var hbcal_boxOffsetX=-19;var hbcal_boxOffsetY=45;var hbcal_containerPos={x:0,y:0};var hbcal_boxPos={x:0,y:0,p:0};var hbcal_oBox=null;var hbcal_prev_id="";function getHbcalBoxPosition(d){var a=mouseCoords(d);var c=(a.x-hbcal_containerPos.x)+hbcal_boxOffsetX;var b=(a.y-hbcal_containerPos.y)+hbcal_boxOffsetY;return{x:c,y:b}}function hbcal(e,containername,basename,id,ad_data_json){if(g_IE6){return}if(!e){var e=window.event}var oContainer=document.getElementById(containername);hbcal_containerPos=getPosition(oContainer);var oContent=document.getElementById(basename+"-content");if(id!=hbcal_prev_id){var oChild=oContent.firstChild;while(oChild!=null){var oNextChild=oChild.nextSibling;oContent.removeChild(oChild);oChild=oNextChild}var ad_data=eval("("+ad_data_json+")");var nAd=0;while(ad_data[nAd]!=null){if(nAd>0){var oDivider=document.createElement("div");oDivider.setAttribute("class",basename+"-divider");oDivider.className=basename+"-divider";if(g_IE){oDivider.style.clear="left";oDivider.style.height="1px";oDivider.style.borderTop="solid 1px #666"}oContent.appendChild(oDivider)}var oTitle=document.createElement("div");oTitle.setAttribute("class",basename+"-title");oTitle.className=basename+"-title";setTextNode(oTitle,ad_data[nAd].title);oContent.appendChild(oTitle);if(ad_data[nAd].adphotos>0){var oImgDiv=document.createElement("div");oImgDiv.setAttribute("class",basename+"-imgdiv");oImgDiv.className=basename+"-imgdiv";if(g_IE){oImgDiv.style.styleFloat="left";oImgDiv.style.width="48px";oImgDiv.style.height="auto";oImgDiv.style.margin="0 3px 3px 0"}var oImg=document.createElement("img");var urlImg="photos/p"+ad_data[nAd].idnum+"_t.jpg";oImg.src=urlImg;oImg.setAttribute("class",basename+"-img");oImg.className=basename+"-img";oImg.setAttribute("width","48");oImg.setAttribute("alt","");if(g_IE){oImg.style.width="48px";oImg.style.height="auto";oImg.style.margin="0"}oImgDiv.appendChild(oImg);add_rounded_corners(oImgDiv);oContent.appendChild(oImgDiv)}var oDesc=document.createElement("div");oDesc.setAttribute("class",basename+"-desc");oDesc.className=basename+"-desc";setTextNode(oDesc,ad_data[nAd].brief);oContent.appendChild(oDesc);++nAd}var oClear=document.createElement("div");oClear.setAttribute("class",basename+"-clear");oClear.className=basename+"-clear";oContent.appendChild(oClear);hbcal_oBox=document.getElementById(basename);if(hbcal_oBox!=null){hbcal_boxPos=getHbcalBoxPosition(e);hbcal_oBox.style.top=hbcal_boxPos.y+"px";hbcal_oBox.style.left=hbcal_boxPos.x+"px";hbcal_oBox.style.display="block"}}}function hbcal_move(a){if(g_IE6){return}if(hbcal_oBox!=null){a=a||window.event;hbcal_boxPos=getHbcalBoxPosition(a);hbcal_oBox.style.top=hbcal_boxPos.y+"px";hbcal_oBox.style.left=hbcal_boxPos.x+"px"}}function hbcal_off(a){if(g_IE6){return}if(hbcal_oBox!=null){hbcal_oBox.style.display="none"}};