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

rev1c="home_1_16_10fs01cRot1.jpg";
rev2c="home_1_16_10fs01cRot2.jpg";
rev3c="home_1_16_10fs01cRot3.jpg";
rev4c="home_1_16_10fs01cRot4v3.jpg";

rev1d="home_1_16_10fs01dRot1.jpg";
rev2d="home_1_16_10fs01dRot2.jpg";
rev3d="home_1_16_10fs01dRot3.jpg";
rev4d="home_1_16_10fs01dRot4.jpg";

rev1e="home_1_16_10fs01eRot1.jpg";
rev2e="home_1_16_10fs01eRot2.jpg";
rev3e="home_1_16_10fs01eRot3.jpg";
rev4e="home_1_16_10fs01eRot4.jpg";

rev1f="home_1_16_10fs01fRot1.jpg";
rev2f="home_1_16_10fs01fRot2.jpg";
rev3f="home_1_16_10fs01fRot3.jpg";
rev4f="home_1_16_10fs01fRot4.jpg";

rev1g="home_1_16_10fs01gRot1.jpg";
rev2g="home_1_16_10fs01gRot2.jpg";
rev3g="home_1_16_10fs01gRot3.jpg";
rev4g="home_1_16_10fs01gRot4.jpg";

rev1h="home_1_16_10fs01hRot1.jpg";
rev2h="home_1_16_10fs01hRot2.jpg";
rev3h="home_1_16_10fs01hRot3.jpg";
rev4h="home_1_16_10fs01hRot4.jpg";

rev1i="home_1_16_10fs01iRot1.jpg";
rev2i="home_1_16_10fs01iRot2.jpg";
rev3i="home_1_16_10fs01iRot3.jpg";
rev4i="home_1_16_10fs01iRot4v2.jpg";


thumb1on="home_1_16_10thumb1on.jpg";
thumb1off="home_1_16_10thumb1off.jpg";
thumb2on="home_1_16_10thumb2on.jpg";
thumb2off="home_1_16_10thumb2off.jpg";
thumb3on="home_1_16_10thumb3on.jpg";
thumb3off="home_1_16_10thumb3off.jpg";
thumb4on="home_1_16_10thumb4on.jpg";
thumb4off="home_1_16_10thumb4off.jpg";


theimage = new Array();

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

theimage[1]=[imgPath + rev2c, "#Map4", imgPath + rev2d, "#Map5", imgPath + rev2e, imgPath + rev2f, imgPath + rev2g, imgPath + rev2h, "#Map6", imgPath + rev2i, "#Map7"];

theimage[2]=[imgPath + rev3c, "#Map8", imgPath + rev3d, "#Map9", imgPath + rev3e, imgPath + rev3f, imgPath + rev3g, imgPath + rev3h, "#Map10", imgPath + rev3i, "#Map11"];

theimage[3]=[imgPath + rev4c, "#Map12", imgPath + rev4d, "#Map13", imgPath + rev4e, imgPath + rev4f, imgPath + rev4g, imgPath + rev4h, "#Map14", imgPath + rev4i, "#Map15"];


///// 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;
			}

	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()')
	if(document.all&&!window.opera&&dotrans==1)eval('document.images.imgslidereviewI.filters.'+transtype+'.Apply()')
	
	document.images.imgslidereviewC.src=theimage[i][0];
	document.images.imgslidereviewC.useMap=theimage[i][1];
	
	document.images.imgslidereviewD.src=theimage[i][2];
	document.images.imgslidereviewD.useMap=theimage[i][3];
	
	document.images.imgslidereviewE.src=theimage[i][4];
	document.images.imgslidereviewF.src=theimage[i][5];
	document.images.imgslidereviewG.src=theimage[i][6];
	
	document.images.imgslidereviewH.src=theimage[i][7];
	document.images.imgslidereviewH.useMap=theimage[i][8];
	
	document.images.imgslidereviewI.src=theimage[i][9];
	document.images.imgslidereviewI.useMap=theimage[i][10];
	

	
	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()')
	if(document.all&&!window.opera&&dotrans==1)eval('document.images.imgslidereviewI.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;
			}
	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()')
	if(document.all&&!window.opera&&dotrans==1)eval('document.images.imgslidereviewI.filters.'+transtype+'.Apply()')
	
	document.images.imgslidereviewC.src=theimage[i][0];
	document.images.imgslidereviewC.useMap=theimage[i][1];
	
	document.images.imgslidereviewD.src=theimage[i][2];
	document.images.imgslidereviewD.useMap=theimage[i][3];
	
	document.images.imgslidereviewE.src=theimage[i][4];
	document.images.imgslidereviewF.src=theimage[i][5];
	document.images.imgslidereviewG.src=theimage[i][6];
	
	document.images.imgslidereviewH.src=theimage[i][7];
	document.images.imgslidereviewH.useMap=theimage[i][8];
	
	document.images.imgslidereviewI.src=theimage[i][9];
	document.images.imgslidereviewI.useMap=theimage[i][10];
	

	
	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()')
	if(document.all&&!window.opera&&dotrans==1)eval('document.images.imgslidereviewI.filters.'+transtype+'.Play()')

	//autoplay
	PlaySlideMan();

}


//###########################################
function PlaySlide() {
	if (!window.playing) {
		PlayingSlide(i+1);
		if(document.slideshow.play){
			document.slideshow.play.value="   Stop   ";
			document.images.imgslidereviewC.useMap=theimage[i][1];
			document.images.imgslidereviewD.useMap=theimage[i][3];
			document.images.imgslidereviewH.useMap=theimage[i][8];
			document.images.imgslidereviewI.useMap=theimage[i][10];
		}
	}
	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.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)";
		document.imgslidereviewI.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
}