MediaWiki:Schulenburg.js

/* Any JavaScript here will be loaded for all users on every page load. */ var currentTab = 0;

function showHideTabs(tabNo){ var tableNames = new Array("table1","table2","table3","table4","table5"); var tabNames = new Array("Tab1","Tab2","Tab3","Tab4","Tab5"); for (var i = 0; i < tableNames.length; i++) { if(i==tabNo){ document.getElementById(tableNames[i]).style.display=''; } else { document.getElementById(tableNames[i]).style.display='none'; document.getElementById(tabNames[i]).style.background='#E9E9C3'; } }  currentTab = tabNo; }

function changeColor(tabNo,inOut){ var tabNames = new Array("Tab1","Tab2","Tab3","Tab4","Tab5"); tabObj = document.getElementById(tabNames[tabNo]); if(currentTab==tabNo){ if(inOut!=0){ tabObj.style.background='#F9F9E3'; } } else { if(inOut==0){ tabObj.style.background='#DADAA3'; } else { tabObj.style.background='#E9E9C3'; } } }

// from wikibits.js function escapeQuotes(text) { var re = new RegExp("'","g"); text = text.replace(re,"\\'"); re = new RegExp("\\n","g"); text = text.replace(re,"\\n"); return escapeQuotesHTML(text); }

function escapeQuotesHTML(text) { var re = new RegExp('&',"g"); text = text.replace(re,"&amp;"); re = new RegExp('"',"g");	text = text.replace(re,"&quot;");	re = new RegExp('<',"g");	text = text.replace(re,"&lt;");	re = new RegExp('>',"g");	text = text.replace(re,"&gt;");	return text; }