function escapeQuotes(b){var a=new RegExp("'","g");b=b.replace(a,"\\'");a=new RegExp('"',"g");b=b.replace(a,"&quot;");a=new RegExp("\\n","g");b=b.replace(a,"\\n");return b}function WikiURL(a){if(typeof a=="undefined"){a=pagename}if(use_path_info){return script_url+"/"+escapeQuotes(a)+"?"}else{return script_url+"?pagename="+escapeQuotes(a)+"&"}}function flipAll(a){var c=-1;for(var b=0;b<a.length;b++){fldObj=a.elements[b];if((fldObj.type=="checkbox")&&(fldObj.name.substring(0,2)=="p[")){if(c==-1){c=(fldObj.checked)?true:false}fldObj.checked=(c)?false:true}}}function toggletoc(b,c,e,d){var f=document.getElementById(d);if(f.style.display=="none"){f.style.display="block";b.title='"._("Click to hide the TOC")."';b.src=c}else{f.style.display="none";b.title='"._("Click to display")."';b.src=e}}var doneOnloadHook;if(!window.onloadFuncts){var onloadFuncts=[]}function addOnloadHook(a){onloadFuncts[onloadFuncts.length]=a}function hookEvent(b,a){if(window.addEventListener){window.addEventListener(b,a,false)}else{if(window.attachEvent){window.attachEvent("on"+b,a)}}}function showHideFolder(e){var d=document.getElementById(e+"-body");if(d==null){return}var b=document.getElementById(e+"-img");var a=new Date();a.setTime(a.getTime()+(30*24*60*60*1000));var c=" expires="+a.toGMTString();if(d.style.display=="none"){d.style.display="block";b.src=folderArrowPath+"/folderArrowOpen.png";document.cookie="folder_"+e+"=Open;"+c}else{d.style.display="none";b.src=folderArrowPath+"/folderArrowClosed.png";document.cookie="folder_"+e+"=Closed;"+c}}function setupshowHideFolder(){var e=["p-tb","p-tbx","p-tags","p-rc"];for(var d=0;d<e.length;d++){if(e[d]){var f=e[d];var b="folder_"+f+"=";var c=document.cookie.indexOf(b);if(c>-1){var a=document.getElementById(f+"-body");if(a){a.style.display=document.cookie.charAt(c+b.length)=="C"?"block":"none"}showHideFolder(f)}}}}hookEvent("load",setupshowHideFolder);function runOnloadHook(){if(doneOnloadHook||!(document.getElementById&&document.getElementsByTagName)){return}doneOnloadHook=true;sortables_init();for(var a=0;a<onloadFuncts.length;a++){onloadFuncts[a]()}}hookEvent("load",runOnloadHook);function getAllSheets(){if(!window.ScriptEngine&&navigator.__ice_version){return document.styleSheets}if(document.getElementsByTagName){var c=document.getElementsByTagName("link"),d=document.getElementsByTagName("style")}else{if(document.styleSheets&&document.all){var c=document.all.tags("LINK"),d=document.all.tags("STYLE")}else{return[]}}for(var b=0,e=[];c[b];b++){var a=c[b].rel?c[b].rel:c[b].getAttribute?c[b].getAttribute("rel"):"";if(typeof(a)=="string"&&a.toLowerCase().indexOf("style")+1){e[e.length]=c[b]}}for(var b=0;d[b];b++){e[e.length]=d[b]}return e}function changeStyle(){for(var a=0,b=getAllSheets();b[a];a++){if(b[a].title){b[a].disabled=true}for(var c=0;c<arguments.length;c++){if(b[a].title==arguments[c]){b[a].disabled=false}}}}function PrinterStylesheet(){changeStyle("Printer")};