function link_to_post(A,B){B=typeof(B)!="undefined"?B:"viewtopic";temp=prompt(L_LINK_TO,"http://"+SERVER_NAME+B+".php?p="+A+"#"+A);return false}function link_to_topic(A,B){B=typeof(B)!="undefined"?B:"viewtopic";temp=prompt(L_LINK_TO,"http://"+SERVER_NAME+B+".php?t="+A);return false}function marklist(id,name,state){var parent=document.getElementById(id);if(!parent){eval("parent = document."+id)}if(!parent){return}var rb=parent.getElementsByTagName("input");for(var r=0;r<rb.length;r++){if(rb[r].name.substr(0,name.length)==name){rb[r].checked=state}}}function MM_swapImgRestore(){var C,A,B=document.MM_sr;for(C=0;B&&C<B.length&&(A=B[C])&&A.oSrc;C++){A.src=A.oSrc}}function MM_preloadImages(){var D=document;if(D.images){if(!D.MM_p){D.MM_p=new Array()}var C,B=D.MM_p.length,A=MM_preloadImages.arguments;for(C=0;C<A.length;C++){if(A[C].indexOf("#")!=0){D.MM_p[B]=new Image;D.MM_p[B++].src=A[C]}}}}function MM_findObj(E,D){var C,B,A;if(!D){D=document}if((C=E.indexOf("?"))>0&&parent.frames.length){D=parent.frames[E.substring(C+1)].document;E=E.substring(0,C)}if(!(A=D[E])&&D.all){A=D.all[E]}for(B=0;!A&&B<D.forms.length;B++){A=D.forms[B][E]}for(B=0;!A&&D.layers&&B<D.layers.length;B++){A=MM_findObj(E,D.layers[B].document)}if(!A&&document.getElementById){A=document.getElementById(E)}return A}function MM_swapImage(){var D,C=0,A,B=MM_swapImage.arguments;document.MM_sr=new Array;for(D=0;D<(B.length-2);D+=3){if((A=MM_findObj(B[D]))!=null){document.MM_sr[C++]=A;if(!A.oSrc){A.oSrc=A.src}A.src=B[D+2]}}}function img_popup(D,C,B,A){screenwidth=false;screenwidth=screen.Width;if(!screenwidth){screenwidth=window.outerWidth}screenheight=false;screenheight=screen.Height;if(!screenheight){screenheight=window.outerHeight}if(screenwidth<(C+30)||screenheight<(B+30)||C==null||B==null){window.open(D,"limit_image_mod_popup_img_"+A,"resizable=yes,top=0,left=0,screenX=0,screenY=0,scrollbars=yes",false)}else{window.open(D,"limit_image_mod_popup_img_"+A,"resizable=yes,top=0,left=0,screenX=0,screenY=0,height="+(B+30)+",width="+(C+30),false)}}function _hideBBCode(){this.objs=[];return this}_hideBBCode.prototype.IsDisplaySupported=function(){if(window.opera&&!document.childNodes){return false}if(document.getElementById||document.all){return true}return false};_hideBBCode.prototype.getObj=function(A){return(document.getElementById?document.getElementById(A):(document.all?document.all[A]:(document.layers?document.layers[A]:null)))};_hideBBCode.prototype.displayObj=function(D,B){var A=this.getObj(D);if(!A){return}var C=(document.layers?A:A.style);if(this.IsDisplaySupported()){C.display=B}else{C.visibility=(B=="none"?"hidden":"visible")}};_hideBBCode.prototype.open=function(D){var C="",A="hide"+Math.floor(Math.random()*15000);var B=(this.IsDisplaySupported()?"display:none;":"visibility:hidden;");if(document.layers){B="position:relative;"+B}C+='<div class="hidetitle"><a class="postlink" href="javascript:hideBBCode.showHide(\''+A+'\');" onmouseover="top.status=\'\';" onfocus="this.blur();">'+D+"</a></div>";C+='<div id="'+A+'" style="'+B+'" class="hide">';document.write(C);this.objs[A]="none"};_hideBBCode.prototype.close=function(){document.write("</div>")};_hideBBCode.prototype.showHide=function(A){if(!this.objs[A]){return}this.objs[A]=((this.objs[A]=="none")?"block":"none");this.displayObj(A,this.objs[A])};var hideBBCode=new _hideBBCode();function page_jump(A,B,C){pages=1;cur_st=page_start;cur_page=1;if(B%C==0){pages=B/C}else{pages=Math.ceil(B/C)}msg=jump_from+" "+pages;if(cur_st>0){cur_page=cur_st/C;cur_page=cur_page-1}show_page=1;if(cur_page<pages){show_page=cur_page+1}if(cur_page>=pages){show_page=cur_page-1}else{show_page=cur_page+1}userPage=prompt(msg,show_page);if(userPage>0){if(userPage<1){userPage=1}if(userPage>pages){userPage=pages}if(userPage==1){start=0}else{start=(userPage-1)*C}window.location=A+"&start="+start}}function sprintf(){if(!arguments||arguments.length<1||!RegExp){return}var I=arguments[0];var G=/([^%]*)%('.|0|\x20)?(-)?(\d+)?(\.\d+)?(%|b|c|d|u|f|o|s|x|X)(.*)/;var Q=b=[],A=0,E=0;while(Q=G.exec(I)){var H=Q[1],N=Q[2],R=Q[3],M=Q[4];var J=Q[5],F=Q[6],C=Q[7];E++;if(F=="%"){B="%"}else{A++;if(A>=arguments.length){alert("Error! Not enough function arguments ("+(arguments.length-1)+", excluding the string)\nfor the number of substitution parameters in string ("+A+" so far).")}var D=arguments[A];var O="";if(N&&N.substr(0,1)=="'"){O=H.substr(1,1)}else{if(N){O=N}}var K=true;if(R&&R==="-"){K=false}var P=-1;if(M){P=parseInt(M)}var L=-1;if(J&&F=="f"){L=parseInt(J.substring(1))}var B=D;if(F=="b"){B=parseInt(D).toString(2)}else{if(F=="c"){B=String.fromCharCode(parseInt(D))}else{if(F=="d"){B=parseInt(D)?parseInt(D):0}else{if(F=="u"){B=Math.abs(D)}else{if(F=="f"){B=(L>-1)?Math.round(parseFloat(D)*Math.pow(10,L))/Math.pow(10,L):parseFloat(D)}else{if(F=="o"){B=parseInt(D).toString(8)}else{if(F=="s"){B=D}else{if(F=="x"){B=(""+parseInt(D).toString(16)).toLowerCase()}else{if(F=="X"){B=(""+parseInt(D).toString(16)).toUpperCase()}}}}}}}}}}I=H+B+C}return I}function _alert(C,B){var A=document.getElementById(C);A.innerHTML=B}function dE(C,A){var B=document.getElementById(C);if(!A){A=(B.style.display==""||B.style.display=="block")?-1:1}B.style.display=(A==1)?"block":"none"}function subPanels(D){var B,C,A;if(typeof(D)=="string"){show_panel=D}for(B=0;B<panels.length;B++){C=document.getElementById(panels[B]);A=document.getElementById(panels[B]+"-tab");if(C){if(panels[B]==show_panel){C.style.display="block";if(A){A.className="activetab"}}else{C.style.display="none";if(A){A.className=""}}}}}function displayBlocks(F,D,A){var C=(D.checked==true)?1:-1;if(A){C*=-1}var B=document.getElementsByTagName("DIV");for(var E=0;E<B.length;E++){if(B[E].className.indexOf(F)==0){B[E].style.display=(C==1)?"none":"block"}}}function selectCode(A){var D=A.parentNode.parentNode.getElementsByTagName("CODE")[0];if(document.selection){var C=document.body.createTextRange();C.moveToElementText(D);C.select()}else{var B=window.getSelection();var C=document.createRange();C.setStartBefore(D);C.setEndAfter(D);B.addRange(C)}}function leq(B,A){if(B<A){return true}else{return false}}function jumpto(B,C,A){var D=prompt(JUMP_PAGE,A);if(D!==null&&!isNaN(D)&&D>0){param=B.indexOf("?")!=-1?"&":"?";document.location.href=B.replace(/&amp;/g,"&")+param+"start="+((D-1)*C)}}function poplatex(D,C,B){if(!C){C=500}if(!B){B=200}if(ie){L_LATEX_POPUP_TITLE=L_CODE}var A=window.open("",L_LATEX_POPUP_TITLE,"width="+C+", height="+B+", resizable=yes, scrollbars=yes, menubar=no, toolbar=no, location=no, status=yes");A.document.write('<!DOCTYPE html PUBLIC"-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"><head><title>'+L_LATEX_POPUP_TITLE+'</title><link rel="stylesheet" href="'+STYLESHEET+'" /><link rel="stylesheet" href="'+CODEBOX_STYLESHEET+'" /><script type="text/javascript" src="http://'+SERVER_NAME+'js/latex_code.js" ><\/script></head><body><div style="width: 95%; padding: 5px; text-align: left;"><dl class="codebox" style="width: 95%;"><dt>'+L_CODE+': <a href="#" onclick="selectCode(this); return false;">'+L_SELECT_ALL+"</a></dt><dd><code>"+D+"</code></dd></dl></div></body></html>");A.document.close();A.focus()}$(function(){$("a.latex").click(function(B){B.preventDefault();var A=window.open(this.href,"","width=550, height=400, resizable=yes, scrollbars=yes, menubar=no, toolbar=no, location=no, status=no");A.focus();return false});$("a.latexcenter").click(function(B){B.preventDefault();var A=window.open(this.href,"","width=550, height=400, resizable=yes, scrollbars=yes, menubar=no, toolbar=no, location=no, status=no");A.focus();return false})});function createCookie(C,D,E){if(E){var B=new Date();B.setTime(B.getTime()+(E*24*60*60*1000));var A="; expires="+B.toGMTString()}else{var A=""}document.cookie=C+"="+D+A+"; path=/; domain = "+COOKIE_DOMAIN}function readCookie(B){var D=B+"=";var A=document.cookie.split(";");for(var C=0;C<A.length;C++){var E=A[C];while(E.charAt(0)==" "){E=E.substring(1,E.length)}if(E.indexOf(D)==0){return E.substring(D.length,E.length)}}return null}function GlobalReplaceWithComma(B,A){while(A.indexOf(B)!=-1){A=A.replace(B,",")}return A}function GlobalReplaceComma(A,B){while(B.indexOf(",")!=-1){B=B.replace(",",A)}return B}function _dom_toggle(){return this}_dom_toggle.prototype.objref=function(A){return document.getElementById?document.getElementById(A):(document.all?document.all[A]:(document.layers?document.layers[A]:null))};_dom_toggle.prototype.cancel_event=function(){if(window.event){window.event.cancelBubble=true}};_dom_toggle.prototype.save_toggle_status=function(F,A,D,B){F=F.replace(A,"");var E=readCookie(D);var C="%2C";E=GlobalReplaceWithComma(C,E);if(B){if(E==null||E==""){createCookie(D,F,365)}else{E=E+","+F;E=GlobalReplaceComma(C,E);createCookie(D,E,365)}}else{E=","+E+",";F=","+F+",";E=GlobalReplaceWithComma(F,E);E=E.substring(1,E.length-1);E=GlobalReplaceComma(C,E);createCookie(D,E,365)}};_dom_toggle.prototype.toggle=function(H,E,D,G,A,F){var B=this.objref(H);var C=this.objref(E);if(B&&B.style){if(B.style.display=="none"){B.style.display="";if(F!=""){this.save_toggle_status(H,A,F,false)}}else{B.style.display="none";if(F!=""){this.save_toggle_status(H,A,F,true)}}if(C&&C.src){C.src=(B.style.display=="none")?D:G}}this.cancel_event()};dom_toggle=new _dom_toggle();var keep_toggle_status=1;