function getPreviewObject(){return document.getElementById?document.getElementById("previewImage_div").style:void 0}function getPreviewObjectNoStyle(){return document.getElementById?document.getElementById("previewImage_div"):void 0}function truebody(){return!window.opera&&document.compatMode&&"BackCompat"!=document.compatMode&&-1==navigator.userAgent.indexOf("Chrome")&&-1==navigator.userAgent.indexOf("Safari")?document.documentElement:document.body}function stopPreview(){getPreviewObject().display="none",document.onmousemove="",getPreviewObject().left="-500px",clearTimeout(timer),clearTimeout(timer2)}function startPreview(e,o,n,r){i=e,t=o,w=n,h=r,timer=setTimeout("show('"+i+"',t,w,h);",50)}function startPreviewX(e,o,n,r,a){i=e,t=o,w=n,h=r,p=a,timer=setTimeout("show2('"+i+"',t,w,h,p);",50)}function show(e,t,i,o){var n=document.all?truebody().scrollLeft+truebody().clientWidth:pageXOffset+window.innerWidth-offsetfrommouse[0],r=document.all?Math.min(truebody().scrollHeight,truebody().clientHeight):Math.min(window.innerHeight);if((-1==navigator.userAgent.indexOf("Konqueror")||-1!=navigator.userAgent.indexOf("Firefox")||-1==navigator.userAgent.indexOf("Opera")&&-1!=navigator.appVersion.indexOf("MSIE"))&&n>650&&r>500){0==i?i=defaultimagewidth:"",0==o?o=defaultimageheight:"",i+=0,o-=20,defaultimageheight=o,defaultimagewidth=i,document.onmousemove=followmouse;var a=o+500;$("img[hoveropt]").length>0?(newHTML='
',newHTML=newHTML+'
'+e+"
"):(newHTML='
',newHTML=newHTML+'
'),newHTML+="
",-1!=navigator.userAgent.indexOf("MSIE")&&-1==navigator.userAgent.indexOf("Opera")&&(newHTML=newHTML+'
'),getPreviewObjectNoStyle().innerHTML=newHTML,getPreviewObject().display="block"}}function rearrange(e,t){var i=t.split("/"),o=i[2],n=i[4],r=!1;if($("#imagedata-"+e).length>0){r=!0;var a=$("#imagedata-"+e).val().split(","),d=a.length,l=d-1,s=0;for(var m in a)a[m]==n&&(s=parseInt(m)+1,$("#hho-"+e).attr("src",t),$("#hho-"+e).attr("next",s),$("#hho-"+e).load(function(){$("#hhoc-"+e).html($(this).attr("next"))}));s>l&&(s=0),s=parseInt(s);var t="http://"+o+"/Products/"+a[s];timer2=window.setTimeout(function(){rearrange(e,t)},2e3)}}function show2(e,t,i,o,n){var r=e.split("/"),a=r[2],d=r[4],l=!1;if($("#imagedata-"+n).length>0){l=!0;var s=$("#imagedata-"+n).val().split(","),m=s.length,g=m-1,u=0,v=1;for(var c in s)s[c]==d&&(u=parseInt(c)+1,v=parseInt(c)+1);u>g&&(u=0),u=parseInt(u);var p="http://"+a+"/Products/"+s[u]}var f=document.all?truebody().scrollLeft+truebody().clientWidth:pageXOffset+window.innerWidth-offsetfrommouse[0],h=document.all?Math.min(truebody().scrollHeight,truebody().clientHeight):Math.min(window.innerHeight);if((-1==navigator.userAgent.indexOf("Konqueror")||-1!=navigator.userAgent.indexOf("Firefox")||-1==navigator.userAgent.indexOf("Opera")&&-1!=navigator.appVersion.indexOf("MSIE"))&&f>650&&h>500){0==i?i=defaultimagewidth:"",0==o?o=defaultimageheight:"",i+=0,o-=20,defaultimageheight=o,defaultimagewidth=i,document.onmousemove=followmouse;var w=o+500;newHTML='
',newHTML=newHTML+'

',l&&(newHTML=newHTML+'
Image '+v+" / "+m+"
"),newHTML+="
",-1!=navigator.userAgent.indexOf("MSIE")&&-1==navigator.userAgent.indexOf("Opera")&&(newHTML=newHTML+'
'),getPreviewObjectNoStyle().innerHTML=newHTML,getPreviewObject().display="block",l&&(clearTimeout(timer2),timer2=window.setTimeout(function(){rearrange(n,p)},2e3))}}function followmouse(e){var t=!1;if(0!=$("img[rel=hoverme]:hover").length&&(t=!0),t){var i=offsetfrommouse[0],o=offsetfrommouse[1],n=60,r=document.all?truebody().scrollLeft+truebody().clientWidth:pageXOffset+window.innerWidth-15,a=document.all?Math.min(truebody().scrollHeight,truebody().clientHeight):Math.min(window.innerHeight);void 0!==e?(r-e.pageX
32||pos>79)&&(pos+=dir),pos>79&&(len-=dir),pos>79&&0==len&&(pos=0),e.style.left=pos+"px",e.style.width=len+"px")}function remove_loading(){this.clearInterval(t);var e=document.getElementById("loader_container");e.style.display="none",e.style.visibility="hidden";var t=setInterval(animate,60)}function imagerotate(e,t,i,o,n,r){var a=this;window.XMLHttpRequest?a.xmlHttpReq=new XMLHttpRequest:window.ActiveXObject&&(a.xmlHttpReq=new ActiveXObject("Microsoft.XMLHTTP")),a.xmlHttpReq.open("POST","http://www.yandy.com/redesign/ajax/messenger.php?mode=nextimage",!0),a.xmlHttpReq.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),a.xmlHttpReq.onreadystatechange=function(){var t=document.getElementById("prodImage_"+e),i=document.getElementById("numImg"+e),o=n+1;if(o>r&&(o=1),4==a.xmlHttpReq.readyState){var d=a.xmlHttpReq.responseText.split("|||");t.innerHTML=d[0],i.innerHTML=d[1]}},qstr="pos="+escape(e)+"&prod="+escape(t)+"&cur="+escape(i)+"&url="+escape(o)+"¤t="+escape(n)+"&total="+escape(r),a.xmlHttpReq.send(qstr)}var offsetfrommouse=[35,35],displayduration=0,defaultimageheight=40,defaultimagewidth=40,timer,timer2,t_id=setInterval(animate,20),pos=0,dir=2,len=0;