var restarea=6;var maxspeed=7;var endofgallerymsg="";var x=-1;var y=-1;var currentParent=null;var currentWin=null;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;var scrollspeed=0;var movestate="";var motioncontainer;var actualwidth="";var cross_scroll,ns_scroll;var loadedyes=0;var crossmain;var menuwidth;var mainobjoffset;var isShown="false";if(!thumbMax){var thumbMax=50}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(A){if(endofgallerymsg!=""){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 moverightButton(){scrollspeed=5;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 moveleftButton(){scrollspeed=5;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 motionengine(E){var F=(window.pageXOffset)?pageXOffset:ietruebody().scrollLeft;var D=(window.pageYOffset)?pageYOffset:ietruebody().scrollTop;var B=window.event?event.clientX:E.clientX?E.clientX:"";B-=mainobjoffset-F;var A=(menuwidth-restarea)/2;var C=(menuwidth+restarea)/2;if(B>C){scrollspeed=(B-C)/((menuwidth-restarea)/2)*maxspeed;if(window.righttime){clearTimeout(righttime)}if(movestate!="left"){moveleft()}}else{if(B<A){scrollspeed=(A-B)/((menuwidth-restarea)/2)*maxspeed;if(window.lefttime){clearTimeout(lefttime)}if(movestate!="right"){moveright()}}else{scrollspeed=0}}}function contains_ns6(B,A){while(A.parentNode){if((A=A.parentNode)==B){return true}}return false}function stopmotion(A){if((window.event&&!crossmain.contains(event.toElement))||(A&&A.currentTarget&&A.currentTarget!=A.relatedTarget&&!contains_ns6(A.currentTarget,A.relatedTarget))){if(window.lefttime){clearTimeout(lefttime)}if(window.righttime){clearTimeout(righttime)}movestate=""}}function stopMotionButton(){if(window.lefttime){clearTimeout(lefttime)}if(window.righttime){clearTimeout(righttime)}movestate=""}function showSlideWindow(F,B,E){if((isShown=="true")&&(currentWin!=null)&&(currentParent!=null)){closeSlideWindow(currentParent,currentWin)}if(isShown=="false"){var A=x-8;var C=y-8;var D;parentWin=document.getElementById(F);popupWin=document.getElementById(B);jQuery(document).ready(function(){var G=jQuery("#lw-launch-browser-icon-"+E).offset();parentWin.style.left=G.left+"px";parentWin.style.top=G.top+"px"});parentWin.style.visibility="visible";parentWin.style.display="block";parentWin.style.styleFloat="left";parentWin.style.cssFloat="left";popupWin.style.visibility="visible";isShown="true";currentParent=F;currentWin=B}}function closeSlideWindow(B,A){if(isShown=="true"){popupWin=document.getElementById(A);parentWin=document.getElementById(B);parentWin.style.visibility="hidden";parentWin.style.display="none";parentWin.style.styleFloat="none";parentWin.style.cssFloat="none";popupWin.style.visibility="hidden";isShown="false"}}function BrowserCheck(){var A=navigator.appName;if(A=="Netscape"){this.b="ns"}else{if(A=="Microsoft Internet Explorer"||A=="Opera"){this.b="ie"}else{this.b=A}}this.v=parseInt(navigator.appVersion);this.ns=(this.b=="ns"&&this.v>=4);this.ns4=(this.b=="ns"&&this.v==4);this.ns5=(this.b=="ns"&&this.v==5);this.ie=(this.b=="ie"&&this.v>=4);this.ie4=(navigator.userAgent.indexOf("MSIE 4")>0);this.ie5=(navigator.userAgent.indexOf("MSIE 5")>0);if(this.ie5){this.v=5}this.min=(this.ns||this.ie)}var is=new BrowserCheck();var currentX=-1;var currentY=-1;function init(){if(document.getElementById("motioncontainer")&&document.getElementById("motiongallery")){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("trueContainer").offsetWidth;loadedyes=1}document.onmousedown=mouseDown;document.onmousemove=mouseMove;document.onmouseup=mouseUp;if(is.ns4){document.captureEvents(Event.MOUSEDOWN|Event.MOUSEMOVE|Event.MOUSEUP)}}function alertCoord(D){if(!D){if(window.event){D=window.event}else{return }}if(typeof (D.pageX)=="number"){var C=D.pageX;var A=D.pageY}else{if(typeof (D.clientX)=="number"){var C=D.clientX;var A=D.clientY;var B=(window.navigator.userAgent.indexOf("Opera")+1)||(window.ScriptEngine&&ScriptEngine().indexOf("InScript")+1)||(navigator.vendor=="KDE");if(!B){if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){C+=document.body.scrollLeft;A+=document.body.scrollTop}else{if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)){C+=document.documentElement.scrollLeft;A+=document.documentElement.scrollTop}}}}else{return }}x=C;y=A}function mouseDown(A){if((is.ns&&A.which!=1)||(is.ie&&event.button!=1)){return true}x=(is.ns)?A.pageX:event.x+document.body.scrollLeft;y=(is.ns)?A.pageY:event.y+document.body.scrollTop;currentX=x;currentY=y;alertCoord(A);return true}function mouseMove(A){x=(is.ns)?A.pageX:event.x+document.body.scrollLeft;y=(is.ns)?A.pageY:event.y+document.body.scrollTop;alertCoord(A);return true}function mouseUp(A){x=(is.ns)?A.pageX:event.x+document.body.scrollLeft;y=(is.ns)?A.pageY:event.y+document.body.scrollTop;alertCoord(A);return true}function setImageArray(id){arrayName=eval("photoLinkArray"+id);contents="";cutoff=(arrayName.length>12)?13:arrayName.length;for(var x=0;x<cutoff;x++){contents=contents+arrayName[x]}actualwidth=(cutoff*thumbMax)+((cutoff)*2)+22;document.getElementById("motiongallery").style.left="2px";theBrowser=returnObjById("trueContainer");theBrowser.innerHTML='<div class="photo-album-preview-title">previewing sample images</div>'+contents}function showBrowser(B){var A=document.getElementById("two-col-content-col");setImageArray(B);showSlideWindow("popup","motioncontainer",B)}function returnObjById(B){if(document.getElementById){var A=document.getElementById(B)}else{if(document.all){var A=document.all[B]}else{if(document.layers){var A=document.layers[B]}}}return A};