<!-- //Begin
var Array0 = new Array(38);
var picsetArray = new Array(0);
var piccapArray = new Array(38);
var groupArray = new Array(0);
var curpx = 0;
var curset = 0;
var inp, numpics, cntr, pccp, grp;
var pxchk0 = 0;
var scrollpos = 0;
var piccount = 8;

function windowOnload() {
	inp = document.getElementById('currentphoto').cbe;
	inr = document.getElementById('innerthumb').cbe;	
	cap = document.getElementById('currentcaption').cbe;
	cntr = cbeGetElementById('counter').cbe;
	pccp = cbeGetElementById('piccap').cbe;
	grp = cbeGetElementById('group').cbe;
	bnb = cbeGetElementById('picshere');
	picsetArray[0] = Array0;
	Array0.length = 38;
	numpics = picsetArray[0].length;
	loadpics();
	loadgroups();
	inr.left(scrollpos);
	display();

}

function display() {
 capchange(0);
 showCount();
 inp.show()
 
}


function notice() {
 alert('This feature coming soon.');
}

function loadgroups() {
	groupArray[0] = "Photo Gallery";
}

function loadpics() {
 
 ply_Img0 = new Image();
 Array0[0] = ply_Img0;
 ply_Img0.src = "images/gallery/ca-3004_a_l.jpg";
 ply_Img0.width = 443;
 ply_Img0.height = 480;
 piccapArray[0] = "NICOLETTE FLORAL CA-3004  Chair Fabric";
  
 ply_Img1 = new Image();
 Array0[1] = ply_Img1;
 ply_Img1.src = "images/gallery/ca-3005_a_l.jpg"; 
 ply_Img1.width = 384;
 ply_Img1.height = 480;
 piccapArray[1] = "ASHLEY ROSETTE CA-3005 Chair, Ottoman & Pillow Fabric";
 
 ply_Img2 = new Image();
 Array0[2] = ply_Img2;
 ply_Img2.src = "images/gallery/ca-3005_b_l.jpg";
 ply_Img2.width = 190;
 ply_Img2.height = 480;
 piccapArray[2] = "ASHLEY ROSETTE CA-3005 Lamp Shade Fabric";
 
 ply_Img3 = new Image();
 Array0[3] = ply_Img3;
 ply_Img3.src = "images/gallery/ca-3005_c_l.jpg";
 ply_Img3.width = 380;
 ply_Img3.height = 480;
 piccapArray[3] = "ASHLEY ROSETTE CA-3005 Pillows Fabric";
 
 ply_Img4 = new Image();
 Array0[4] = ply_Img4;
 ply_Img4.src = "images/gallery/ca-3005_d_l.jpg";
 ply_Img4.width = 330;
 ply_Img4.height = 480;
 piccapArray[4] = "ASHLEY ROSETTE CA-3005 Window Treatment & Sofa Fabric";
 
 ply_Img5 = new Image();
 Array0[5] = ply_Img5;
 ply_Img5.src = "images/gallery/ca-3005_e_l.jpg";
 ply_Img5.width = 348;
 ply_Img5.height = 480;
 piccapArray[5] = "ASHLEY ROSETTE CA-3005 Chair, Ottoman & Pillow Fabric";
 
 ply_Img6 = new Image();
 Array0[6] = ply_Img6;
 ply_Img6.src = "images/gallery/cj-5000_a_l.jpg";
 ply_Img6.width = 398;
 ply_Img6.height = 480;
 piccapArray[6] = "FRANCINE FLORAL CJ-5000 Chair Fabric";
 
 ply_Img7 = new Image();
 Array0[7] = ply_Img7;
 ply_Img7.src = "images/gallery/cj-600_a_l.jpg";
 ply_Img7.width = 480;
 ply_Img7.height = 167;
 piccapArray[7] = "ALL AMERICAN FOLK BOX CJ-600 Wall Fabric Covering";
 
 ply_Img8 = new Image();
 Array0[8] = ply_Img8;
 ply_Img8.src = "images/gallery/cs-1002f_a_l.jpg";
 ply_Img8.width = 480;
 ply_Img8.height = 325;
 piccapArray[8] = "FRENCH FOX CS-1002F  Printed Baby Bedding";
 
 ply_Img9 = new Image();
 Array0[9] = ply_Img9;
 ply_Img9.src = "images/gallery/cs-1002f_b_l.jpg";
 ply_Img9.width = 306;
 ply_Img9.height = 480;
 piccapArray[9] = "FRENCH FOX CS-1002F  Printed Baby Bedding";
 
 ply_Img10 = new Image();
 Array0[10] = ply_Img10;
 ply_Img10.src = "images/gallery/cs-1002f_c_l.jpg";
 ply_Img10.width = 480;
 ply_Img10.height = 436;
 piccapArray[10] = "FRENCH FOX CS-1002F  Printed Baby Bedding";
 
 ply_Img11 = new Image();
 Array0[11] = ply_Img11;
 ply_Img11.src = "images/gallery/dg-1030_a_l.jpg";
 ply_Img11.width = 480;
 ply_Img11.height = 405;
 piccapArray[11] = "ROSETTE FLORAL DG-1030 Fabric Print Chair";
 
 ply_Img12 = new Image();
 Array0[12] = ply_Img12;
 ply_Img12.src = "images/gallery/nk-8005_a_l.jpg";
 ply_Img12.width = 453;
 ply_Img12.height = 480;
 piccapArray[12] = "BLOSSOM NK-8005";
 
 ply_Img13 = new Image();
 Array0[13] = ply_Img13;
 ply_Img13.src = "images/gallery/rt-10000_a_l.jpg";
 ply_Img13.width = 396;
 ply_Img13.height = 480;
 piccapArray[13] = "FLORA BUNDA RT-10000 Duvet & Pillow Fabric";
 
 ply_Img14 = new Image();
 Array0[14] = ply_Img14;
 ply_Img14.src = "images/gallery/rt-10000_b_l.jpg";
 ply_Img14.width = 435;
 ply_Img14.height = 480;
 piccapArray[14] = "FLORA BUNDA RT-10000 Floral Pillow";
 
 ply_Img15 = new Image();
 Array0[15] = ply_Img15;
 ply_Img15.src = "images/gallery/rt-1113_a_l.jpg";
 ply_Img15.width = 445;
 ply_Img15.height = 480;
 piccapArray[15] = "SUMMERS ROSE RT-1113 Curtains & Bed Sheet";
 
 ply_Img16 = new Image();
 Array0[16] = ply_Img16;
 ply_Img16.src = "images/gallery/rt-1113_b_l.jpg";
 ply_Img16.width = 361;
 ply_Img16.height = 480;
 piccapArray[16] = "SUMMERS ROSE RT-1113 Dining Chair Fabric";
 
 ply_Img17 = new Image();
 Array0[17] = ply_Img17;
 ply_Img17.src = "images/gallery/rt-1113_c_l.jpg";
 ply_Img17.width = 480;
 ply_Img17.height = 358;
 piccapArray[17] = "SUMMERS ROSE  RT-1113 Dress Fabric";
 
 ply_Img18 = new Image();
 Array0[18] = ply_Img18;
 ply_Img18.src = "images/gallery/rt-1113_d_l.jpg";
 ply_Img18.width = 470;
 ply_Img18.height = 480;
 piccapArray[18] = "SUMMERS ROSE RT-1113 European Sham Fabric";
 
 ply_Img19 = new Image();
 Array0[19] = ply_Img19;
 ply_Img19.src = "images/gallery/rt-1113_e_l.jpg";
 ply_Img19.width = 384;
 ply_Img19.height = 480;
 piccapArray[19] = "SUMMERS ROSE RT-1113 Slipcover Fabric";
 
 ply_Img20 = new Image();
 Array0[20] = ply_Img20;
 ply_Img20.src = "images/gallery/rt-1113_f_l.jpg";
 ply_Img20.width = 480;
 ply_Img20.height = 255;
 piccapArray[20] = "SUMMERS ROSE RT-1113 Sofa & Pillow Fabric";
 
 ply_Img21 = new Image();
 Array0[21] = ply_Img21;
 ply_Img21.src = "images/gallery/rt-1121_a_l.jpg";
 ply_Img21.width = 382;
 ply_Img21.height = 420;
 piccapArray[21] = "TOILE FRANCAISE RT-1121";
 
 ply_Img22 = new Image();
 Array0[22] = ply_Img22;
 ply_Img22.src = "images/gallery/rt-2004_a_l.jpg";
 ply_Img22.width = 480;
 ply_Img22.width = 320;
 piccapArray[22] = "SOMERSET HILLS RT-2004 Floral Pillow";
 
 ply_Img23 = new Image();
 Array0[23] = ply_Img23;
 ply_Img23.src = "images/gallery/rt-2004_b_l.jpg";
 ply_Img23.width = 328;
 ply_Img23.height = 468;
 piccapArray[23] = "SOMERSET HILLS  RT-2004  Floral Throw Pillow";
 
 ply_Img24 = new Image();
 Array0[24] = ply_Img24;
 ply_Img24.src = "images/gallery/ta-1009_a_l.jpg";
 ply_Img24.width = 480;
 ply_Img24.height = 436;
 piccapArray[24] = "TINA FLORAL TA-1009 Chaise Lounge Fabric";
 
 ply_Img25 = new Image();
 Array0[25] = ply_Img25;
 ply_Img25.src = "images/gallery/tk-8005_a_l.jpg";
 ply_Img25.width = 433;
 ply_Img25.height = 480;
 piccapArray[25] = "TRANQUILTY TK-8005 Printed Chair Fabric";
 
 ply_Img26 = new Image();
 Array0[26] = ply_Img26;
 ply_Img26.src = "images/gallery/wa-1015_a_l.jpg";
 ply_Img26.width = 480;
 ply_Img26.height = 407;
 piccapArray[26] = "DARLINGTON FLORAL WA-1-15 Printed Floral Pillow";
 
 ply_Img27 = new Image();
 Array0[27] = ply_Img27;
 ply_Img27.src = "images/gallery/wa-1015_b_l.jpg";
 ply_Img27.width = 469;
 ply_Img27.height = 395;
 piccapArray[27] = "DARLINGTON FLORAL WA-1015  Printed Pillow";
 
 ply_Img28 = new Image();
 Array0[28] = ply_Img28;
 ply_Img28.src = "images/gallery/wa-1015_c_l.jpg";
 ply_Img28.width = 418;
 ply_Img28.height = 480;
 piccapArray[28] = "DARLINGTON  WA-1015 Floral Curtains";
 
 ply_Img29 = new Image();
 Array0[29] = ply_Img29;
 ply_Img29.src = "images/gallery/wa-1015_d_l.jpg";
 ply_Img29.width = 480;
 ply_Img29.height = 368;
 piccapArray[29] = "DARLINGTON WA-1015  Floral Sofa Fabric";
 
 ply_Img30 = new Image();
 Array0[30] = ply_Img30;
 ply_Img30.src = "images/gallery/wa-1015_rt-1113_l.jpg";
 ply_Img30.width = 379;
 ply_Img30.height = 424;
 piccapArray[30] = "DARLINGTON WA-1015 SUMMERS, ROSE RT-1113";
 
 ply_Img31 = new Image();
 Array0[31] = ply_Img31;
 ply_Img31.src = "images/gallery/wa-3021_a_l.jpg";
 ply_Img31.width = 377;
 ply_Img31.width = 439;
 piccapArray[31] = "KAREN FLORAL WA-3021  Smock Fabric";
 
 ply_Img32 = new Image();
 Array0[32] = ply_Img32;
 ply_Img32.src = "images/gallery/wa-3026_a_l.jpg";
 ply_Img32.width = 480;
 ply_Img32.height = 465;
 piccapArray[32] = "BENTLEY FLORAL WA-3026";
 
 ply_Img33 = new Image();
 Array0[33] = ply_Img33;
 ply_Img33.src = "images/gallery/wa-4022_a_l.jpg";
 ply_Img33.width = 480;
 ply_Img33.height = 335;
 piccapArray[33] = "KINGS MUIR WA-4022 Dining Chair Fabric";
 
 ply_Img34 = new Image();
 Array0[34] = ply_Img34;
 ply_Img34.src = "images/gallery/wa-4022_b_l.jpg";
 ply_Img34.width = 480;
 ply_Img34.height = 468;
 piccapArray[34] = "KINGS MUIR WA-4022 European Floral Sham";
 
 ply_Img35 = new Image();
 Array0[35] = ply_Img35;
 ply_Img35.src = "images/gallery/wa-4022_c_l.jpg";
 ply_Img35.width = 393;
 ply_Img35.height = 480;
 piccapArray[35] = "KINGS MUIR WA-4022 Side Chairs";
 
 ply_Img36 = new Image();
 Array0[36] = ply_Img36;
 ply_Img36.src = "images/gallery/wa-6013_a_l.jpg";
 ply_Img36.width = 440;
 ply_Img36.height = 430;
 piccapArray[36] = "TURNBERRY TOILE WA-6013 Chair Fabric";
 
 ply_Img37 = new Image();
 Array0[37] = ply_Img37;
 ply_Img37.src = "images/gallery/wa-6020_a_l.jpg";
 ply_Img37.width = 480;
 ply_Img37.height = 284;
 piccapArray[37] = "BRADWELL BANDANA WA-6020 Sofa Fabric";
 
 ply_Img38 = new Image();
 Array0[38] = ply_Img38;
 ply_Img38.src = "images/gallery/wa-7002_a_l.jpg";
 ply_Img38.width = 480;
 ply_Img38.height = 398;
 piccapArray[38] = "PORTOBELLO STRIPE WA-7002 Duvet Cover, Shams & Pillows";
 
 pxchk0 = 1;
}

function chgpic(x) {
 //curpx = curpx +1;
 curpx = x;
 if(curpx > numpics) {
  curpx = 0;
  }
 inp.hide();
 bnb.src = picsetArray[curset][curpx].src;
 bnb.width = picsetArray[curset][curpx].width;
 //pccp.width = picsetArray[curset][curpx].width;
 //cap.width = picsetArray[curset][curpx].width; 
 bnb.height = picsetArray[curset][curpx].height;
 inp.show();
 showCount();
}

function bckpic() {
 curpx = curpx -1;
 if(curpx < 0) {
  curpx = numpics;
  }
 inp.hide(); 
 bnb.width = picsetArray[curset][curpx].width;
 bnb.src = picsetArray[curset][curpx].src;
 inp.show();
 showCount();
}

function showCount() {
  var tt= (curpx + 1) + " of " + (numpics + 1); 
  var xx= piccapArray[curpx];
  cntr.hide();
 // cntr.moveTo(anc1.pageX() + 428,anc1.pageY() + my2);
  if (is.nav4) tt = "<span class='nnCounter'>" + tt + "<\/span>";
  cntr.innerHtml(tt);
  cntr.show();
  pccp.innerHtml(xx);
  pccp.show();
}

function capchange(x) {
	//var cc= groupArray[x];
	//grp.hide();
  	//grp.innerHtml(cc);
  	//grp.show();
}

function chgset(x) {
  
 if(pxchk[x]==0) {
  if(x==0) {
   loadpics0();
  }
  if(x==1) {
   loadpics1();
  }
  if(x==2) {
   loadpics2();
  }
  if(x==3) {
   loadpics3();
  }
  if(x==4) {
   loadpics4();
  }
  if(x==5) {
   loadpics5();
  }
  
 }
 curset = x;
 numpics = picsetArray[x].length;
 curpx = numpics;
 chgpic();
 capchg();
 }
 
 
 function scroleft() {
	//alert(scrollpos);
	if (scrollpos<=4) {
	 inr.slideBy(-728, 0, 1000);
	 scrollpos = (scrollpos+1);
	}	
	
 }
 
  function scroright() {
	//alert(scrollpos);
	if (scrollpos>0) {
	inr.slideBy(728, 0, 1000);
	scrollpos = (scrollpos-1);	
	}
	
 
 }

// End -->
