isIE=0;if(document.all&&!window.opera){isIE=1;}function BxHistory(){this._hash="";this._to=400;this._hf=null;this._en="";this._rw={cat:{regexp:"^group/(.*)\\.htm$","eval":"document.f.selectForumIndex (m[1]);",pre:"group/",ext:".htm"},forum:{regexp:"^forum/(.*)-(\\d+)\\.htm$","eval":"document.f.selectForum (m[1], m[2]);",pre:"forum/",page:"-",ext:".htm"},topic:{regexp:"^topic/(.*)\\.htm$","eval":"document.f.selectTopic (m[1]);",pre:"topic/",ext:".htm"},user:{regexp:"^user/(.*)\\.htm$","eval":"document.f.showProfile (m[1]);",pre:"user/",ext:".htm"},edit_cats:{regexp:"^action=goto&edit_cats=","eval":"if (document.orca_admin) document.orca_admin.editCategories ();"},new_topic:{regexp:"^action=goto&new_topic=(.*)$","eval":"document.f.newTopic (m[1]);"},search:{regexp:"^action=goto&search=","eval":"document.f.showSearch ();"},search_result:{regexp:"^action=goto&search_result=1&(.*?)&(.*?)&(.*?)&(.*?)&(.*?)$","eval":"document.f.search (m[1], m[2], m[3], m[4], m[5]);"},my_flags:{regexp:"^action=goto&my_flags=","eval":"document.f.showMyFlags ();"},my_threads:{regexp:"^action=goto&my_threads=","eval":"document.f.showMyThreads ();"}};}BxHistory.prototype.go=function(h){for(var i in this._rw){var pattern=new RegExp(this._rw[i]["regexp"]);var m=h.match(pattern);if(!m){continue;}eval(this._rw[i]["eval"]);break;}return;};BxHistory.prototype.init=function(A){this._en=A;if(isIE){this._initHiddenFrame();}this.handleHist();window.setInterval(this._en+".handleHist()",this._to);return true;};BxHistory.prototype.handleHist=function(){if(isIE){var B=this._hf.contentDocument||this._hf.contentWindow.document;var A=B.getElementById("hidfr").value;if(A!=window.location.hash){this._hash=A;var A=this._hash.substr(1);if(A.length){this.go(A);}else{if(!A.length&&window.location.hash.length){var A=window.location.hash.charAt(0)=="#"?window.location.hash.substr(1):window.location.hash;this.pushHist(A);this.go(A);}}}}else{if(window.location.hash!=this._hash){this._hash=window.location.hash;var A=this._hash.substr(1);if(A.length){this.go(A);}}}return true;};BxHistory.prototype.makeHist=function(A){if(A.charAt(0)!="#"){A="#"+A;}if(window.location.hash==A){return;}if(isIE){var C=this._hf.contentDocument||this._hf.contentWindow.document;var B=C.getElementById("hidfr").value;C.getElementById("hidfr").value=A;if(A!=B){this.pushHist(A);}window.location.hash=A;}else{window.location.hash=A;this._hash=window.location.hash;}return true;};BxHistory.prototype.pushHist=function(A){if(A.charAt(0)!="#"){A="#"+A;}var B=this._hf.contentDocument||this._hf.contentWindow.document;B.write('<input id="hidfr" value="'+A+'"/>');B.close();this._hash=window.location.hash;};BxHistory.prototype._initHiddenFrame=function(){var A=document.body;var B=document.createElement("iframe");B.style.display="none";B.id="hidfr";A.appendChild(B);this._hf=document.getElementById("hidfr");var C=null;if(this._hf.contentDocument){C=this._hf.contentDocument;}else{if(this._hf.contentWindow&&this._hf.contentWindow.document){C=this._hf.contentWindow.document;}}if(C){C.write('<input id="hidfr" />');C.close();}};BxHistory.prototype.rw=function(A){return this._rw[A];};