var offsetfrommouse=[10,10];var displayduration=0;var currentimageheight=400;var padding=10;var zoomimg_w=0;var zoomimg_h=0;function findObj(a){if(document.getElementById&&document.getElementById(a)){return true}else{if(document.all&&document.all[a]){return true}else{if(document.layers&&document.layers[a]){return true}}}return false}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 createtrail(){var a=document.createElement("div");a.setAttribute("id","trailimageid");document.body.appendChild(a)}function gettrail(){if(!findObj("trailimageid")){createtrail()}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 c=offsetfrommouse[0];var i=offsetfrommouse[1];var b=document.all&&!window.opera?truebody().scrollLeft:pageXOffset;var a=document.all&&!window.opera?truebody().scrollTop:pageYOffset;var k=document.all&&!window.opera?truebody().clientWidth:window.innerWidth;var d=document.all&&!window.opera?truebody().clientHeight:window.innerHeight;var j=b+k;var l=a+d;trail=gettrail();var g=null;var f=null;if(typeof h!="undefined"){if((typeof h.layerX!="undefined")&&(typeof h.layerY!="undefined")){g=h.layerX;f=h.layerY}else{if((typeof h.offsetX!="undefined")&&(typeof h.offsetY!="undefined")){g=h.offsetX;f=h.offsetY}else{if((typeof h.x!="undefined")&&(typeof h.y!="undefined")){g=h.x;f=h.y}}}if(j-h.pageX<zoomimg_w+(3*padding)){c=h.pageX-c-zoomimg_w-(2*offsetfrommouse[0])}else{c+=h.pageX}if(l-h.pageY<zoomimg_h+(2*padding)){i+=h.pageY-Math.max(0,(0+zoomimg_h+(5*padding)+h.pageY-l))}else{i+=h.pageY}}else{if(typeof window.event!="undefined"){if((typeof event.x!="undefined")&&(typeof event.y!="undefined")){g=event.x;f=event.y}else{if((typeof event.offsetX!="undefined")&&(event.offsetY!="undefined")){g=event.offsetX;f=event.offsetY}}if(j-event.clientX<zoomimg_w+(3*padding)){c=event.clientX-c-zoomimg_w-(2*offsetfrommouse[0])}else{c+=b+event.clientX}if(l-a-event.clientY<zoomimg_h+(2*padding)){i+=a+event.clientY-Math.max(0,(0+zoomimg_h+(5*padding)+event.clientY+a-l))}else{i+=a+event.clientY}}}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");if(i<0){i=i*-1}trail.style.left=c+"px";trail.style.top=i+"px";if(trail.style.visibility!="visible"){if(((g==null)||(f==null))||((g>=startx)&&(g<=(startx+startw))&&(f>=starty)&&(f<=(starty+starth)))){newHTML="<div><h1>"+title+"</h1>";newHTML=newHTML+'<img src="'+imagename+'"></div>';trail.obj.innerHTML=newHTML;trail.style.visibility="visible"}}};
