var         strSegMarker ="-----segment-----"; function suppressErrors() { return true;} function hbo(vid) { window.onerror =suppressErrors; if(Ajax.isSupported()) { hb("b", vid); window.setInterval(hbv, 15000) } } function hbv() { hb("v", pvid); } function hbc(vid) { if(Ajax.isSupported()) hb("e", vid); } function hb(t, vid) { var         ajaxreq =Ajax.createRequest("/hb?t=" +t +"&pvid=" +vid, "GET"); ajaxreq.setCallback(hbCallback); if(ajaxreq != null) { ajaxreq.send(); } } function act(tid) { var         ajaxreq =Ajax.createRequest("/act?tid=" +tid, "GET"); ajaxreq.setCallback(hbCallback); if(ajaxreq != null) { ajaxreq.send(); } } function hbCallback(ajaxreq) { var             strText =ajaxreq.getRequest().responseText; if(document.handleSegments) document.handleSegments(strText); }; function handleSegments(strText) { if((strText == null) || (strText == "")) return; strText =hbStripLeadingWhitespace(strText); var         astrSeg =strText.split(strSegMarker); if(!astrSeg) return; for(var iSeg =0; iSeg <astrSeg.length;iSeg++) { var         strSeg =astrSeg[iSeg]; strSeg =hbStripLeadingWhitespace(strSeg); if(strSeg.length == 0) continue; handleSegment(strSeg); } }; document.handleSegments =handleSegments; function handleSegment(str) { var         astr =str.match(/([^\n\r]*)[\n\r]+([^\n\r]*)[\n\r]+/); if(!astr) return; var         strType =astr[1]; var         strTarget =astr[2]; var         strBody =str.replace(/([^\n\r]*)[\n\r]+([^\n\r]*)[\n\r]+/, ""); if("html" == strType) handleHTML(strTarget, strBody); else if("exec" == strType) handleExec(strTarget, strBody); }; function handleHTML(strElemID, strHTML) { var         astrScript =strHTML.match(/<script>([\s\S]*)<\/script>/); if(astrScript && (astrScript.length >1)) { var     strScript =astrScript[1]; eval(strScript); } strHTML =strHTML.replace(/<script>([\s\S]*)<\/script>/g, " "); strHTML =strHTML.replace(/\s{2,}/g, " "); strHTML =strHTML.replace(/[\n\r\t]/g, " "); var         elemParent =document.getElementById(strElemID); if(elemParent != null) { if(elemParent.innerHTML != strHTML) elemParent.innerHTML =strHTML; } }; function handleExec(strLang, strCode) { if("javascript" == strLang) eval(strCode); else alert("unknown language (" +strLang +")"); }; function hbStripLeadingWhitespace(str) { return str.replace(/^\s+/g, ""); };