function getVpWidth(){var A;if(self.innerHeight){A=self.innerWidth}else{if(document.documentElement&&document.documentElement.clientHeight){A=document.documentElement.clientWidth}else{if(document.body){A=document.body.clientWidth}}}return A}function setMinWidth(B,C){var A=document.getElementById(C);if(A.currentStyle){if(A.currentStyle.marginRight!="auto"){mRight=parseInt(A.currentStyle.marginRight)}else{mRight=0}if(A.currentStyle.marginLeft!="auto"){mLeft=parseInt(A.currentStyle.marginLeft)}else{mLeft=0}margins=mLeft+mRight;window.status=margins;if(getVpWidth()<=B){A.style.width=(B-margins)+"px"}else{if(getVpWidth()>B){window.status=margins;A.style.width="auto"}}}}function addEvent(C,B,A){if(C.addEventListener){C.addEventListener(B,A,false);EventCache.add(C,B,A)}else{if(C.attachEvent){C["e"+B+A]=A;C[B+A]=function(){C["e"+B+A](window.event)};C.attachEvent("on"+B,C[B+A]);EventCache.add(C,B,A)}else{C["on"+B]=C["e"+B+A]}}}var EventCache=function(){var A=[];return{listEvents:A,add:function(B,D,C){A.push(arguments)},flush:function(){var B,C;for(B=A.length-1;B>=0;B=B-1){C=A[B];if(C[0].removeEventListener){C[0].removeEventListener(C[1],C[2],C[3])}if(C[1].substring(0,2)!="on"){C[1]="on"+C[1]}if(C[0].detachEvent){C[0].detachEvent(C[1],C[2])}C[0][C[1]]=null}}}}();addEvent(window,"unload",EventCache.flush);function addLoadEvent(A){var B=window.onload;if(typeof window.onload!="function"){window.onload=A}else{window.onload=function(){B();A()}}}function getElementsByClass(G,E,A){var D=new Array();if(E==null){E=document}if(A==null){A="*"}var C=E.getElementsByTagName(A);var B=C.length;var F=new RegExp("(^|\\s)"+G+"(\\s|$)");for(i=0,j=0;i<B;i++){if(F.test(C[i].className)){D[j]=C[i];j++}}return D}function toggle(B){var A=document.getElementById(B);if(A.style.display!="none"){A.style.display="none"}else{A.style.display=""}}function insertAfter(B,C,A){B.insertBefore(C,A.nextSibling)}Array.prototype.inArray=function(B){var A;for(A=0;A<this.length;A++){if(this[A]===B){return true}}return false};function getCookie(C){var D=document.cookie.indexOf(C+"=");var A=D+C.length+1;if((!D)&&(C!=document.cookie.substring(0,C.length))){return null}if(D==-1){return null}var B=document.cookie.indexOf(";",A);if(B==-1){B=document.cookie.length}return unescape(document.cookie.substring(A,B))}function setCookie(C,E,A,H,D,G){var B=new Date();B.setTime(B.getTime());if(A){A=A*1000*60*60*24}var F=new Date(B.getTime()+(A));document.cookie=C+"="+escape(E)+((A)?";expires="+F.toGMTString():"")+((H)?";path="+H:"")+((D)?";domain="+D:"")+((G)?";secure":"")}function deleteCookie(A,C,B){if(getCookie(A)){document.cookie=A+"="+((C)?";path="+C:"")+((B)?";domain="+B:"")+";expires=Thu, 01-Jan-1970 00:00:01 GMT"}}function checkThingBar(){var C=document.getElementById("fcontent");if(!C){C=document.getElementById("wikicontent")}if(!C){C=document.getElementById("editbox")}var D=document.getElementById("thingbar");var B=document.getElementById("thingbartoggle");var A=document.getElementById("thingbarexterior");if(getCookie("hidetbar")){C.style.width="98%";D.style.display="none";B.innerHTML="[+] Show hints";A.style.hsave=A.style.height;A.style.height="30px"}else{C.style.width="74%";D.style.display="";B.innerHTML="[X] Hide hints";if(A.style.hsave&&(A.style.height=A.style.hsave)){A.style.height=A.style.hsave}}}function toggleThingBar(){if(getCookie("hidetbar")){deleteCookie("hidetbar")}else{setCookie("hidetbar","1",3,"/")}checkThingBar()}function insertAtCursor(E,D){var A=E.scrollTop;if(document.selection){E.focus();sel=document.selection.createRange();sel.text=D}else{if(E.selectionStart||E.selectionStart=="0"){var C=E.selectionStart;var B=E.selectionEnd;E.value=E.value.substring(0,C)+D+E.value.substring(B,E.value.length);E.selectionStart=C;E.selectionEnd=C+D.length;E.focus();E.scrollTop=A}else{E.value+=D}}E.scrollTop=A}function headTailAtCursor(G,F,E){var B=G.scrollTop;if(document.selection){G.focus();var H=document.selection.createRange();if(H.parentElement()==G){var A=document.selection.createRange().text;document.selection.createRange().text=F+A+E}}else{if(G.selectionStart||G.selectionStart=="0"){var D=G.selectionStart;var C=G.selectionEnd;myValue=G.value.substring(D,C);G.value=G.value.substring(0,D)+F+myValue+E+G.value.substring(C,G.value.length);G.selectionStart=D+F.length;G.selectionEnd=D+myValue.length+F.length;G.focus()}else{G.value+=F+E}}G.scrollTop=B}var Messaging={url:"/messaging.php",dismiss:function(D,C){var B=document.getElementById("notification-"+D);B.parentNode.removeChild(B);var A=document.getElementById("notifications");if(A&&(A.childNodes.length==0)){A.parentNode.style.display="none"}YAHOO.util.Connect.asyncRequest("POST",Messaging.url+"?mId="+D+"&dismiss=1")},Link:function(B){if(B.dismiss&&B.dismiss!="no"){Messaging.dismiss(B.id)}if(B.url){var A=Messaging.url+"?mId="+B.id+"&url="+B.url;if(B.target=="_blank"){window.open(A)}else{window.location.href=A}}}};