var restarea=6;var maxspeed=7;var endofgallerymsg="";function enlargeimage(_1,_2,_3){var _4=typeof _2!="undefined"?_2:"600px";var _5=typeof _3!="undefined"?_3:"500px";var _6="width="+_4+",height="+_5+",resizable=yes";window.open(_1,"",_6);}var iedom=document.all||document.getElementById;var scrollspeed=0;var movestate="";var actualwidth="";var cross_scroll,ns_scroll;var loadedyes=0;function ietruebody(){return (document.compatMode&&document.compatMode!="BackCompat")?document.documentElement:document.body;}function creatediv(){statusdiv=document.createElement("div");statusdiv.setAttribute("id","statusdiv");document.body.appendChild(statusdiv);statusdiv=document.getElementById("statusdiv");statusdiv.innerHTML=endofgallerymsg;}function positiondiv(){menuheight=parseInt(crossmain.offsetHeight);mainobjoffsetH=getposOffset(crossmain,"top");statusdiv.style.left=mainobjoffset+(menuwidth/2)-(statusdiv.offsetWidth/2)+"px";statusdiv.style.top=menuheight+mainobjoffsetH+"px";}function showhidediv(_7){if(endofgallerymsg!=""){statusdiv.style.visibility=_7;}}function getposOffset(_8,_9){var _a=(_9=="left")?_8.offsetLeft:_8.offsetTop;var _b=_8.offsetParent;while(_b!=null){_a=(_9=="left")?_a+_b.offsetLeft:_a+_b.offsetTop;_b=_b.offsetParent;}return _a;}function moveleft(){if(loadedyes){movestate="left";if(iedom&&parseInt(cross_scroll.style.left)>(menuwidth-actualwidth)){cross_scroll.style.left=parseInt(cross_scroll.style.left)-scrollspeed+"px";showhidediv("hidden");}else{showhidediv("visible");}}lefttime=setTimeout("moveleft()",10);}function moveright(){if(loadedyes){movestate="right";if(iedom&&parseInt(cross_scroll.style.left)<0){cross_scroll.style.left=parseInt(cross_scroll.style.left)+scrollspeed+"px";showhidediv("hidden");}else{showhidediv("visible");}}righttime=setTimeout("moveright()",10);}function motionengine(e){var _d=(window.pageXOffset)?pageXOffset:ietruebody().scrollLeft;var _e=(window.pageYOffset)?pageYOffset:ietruebody().scrollTop;var _f=window.event?event.clientX:e.clientX?e.clientX:"";_f-=mainobjoffset-_d;var _10=(menuwidth-restarea)/2;var _11=(menuwidth+restarea)/2;if(_f>_11){scrollspeed=(_f-_11)/((menuwidth-restarea)/2)*maxspeed;if(window.righttime){clearTimeout(righttime);}if(movestate!="left"){moveleft();}}else{if(_f<_10){scrollspeed=(_10-_f)/((menuwidth-restarea)/2)*maxspeed;if(window.lefttime){clearTimeout(lefttime);}if(movestate!="right"){moveright();}}else{scrollspeed=0;}}}function contains_ns6(a,b){while(b.parentNode){if((b=b.parentNode)==a){return true;}}return false;}function stopmotion(e){if((window.event&&!crossmain.contains(event.toElement))||(e&&e.currentTarget&&e.currentTarget!=e.relatedTarget&&!contains_ns6(e.currentTarget,e.relatedTarget))){if(window.lefttime){clearTimeout(lefttime);}if(window.righttime){clearTimeout(righttime);}movestate="";}}function fillup(){if(iedom){crossmain=document.getElementById?document.getElementById("motioncontainer"):document.all.motioncontainer;menuwidth=parseInt(crossmain.style.width);mainobjoffset=getposOffset(crossmain,"left");cross_scroll=document.getElementById?document.getElementById("motiongallery"):document.all.motiongallery;actualwidth=document.all?cross_scroll.offsetWidth:document.getElementById("wtg-gallery-minilist").offsetWidth;crossmain.onmousemove=function(e){motionengine(e);};crossmain.onmouseout=function(e){stopmotion(e);showhidediv("hidden");};}loadedyes=1;if(endofgallerymsg!=""){creatediv();positiondiv();}}window.onload=fillup;
