var offsetfrommouse=[10,10];var displayduration=0;var currentimageheight=400;var padding=10;var zoomimg_w=0;var zoomimg_h=0;if(document.getElementById||document.all){document.write('<div id="trailimageid">');document.write("</div>")}function getObj(a){if(document.getElementById){this.obj=document.getElementById(a);this.style=document.getElementById(a).style}else{if(document.all){this.obj=document.all[a];this.style=document.all[a].style}else{if(document.layers){this.obj=document.layers[a];this.style=document.layers[a]}}}}function gettrail(){return new getObj("trailimageid")}function truebody(){return(!window.opera&&document.compatMode&&document.compatMode!="BackCompat")?document.documentElement:document.body}function showtrail(g,j,d,f,k,h,e,b,a,c,i){zoomimg_w=k;zoomimg_h=h;if(h>0){currentimageheight=h}trailobj=gettrail().obj;trailobj.style.width=(k+(2*padding))+"px";trailobj.style.height=(h+(2*padding))+"px";trailobj.setAttribute("startx",b);trailobj.setAttribute("starty",a);trailobj.setAttribute("startw",c);trailobj.setAttribute("starth",i);trailobj.setAttribute("imagename",g);trailobj.setAttribute("imgtitle",j);document.onmousemove=followmouse}function hidetrail(){trailstyle=gettrail().style;trailstyle.visibility="hidden";document.onmousemove="";trailstyle.left="-2000px";trailstyle.top="-2000px"}function followmouse(h){var b=offsetfrommouse[0];var a=offsetfrommouse[1];var g=document.all?truebody().scrollLeft+truebody().clientWidth:pageXOffset+window.innerWidth-15;var f=document.all?Math.min(truebody().scrollHeight,truebody().clientHeight):Math.min(window.innerHeight);var d=null;var c=null;if(typeof h!="undefined"){if((typeof h.layerX!="undefined")&&(typeof h.layerY!="undefined")){d=h.layerX;c=h.layerY}else{if((typeof h.x!="undefined")&&(typeof h.y!="undefined")){d=h.x;c=h.y}}if(g-h.pageX<zoomimg_w+(3*padding)){b=h.pageX-b-zoomimg_w-(2*offsetfrommouse[0])}else{b+=h.pageX}if(f-h.pageY<zoomimg_h+(2*padding)){a+=h.pageY-Math.max(0,(0+zoomimg_h+(5*padding)+h.pageY-f-truebody().scrollTop))}else{a+=h.pageY}}else{if(typeof window.event!="undefined"){if((typeof event.x!="undefined")&&(typeof event.y!="undefined")){d=event.x;c=event.y}else{if((typeof event.offsetX!="undefined")&&(event.offsetY!="undefined")){d=event.offsetX;c=event.offsetY}}if(g-event.clientX<zoomimg_w+(3*padding)){b=event.clientX-b-zoomimg_w-(2*offsetfrommouse[0])}else{b+=truebody().scrollLeft+event.clientX}if(f-event.clientY<zoomimg_h+(2*padding)){a+=event.clientY-Math.max(0,(0+zoomimg_h+(5*padding)+event.clientY-f-truebody().scrollTop))}else{a+=truebody().scrollTop+event.clientY}}}trail=gettrail();startx=trail.obj.getAttribute("startx");starty=trail.obj.getAttribute("starty");startw=trail.obj.getAttribute("startw");starth=trail.obj.getAttribute("starth");imagename=trail.obj.getAttribute("imagename");title=trail.obj.getAttribute("imgtitle");var g=document.all?truebody().scrollLeft+truebody().clientWidth:pageXOffset+window.innerWidth-15;var f=document.all?Math.max(truebody().scrollHeight,truebody().clientHeight):Math.max(document.body.offsetHeight,window.innerHeight);if(a<0){a=a*-1}if((trail.style.left=="-2000px")||(trail.style.left=="")){trail.style.left=b+"px"}if((trail.style.top=="-2000px")||(trail.style.top=="")){trail.style.top=a+"px"}trail.style.left=b+"px";trail.style.top=a+"px";if(trail.style.visibility!="visible"){if(((d==null)||(c==null))||((d>=startx)&&(d<=(startx+startw))&&(c>=starty)&&(c<=(starty+starth)))){newHTML="<div><h1>"+title+"</h1>";newHTML=newHTML+'<img src="'+imagename+'"></div>';trail.obj.innerHTML=newHTML;trail.style.visibility="visible"}}};