imgPath="http://images.helzberg.com/images/en_US/local/page_specific/home/101909/";

rot1="home10_19_09rot1i.jpg";
rot2="home10_19_09rot2i.jpg";
rot3="home10_19_09rot3i.jpg";
rot4="home10_19_09rot4i.jpg";

rev1a="home10_19_09rot1aWtext.jpg";
rev2a="home10_19_09rot2aWtext.jpg";
rev3a="home10_19_09rot3aWtext.jpg";
rev4a="home10_19_09rot4aWtext.jpg";

rev1b="home10_19_09rot1bWtext.jpg";
rev2b="home10_19_09rot2bWtext.jpg";
rev3b="home10_19_09rot3bWtext.jpg";
rev4b="home10_19_09rot4bWtext.jpg";

rev1c="home10_19_09rot1c.jpg";
rev2c="home10_19_09rot2c.jpg";
rev3c="home10_19_09rot3c.jpg";
rev4c="home10_19_09rot4c.jpg";

rev1d="home10_19_09rot1d.jpg";
rev2d="home10_19_09rot2d.jpg";
rev3d="home10_19_09rot3d.jpg";
rev4d="home10_19_09rot4d.jpg";

rev1e="home10_19_09rot1e.jpg";
rev2e="home10_19_09rot2e.jpg";
rev3e="home10_19_09rot3e.jpg";
rev4e="home10_19_09rot4e.jpg";

rev1f="home10_19_09rot1f.jpg";
rev2f="home10_19_09rot2f.jpg";
rev3f="home10_19_09rot3f.jpg";
rev4f="home10_19_09rot4f.jpg";

rev1g="home10_19_09rot1g.jpg";
rev2g="home10_19_09rot2g.jpg";
rev3g="home10_19_09rot3g.jpg";
rev4g="home10_19_09rot4g.jpg";

rev1h="home10_19_09rot1h.jpg";
rev2h="home10_19_09rot2h.jpg";
rev3h="home10_19_09rot3h.jpg";
rev4h="home10_19_09rot4h.jpg";

thumb1on="home10_19_09thumb1On.jpg";
thumb1off="home10_19_09thumb1Off.jpg";
thumb2on="home10_19_09thumb2On.jpg";
thumb2off="home10_19_09thumb2Off.jpg";
thumb3on="home10_19_09thumb3On.jpg";
thumb3off="home10_19_09thumb3Off.jpg";
thumb4on="home10_19_09thumb4On.jpg";
thumb4off="home10_19_09thumb4Off.jpg";


theimage = new Array();

theimage[0]=[imgPath + rot1, "#Map2", imgPath + rev1a, "#Map0", imgPath + rev1b, "#Map1", imgPath + rev1c, imgPath + rev1d, imgPath + rev1e, imgPath + rev1f, imgPath + rev1g, imgPath + rev1h, "#Map3"];

theimage[1]=[imgPath + rot2, "#Map4", imgPath + rev2a, "#Map0", imgPath + rev2b, "#Map1", imgPath + rev2c, imgPath + rev2d, imgPath + rev2e, imgPath + rev2f, imgPath + rev2g, imgPath + rev2h, "#Map5"];

theimage[2]=[imgPath + rot3, "#Map6", imgPath + rev3a, "#Map0", imgPath + rev3b, "#Map1", imgPath + rev3c, imgPath + rev3d, imgPath + rev3e, imgPath + rev3f, imgPath + rev3g, imgPath + rev3h, "#Map7"];

theimage[3]=[imgPath + rot4, "#Map8", imgPath + rev4a, "#Map0", imgPath + rev4b, "#Map1", imgPath + rev4c, imgPath + rev4d, imgPath + rev4e, imgPath + rev4f, imgPath + rev4g, imgPath + rev4h, "#Map9"];


///// Plugin variables

playspeed=7000;// The playspeed determines the delay in ms
playspeedMan=8500;// The playspeed determines the delay in ms


dotrans=1; // if value = 1 then there are transitions played in IE
transtype='blendTrans';// 'blend Transition' 
transattributes='23';// duration=seconds,transition=#<24
//#####
//array index
i=0;


//###########################################
window.onload=function(){

	//preload images into browser
	preloadSlide();

	//set transitions
	GetTrans();

	//set the first slide
	SetSlide(0);

	//autoplay
	PlaySlide();
}

//###########################################
function SetSlide(num) {
	//too big
	i=num%theimage.length;
	//too small
	if(i<0)i=theimage.length-1;
		if(i == 0){
				document.smImgOne.src= imgPath + thumb1on;
				document.smImgTwo.src= imgPath + thumb2off;
				document.smImgThree.src= imgPath + thumb3off;
				document.smImgFour.src= imgPath + thumb4off;
			}else if(i == 1){
				document.smImgOne.src= imgPath + thumb1off;
				document.smImgTwo.src= imgPath + thumb2on;
				document.smImgThree.src= imgPath + thumb3off;
				document.smImgFour.src= imgPath + thumb4off;
			}else if(i == 2){
				document.smImgOne.src= imgPath + thumb1off;
				document.smImgTwo.src= imgPath + thumb2off;
				document.smImgThree.src= imgPath + thumb3on;
				document.smImgFour.src= imgPath + thumb4off;
			}else if(i == 3){
				document.smImgOne.src= imgPath + thumb1off;
				document.smImgTwo.src= imgPath + thumb2off;
				document.smImgThree.src= imgPath + thumb3off;
				document.smImgFour.src= imgPath + thumb4on;
			}
	//switch the image
	if(document.all&&!window.opera&&dotrans==1)eval('document.images.imgslide.filters.'+transtype+'.Apply()')
	if(document.all&&!window.opera&&dotrans==1)eval('document.images.imgslidereviewA.filters.'+transtype+'.Apply()')
	if(document.all&&!window.opera&&dotrans==1)eval('document.images.imgslidereviewB.filters.'+transtype+'.Apply()')
	if(document.all&&!window.opera&&dotrans==1)eval('document.images.imgslidereviewC.filters.'+transtype+'.Apply()')
	if(document.all&&!window.opera&&dotrans==1)eval('document.images.imgslidereviewD.filters.'+transtype+'.Apply()')
	if(document.all&&!window.opera&&dotrans==1)eval('document.images.imgslidereviewE.filters.'+transtype+'.Apply()')
	if(document.all&&!window.opera&&dotrans==1)eval('document.images.imgslidereviewF.filters.'+transtype+'.Apply()')
	if(document.all&&!window.opera&&dotrans==1)eval('document.images.imgslidereviewG.filters.'+transtype+'.Apply()')
	if(document.all&&!window.opera&&dotrans==1)eval('document.images.imgslidereviewH.filters.'+transtype+'.Apply()')

	
	document.images.imgslide.src=theimage[i][0];
	document.images.imgslide.useMap=theimage[i][1];
	document.images.imgslidereviewA.src=theimage[i][2];
	document.images.imgslidereviewA.useMap=theimage[i][3];
	
	document.images.imgslidereviewB.src=theimage[i][4];
	document.images.imgslidereviewB.useMap=theimage[i][5];
	document.images.imgslidereviewC.src=theimage[i][6];
	document.images.imgslidereviewD.src=theimage[i][7];
	document.images.imgslidereviewE.src=theimage[i][8];
	document.images.imgslidereviewF.src=theimage[i][9];
	document.images.imgslidereviewG.src=theimage[i][10];
	document.images.imgslidereviewH.src=theimage[i][11];
	document.images.imgslidereviewH.useMap=theimage[i][12];
	

	
	if(document.all&&!window.opera&&dotrans==1)eval('document.images.imgslide.filters.'+transtype+'.Play()')
	if(document.all&&!window.opera&&dotrans==1)eval('document.images.imgslidereviewA.filters.'+transtype+'.Play()')
	if(document.all&&!window.opera&&dotrans==1)eval('document.images.imgslidereviewB.filters.'+transtype+'.Play()')
	if(document.all&&!window.opera&&dotrans==1)eval('document.images.imgslidereviewC.filters.'+transtype+'.Play()')
	if(document.all&&!window.opera&&dotrans==1)eval('document.images.imgslidereviewD.filters.'+transtype+'.Play()')
	if(document.all&&!window.opera&&dotrans==1)eval('document.images.imgslidereviewE.filters.'+transtype+'.Play()')
	if(document.all&&!window.opera&&dotrans==1)eval('document.images.imgslidereviewF.filters.'+transtype+'.Play()')
	if(document.all&&!window.opera&&dotrans==1)eval('document.images.imgslidereviewG.filters.'+transtype+'.Play()')
	if(document.all&&!window.opera&&dotrans==1)eval('document.images.imgslidereviewH.filters.'+transtype+'.Play()')

}


function SetSlideMan(num) {
	PlaySlideMan();

	//too big
	i=num%theimage.length;
	//too small
	if(i<0)i=theimage.length-1;
		if(i == 0){
				document.smImgOne.src= imgPath + thumb1on;
				document.smImgTwo.src= imgPath + thumb2off;
				document.smImgThree.src= imgPath + thumb3off;
				document.smImgFour.src= imgPath + thumb4off;
			}else if(i == 1){
				document.smImgOne.src= imgPath + thumb1off;
				document.smImgTwo.src= imgPath + thumb2on;
				document.smImgThree.src= imgPath + thumb3off;
				document.smImgFour.src= imgPath + thumb4off;
			}else if(i == 2){
				document.smImgOne.src= imgPath + thumb1off;
				document.smImgTwo.src= imgPath + thumb2off;
				document.smImgThree.src= imgPath + thumb3on;
				document.smImgFour.src= imgPath + thumb4off;
			}else if(i == 3){
				document.smImgOne.src= imgPath + thumb1off;
				document.smImgTwo.src= imgPath + thumb2off;
				document.smImgThree.src= imgPath + thumb3off;
				document.smImgFour.src= imgPath + thumb4on;
			}
	//switch the image
	if(document.all&&!window.opera&&dotrans==1)eval('document.images.imgslide.filters.'+transtype+'.Apply()')
	if(document.all&&!window.opera&&dotrans==1)eval('document.images.imgslidereviewA.filters.'+transtype+'.Apply()')
	if(document.all&&!window.opera&&dotrans==1)eval('document.images.imgslidereviewB.filters.'+transtype+'.Apply()')
	if(document.all&&!window.opera&&dotrans==1)eval('document.images.imgslidereviewC.filters.'+transtype+'.Apply()')
	if(document.all&&!window.opera&&dotrans==1)eval('document.images.imgslidereviewD.filters.'+transtype+'.Apply()')
	if(document.all&&!window.opera&&dotrans==1)eval('document.images.imgslidereviewE.filters.'+transtype+'.Apply()')
	if(document.all&&!window.opera&&dotrans==1)eval('document.images.imgslidereviewF.filters.'+transtype+'.Apply()')
	if(document.all&&!window.opera&&dotrans==1)eval('document.images.imgslidereviewG.filters.'+transtype+'.Apply()')
	if(document.all&&!window.opera&&dotrans==1)eval('document.images.imgslidereviewH.filters.'+transtype+'.Apply()')

	
	document.images.imgslide.src=theimage[i][0];
	document.images.imgslide.useMap=theimage[i][1];
	document.images.imgslidereviewA.src=theimage[i][2];
	document.images.imgslidereviewA.useMap=theimage[i][3];
	
	document.images.imgslidereviewB.src=theimage[i][4];
	document.images.imgslidereviewB.useMap=theimage[i][5];
	document.images.imgslidereviewC.src=theimage[i][6];
	document.images.imgslidereviewD.src=theimage[i][7];
	document.images.imgslidereviewE.src=theimage[i][8];
	document.images.imgslidereviewF.src=theimage[i][9];
	document.images.imgslidereviewG.src=theimage[i][10];
	document.images.imgslidereviewH.src=theimage[i][11];
	document.images.imgslidereviewH.useMap=theimage[i][12];
	

	
	if(document.all&&!window.opera&&dotrans==1)eval('document.images.imgslide.filters.'+transtype+'.Play()')
	if(document.all&&!window.opera&&dotrans==1)eval('document.images.imgslidereviewA.filters.'+transtype+'.Play()')
	if(document.all&&!window.opera&&dotrans==1)eval('document.images.imgslidereviewB.filters.'+transtype+'.Play()')
	if(document.all&&!window.opera&&dotrans==1)eval('document.images.imgslidereviewC.filters.'+transtype+'.Play()')
	if(document.all&&!window.opera&&dotrans==1)eval('document.images.imgslidereviewD.filters.'+transtype+'.Play()')
	if(document.all&&!window.opera&&dotrans==1)eval('document.images.imgslidereviewE.filters.'+transtype+'.Play()')
	if(document.all&&!window.opera&&dotrans==1)eval('document.images.imgslidereviewF.filters.'+transtype+'.Play()')
	if(document.all&&!window.opera&&dotrans==1)eval('document.images.imgslidereviewG.filters.'+transtype+'.Play()')
	if(document.all&&!window.opera&&dotrans==1)eval('document.images.imgslidereviewH.filters.'+transtype+'.Play()')

	//autoplay
	PlaySlideMan();

}


//###########################################
function PlaySlide() {
	if (!window.playing) {
		PlayingSlide(i+1);
		if(document.slideshow.play){
			document.slideshow.play.value="   Stop   ";
			document.images.imgslide.useMap=theimage[i][1];
			document.images.imgslidereviewA.useMap=theimage[i][3];
			document.images.imgslidereviewB.useMap=theimage[i][5];
			document.images.imgslidereviewH.useMap=theimage[i][12];
		}
	}
	else {
		playing=clearTimeout(playing);
		if(document.slideshow.play){
			document.slideshow.play.value="   Play   ";
		}
	}
	// if you have to change the image for the "playing" slide
	if(document.images.imgPlay){
		setTimeout('document.images.imgPlay.src="'+imgStop+'"',1);
		imgStop=document.images.imgPlay.src
	}
}

//###########################################
function PlaySlideMan() {
	if (!window.playing) {
		PlayingSlideMan(i+1);
		if(document.slideshow.play){
			document.slideshow.play.value="   Stop   ";
		}
	}
	else {
		playing=clearTimeout(playing);
		if(document.slideshow.play){
			document.slideshow.play.value="   Play   ";
		}
	}
	// if you have to change the image for the "playing" slide
	if(document.images.imgPlay){
		setTimeout('document.images.imgPlay.src="'+imgStop+'"',1);
		imgStop=document.images.imgPlay.src
	}
}


//###########################################
function PlayingSlide(num) {
	playing=setTimeout('PlayingSlide(i+1);SetSlide(i+1);', playspeed);
}

//###########################################
function PlayingSlideMan(num) {
	playing=setTimeout('PlayingSlideMan(i+1);SetSlide(i+1);', playspeedMan);
}

//###########################################
//desc: picks the transition to apply to the images
function GetTrans() {
	//si=document.slideshow.trans.selectedIndex;
		if((document.slideshow.trans && document.slideshow.trans.selectedIndex == 0) || (!document.slideshow.trans && dotrans==0)){
		dotrans=0;
	}
	else if ((document.slideshow.trans && document.slideshow.trans.selectedIndex == 1) || (!document.slideshow.trans && transtype == 'blendTrans')){
		dotrans=1;
		transtype='blendTrans';
		document.imgslide.style.filter = "blendTrans(duration=1,transition=1)";
		document.imgslidereviewA.style.filter = "blendTrans(duration=1,transition=1)";
		document.imgslidereviewB.style.filter = "blendTrans(duration=1,transition=1)";
		document.imgslidereviewC.style.filter = "blendTrans(duration=1,transition=1)";
		document.imgslidereviewD.style.filter = "blendTrans(duration=1,transition=1)";
		document.imgslidereviewE.style.filter = "blendTrans(duration=1,transition=1)";
		document.imgslidereviewF.style.filter = "blendTrans(duration=1,transition=1)";
		document.imgslidereviewG.style.filter = "blendTrans(duration=1,transition=1)";
		document.imgslidereviewH.style.filter = "blendTrans(duration=1,transition=1)";
	}

}


//###########################################
function preloadSlide() {
	for(k=0;k<theimage.length;k++) {
		theimage[k][0]=new Image().src=theimage[k][0];
	}
	for(k=0;k<theimage.length;k++) {
		theimage[k][2]=new Image().src=theimage[k][2];
	}
}

function lightup(imageobject, opacity){
 if (navigator.appName.indexOf("Netscape")!=-1
  &&parseInt(navigator.appVersion)>=5)
    imageobject.style.MozOpacity=opacity/100
 else if (navigator.appName.indexOf("Microsoft")!= -1 
  &&parseInt(navigator.appVersion)>=4)
    imageobject.filters.alpha.opacity=opacity
}