var selectedColor=new Array(6);selectedColor[0]="";selectedColor[1]="";selectedColor[2]="";selectedColor[3]="";selectedColor[4]="";selectedColor[5]="";var NS4=(document.layers)?true:false;var IE4=(document.all)?true:false;var IE5=false;var GECKO=false;if(IE4){if(navigator.userAgent.indexOf("MSIE 5")>0){IE5=true}}if(navigator.userAgent.indexOf("Gecko")!=-1){GECKO=true}function rollDesc(desc,divID){var myLyr="swatchDesc"+divID;if(IE4){myLyr=eval(myLyr);myLyr.innerHTML="COLOR:&nbsp;"+desc}else{if(GECKO){document.getElementById(myLyr).innerHTML=desc}else{}}}function rollText(divID,mystyle){var myLyr="TextDesc"+divID;var myLyr2="ItemDesc"+divID;if(IE4){myLyr=eval(myLyr);myLyr2=eval(myLyr2);myLyr.style.textDecoration=mystyle;myLyr2.style.textDecoration=mystyle}else{if(GECKO){document.getElementById(myLyr).style.textDecoration=mystyle;document.getElementById(myLyr2).style.textDecoration=mystyle}else{}}}function swapSwatchImage(d,j,e,b,i,c,h,f){document.images["primaryImage_"+j].src=d;if(b){var a=e.split("-");var k=a[1];var g=new Image()}}function swapPrimarySwatchImage(imageURL,imageID,prnbr,isSaico,index,blockId,desc,dispMode){document.images["primaryImage_"+imageID].src=imageURL;var myLyr="primaryDesc";if(IE4){myLyr=eval(myLyr);myLyr.innerHTML="COLOR:&nbsp;"+desc}else{if(GECKO){document.getElementById(myLyr).innerHTML="COLOR:&nbsp;"+desc}else{}}}function moveElement(c,a,b){if(document.getElementById){document.getElementById(c).style.left=a+"px";document.getElementById(c).style.top=b+"px"}}function showElement(a){if(document.getElementById){if(document.getElementById(a)){document.getElementById(a).style.visibility="visible"}}}function hideElement(a){if(document.getElementById){if(document.getElementById(a)){document.getElementById(a).style.visibility="hidden"}}}function swapHtml(b,a){if(document.getElementById){if(document.getElementById(b)){document.getElementById(b).innerHTML=a}}}function moveSwatch(c,e,d,b,a){moveSwatchOriginal(c,e,d,b,a)}function moveSwatchOriginal(d,f,e,b,a){sCont=document.getElementById("colorcontainer");sBCont=document.getElementById("content");sContTop=sCont.offsetTop+sBCont.offsetTop;sContLeft=sCont.offsetLeft+sBCont.offsetLeft;sContWidth=sCont.offsetWidth;sContRight=sContLeft+sContWidth;sBox=document.getElementById("SwatchBox");sBoxTop=sBox.offsetTop;sBoxLeft=sBox.offsetLeft;sBoxWidth=sBox.offsetWidth;sBoxHeight=sBox.offsetHeight;sBoxNewLeft=sContLeft+(f.offsetLeft+(f.offsetWidth/2))-(sBoxWidth/2);sBoxNewRight=sBoxNewLeft+(sBoxWidth);if((sBoxNewLeft)<(sContLeft)){sbPosLeft=sContLeft}else{if((sBoxNewRight)>(sContRight)){sbPosLeft=sContRight-sBoxWidth-4}else{sbPosLeft=sBoxNewLeft}}imgTag='<img src="'+b+'">';imgURL=b;showSwatch(d);var c=document.getElementById("DivShim");c.style.width=sBox.offsetWidth;c.style.height=sBox.offsetHeight;c.style.top=sBox.style.top;c.style.left=sBox.style.left;c.style.zIndex=999;moveElement("DivShim",sbPosLeft,sContTop-sBoxHeight-1);moveElement("SwatchBox",sbPosLeft,sContTop-sBoxHeight-1);swapHtml("SwatchBoxColorDesc",e);if(a){swapHtml("SwatchBoxAction","click to change color in photo.")}else{swapHtml("SwatchBoxAction","")}swapHtml("SwatchBoxImg",imgTag)}function moveSwatchWide(f,i,c,d,b){sCont=document.getElementById("swatchContainer"+f);sBCont=document.getElementById("bodycontainer");var h=getPosition(sBCont);var e=getPosition(i);var g=getPosition(sCont);sContTop=sCont.offsetTop+sBCont.offsetTop;sContLeft=sCont.offsetLeft+sBCont.offsetLeft;sContWidth=sCont.offsetWidth;sContRight=sContLeft+sContWidth;sBox=document.getElementById("SwatchBox");sBoxTop=sBox.offsetTop;sBoxLeft=sBox.offsetLeft;sBoxWidth=sBox.offsetWidth;sBoxHeight=sBox.offsetHeight;sBoxNewRight=e.x+sBoxWidth;sBoxNewLeft=sCont.offsetLeft-sBCont.offsetLeft+(i.offsetLeft+(i.offsetWidth/2))-(sBoxWidth/2);if(e.x!=g.x){e.x=g.x+11}imgTag='<img src="'+skinURL+d+'.jpg">';imgURL=skinURL+d+".jpg";showSwatch(f);var a=document.getElementById("DivShim");a.style.width=sBox.offsetWidth;a.style.height=sBox.offsetHeight;a.style.top=sBox.style.top;a.style.left=sBox.style.left;a.style.zIndex=999;moveElement("DivShim",e.x,sCont.offsetTop-sBoxHeight);moveElement("SwatchBox",e.x,sCont.offsetTop-sBoxHeight);swapHtml("SwatchBoxColorDesc",c);if(b){swapHtml("SwatchBoxAction","click to change color in photo.")}else{swapHtml("SwatchBoxAction","")}swapHtml("SwatchBoxImg",imgTag)}dispSwatch=false;function hideSwatch(a){dispSwatch=false;setTimeout("doHideSwatch()",100)}function doHideSwatch(b){if(!dispSwatch){var a=document.getElementById("DivShim");a.style.display="none";hideElement("SwatchBox")}}function showSwatch(b){dispSwatch=true;var a=document.getElementById("DivShim");a.style.display="block";showElement("SwatchBox")}function unscale(b,a){element=document.getElementById(b);hideSwatch(0)}function scale(c,a){element=document.getElementById(c);var b=myImages[a+"-b"];moveSwatch(0,element,a,b,false)};
