var restarea=6;var maxspeed=7;var maxwidth=1000;var startpos=0;var endofgallerymsg="";function enlargeimage(D,B,F){var C=typeof B!="undefined"?B:"600px";var E=typeof F!="undefined"?F:"500px";var A="width="+C+",height="+E+",resizable=yes";window.open(D,"",A)}var iedom=document.all||document.getElementById,scrollspeed=0,movestate="",actualwidth="",cross_scroll,ns_scroll,statusdiv,loadedyes=0,lefttime,righttime;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(){var C=getposOffset(crossmain,"left"),A=parseInt(crossmain.offsetHeight),B=getposOffset(crossmain,"top");statusdiv.style.left=C+(menuwidth/2)-(statusdiv.offsetWidth/2)+"px";statusdiv.style.top=A+B+"px"}function showhidediv(A){if(endofgallerymsg!=""){positiondiv();statusdiv.style.visibility=A}}function getposOffset(D,C){var B=(C=="left")?D.offsetLeft:D.offsetTop;var A=D.offsetParent;while(A!=null){B=(C=="left")?B+A.offsetLeft:B+A.offsetTop;A=A.offsetParent}return B}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(F){var E=getposOffset(crossmain,"left"),G=(window.pageXOffset)?pageXOffset:ietruebody().scrollLeft,D=(window.pageYOffset)?pageYOffset:ietruebody().scrollTop,B=window.event?event.clientX:F.clientX?F.clientX:"";B-=E-G;var A=(menuwidth-restarea)/2;var C=(menuwidth+restarea)/2;if(B>C){scrollspeed=(B-C)/((menuwidth-restarea)/2)*maxspeed;clearTimeout(righttime);if(movestate!="left"){moveleft()}}else{if(B<A){scrollspeed=(A-B)/((menuwidth-restarea)/2)*maxspeed;clearTimeout(lefttime);if(movestate!="right"){moveright()}}else{scrollspeed=0}}}function contains_ns6(B,A){if(A!==null){while(A.parentNode){if((A=A.parentNode)==B){return true}}}return false}function stopmotion(A){if(!window.opera||(window.opera&&A.relatedTarget!==null)){if((window.event&&!crossmain.contains(event.toElement))||(A&&A.currentTarget&&A.currentTarget!=A.relatedTarget&&!contains_ns6(A.currentTarget,A.relatedTarget))){clearTimeout(lefttime);clearTimeout(righttime);movestate=""}}}function fillup(){if(iedom){crossmain=document.getElementById?document.getElementById("motioncontainer"):document.all.motioncontainer;if(typeof crossmain.style.maxWidth!=="undefined"){crossmain.style.maxWidth=maxwidth+"px"}menuwidth=crossmain.offsetWidth;cross_scroll=document.getElementById?document.getElementById("motiongallery"):document.all.motiongallery;actualwidth=document.getElementById?document.getElementById("trueContainer").offsetWidth:document.all.trueContainer.offsetWidth;if(startpos){cross_scroll.style.left=(menuwidth-actualwidth)/startpos+"px"}crossmain.onmousemove=function(A){motionengine(A)};crossmain.onmouseout=function(A){stopmotion(A);showhidediv("hidden")}}loadedyes=1;if(endofgallerymsg!=""){creatediv();positiondiv()}if(document.body.filters){onresize()}}window.onload=fillup;onresize=function(){if(typeof motioncontainer!=="undefined"&&motioncontainer.filters){motioncontainer.style.width="0";motioncontainer.style.width="";motioncontainer.style.width=Math.min(motioncontainer.offsetWidth,maxwidth)+"px"}menuwidth=crossmain.offsetWidth;cross_scroll.style.left=startpos?(menuwidth-actualwidth)/startpos+"px":0};
