var style_cookie;var style_cookie_txt;var style_cookie_site;var kumod_set=false;var ispage;if(!Array.prototype.indexOf){Array.prototype.indexOf=function(_1){var _2=this.length;var _3=Number(arguments[1])||0;_3=(_3<0)?Math.ceil(_3):Math.floor(_3);if(_3<0){_3+=_2;}for(;_3<_2;_3++){if(_3 in this&&this[_3]===_1){return _3;}}return -1;};}var Utf8={encode:function(_4){_4=_4.replace(/\r\n/g,"\n");var _5="";for(var n=0;n<_4.length;n++){var c=_4.charCodeAt(n);if(c<128){_5+=String.fromCharCode(c);}else{if((c>127)&&(c<2048)){_5+=String.fromCharCode((c>>6)|192);_5+=String.fromCharCode((c&63)|128);}else{_5+=String.fromCharCode((c>>12)|224);_5+=String.fromCharCode(((c>>6)&63)|128);_5+=String.fromCharCode((c&63)|128);}}}return _5;},decode:function(_8){var _9="";var i=0;var c=c1=c2=0;while(i<_8.length){c=_8.charCodeAt(i);if(c<128){_9+=String.fromCharCode(c);i++;}else{if((c>191)&&(c<224)){c2=_8.charCodeAt(i+1);_9+=String.fromCharCode(((c&31)<<6)|(c2&63));i+=2;}else{c2=_8.charCodeAt(i+1);c3=_8.charCodeAt(i+2);_9+=String.fromCharCode(((c&15)<<12)|((c2&63)<<6)|(c3&63));i+=3;}}}return _9;}};function replaceAll(_c,_d,to){var _f=_c.indexOf(_d);while(_f>-1){_c=_c.replace(_d,to);_f=_c.indexOf(_d);}return _c;}function insert(_10){var _11=document.forms.postform.message;if(_11){if(_11.createTextRange&&_11.caretPos){var _12=_11.caretPos;_12.text=_12.text.charAt(_12.text.length-1)==" "?_10+" ":_10;}else{if(_11.setSelectionRange){var _13=_11.selectionStart;var end=_11.selectionEnd;_11.value=_11.value.substr(0,_13)+_10+_11.value.substr(end);_11.setSelectionRange(_13+_10.length,_13+_10.length);}else{_11.value+=_10+" ";}}_11.focus();}}function quote(b,a){var v=eval("document."+a+".message");v.value+=">>"+b+"\n";v.focus();}function checkhighlight(){var _18;if(_18=/#i([0-9]+)/.exec(document.location.toString())){if(!document.forms.postform.message.value){insert(">>"+_18[1]);}}if(_18=/#([0-9]+)/.exec(document.location.toString())){highlight(_18[1]);}}function highlight(_19,_1a){if(_1a&&ispage){return;}var _1b=document.getElementsByTagName("td");for(var i=0;i<_1b.length;i++){if(_1b[i].className=="highlight"){_1b[i].className="reply";}}var _1d=document.getElementById("reply"+_19);if(_1d){_1d.className="highlight";var _1e=/^([^#]*)/.exec(document.location.toString());document.location=_1e[1]+"#"+_19;}}function get_password(_1f){var _20=getCookie(_1f);if(_20){return _20;}var _21="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";var _22="";for(var i=0;i<8;i++){var rnd=Math.floor(Math.random()*_21.length);_22+=_21.substring(rnd,rnd+1);}set_cookie(_1f,_22,365);return (_22);}function togglePassword(){var _25=(navigator.userAgent.indexOf("Safari")!=-1);var _26=(navigator.userAgent.indexOf("Opera")!=-1);var _27=(navigator.appName=="Netscape");var _28=document.getElementById("passwordbox");var _29;if((_25)||(_26)||(_27)){_29=_28.innerHTML;}else{_29=_28.text;}_29=_29.toLowerCase();var _2a="<td></td><td></td>";if(_29==_2a){var _2b="<td class=\"postblock\">Mod</td><td><input type=\"text\" name=\"modpassword\" size=\"28\" maxlength=\"75\">&nbsp;<acronym title=\"Distplay staff status (Mod/Admin)\">D</acronym>:&nbsp;<input type=\"checkbox\" name=\"displaystaffstatus\" checked>&nbsp;<acronym title=\"Lock\">L</acronym>:&nbsp;<input type=\"checkbox\" name=\"lockonpost\">&nbsp;&nbsp;<acronym title=\"Sticky\">S</acronym>:&nbsp;<input type=\"checkbox\" name=\"stickyonpost\">&nbsp;&nbsp;<acronym title=\"Raw HTML\">RH</acronym>:&nbsp;<input type=\"checkbox\" name=\"rawhtml\">&nbsp;&nbsp;<acronym title=\"Name\">N</acronym>:&nbsp;<input type=\"checkbox\" name=\"usestaffname\"></td>";}if((_25)||(_26)||(_27)){_28.innerHTML=_2b;}else{_28.text=_2b;}return false;}function toggleOptions(_2c,_2d,_2e){if(document.getElementById("opt"+_2c)){if(document.getElementById("opt"+_2c).style.display==""){document.getElementById("opt"+_2c).style.display="none";document.getElementById("opt"+_2c).innerHTML="";}else{var _2f="<td class=\"label\"><label for=\"formatting\">Formatting:</label></td><td colspan=\"3\"><select name=\"formatting\"><option value=\"\" onclick=\"javascript:document.getElementById('formattinginfo"+_2c+"').innerHTML = 'All formatting is performed by the user.';\">Normal</option><option value=\"aa\" onclick=\"javascript:document.getElementById('formattinginfo"+_2c+"').innerHTML = '[aa] and [/aa] will surround your message.';\"";if(getCookie("kuformatting")=="aa"){_2f+=" selected";}_2f+=">Text Art</option></select> <input type=\"checkbox\" name=\"rememberformatting\"><label for=\"rememberformatting\">Remember</label> <span id=\"formattinginfo"+_2c+"\">";if(getCookie("kuformatting")=="aa"){_2f+="[aa] and [/aa] will surround your message.";}else{_2f+="All formatting is performed by the user.";}_2f+="</span></td><td><input type=\"button\" value=\"Preview\" class=\"submit\" onclick=\"javascript:postpreview('preview"+_2c+"', '"+_2e+"', '"+_2c+"', document."+_2d+".message.value);\"></td>";document.getElementById("opt"+_2c).innerHTML=_2f;document.getElementById("opt"+_2c).style.display="";}}}function getCookie(_30){with(document.cookie){var _31=new RegExp("(^|;\\s+)"+_30+"=(.*?)(;|$)");var hit=_31.exec(document.cookie);if(hit&&hit.length>2){return Utf8.decode(unescape(replaceAll(hit[2],"+","%20")));}else{return "";}}}function set_cookie(_33,_34,_35){if(_35){var _36=new Date();_36.setTime(_36.getTime()+(_35*24*60*60*1000));var _37="; expires="+_36.toGMTString();}else{_37="";}document.cookie=_33+"="+_34+_37+"; path=/";}function set_stylesheet(_38,txt,_3a){if(txt){set_cookie("kustyle_txt",_38,365);}else{if(_3a){set_cookie("kustyle_site",_38,365);}else{set_cookie("kustyle",_38,365);}}var _3b=document.getElementsByTagName("link");var _3c=false;for(var i=0;i<_3b.length;i++){var rel=_3b[i].getAttribute("rel");var _3f=_3b[i].getAttribute("title");if(rel.indexOf("style")!=-1&&_3f){_3b[i].disabled=true;if(_38==_3f){_3b[i].disabled=false;_3c=true;}}}if(!_3c){set_preferred_stylesheet();}}function set_preferred_stylesheet(){var _40=document.getElementsByTagName("link");for(var i=0;i<_40.length;i++){var rel=_40[i].getAttribute("rel");var _43=_40[i].getAttribute("title");if(rel.indexOf("style")!=-1&&_43){_40[i].disabled=(rel.indexOf("alt")!=-1);}}}function get_active_stylesheet(){var _44=document.getElementsByTagName("link");for(var i=0;i<_44.length;i++){var rel=_44[i].getAttribute("rel");var _47=_44[i].getAttribute("title");if(rel.indexOf("style")!=-1&&_47&&!_44[i].disabled){return _47;}}return null;}function get_preferred_stylesheet(){var _48=document.getElementsByTagName("link");for(var i=0;i<_48.length;i++){var rel=_48[i].getAttribute("rel");var _4b=_48[i].getAttribute("title");if(rel.indexOf("style")!=-1&&rel.indexOf("alt")==-1&&_4b){return _4b;}}return null;}function delandbanlinks(){if(!kumod_set){return;}var _4c=document.getElementsByTagName("span");var _4d;var _4e;for(var i=0;i<_4c.length;i++){_4d=_4c[i];if(_4d.getAttribute("class")){if(_4d.getAttribute("class").substr(0,3)=="dnb"){_4e=_4d.getAttribute("class").split("|");var _50="&#91;<a href=\""+ku_cgipath+"/manage_page.php?action=delposts&boarddir="+_4e[1]+"&del";if(_4e[3]=="y"){_50+="thread";}else{_50+="post";}_50+="id="+_4e[2]+"\" title=\"Delete\" onclick=\"return confirm('Are you sure you want to delete this post/thread?');\">D</a>&nbsp;<a href=\""+ku_cgipath+"/manage_page.php?action=delposts&boarddir="+_4e[1]+"&del";if(_4e[3]=="y"){_50+="thread";}else{_50+="post";}_50+="id="+_4e[2]+"&postid="+_4e[2]+"\" title=\"Delete &amp; Ban\" onclick=\"return confirm('Are you sure you want to delete and ban the poster of this post/thread?');\">&amp;</a>&nbsp;<a href=\""+ku_cgipath+"/manage_page.php?action=bans&banboard="+_4e[1]+"&banpost="+_4e[2]+"\" title=\"Ban\">B</a>&#93;";_4c[i].innerHTML=_50;}}}}function togglethread(_51){if(hiddenthreads.toString().indexOf(_51)!==-1){document.getElementById("unhidethread"+_51).style.display="none";document.getElementById("thread"+_51).style.display="block";hiddenthreads.splice(hiddenthreads.indexOf(_51),1);set_cookie("hiddenthreads",hiddenthreads.join("!"),30);}else{document.getElementById("unhidethread"+_51).style.display="block";document.getElementById("thread"+_51).style.display="none";hiddenthreads.push(_51);set_cookie("hiddenthreads",hiddenthreads.join("!"),30);}return false;}function toggleblotter(_52){var _53=document.getElementsByTagName("li");var arr=new Array();var _55;for(i=0,iarr=0;i<_53.length;i++){att=_53[i].getAttribute("class");if(att=="blotterentry"){_55=_53[i];if(_55.style.display=="none"){_55.style.display="";if(_52){set_cookie("ku_showblotter","1",365);}}else{_55.style.display="none";if(_52){set_cookie("ku_showblotter","0",365);}}}}}function expandthread(_56,_57){if(document.getElementById("replies"+_56+_57)){var _58=document.getElementById("replies"+_56+_57);_58.innerHTML="Expanding thread...<br><br>"+_58.innerHTML;new Ajax.Request(ku_boardspath+"/expand.php?board="+_57+"&threadid="+_56,{method:"get",onSuccess:function(_59){var _5a=_59.responseText||"something went wrong (blank response)";_58.innerHTML=_5a;delandbanlinks();},onFailure:function(){alert("Something went wrong...");}});}return false;}function quickreply(_5b){if(_5b==0){document.getElementById("posttypeindicator").innerHTML="new thread";}else{document.getElementById("posttypeindicator").innerHTML="reply to "+_5b+" [<a href=\"#postbox\" onclick=\"javascript:quickreply('0');\" title=\"Cancel\">x</a>]";}document.postform.replythread.value=_5b;}function getwatchedthreads(_5c,_5d){if(document.getElementById("watchedthreadlist")){var _5e=document.getElementById("watchedthreadlist");_5e.innerHTML="Loading watched threads...";new Ajax.Request(ku_boardspath+"/threadwatch.php?board="+_5d+"&threadid="+_5c,{method:"get",onSuccess:function(_5f){var _60=_5f.responseText||"something went wrong (blank response)";_5e.innerHTML=_60;},onFailure:function(){alert("Something went wrong...");}});}}function addtowatchedthreads(_61,_62){if(document.getElementById("watchedthreadlist")){new Ajax.Request(ku_boardspath+"/threadwatch.php?do=addthread&board="+_62+"&threadid="+_61,{method:"get",onSuccess:function(_63){var _64=_63.responseText||"something went wrong (blank response)";alert("Thread successfully added to your watch list.");getwatchedthreads("0",_62);},onFailure:function(){alert("Something went wrong...");}});}}function removefromwatchedthreads(_65,_66){if(document.getElementById("watchedthreadlist")){new Ajax.Request(ku_boardspath+"/threadwatch.php?do=removethread&board="+_66+"&threadid="+_65,{method:"get",onSuccess:function(_67){var _68=_67.responseText||"something went wrong (blank response)";getwatchedthreads("0",_66);},onFailure:function(){alert("Something went wrong...");}});}}function hidewatchedthreads(){set_cookie("showwatchedthreads","0",30);if(document.getElementById("watchedthreads")){document.getElementById("watchedthreads").innerHTML="The Watched Threads box will be hidden the next time a page is loaded.  [<a href=\"#\" onclick=\"javascript:showwatchedthreads();return false\">undo</a>]";}}function showwatchedthreads(){set_cookie("showwatchedthreads","1",30);window.location.reload(true);}function checkcaptcha(_69){if(document.getElementById(_69)){if(document.getElementById(_69).captcha){if(document.getElementById(_69).captcha.value==""){alert("Please enter the captcha image text.");document.getElementById(_69).captcha.focus();return false;}}}return true;}function expandimg(_6a,_6b,_6c,_6d,_6e,_6f,_70){element=document.getElementById("thumb"+_6a);var _71="<img src=\""+_6c+"\" alt=\""+_6a+"\" class=\"thumb\" height=\""+_70+"\" width=\""+_6f+"\">";var _72="<img class=thumb height="+_70+" alt="+_6a+" src=\""+_6c+"\" width="+_6f+">";if(element.innerHTML.toLowerCase()!=_71&&element.innerHTML.toLowerCase()!=_72){element.innerHTML=_71;}else{element.innerHTML="<img src=\""+_6b+"\" alt=\""+_6a+"\" class=\"thumb\" height=\""+_6e+"\" width=\""+_6d+"\">";}}function postpreview(_73,_74,_75,_76){if(document.getElementById(_73)){new Ajax.Request(ku_boardspath+"/expand.php?preview&board="+_74+"&parentid="+_75+"&message="+escape(_76),{method:"get",onSuccess:function(_77){var _78=_77.responseText||"something went wrong (blank response)";document.getElementById(_73).innerHTML=_78;},onFailure:function(){alert("Something went wrong...");}});}}function set_inputs(id){if(document.getElementById(id)){with(document.getElementById(id)){if(!name.value){name.value=getCookie("name");}if(!em.value){em.value=getCookie("email");}if(!postpassword.value){postpassword.value=get_password("postpassword");}}}}function set_delpass(id){if(document.getElementById(id).postpassword){with(document.getElementById(id)){if(!postpassword.value){postpassword.value=get_password("postpassword");}}}}function addreflinkpreview(e){ainfo=this.getAttribute("class").split("|");var _7c=document.createElement("div");_7c.setAttribute("id","preview"+this.getAttribute("href"));_7c.setAttribute("class","reflinkpreview");if(e.pageX){_7c.style.left=""+(e.pageX+50)+"px";}else{_7c.style.left=(e.clientX+50);}var _7d=document.createTextNode("");_7c.appendChild(_7d);var _7e=this.parentNode;var _7f=_7e.insertBefore(_7c,this);new Ajax.Request(ku_boardspath+"/read.php?b="+ainfo[1]+"&t="+ainfo[2]+"&p="+ainfo[3]+"&single",{method:"get",onSuccess:function(_80){var _81=_80.responseText||"something went wrong (blank response)";_7f.innerHTML=_81;},onFailure:function(){alert("wut");}});}function delreflinkpreview(e){var _83=document.getElementById("preview"+this.getAttribute("href"));if(_83){_83.parentNode.removeChild(_83);}}function addpreviewevents(){var _84=document.getElementsByTagName("a");var _85;var _86;for(var i=0;i<_84.length;i++){_85=_84[i];if(_85.getAttribute("class")){if(_85.getAttribute("class").substr(0,4)=="ref|"){_85.addEventListener("mouseover",addreflinkpreview,false);_85.addEventListener("mouseout",delreflinkpreview,false);}}}}function keypress(e){if(e.altKey){var _89=document.location.toString();if((_89.indexOf("catalog.html")==-1&&_89.indexOf("/res/")==-1)||(_89.indexOf("catalog.html")==-1&&e.keyCode==80)){if(e.keyCode!=18&&e.keyCode!=16){if(_89.indexOf(".html")==-1||_89.indexOf("board.html")!=-1){var _8a=0;var _8b=_89.substr(0,_89.lastIndexOf("/")+1);}else{var _8c=_89.substr((_89.lastIndexOf("/")+1));_8c=(+_8c.substr(0,_8c.indexOf(".html")));var _8d=_89.substr(0,_89.lastIndexOf("/")+1);}if(_8c==0){var _8e=_8d;}else{var _8f=_8d+_8c+".html";}if(e.keyCode==222||e.keyCode==221){if(match=/#s([0-9])/.exec(_89)){var _90=(+match[1]);}else{var _91=-1;}if(e.keyCode==222){if(_91==-1||_91==9){var _92=0;}else{var _93=_91+1;}}else{if(e.keyCode==221){if(_91==-1||_91==0){var _94=9;}else{var _95=_91-1;}}}document.location.href=_8f+"#s"+_95;}else{if(e.keyCode==59||e.keyCode==219){if(e.keyCode==59){_8c=_8c+1;}else{if(e.keyCode==219){if(_8c>=1){_8c=_8c-1;}}}if(_8c==0){document.location.href=_8d;}else{document.location.href=_8d+_8c+".html";}}else{if(e.keyCode==80){document.location.href=_8f+"#postbox";}}}}}}}window.onunload=function(e){if(style_cookie){var _97=get_active_stylesheet();set_cookie(style_cookie,_97,365);}if(style_cookie_txt){var _98=get_active_stylesheet();set_cookie(style_cookie_txt,_98,365);}if(style_cookie_site){}};window.onload=function(e){delandbanlinks();addpreviewevents();checkhighlight();if(document.getElementById("watchedthreads")){var _9a=new Draggable("watchedthreads",{handle:"watchedthreadsdraghandle",onEnd:function(){watchedthreadsdragend();}});var _9b=new Resizeable("watchedthreads",{resize:function(){watchedthreadsresizeend();}});function watchedthreadsdragend(){set_cookie("watchedthreadstop",document.getElementById("watchedthreads").style.top,30);set_cookie("watchedthreadsleft",document.getElementById("watchedthreads").style.left,30);}function watchedthreadsresizeend(){var _9c=document.getElementById("watchedthreads").offsetWidth;var _9d=document.getElementById("watchedthreads").offsetHeight;set_cookie("watchedthreadswidth",_9c,30);set_cookie("watchedthreadsheight",_9d,30);}}document.onkeydown=keypress;};if(style_cookie){var cookie=getCookie(style_cookie);var title=cookie?cookie:get_preferred_stylesheet();set_stylesheet(title);}if(style_cookie_txt){var cookie=getCookie(style_cookie_txt);var title=cookie?cookie:get_preferred_stylesheet();set_stylesheet(title,true);}if(style_cookie_site){var cookie=getCookie(style_cookie_site);var title=cookie?cookie:get_preferred_stylesheet();set_stylesheet(title,false,true);}if(getCookie("kumod")=="yes"){kumod_set=true;}