var pointerX=50;var boxOffsetX=-62;var boxOffsetY=35;var boxWidth=450;var containerPos={x:0,y:0};var boxPos={x:0,y:0,p:0};var oBox=null;var oPointer=null;function getBoxPosition(g){var a=mouseCoords(g);var c=getWindowWidth();var f=(((c-boxWidth)-containerPos.x)+boxOffsetX+40);var b=(a.x-containerPos.x)+boxOffsetX;var d=0;if(b<f){d=b;pX=pointerX}else{d=f;pX=pointerX+(b-f)}return{x:d,y:(a.y-containerPos.y)+boxOffsetY,p:pX}}function getWindowWidth(){if(typeof(window.innerWidth)=="number"){return window.innerWidth}else{if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)){return document.documentElement.clientWidth}else{if(document.body&&(document.body.clientWidth||document.body.clientHeight)){return document.body.clientWidth}}}return 1440}function hoverbox(k,n,l,d,f,m,q,a){if(!k){var k=window.event}var o=document.getElementById(n);containerPos=getPosition(o);var h=document.getElementById(l+"-img");if(h!=null){h.src=f}var j=document.getElementById(l+"-title");if(j!=null){setTextNode(j,m)}var c=document.getElementById(l+"-desc");if(c!=null){var p=c.firstChild;while(p!=null){var b=p.nextSibling;c.removeChild(p);p=b}if((a!=null)&&(a!="")&&(a!="undefined")){var g=document.createElement("span");g.setAttribute("class","hoverbox-emph");g.style.fontWeight="bold";g.style.color="#398c21";var i="miles";if(a=="1"){i="mile"}g.appendChild(document.createTextNode(a+" "+i+" from "+g_c_sn));c.appendChild(g);c.appendChild(document.createElement("br"))}c.appendChild(document.createTextNode(q))}oBox=document.getElementById(l);if(oBox!=null){boxPos=getBoxPosition(k);oBox.style.top=boxPos.y+"px";oBox.style.left=boxPos.x+"px";oPointer=document.getElementById(l+"-top-pointer");if(oPointer!=null){oPointer.style.left=boxPos.p+"px"}oBox.style.display="block"}}function hoverbox_move(a){if(oBox!=null){a=a||window.event;boxPos=getBoxPosition(a);oBox.style.top=boxPos.y+"px";oBox.style.left=boxPos.x+"px";if(oPointer!=null){oPointer.style.left=boxPos.p+"px"}}}function hoverbox_off(a){var b=document.getElementById(a);if(b!=null){b.style.display="none"}};