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