var formSubmitted=false;var lastKeepAliveCheck=new Date().getTime();var editorArray=new Array();var ua=navigator.userAgent.toLowerCase();var is_opera=ua.indexOf("opera")!=-1;var is_opera5=ua.indexOf("opera/5")!=-1||ua.indexOf("opera 5")!=-1;var is_opera6=ua.indexOf("opera/6")!=-1||ua.indexOf("opera 6")!=-1;var is_opera7=ua.indexOf("opera/7")!=-1||ua.indexOf("opera 7")!=-1;var is_opera8=ua.indexOf("opera/8")!=-1||ua.indexOf("opera 8")!=-1;var is_opera9=ua.indexOf("opera/9")!=-1||ua.indexOf("opera 9")!=-1;var is_opera95=ua.indexOf("opera/9.5")!=-1||ua.indexOf("opera 9.5")!=-1;var is_opera96=ua.indexOf("opera/9.6")!=-1||ua.indexOf("opera 9.6")!=-1;var is_opera95up=is_opera95||is_opera96;var is_gecko=ua.indexOf("gecko")!=-1&&!is_opera;var is_ff=(ua.indexOf("firefox")!=-1&&!is_opera)||is_gecko;var is_chrome=ua.indexOf("chrome")!=-1;var is_safari=ua.indexOf("applewebkit")!=-1&&!is_chrome;var is_ie=ua.indexOf("msie")!=-1&&!is_opera;var is_ie4=is_ie&&ua.indexOf("msie 4")!=-1;var is_ie5=is_ie&&ua.indexOf("msie 5")!=-1;var is_ie50=is_ie&&ua.indexOf("msie 5.0")!=-1;var is_ie55=is_ie&&ua.indexOf("msie 5.5")!=-1;var is_ie5up=is_ie&&!is_ie4;var is_ie6=is_ie&&ua.indexOf("msie 6")!=-1;var is_ie6up=is_ie5up&&!is_ie55&&!is_ie5;var is_ie7=is_ie&&ua.indexOf("msie 7")!=-1;var is_ie7up=is_ie6up&&!is_ie6;var is_ie7down=is_ie7||is_ie6||is_ie5||is_ie4;var is_ie8=is_ie&&ua.indexOf("msie 8")!=-1;var is_ie8up=is_ie8&&!is_ie7down;var is_phone=ua.indexOf("iphone")!=-1||ua.indexOf("ipod")!=-1;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(navigator.userAgent.indexOf("MSIE 5")!=-1?"Microsoft.XMLHTTP":"MSXML2.XMLHTTP")}}}if(typeof(document.forms)=="undefined"){document.forms=document.getElementsByTagName("form")}function getXMLDocument(d,e){if(!window.XMLHttpRequest){return null}var b=new XMLHttpRequest();var a=typeof(e)!="undefined";var c=this;if(a){b.onreadystatechange=function(){if(b.readyState!=4){return}if(b.responseXML!=null&&b.status==200){if(e.call){e.call(c,b.responseXML)}else{c.tmpMethod=e;c.tmpMethod(b.responseXML);delete c.tmpMethod}}}}b.open("GET",d,a);b.send(null);return b}function sendXMLDocument(d,a,e){if(!window.XMLHttpRequest){return false}var c=new window.XMLHttpRequest();var b=this;if(typeof(e)!="undefined"){c.onreadystatechange=function(){if(c.readyState!=4){return}if(c.responseXML!=null&&c.status==200){e.call(b,c.responseXML)}else{e.call(b,false)}}}c.open("POST",d,true);if(typeof(c.setRequestHeader)!="undefined"){c.setRequestHeader("Content-Type","application/x-www-form-urlencoded")}c.send(a);return true}function textToEntities(d){var c="";if(charset=="UTF-8"){for(var a=0;a<d.length;a++){var b=d.charCodeAt(a);if(b<128){c+=d.charAt(a)}else{if(b<2048){c+=String.fromCharCode(192|b>>6,128|b&63)}else{if(b<65536){c+=String.fromCharCode(224|b>>12,128|b>>6&63,128|b&63)}else{c+=String.fromCharCode(240|b>>18,128|b>>12&63,128|b>>6&63,128|b&63)}}}}}else{for(var a=0;a<d.length;a++){if(d.charCodeAt(a)>127){c+="&#"+d.charCodeAt(a)+";"}else{c+=d.charAt(a)}}}return c}function reqWin(a,d,c,b){if((d&&self.screen.availWidth*0.8<d)||(c&&self.screen.availHeight*0.8<c)){b=false;d=Math.min(d,self.screen.availWidth*0.8);c=Math.min(c,self.screen.availHeight*0.8)}else{b=typeof(b)!="undefined"&&b==true}window.open(a,"requested_popup","toolbar=no,location=no,status=no,menubar=no,scrollbars="+(b?"no":"yes")+",width="+(d?d:480)+",height="+(c?c:220)+",resizable=no");return false}function storeCaret(a){if(typeof(a.createTextRange)!="undefined"){a.caretPos=document.selection.createRange().duplicate()}}function replaceText(e,b){if(typeof(b.caretPos)!="undefined"&&b.createTextRange){var c=b.caretPos;c.text=c.text.charAt(c.text.length-1)==" "?e+" ":e;c.select()}else{if(typeof(b.selectionStart)!="undefined"){var d=b.value.substr(0,b.selectionStart);var a=b.value.substr(b.selectionEnd);var f=b.scrollTop;b.value=d+e+a;if(b.setSelectionRange){b.focus();b.setSelectionRange(d.length+e.length,d.length+e.length)}b.scrollTop=f}else{b.value+=e;b.focus(b.value.length-1)}}}function surroundText(c,a,j){if(typeof(j.caretPos)!="undefined"&&j.createTextRange){var g=j.caretPos,k=g.text.length;g.text=g.text.charAt(g.text.length-1)==" "?c+g.text+a+" ":c+g.text+a;if(k==0){g.moveStart("character",-a.length);g.moveEnd("character",-a.length);g.select()}else{j.focus(g)}}else{if(typeof(j.selectionStart)!="undefined"){var d=j.value.substr(0,j.selectionStart);var h=j.value.substr(j.selectionStart,j.selectionEnd-j.selectionStart);var f=j.value.substr(j.selectionEnd);var e=j.selectionStart;var b=j.scrollTop;j.value=d+c+h+a+f;if(j.setSelectionRange){if(h.length==0){j.setSelectionRange(e+c.length,e+c.length)}else{j.setSelectionRange(e,e+c.length+h.length+a.length)}j.focus()}j.scrollTop=b}else{j.value+=c+a;j.focus(j.value.length-1)}}}function isEmptyText(a){var b=a.value;while(b.length>0&&(b.charAt(0)==" "||b.charAt(0)=="\t")){b=b.substring(1,b.length)}while(b.length>0&&(b.charAt(b.length-1)==" "||b.charAt(b.length-1)=="\t")){b=b.substring(0,b.length-1)}if(b==""){return true}else{return false}}function submitonce(a){formSubmitted=true}function submitThisOnce(b){if(is_safari){return !formSubmitted}if(typeof(b.form)!="undefined"){b=b.form}for(var a=0;a<b.length;a++){if(typeof(b[a])!="undefined"&&b[a].tagName.toLowerCase()=="textarea"){b[a].readOnly=true}}return !formSubmitted}function setInnerHTML(c,a){if(typeof(c.innerHTML)!="undefined"){c.innerHTML=a}else{var b=document.createRange();b.selectNodeContents(c);b.deleteContents();c.appendChild(b.createContextualFragment(a))}}function setOuterHTML(c,a){if(typeof(c.outerHTML)!="undefined"){c.outerHTML=a}else{var b=document.createRange();b.setStartBefore(c);c.parentNode.replaceChild(b.createContextualFragment(a),c)}}function getInnerHTML(b){if(typeof(b.innerHTML)!="undefined"){return b.innerHTML}else{var c="";for(var a=0;a<b.childNodes.length;a++){c+=getOuterHTML(b.childNodes[a])}return c}}function getOuterHTML(b){if(typeof(b.outerHTML)!="undefined"){return b.outerHTML}var c="";switch(b.nodeType){case 1:c+="<"+b.nodeName;for(var a=0;a<b.attributes.length;a++){if(b.attributes[a].nodeValue!=null){c+=" "+b.attributes[a].nodeName+'="'+b.attributes[a].nodeValue+'"'}}if(b.childNodes.length==0&&in_array(b.nodeName.toLowerCase(),["hr","input","img","link","meta","br"])){c+=">"}else{c+=">"+getInnerHTML(b)+"</"+b.nodeName+">"}break;case 3:c+=b.nodeValue;break;case 4:c+="<![CDATA["+b.nodeValue+"]]>";break;case 5:c+="&"+b.nodeName+";";break;case 8:c+="<!--"+b.nodeValue+"-->";break}return c}function in_array(b,a){for(var c=0;c<a.length;c++){if(a[c]==b){return true}}return false}function selectRadioByName(b,a){if(typeof(b.length)=="undefined"){return b.checked=true}for(var c=0;c<b.length;c++){if(b[c].value==a){return b[c].checked=true}}return false}function invertAll(a,d,b){for(var c=0;c<d.length;c++){if(typeof(d[c].name)=="undefined"||(typeof(b)!="undefined"&&d[c].name.substr(0,b.length)!=b)){continue}if(!d[c].disabled){d[c].checked=a.checked}}}var lastKeepAliveCheck=new Date().getTime();function sessionKeepAlive(){var b=new Date().getTime();if(scripturl&&b-lastKeepAliveCheck>900000){var a=new Image();a.src=scripturl+(scripturl.indexOf("?")==-1?"?":"&")+"action=keepalive;"+b;lastKeepAliveCheck=b}window.setTimeout("sessionKeepAlive();",1200000)}window.setTimeout("sessionKeepAlive();",1200000);function setThemeOption(b,d,e,a){if(a==null){a=session_id}var c=new Image();c.src=scripturl+(scripturl.indexOf("?")==-1?"?":"&")+"action=jsoption;var="+b+";val="+d+";sesc="+a+(e==null?"":"&id="+e)+";"+(new Date().getTime())}function avatarResize(){var a=document.getElementsByTagName?document.getElementsByTagName("img"):document.all.tags("img");for(var b=0;b<a.length;b++){if(a[b].className!="avatar"){continue}var c=new Image();c.src=a[b].src;if(avatarMaxWidth!=0&&c.width>avatarMaxWidth){a[b].height=(avatarMaxWidth*c.height)/c.width;a[b].width=avatarMaxWidth}else{if(avatarMaxHeight!=0&&c.height>avatarMaxHeight){a[b].width=(avatarMaxHeight*c.width)/c.height;a[b].height=avatarMaxHeight}else{a[b].width=c.width;a[b].height=c.height}}}if(typeof(window_oldAvatarOnload)!="undefined"&&window_oldAvatarOnload){window_oldAvatarOnload();window_oldAvatarOnload=null}}function hashLoginPassword(b,a){if(a==null){a=session_id}if(typeof(hex_sha1)=="undefined"){return}if(b.user.value.indexOf("@")!=-1){return}if(typeof(window.opera)=="undefined"){b.passwrd.autocomplete="off"}b.hash_passwrd.value=hex_sha1(hex_sha1(b.user.value.php_to8bit().php_strtolower()+b.passwrd.value.php_to8bit())+a);if(navigator.userAgent.indexOf("Firefox/")!=-1){b.passwrd.value=""}else{b.passwrd.value=b.passwrd.value.replace(/./g,"*")}}function hashAdminPassword(c,b,a){if(a==null){a=session_id}if(typeof(hex_sha1)=="undefined"){return}c.admin_hash_pass.value=hex_sha1(hex_sha1(b.toLowerCase()+c.admin_pass.value)+a);c.admin_pass.value=c.admin_pass.value.replace(/./g,"*")}function ajax_indicator(b){var a=document.getElementById("ajax_in_progress");if(a!=null){if(navigator.appName=="Microsoft Internet Explorer"&&navigator.userAgent.indexOf("MSIE 7")==-1){a.style.top=document.documentElement.scrollTop}a.style.display=b?"block":"none"}}var Editor=new Array();function expandPages(d,g,h,f,b){var e="",c,a=0;d.style.fontWeight="normal";d.onclick="";if((f-h)/b>1000){a=f;f=h+1000*b}for(c=h;c<f;c+=b){e+='<a class="navPages" href="'+g.replace(/%d/,c)+'">'+(1+c/b)+"</a> "}if(a>0){e+='<span style="font-weight: bold; cursor: '+(is_ie&&!is_ie6up?"hand":"pointer")+';" onclick="expandPages(this, \''+g+"', "+f+", "+a+", "+b+');"> ... </span> '}setInnerHTML(d,e)}function createEventListener(a){if(typeof(a.addEventListener)=="undefined"){if(a.attachEvent){a.addEventListener=function(d,b,c){a.attachEvent("on"+d,b)};a.removeEventListener=function(d,b,c){a.detachEvent("on"+d,b)}}else{a.addEventListener=function(d,b,c){a["on"+d]=b};a.removeEventListener=function(d,b,c){a["on"+d]=null}}}}function htmlspecialchars(a){a=a.replace(/&/g,"&amp;");a=a.replace(/</g,"&lt;");a=a.replace(/>/g,"&gt;");a=a.replace(/"/g,"&quot;");return a}function unhtmlspecialchars(a){a=a.replace(/&amp;/g,"&");a=a.replace(/&lt;/g,"<");a=a.replace(/&gt;/g,">");a=a.replace(/&quot;/g,'"');return a}function findCoords(a){if(typeof(a.tagName)=="undefined"){return{iX:0,iY:0}}var b=in_array(a.tagName.toLowerCase(),["tr","form","div"]);if(a.parentNode==null||typeof(a.parentNode.offsetLeft)=="undefined"){return{iX:b?0:a.offsetLeft,iY:b?0:a.offsetTop}}else{var c=findCoords(a.parentNode);return{iX:(b?0:a.offsetLeft)+c.iX,iY:(b?0:a.offsetTop)+c.iY}}}var aIconLists=new Array();function IconList(a){if(!window.XMLHttpRequest){return}this.opt=a;this.bListLoaded=false;this.oContainerDiv=null;this.funcMousedownHandler=null;this.funcParent=this;this.iCurMessageId=0;this.iCurTimeout=0;this.initIcons()}IconList.prototype.initIcons=function(){for(var b=document.images.length-1,a=this.opt.sIconIdPrefix.length;b>=0;b--){if(document.images[b].id.substr(0,a)==this.opt.sIconIdPrefix){setOuterHTML(document.images[b],'<div title="'+this.opt.sLabelIconList+'" onclick="'+this.opt.sBackReference+".openPopup(this, "+document.images[b].id.substr(a)+')" 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[b].src+'" alt="'+document.images[b].alt+'" style="margin: 0px; padding: '+(is_ie?"3px":"3px 0px 3px 0px")+';"></div>')}}};IconList.prototype.onBoxHover=function(b,a){b.style.border=a?this.opt.iBoxBorderWidthHover+"px solid "+this.opt.sBoxBorderColorHover:"";b.style.background=a?this.opt.sBoxBackgroundHover:this.opt.sBoxBackground;b.style.padding=a?(3-this.opt.iBoxBorderWidthHover)+"px":"3px"};IconList.prototype.openPopup=function(c,a){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=c.clientWidth+"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(this.opt.sScriptUrl+"?action=xmlhttp;sa=messageicons;board="+this.opt.iBoardId+";xml",this.onIconsReceived);delete this.tmpMethod;createEventListener(document.body)}this.iCurMessageId=a;var b=findCoords(c);if(is_ie50){b.iY+=4}this.oContainerDiv.style.top=(b.iY+c.offsetHeight)+"px";this.oContainerDiv.style.left=(b.iX-1)+"px";this.oClickedIcon=c;if(this.bListLoaded){this.oContainerDiv.style.display="block"}document.body.addEventListener("mousedown",this.onWindowMouseDown,false)};IconList.prototype.onIconsReceived=function(c){var b=c.getElementsByTagName("smf")[0].getElementsByTagName("icon");var d="";for(var a=0,e=b.length;a<e;a++){d+='<div onmouseover="'+this.opt.sBackReference+'.onItemHover(this, true)" onmouseout="'+this.opt.sBackReference+'.onItemHover(this, false);" onmousedown="'+this.opt.sBackReference+".onItemMouseDown(this, '"+b[a].getAttribute("value")+'\');" style="padding: 3px 0px 3px 0px; margin-left: auto; margin-right: auto; border: '+this.opt.sItemBorder+"; background: "+this.opt.sItemBackground+'"><img src="'+b[a].getAttribute("url")+'" alt="'+b[a].getAttribute("name")+'" title="'+b[a].firstChild.nodeValue+'" border="0"></div>'}setInnerHTML(this.oContainerDiv,d);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(b,a){b.style.background=a?this.opt.sItemBackgroundHover:this.opt.sItemBackground;b.style.border=a?this.opt.sItemBorderHover:this.opt.sItemBorder;if(this.iCurTimeout!=0){window.clearTimeout(this.iCurTimeout)}if(a){this.onBoxHover(this.oClickedIcon,true)}else{this.iCurTimeout=window.setTimeout(this.opt.sBackReference+".collapseList();",500)}};IconList.prototype.onItemMouseDown=function(b,a){if(this.iCurMessageId!=0){ajax_indicator(true);this.tmpMethod=getXMLDocument;var c=this.tmpMethod(this.opt.sScriptUrl+"?action=jsmodify;topic="+this.opt.iTopicId+";msg="+this.iCurMessageId+";sesc="+this.opt.sSessionId+";icon="+a+";xml");delete this.tmpMethod;ajax_indicator(false);var d=c.responseXML.getElementsByTagName("smf")[0].getElementsByTagName("message")[0];if(d.getElementsByTagName("error").length==0){if(this.opt.bShowModify&&d.getElementsByTagName("modified").length!=0){setInnerHTML(document.getElementById("modified_"+this.iCurMessageId),d.getElementsByTagName("modified")[0].childNodes[0].nodeValue)}this.oClickedIcon.getElementsByTagName("img")[0].src=b.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 prepareScriptUrl(a){return a.indexOf("?")==-1?a+"?":a+(a.charAt(a.length-1)=="?"||a.charAt(a.length-1)=="&"||a.charAt(a.length-1)==";"?"":";")}function theme_change(a){getXMLDocument(scripturl+"?action=jsoption;new_th="+a+";sa=quickpick");window.location.reload()}function EventAttach(d,c,b,a){a=a||false;if(c=="keypress"&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||d.attachEvent)){c="keydown"}if(d.addEventListener){d.addEventListener(c,b,a)}else{if(d.attachEvent){d.attachEvent("on"+c,b)}}}function func_mousePose(b){var a=0;var c=0;if(b.pageX){c=b.pageY;a=b.pageX}else{if(b.clientX){a=b.clientX+(document.documentElement.scrollLeft?document.documentElement.scrollLeft:document.body.scrollLeft);c=b.clientY+(document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop)}}return[a,c]}function func_itemPos(b){var c=0;var a=0;if(typeof(b.offsetParent)!="undefined"){c=b.offsetLeft;a=b.offsetTop;while(b.offsetParent&&typeof(b.offsetParent)=="object"){b=b.offsetParent;c+=b.offsetLeft;a+=b.offsetTop}}else{if(typeof(b.x)!="undefined"){c=b.x;a=b.y}}return[c,a]}function menu(g){var e=document.getElementById(g);d(g);var b=new Array(2);var h=new Array();this.killElement=f;this.onMenuMouseMove=c;function d(){if(!e){return false}if(!is_ie){return false}var j=e.getElementsByTagName("LI");for(i=0;i<j.length;i++){j[i].mid=i+1;j[i].onmouseover=function(){a(this,true)};j[i].onmouseout=function(){a(this,false)}}createEventListener(document.body);document.body.addEventListener("mousemove",c,false);return true}function a(k,j){if(!k.mid){return}if(j){k.className+=" over"}else{h[k.mid]=k;setTimeout(function(){f(k.mid)},20)}}function f(j){if(h[j]){itemPos=func_itemPos(h[j]);h[j].className=h[j].className.replace(" over","")}}function c(j){if(!j){j=window.event}b=func_mousePose(j)}}function Toggle(h,a){this.uid=h;this.state=a;this.use_cookie=0;var e=Array(5);e[0]=null;this.useCookie=g;this.toggle=d;this.setOptions=c;this.imageToggles=new Array();this.panelToggles=new Array();this.addToggleImage=b;this.addTogglePanel=f;function g(j){this.use_cookie=j?1:0}function d(n){if(n==null){n=!this.state}if(this.use_cookie){document.cookie=this.uid+"="+(n?1:0)}if(e[0]!=null){var l=e[2]?!n:n;setThemeOption(e[0],l?1:0,e[3]==0?null:e[3],e[1],e[4])}var j=0;for(j=0;j<this.imageToggles.length;j++){var m=document.getElementById(this.imageToggles[j][0]);if(m){m.src=n?this.imageToggles[j][2]:this.imageToggles[j][1]}}for(j=0;j<this.panelToggles.length;j++){var l=this.panelToggles[j][1]?!n:n;var k=document.getElementById(this.panelToggles[j][0]);if(k){k.style.display=l?"none":""}}this.state=n}function c(n,k,m,j,l){e[0]=n;e[1]=k;e[2]=m==null?0:1;e[3]=j==null?0:j;e[4]=l==null?"":";admin_key="+l}function b(k,n,m,j){var l=this.imageToggles.length;this.imageToggles[l]=Array(3);this.imageToggles[l][0]=k;this.imageToggles[l][1]=(j==null?images_url:"")+n;this.imageToggles[l][2]=(j==null?images_url:"")+m}function f(j,l){var k=this.panelToggles.length;this.panelToggles[k]=Array(2);this.panelToggles[k][0]=j;this.panelToggles[k][1]=l==null?0:1}}function addslashes(a){a=a.replace(/\\/g,"\\\\").replace(/'/g,"\\'");return a}String.prototype.php_strtr=function(b,a){return this.replace(new RegExp("["+b+"]","g"),function(c){return a.charAt(b.indexOf(c))})};String.prototype.php_strtolower=function(){return typeof(iso_case_folding)!="undefined"&&iso_case_folding==true?this.php_strtr("ABCDEFGHIJKLMNOPQRSTUVWXYZ\x8a\x8c\x8e\x9f\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde","abcdefghijklmnopqrstuvwxyz\x9a\x9c\x9e\xff\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe"):this.php_strtr("ABCDEFGHIJKLMNOPQRSTUVWXYZ","abcdefghijklmnopqrstuvwxyz")};String.prototype.php_to8bit=function(){if(charset=="UTF-8"){var g,f="";for(var c=0,e=this.length;c<e;c++){g=this.charCodeAt(c);if(g<128){f+=String.fromCharCode(g)}else{if(g<2048){f+=String.fromCharCode(192|g>>6)+String.fromCharCode(128|g&63)}else{if(g<65536){f+=String.fromCharCode(224|g>>12)+String.fromCharCode(128|g>>6&63)+String.fromCharCode(128|g&63)}else{f+=String.fromCharCode(240|g>>18)+String.fromCharCode(128|g>>12&63)+String.fromCharCode(128|g>>6&63)+String.fromCharCode(128|g&63)}}}}return f}else{if(typeof(this.oCharsetConversion)=="undefined"){switch(charset){case"ISO-8859-1":this.oCharsetConversion={from:"\xa0-\xff",to:"\xa0-\xff"};break;case"ISO-8859-2":this.oCharsetConversion={from:"\xa0\u0104\u02d8\u0141\xa4\u013d\u015a\xa7\xa8\u0160\u015e\u0164\u0179\xad\u017d\u017b\xb0\u0105\u02db\u0142\xb4\u013e\u015b\u02c7\xb8\u0161\u015f\u0165\u017a\u02dd\u017e\u017c\u0154\xc1\xc2\u0102\xc4\u0139\u0106\xc7\u010c\xc9\u0118\xcb\u011a\xcd\xce\u010e\u0110\u0143\u0147\xd3\xd4\u0150\xd6\xd7\u0158\u016e\xda\u0170\xdc\xdd\u0162\xdf\u0155\xe1\xe2\u0103\xe4\u013a\u0107\xe7\u010d\xe9\u0119\xeb\u011b\xed\xee\u010f\u0111\u0144\u0148\xf3\xf4\u0151\xf6\xf7\u0159\u016f\xfa\u0171\xfc\xfd\u0163\u02d9",to:"\xa0-\xff"};break;case"ISO-8859-5":this.oCharsetConversion={from:"\xa0\u0401-\u040c\xad\u040e-\u044f\u2116\u0451-\u045c\xa7\u045e\u045f",to:"\xa0-\xff"};break;case"ISO-8859-9":this.oCharsetConversion={from:"\xa0-\xcf\u011e\xd1-\xdc\u0130\u015e\xdf-\xef\u011f\xf1-\xfc\u0131\u015f\xff",to:"\xa0-\xff"};break;case"ISO-8859-15":this.oCharsetConversion={from:"\xa0-\xa3\u20ac\xa5\u0160\xa7\u0161\xa9-\xb3\u017d\xb5-\xb7\u017e\xb9-\xbb\u0152\u0153\u0178\xbf-\xff",to:"\xa0-\xff"};break;case"tis-620":this.oCharsetConversion={from:"\u20ac\u2026\u2018\u2019\u201c\u201d\u2022\u2013\u2014\xa0\u0e01-\u0e3a\u0e3f-\u0e5b",to:"\x80\x85\x91-\x97\xa0-\xda\xdf-\xfb"};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\xa0\u040e\u045e\u0408\xa4\u0490\xa6\xa7\u0401\xa9\u0404\xab-\xae\u0407\xb0\xb1\u0406\u0456\u0491\xb5-\xb7\u0451\u2116\u0454\xbb\u0458\u0405\u0455\u0457\u0410-\u044f",to:"\x80-\x97\x99-\xff"};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\xa0\u0385\u0386\xa3-\xa9\xab-\xae\u2015\xb0-\xb3\u0384\xb5-\xb7\u0388-\u038a\xbb\u038c\xbd\u038e-\u03a1\u03a3-\u03ce",to:"\x80\x82-\x87\x89\x8b\x91-\x97\x99\x9b\xa0-\xa9\xab-\xd1\xd3-\xfe"};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\xa0-\xa3\u20aa\xa5-\xa9\xd7\xab-\xb9\xf7\xbb-\xbf\u05b0-\u05b9\u05bb-\u05c3\u05f0-\u05f4\u05d0-\u05ea\u200e\u200f",to:"\x80\x82-\x89\x8b\x91-\x99\x9b\xa0-\xc9\xcb-\xd8\xe0-\xfa\xfd\xfe"};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\xa0\u060c\xa2-\xa9\u06be\xab-\xb9\u061b\xbb-\xbe\u061f\u06c1\u0621-\u0636\xd7\u0637-\u063a\u0640-\u0643\xe0\u0644\xe2\u0645-\u0648\xe7-\xeb\u0649\u064a\xee\xef\u064b-\u064e\xf4\u064f\u0650\xf7\u0651\xf9\u0652\xfb\xfc\u200e\u200f\u06d2",to:"\x80-\xff"};break;default:this.oCharsetConversion={from:"",to:""};break}var d=function(k){var h="";for(var j=k.charCodeAt(0),l=k.charCodeAt(2);j<=l;j++){h+=String.fromCharCode(j)}return h};this.oCharsetConversion.from=this.oCharsetConversion.from.replace(/.\-./g,d);this.oCharsetConversion.to=this.oCharsetConversion.to.replace(/.\-./g,d)}}var f="",b=0,a=0;for(var c=0,g=this.length;c<g;c++){b=this.oCharsetConversion.from.indexOf(this.charAt(c));f+=b>-1?this.oCharsetConversion.to.charAt(b):(this.charCodeAt(c)>127?"&#"+this.charCodeAt(c)+";":this.charAt(c))}return f};String.prototype.php_urlencode=function(){return escape(this).replace(/\+/g,"%2b").replace("*","%2a").replace("/","%2f").replace("@","%40")};String.prototype._replaceEntities=function(a,b){return String.fromCharCode(parseInt(b))};String.prototype.removeEntities=function(){return this.replace(/&(?:amp;)?#(\d+);/g,this._replaceEntities)};function selectText(a,d){if(d){var e=document.getElementById(a)}else{var e=a.parentNode.nextSibling}if(!e){return false}if(document.body.createTextRange){var c=document.body.createTextRange();c.moveToElementText(e);c.select()}else{if(window.getSelection){var b=window.getSelection();if(b.setBaseAndExtent){b.setBaseAndExtent(e,0,e,1)}else{var c=document.createRange();c.selectNodeContents(e);b.removeAllRanges();b.addRange(c)}}}return false}var onload_events=new Array();function add_load_event(a){var b=window.onload;if(typeof(b)!="function"){window.onload=a}else{if(onload_events.length==0){onload_events[0]=b;onload_events[1]=a;window.onload=function(){for(var c=0;c<onload_events.length;c++){if(onload_events[c]){onload_events[c]()}}}}else{onload_events[onload_events.length]=a}}}function concatChildValues(b,d){var c="";var e=b.firstChild;var a;while(e){a=e.nodeValue;if(a){c+=a}e=e.nextSibling}if(c==""&&d!=undefined){c=d}return c}function insertTab(d,h){var g=9;if(d.which){var a=d.which}else{var a=d.keyCode}if(a==g){var c=h.scrollTop;if(d.type=="keydown"){if(h.setSelectionRange){var b=h.selectionStart;var f=h.selectionEnd;h.value=h.value.substring(0,b)+"\t"+h.value.substr(f);h.setSelectionRange(b+1,b+1);h.focus()}else{if(h.createTextRange){document.selection.createRange().text="\t";h.onblur=function(){this.focus();this.onblur=null}}}}if(d.returnValue){d.returnValue=false}h.scrollTop=c;if(d.preventDefault){d.preventDefault()}return false}return true};
