var smf_formSubmitted=false,lastKeepAliveCheck=(new Date).getTime(),smf_editorArray=[],ua=navigator.userAgent.toLowerCase(),is_opera=ua.indexOf("opera")!=-1,is_opera5=ua.indexOf("opera/5")!=-1||ua.indexOf("opera 5")!=-1,is_opera6=ua.indexOf("opera/6")!=-1||ua.indexOf("opera 6")!=-1,is_opera7=ua.indexOf("opera/7")!=-1||ua.indexOf("opera 7")!=-1,is_opera8=ua.indexOf("opera/8")!=-1||ua.indexOf("opera 8")!=-1,is_opera9=ua.indexOf("opera/9")!=-1||ua.indexOf("opera 9")!=-1,is_opera95=ua.indexOf("opera/9.5")!=
-1||ua.indexOf("opera 9.5")!=-1,is_opera96=ua.indexOf("opera/9.6")!=-1||ua.indexOf("opera 9.6")!=-1,is_opera95up=is_opera95||is_opera96,is_ff=(ua.indexOf("firefox")!=-1||ua.indexOf("iceweasel")!=-1||ua.indexOf("icecat")!=-1)&&!is_opera,is_gecko=ua.indexOf("gecko")!=-1&&!is_opera,is_chrome=ua.indexOf("chrome")!=-1,is_safari=ua.indexOf("applewebkit")!=-1&&!is_chrome,is_ie=ua.indexOf("msie")!=-1&&!is_opera,is_ie4=is_ie&&ua.indexOf("msie 4")!=-1,is_ie5=is_ie&&ua.indexOf("msie 5")!=-1,is_ie50=is_ie&&ua.indexOf("msie 5.0")!=
-1,is_ie55=is_ie&&ua.indexOf("msie 5.5")!=-1,is_ie5up=is_ie&&!is_ie4,is_ie6=is_ie&&ua.indexOf("msie 6")!=-1,is_ie6up=is_ie5up&&!is_ie55&&!is_ie5,is_ie6down=is_ie6||is_ie5||is_ie4,is_ie7=is_ie&&ua.indexOf("msie 7")!=-1,is_ie7up=is_ie6up&&!is_ie6,is_ie7down=is_ie7||is_ie6||is_ie5||is_ie4,is_ie8=is_ie&&ua.indexOf("msie 8")!=-1,is_ie8up=is_ie8&&!is_ie7down,is_phone=ua.indexOf("iphone")!=-1||ua.indexOf("ipod")!=-1,ajax_indicator_ele=null;
if(typeof document.getElementById=="undefined")document.getElementById=function(a){return document.all[a]};else if(!window.XMLHttpRequest&&window.ActiveXObject)window.XMLHttpRequest=function(){return new ActiveXObject(is_ie5?"Microsoft.XMLHTTP":"MSXML2.XMLHTTP")};if(typeof document.getElementsByTagName=="undefined")document.getElementsByTagName=function(a){return document.all.tags[a]};if(typeof document.forms=="undefined")document.forms=document.getElementsByTagName("form");
function getXMLDocument(a,c){if(!window.XMLHttpRequest)return null;var b=new XMLHttpRequest,d=typeof c!="undefined",e=this;if(d)b.onreadystatechange=function(){if(b.readyState==4)if(b.responseXML!=null&&b.status==200)if(c.call)c.call(e,b.responseXML);else{e.tmpMethod=c;e.tmpMethod(b.responseXML);delete e.tmpMethod}};b.open("GET",a,d);b.send(null);return b}
function sendXMLDocument(a,c,b){if(!window.XMLHttpRequest)return false;var d=new window.XMLHttpRequest,e=this;if(typeof b!="undefined")d.onreadystatechange=function(){if(d.readyState==4)d.responseXML!=null&&d.status==200?b.call(e,d.responseXML):b.call(e,false)};d.open("POST",a,true);typeof d.setRequestHeader!="undefined"&&d.setRequestHeader("Content-Type","application/x-www-form-urlencoded");d.send(c);return true}String.prototype.php_strtr=function(a,c){return this.replace(RegExp("["+a+"]","g"),function(b){return c.charAt(a.indexOf(b))})};
String.prototype.php_strtolower=function(){return typeof smf_iso_case_folding!="undefined"&&smf_iso_case_folding==true?this.php_strtr("ABCDEFGHIJKLMNOPQRSTUVWXYZ\u008a\u008c\u008e\u009f\u00c0\u00c1\u00c2\u00c3\u00c4\u00c5\u00c6\u00c7\u00c8\u00c9\u00ca\u00cb\u00cc\u00cd\u00ce\u00cf\u00d0\u00d1\u00d2\u00d3\u00d4\u00d5\u00d6\u00d7\u00d8\u00d9\u00da\u00db\u00dc\u00dd\u00de","abcdefghijklmnopqrstuvwxyz\u009a\u009c\u009e\u00ff\u00e0\u00e1\u00e2\u00e3\u00e4\u00e5\u00e6\u00e7\u00e8\u00e9\u00ea\u00eb\u00ec\u00ed\u00ee\u00ef\u00f0\u00f1\u00f2\u00f3\u00f4\u00f5\u00f6\u00f7\u00f8\u00f9\u00fa\u00fb\u00fc\u00fd\u00fe"):
this.php_strtr("ABCDEFGHIJKLMNOPQRSTUVWXYZ","abcdefghijklmnopqrstuvwxyz")};String.prototype.oCharsetConversion={from:"",to:""};
String.prototype.php_to8bit=function(){if(smf_charset=="UTF-8"){for(var a,c="",b=0,d=this.length;b<d;b++){a=this.charCodeAt(b);c+=a<128?String.fromCharCode(a):a<2048?String.fromCharCode(192|a>>6)+String.fromCharCode(128|a&63):a<65536?String.fromCharCode(224|a>>12)+String.fromCharCode(128|a>>6&63)+String.fromCharCode(128|a&63):String.fromCharCode(240|a>>18)+String.fromCharCode(128|a>>12&63)+String.fromCharCode(128|a>>6&63)+String.fromCharCode(128|a&63)}return c}else if(typeof this.oCharsetConversion==
"undefined"){switch(smf_charset){case "ISO-8859-1":this.oCharsetConversion={from:"\u00a0-\u00ff",to:"\u00a0-\u00ff"};break;case "ISO-8859-2":this.oCharsetConversion={from:"\u00a0\u0104\u02d8\u0141\u00a4\u013d\u015a\u00a7\u00a8\u0160\u015e\u0164\u0179\u00ad\u017d\u017b\u00b0\u0105\u02db\u0142\u00b4\u013e\u015b\u02c7\u00b8\u0161\u015f\u0165\u017a\u02dd\u017e\u017c\u0154\u00c1\u00c2\u0102\u00c4\u0139\u0106\u00c7\u010c\u00c9\u0118\u00cb\u011a\u00cd\u00ce\u010e\u0110\u0143\u0147\u00d3\u00d4\u0150\u00d6\u00d7\u0158\u016e\u00da\u0170\u00dc\u00dd\u0162\u00df\u0155\u00e1\u00e2\u0103\u00e4\u013a\u0107\u00e7\u010d\u00e9\u0119\u00eb\u011b\u00ed\u00ee\u010f\u0111\u0144\u0148\u00f3\u00f4\u0151\u00f6\u00f7\u0159\u016f\u00fa\u0171\u00fc\u00fd\u0163\u02d9",
to:"\u00a0-\u00ff"};break;case "ISO-8859-5":this.oCharsetConversion={from:"\u00a0\u0401-\u040c\u00ad\u040e-\u044f\u2116\u0451-\u045c\u00a7\u045e\u045f",to:"\u00a0-\u00ff"};break;case "ISO-8859-9":this.oCharsetConversion={from:"\u00a0-\u00cf\u011e\u00d1-\u00dc\u0130\u015e\u00df-\u00ef\u011f\u00f1-\u00fc\u0131\u015f\u00ff",to:"\u00a0-\u00ff"};break;case "ISO-8859-15":this.oCharsetConversion={from:"\u00a0-\u00a3\u20ac\u00a5\u0160\u00a7\u0161\u00a9-\u00b3\u017d\u00b5-\u00b7\u017e\u00b9-\u00bb\u0152\u0153\u0178\u00bf-\u00ff",
to:"\u00a0-\u00ff"};break;case "tis-620":this.oCharsetConversion={from:"\u20ac\u2026\u2018\u2019\u201c\u201d\u2022\u2013\u2014\u00a0\u0e01-\u0e3a\u0e3f-\u0e5b",to:"\u0080\u0085\u0091-\u0097\u00a0-\u00da\u00df-\u00fb"};break;case "windows-1251":this.oCharsetConversion={from:"\u0402\u0403\u201a\u0453\u201e\u2026\u2020\u2021\u20ac\u2030\u0409\u2039\u040a\u040c\u040b\u040f\u0452\u2018\u2019\u201c\u201d\u2022\u2013\u2014\u2122\u0459\u203a\u045a\u045c\u045b\u045f\u00a0\u040e\u045e\u0408\u00a4\u0490\u00a6\u00a7\u0401\u00a9\u0404\u00ab-\u00ae\u0407\u00b0\u00b1\u0406\u0456\u0491\u00b5-\u00b7\u0451\u2116\u0454\u00bb\u0458\u0405\u0455\u0457\u0410-\u044f",
to:"\u0080-\u0097\u0099-\u00ff"};break;case "windows-1253":this.oCharsetConversion={from:"\u20ac\u201a\u0192\u201e\u2026\u2020\u2021\u2030\u2039\u2018\u2019\u201c\u201d\u2022\u2013\u2014\u2122\u203a\u00a0\u0385\u0386\u00a3-\u00a9\u00ab-\u00ae\u2015\u00b0-\u00b3\u0384\u00b5-\u00b7\u0388-\u038a\u00bb\u038c\u00bd\u038e-\u03a1\u03a3-\u03ce",to:"\u0080\u0082-\u0087\u0089\u008b\u0091-\u0097\u0099\u009b\u00a0-\u00a9\u00ab-\u00d1\u00d3-\u00fe"};break;case "windows-1255":this.oCharsetConversion={from:"\u20ac\u201a\u0192\u201e\u2026\u2020\u2021\u02c6\u2030\u2039\u2018\u2019\u201c\u201d\u2022\u2013\u2014\u02dc\u2122\u203a\u00a0-\u00a3\u20aa\u00a5-\u00a9\u00d7\u00ab-\u00b9\u00f7\u00bb-\u00bf\u05b0-\u05b9\u05bb-\u05c3\u05f0-\u05f4\u05d0-\u05ea\u200e\u200f",
to:"\u0080\u0082-\u0089\u008b\u0091-\u0099\u009b\u00a0-\u00c9\u00cb-\u00d8\u00e0-\u00fa\u00fd\u00fe"};break;case "windows-1256":this.oCharsetConversion={from:"\u20ac\u067e\u201a\u0192\u201e\u2026\u2020\u2021\u02c6\u2030\u0679\u2039\u0152\u0686\u0698\u0688\u06af\u2018\u2019\u201c\u201d\u2022\u2013\u2014\u06a9\u2122\u0691\u203a\u0153\u200c\u200d\u06ba\u00a0\u060c\u00a2-\u00a9\u06be\u00ab-\u00b9\u061b\u00bb-\u00be\u061f\u06c1\u0621-\u0636\u00d7\u0637-\u063a\u0640-\u0643\u00e0\u0644\u00e2\u0645-\u0648\u00e7-\u00eb\u0649\u064a\u00ee\u00ef\u064b-\u064e\u00f4\u064f\u0650\u00f7\u0651\u00f9\u0652\u00fb\u00fc\u200e\u200f\u06d2",
to:"\u0080-\u00ff"};break;default:this.oCharsetConversion={from:"",to:""};break}a=function(e){var f="",g=e.charCodeAt(0);for(e=e.charCodeAt(2);g<=e;g++)f+=String.fromCharCode(g);return f};this.oCharsetConversion.from=this.oCharsetConversion.from.replace(/.\-./g,a);this.oCharsetConversion.to=this.oCharsetConversion.to.replace(/.\-./g,a)}c="";b=d=0;for(a=this.length;b<a;b++){d=this.oCharsetConversion.from.indexOf(this.charAt(b));c+=d>-1?this.oCharsetConversion.to.charAt(d):this.charCodeAt(b)>127?"&#"+
this.charCodeAt(b)+";":this.charAt(b)}return c};String.prototype.php_urlencode=function(){return escape(this).replace(/\+/g,"%2b").replace("*","%2a").replace("/","%2f").replace("@","%40")};String.prototype._replaceEntities=function(a,c,b){return String.fromCharCode(parseInt(b))};String.prototype.removeEntities=function(){return this.replace(/&(amp;)?#(\d+);/g,this._replaceEntities)};
function reqWin(a,c,b,d){if(c&&self.screen.availWidth*0.8<c||b&&self.screen.availHeight*0.8<b){d=false;c=Math.min(c,self.screen.availWidth*0.8);b=Math.min(b,self.screen.availHeight*0.8)}else d=typeof d!="undefined"&&d==true;window.open(a,"requested_popup","toolbar=no,location=no,status=no,menubar=no,scrollbars="+(d?"no":"yes")+",width="+(c?c:480)+",height="+(b?b:220)+",resizable=no");return false}
function storeCaret(a){if(typeof a.createTextRange!="undefined")a.caretPos=document.selection.createRange().duplicate()}
function replaceText(a,c){if(typeof c.caretPos!="undefined"&&c.createTextRange){var b=c.caretPos;b.text=b.text.charAt(b.text.length-1)==" "?a+" ":a;b.select()}else if(typeof c.selectionStart!="undefined"){b=c.value.substr(0,c.selectionStart);var d=c.value.substr(c.selectionEnd),e=c.scrollTop;c.value=b+a+d;if(c.setSelectionRange){c.focus();c.setSelectionRange(b.length+a.length,b.length+a.length)}c.scrollTop=e}else{c.value+=a;c.focus(c.value.length-1)}}
function surroundText(a,c,b){if(typeof b.caretPos!="undefined"&&b.createTextRange){var d=b.caretPos,e=d.text.length;d.text=d.text.charAt(d.text.length-1)==" "?a+d.text+c+" ":a+d.text+c;if(e==0){d.moveStart("character",-c.length);d.moveEnd("character",-c.length);d.select()}else b.focus(d)}else if(typeof b.selectionStart!="undefined"){d=b.value.substr(0,b.selectionStart);e=b.value.substr(b.selectionStart,b.selectionEnd-b.selectionStart);var f=b.value.substr(b.selectionEnd),g=b.selectionStart,h=b.scrollTop;
b.value=d+a+e+c+f;if(b.setSelectionRange){e.length==0?b.setSelectionRange(g+a.length,g+a.length):b.setSelectionRange(g,g+a.length+e.length+c.length);b.focus()}b.scrollTop=h}else{b.value+=a+c;b.focus(b.value.length-1)}}function isEmptyText(a){for(a=a.value;a.length>0&&(a.charAt(0)==" "||a.charAt(0)=="\t");)a=a.substring(1,a.length);for(;a.length>0&&(a.charAt(a.length-1)==" "||a.charAt(a.length-1)=="\t");)a=a.substring(0,a.length-1);return a==""?true:false}
function submitonce(){smf_formSubmitted=true;for(var a=0;a<smf_editorArray.length;a++)smf_editorArray[a].doSubmit()}function submitThisOnce(a){if(is_safari)return!smf_formSubmitted;if(typeof a.form!="undefined")a=a.form;for(var c=0;c<a.length;c++)if(typeof a[c]!="undefined"&&a[c].tagName.toLowerCase()=="textarea")a[c].readOnly=true;return!smf_formSubmitted}
function setInnerHTML(a,c){if(typeof a.innerHTML!="undefined")a.innerHTML=c;else{var b=document.createRange();b.selectNodeContents(a);b.deleteContents();a.appendChild(b.createContextualFragment(c))}}function setOuterHTML(a,c){if(typeof a.outerHTML!="undefined")a.outerHTML=c;else{var b=document.createRange();b.setStartBefore(a);a.parentNode.replaceChild(b.createContextualFragment(c),a)}}
function getInnerHTML(a){if(typeof a.innerHTML!="undefined")return a.innerHTML;else{for(var c="",b=0;b<a.childNodes.length;b++)c+=getOuterHTML(a.childNodes[b]);return c}}
function getOuterHTML(a){if(typeof a.outerHTML!="undefined")return a.outerHTML;var c="";switch(a.nodeType){case 1:c+="<"+a.nodeName;for(var b=0;b<a.attributes.length;b++)if(a.attributes[b].nodeValue!=null)c+=" "+a.attributes[b].nodeName+'="'+a.attributes[b].nodeValue+'"';c+=a.childNodes.length==0&&in_array(a.nodeName.toLowerCase(),["hr","input","img","link","meta","br"])?" />":">"+getInnerHTML(a)+"</"+a.nodeName+">";break;case 3:c+=a.nodeValue;break;case 4:c+="<![CDATA["+a.nodeValue+"]]\>";break;
case 5:c+="&"+a.nodeName+";";break;case 8:c+="<!--"+a.nodeValue+"--\>";break}return c}function in_array(a,c){for(var b in c)if(c[b]==a)return true;return false}function array_search(a,c){for(var b in c)if(c[b]==a)return b;return null}function selectRadioByName(a,c){if(typeof a.length=="undefined")return a.checked=true;for(var b=0;b<a.length;b++)if(a[b].value==c)return a[b].checked=true;return false}
function invertAll(a,c,b,d){for(var e=0;e<c.length;e++)if(!(typeof c[e].name=="undefined"||typeof b!="undefined"&&c[e].name.substr(0,b.length)!=b&&c[e].id.substr(0,b.length)!=b))if(!c[e].disabled||typeof d!="undefined")c[e].checked=a.checked}lastKeepAliveCheck=(new Date).getTime();
function smf_sessionKeepAlive(){var a=(new Date).getTime();if(smf_scripturl&&a-lastKeepAliveCheck>9E5){(new Image).src=smf_scripturl+(smf_scripturl.indexOf("?")==-1?"?":"&")+"action=keepalive;time="+a;lastKeepAliveCheck=a}window.setTimeout("smf_sessionKeepAlive();",12E5)}window.setTimeout("smf_sessionKeepAlive();",12E5);
function smf_setThemeOption(a,c,b,d,e){if(d==null)d=smf_session_id;if(e==null)e="";(new Image).src=smf_scripturl+(smf_scripturl.indexOf("?")==-1?"?":"&")+"action=jsoption;var="+a+";val="+c+";sesc="+d+e+(b==null?"":"&id="+b)+";"+(new Date).getTime()}
function smf_avatarResize(){for(var a=document.getElementsByTagName("img"),c=0;c<a.length;c++)if(a[c].className=="avatar"){var b=new Image;b.src=a[c].src;if(smf_avatarMaxWidth!=0&&b.width>smf_avatarMaxWidth){a[c].height=smf_avatarMaxWidth*b.height/b.width;a[c].width=smf_avatarMaxWidth}else if(smf_avatarMaxHeight!=0&&b.height>smf_avatarMaxHeight){a[c].width=smf_avatarMaxHeight*b.width/b.height;a[c].height=smf_avatarMaxHeight}else{a[c].width=b.width;a[c].height=b.height}}if(typeof window_oldAvatarOnload!=
"undefined"&&window_oldAvatarOnload){window_oldAvatarOnload();window_oldAvatarOnload=null}}function hashLoginPassword(a,c){if(c==null)c=smf_session_id;if(typeof hex_sha1!="undefined")if(a.user.value.indexOf("@")==-1){if(typeof window.opera=="undefined")a.passwrd.autocomplete="off";a.hash_passwrd.value=hex_sha1(hex_sha1(a.user.value.php_to8bit().php_strtolower()+a.passwrd.value.php_to8bit())+c);a.passwrd.value=is_ff!=-1?"":a.passwrd.value.replace(/./g,"*")}}
function hashAdminPassword(a,c,b){if(b==null)b=smf_session_id;if(typeof hex_sha1!="undefined"){a.admin_hash_pass.value=hex_sha1(hex_sha1(c.toLowerCase()+a.admin_pass.value)+b);a.admin_pass.value=a.admin_pass.value.replace(/./g,"*")}}
function expandPages(a,c,b,d,e){var f="",g=0;a.style.fontWeight="normal";a.onclick="";if((d-b)/e>50){g=d;d=b+50*e}for(b=b;b<d;b+=e)f+='<a class="navPages" href="'+c.replace(/%d/,b)+'">'+(1+b/e)+"</a> ";if(g>0)f+='<span style="font-weight: bold; cursor: '+(is_ie&&!is_ie6up?"hand":"pointer")+';" onclick="expandPages(this, \''+c+"', "+d+", "+g+", "+e+');"> ... </span> ';setInnerHTML(a,f)}
function smfToggle(a,c){this.uid=a;this.state=c;this.use_cookie=0;var b=Array(5);b[0]=null;this.useCookie=function(d){this.use_cookie=d?1:0};this.toggle=function(d){if(d==null)d=!this.state;if(this.use_cookie)document.cookie=this.uid+"="+(d?1:0);if(b[0]!=null){var e=b[2]?!d:d;smf_setThemeOption(b[0],e?1:0,b[3]==0?null:b[3],b[1],b[4])}var f=0;for(f=0;f<this.imageToggles.length;f++)if(e=document.getElementById(this.imageToggles[f][0]))e.src=d?this.imageToggles[f][2]:this.imageToggles[f][1];for(f=0;f<
this.panelToggles.length;f++){e=this.panelToggles[f][1]?!d:d;var g=document.getElementById(this.panelToggles[f][0]);if(g)g.style.display=e?"none":""}this.state=d};this.setOptions=function(d,e,f,g,h){b[0]=d;b[1]=e;b[2]=f==null?0:1;b[3]=g==null?0:g;b[4]=h==null?"":";admin_key="+h};this.imageToggles=[];this.panelToggles=[];this.addToggleImage=function(d,e,f,g){var h=this.imageToggles.length;this.imageToggles[h]=Array(3);this.imageToggles[h][0]=d;this.imageToggles[h][1]=(g==null?smf_images_url:"")+e;
this.imageToggles[h][2]=(g==null?smf_images_url:"")+f};this.addTogglePanel=function(d,e){var f=this.panelToggles.length;this.panelToggles[f]=Array(2);this.panelToggles[f][0]=d;this.panelToggles[f][1]=e==null?0:1}}
function ajax_indicator(a){if(ajax_indicator_ele==null){ajax_indicator_ele=document.getElementById("ajax_in_progress");ajax_indicator_ele==null&&typeof ajax_notification_text!=null&&create_ajax_indicator_ele()}if(ajax_indicator_ele!=null){if(navigator.appName=="Microsoft Internet Explorer"&&!is_ie7up){ajax_indicator_ele.style.position="absolute";ajax_indicator_ele.style.top=document.documentElement.scrollTop}ajax_indicator_ele.style.display=a?"block":"none"}}
function create_ajax_indicator_ele(){ajax_indicator_ele=document.createElement("div");ajax_indicator_ele.id="ajax_in_progress";var a=document.createElement("a");a.href="javascript:ajax_indicator(false)";var c=document.createElement("img");c.src=smf_images_url+"/icons/quick_remove.gif";if(typeof ajax_notification_cancel_text!=null){c.alt=ajax_notification_cancel_text;c.title=ajax_notification_cancel_text}a.appendChild(c);ajax_indicator_ele.appendChild(a);ajax_indicator_ele.innerHTML+=ajax_notification_text;
document.body.appendChild(ajax_indicator_ele)}function smf_htmlspecialchars(a){a=a.replace(/&/g,"&amp;");a=a.replace(/</g,"&lt;");a=a.replace(/>/g,"&gt;");return a=a.replace(/"/g,"&quot;")}function smf_unhtmlspecialchars(a){a=a.replace(/&amp;/g,"&");a=a.replace(/&lt;/g,"<");a=a.replace(/&gt;/g,">");return a=a.replace(/&quot;/g,'"')}function smf_addslashes(a){return a=a.replace(/\\/g,"\\\\").replace(/'/g,"\\'")}
function createEventListener(a){if(typeof a.addEventListener=="undefined")if(a.attachEvent){a.addEventListener=function(c,b){a.attachEvent("on"+c,b)};a.removeEventListener=function(c,b){a.detachEvent("on"+c,b)}}else{a.addEventListener=function(c,b){a["on"+c]=b};a.removeEventListener=function(c){a["on"+c]=null}}}
function grabJumpToContent(){var a=getXMLDocument(smf_prepareScriptUrl(smf_scripturl)+"action=xmlhttp;sa=jumpto;xml"),c=[];ajax_indicator(true);if(a.responseXML){a=a.responseXML.getElementsByTagName("smf")[0].getElementsByTagName("item");for(var b=0,d=a.length;b<d;b++)c[c.length]={id:parseInt(a[b].getAttribute("id")),isCategory:a[b].getAttribute("type")=="category",name:a[b].firstChild.nodeValue.removeEntities(),is_current:false,childLevel:parseInt(a[b].getAttribute("childlevel"))}}ajax_indicator(false);
b=0;for(d=aJumpTo.length;b<d;b++)aJumpTo[b].fillSelect(c)}var aJumpTo=[];function JumpTo(a){this.opt=a;this.dropdownList=null;this.showSelect()}
JumpTo.prototype.showSelect=function(){for(var a="",c=this.opt.iCurBoardChildLevel;c>0;c--)a+=this.opt.sBoardChildLevelIndicator;setInnerHTML(document.getElementById(this.opt.sContainerId),this.opt.sJumpToTemplate.replace(/%select_id%/,this.opt.sContainerId+"_select").replace(/%dropdown_list%/,'<select name="'+this.opt.sContainerId+'_select" id="'+this.opt.sContainerId+'_select" '+(typeof document.implementation=="undefined"?'onmouseover="grabJumpToContent();" ':"")+(typeof document.onbeforeactivate==
"undefined"?"onfocus":"onbeforeactivate")+'="grabJumpToContent();"><option value="?board='+this.opt.iCurBoardId+'.0">'+a+this.opt.sBoardPrefix+this.opt.sCurBoardName.removeEntities()+'</option></select>&nbsp;<input type="button" value="'+this.opt.sGoButtonLabel+'" onclick="window.location.href = \''+smf_scripturl+"?board="+this.opt.iCurBoardId+".0';\" />"));this.dropdownList=document.getElementById(this.opt.sContainerId+"_select")};
JumpTo.prototype.fillSelect=function(a){var c=typeof document.implementation=="undefined",b=0,d=document.createElement("option");d.appendChild(document.createTextNode(this.opt.sCatSeparator));d.disabled="disabled";d.value="";if(c){this.dropdownList.onmouseover=null;this.dropdownList.remove(0)}if(typeof document.onbeforeactivate=="undefined")this.dropdownList.onfocus=null;else this.dropdownList.onbeforeactivate=null;for(var e=c?this.dropdownList:document.createDocumentFragment(),f=0,g=a.length;f<g;f++){var h,
i;if(!a[f].isCategory&&a[f].id==this.opt.iCurBoardId)if(c)b=this.dropdownList.options.length;else{this.dropdownList.insertBefore(e,this.dropdownList.options[0]);e=document.createDocumentFragment();continue}if(a[f].isCategory)e.appendChild(d.cloneNode(true));else{h=a[f].childLevel;for(i="";h>0;h--)i+=this.opt.sBoardChildLevelIndicator}h=document.createElement("option");h.appendChild(document.createTextNode((a[f].isCategory?this.opt.sCatPrefix:i+this.opt.sBoardPrefix)+a[f].name));h.value=a[f].isCategory?
"#c"+a[f].id:"?board="+a[f].id+".0";e.appendChild(h);a[f].isCategory&&e.appendChild(d.cloneNode(true))}this.dropdownList.appendChild(e);if(c)this.dropdownList.options[b].selected=true;this.dropdownList.style.width="auto";this.dropdownList.focus();this.dropdownList.onchange=function(){if(this.selectedIndex>0&&this.options[this.selectedIndex].value)window.location.href=smf_scripturl+this.options[this.selectedIndex].value.substr(smf_scripturl.indexOf("?")==-1||this.options[this.selectedIndex].value.substr(0,
1)!="?"?0:1)}};var aIconLists=[];function IconList(a){if(window.XMLHttpRequest){this.opt=a;this.bListLoaded=false;this.funcMousedownHandler=this.oContainerDiv=null;this.funcParent=this;this.iCurTimeout=this.iCurMessageId=0;this.initIcons()}}
IconList.prototype.initIcons=function(){for(var a=document.images.length-1,c=this.opt.sIconIdPrefix.length;a>=0;a--)if(document.images[a].id.substr(0,c)==this.opt.sIconIdPrefix)setOuterHTML(document.images[a],'<div title="'+this.opt.sLabelIconList+'" onclick="'+this.opt.sBackReference+".openPopup(this, "+document.images[a].id.substr(c)+')" onmouseover="'+this.opt.sBackReference+'.onBoxHover(this, true)" onmouseout="'+this.opt.sBackReference+'.onBoxHover(this, false)" style="background: '+this.opt.sBoxBackground+
"; cursor: "+(is_ie&&!is_ie6up?"hand":"pointer")+'; padding: 3px; text-align: center;"><img src="'+document.images[a].src+'" alt="'+document.images[a].alt+'" style="margin: 0px; padding: '+(is_ie?"3px":"3px 0px 3px 0px")+';" /></div>')};
IconList.prototype.onBoxHover=function(a,c){a.style.border=c?this.opt.iBoxBorderWidthHover+"px solid "+this.opt.sBoxBorderColorHover:"";a.style.background=c?this.opt.sBoxBackgroundHover:this.opt.sBoxBackground;a.style.padding=c?3-this.opt.iBoxBorderWidthHover+"px":"3px"};
IconList.prototype.openPopup=function(a,c){if(!this.bListLoaded&&this.oContainerDiv==null){this.oContainerDiv=document.createElement("div");this.oContainerDiv.id="iconList";this.oContainerDiv.style.display="none";this.oContainerDiv.style.cursor=is_ie&&!is_ie6up?"hand":"pointer";this.oContainerDiv.style.position="absolute";this.oContainerDiv.style.width=a.offsetWidth+"px";this.oContainerDiv.style.background=this.opt.sContainerBackground;this.oContainerDiv.style.border=this.opt.sContainerBorder;this.oContainerDiv.style.padding=
"1px";this.oContainerDiv.style.textAlign="center";document.body.appendChild(this.oContainerDiv);ajax_indicator(true);this.tmpMethod=getXMLDocument;this.tmpMethod(smf_prepareScriptUrl(this.opt.sScriptUrl)+"action=xmlhttp;sa=messageicons;board="+this.opt.iBoardId+";xml",this.onIconsReceived);delete this.tmpMethod;createEventListener(document.body)}this.iCurMessageId=c;var b=smf_itemPos(a);if(is_ie50)b[1]+=4;this.oContainerDiv.style.top=b[1]+a.offsetHeight+"px";this.oContainerDiv.style.left=b[0]-1+"px";
this.oClickedIcon=a;if(this.bListLoaded)this.oContainerDiv.style.display="block";document.body.addEventListener("mousedown",this.onWindowMouseDown,false)};
IconList.prototype.onIconsReceived=function(a){a=a.getElementsByTagName("smf")[0].getElementsByTagName("icon");for(var c="",b=0,d=a.length;b<d;b++)c+='<div onmouseover="'+this.opt.sBackReference+'.onItemHover(this, true)" onmouseout="'+this.opt.sBackReference+'.onItemHover(this, false);" onmousedown="'+this.opt.sBackReference+".onItemMouseDown(this, '"+a[b].getAttribute("value")+'\');" style="padding: 3px 0px 3px 0px; margin-left: auto; margin-right: auto; border: '+this.opt.sItemBorder+"; background: "+
this.opt.sItemBackground+'"><img src="'+a[b].getAttribute("url")+'" alt="'+a[b].getAttribute("name")+'" title="'+a[b].firstChild.nodeValue+'" border="0" /></div>';setInnerHTML(this.oContainerDiv,c);this.oContainerDiv.style.display="block";this.bListLoaded=true;if(is_ie)this.oContainerDiv.style.width=this.oContainerDiv.clientWidth+"px";ajax_indicator(false)};
IconList.prototype.onItemHover=function(a,c){a.style.background=c?this.opt.sItemBackgroundHover:this.opt.sItemBackground;a.style.border=c?this.opt.sItemBorderHover:this.opt.sItemBorder;this.iCurTimeout!=0&&window.clearTimeout(this.iCurTimeout);if(c)this.onBoxHover(this.oClickedIcon,true);else this.iCurTimeout=window.setTimeout(this.opt.sBackReference+".collapseList();",500)};
IconList.prototype.onItemMouseDown=function(a,c){if(this.iCurMessageId!=0){ajax_indicator(true);this.tmpMethod=getXMLDocument;var b=this.tmpMethod(smf_prepareScriptUrl(this.opt.sScriptUrl)+"action=jsmodify;topic="+this.opt.iTopicId+";msg="+this.iCurMessageId+";sesc="+this.opt.sSessionId+";icon="+c+";xml");delete this.tmpMethod;ajax_indicator(false);b=b.responseXML.getElementsByTagName("smf")[0].getElementsByTagName("message")[0];if(b.getElementsByTagName("error").length==0){this.opt.bShowModify&&
b.getElementsByTagName("modified").length!=0&&setInnerHTML(document.getElementById("modified_"+this.iCurMessageId),b.getElementsByTagName("modified")[0].childNodes[0].nodeValue);this.oClickedIcon.getElementsByTagName("img")[0].src=a.getElementsByTagName("img")[0].src}}};IconList.prototype.onWindowMouseDown=function(){for(var a=aIconLists.length-1;a>=0;a--){aIconLists[a].funcParent.tmpMethod=aIconLists[a].collapseList;aIconLists[a].funcParent.tmpMethod();delete aIconLists[a].funcParent.tmpMethod}};
IconList.prototype.collapseList=function(){this.onBoxHover(this.oClickedIcon,false);this.oContainerDiv.style.display="none";this.iCurMessageId=0;document.body.removeEventListener("mousedown",this.onWindowMouseDown,false)};
function smf_mousePose(a){var c=0,b=0;if(a.pageX){b=a.pageY;c=a.pageX}else if(a.clientX){c=a.clientX+(document.documentElement.scrollLeft?document.documentElement.scrollLeft:document.body.scrollLeft);b=a.clientY+(document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop)}return[c,b]}
function smf_itemPos(a){var c=0,b=0;if(typeof a.offsetParent!="undefined"){c=a.offsetLeft;for(b=a.offsetTop;a.offsetParent&&typeof a.offsetParent=="object";){a=a.offsetParent;c+=a.offsetLeft;b+=a.offsetTop}}else if(typeof a.x!="undefined"){c=a.x;b=a.y}return[c,b]}function smf_prepareScriptUrl(a){return a.indexOf("?")==-1?a+"?":a+(a.charAt(a.length-1)=="?"||a.charAt(a.length-1)=="&"||a.charAt(a.length-1)==";"?"":";")}var onload_events=[];
function add_load_event(a){var c=window.onload;if(typeof c!="function")window.onload=a;else if(onload_events.length==0){onload_events[0]=c;onload_events[1]=a;window.onload=function(){for(var b=0;b<onload_events.length;b++)onload_events[b]&&onload_events[b]()}}else onload_events[onload_events.length]=a}function smfFooterHighlight(a,c){a.src=smf_images_url+"/"+(c?"h_":"")+a.id+".gif"}
function smfSelectText(a,c){var b=typeof c=="boolean"&&c?document.getElementById(a):a.parentNode.nextSibling;if(typeof b!="object"||b==null)return false;if(document.body.createTextRange){var d=document.body.createTextRange();d.moveToElementText(b);d.select()}else if(window.getSelection){d=window.getSelection();if(d.setBaseAndExtent){var e=b.lastChild;d.setBaseAndExtent(b,0,e,typeof e.innerText=="undefined"?e.textContent.length:e.innerText.length)}else{e=document.createRange();e.selectNodeContents(b);
d.removeAllRanges();d.addRange(e)}}return false};
