var enablepersistence=true //true to enable persistence, false to turn off (or simply remove this entire script block).
var persisttype="local" //enter "sitewide" for Tab content order to persist across site, "local" for this page only

var initialtab=[1, "tab1"];
var previoustab=""
var pretab=""
function expandcontent(cid, aobject){
	if (document.getElementById){
		collecttablinks()
		detectSourceindex(aobject)
		if (previoustab!=""){
			document.getElementById(previoustab).style.display="none"
			if (pretab !=""){ pretab.setAttribute("id", "inactive") }
		}
		document.getElementById(cid).style.display="block"
		aobject.setAttribute("id", "current")
		previoustab=cid
		pretab=aobject
		if (aobject.blur) aobject.blur()
		return false
	}
	else return true
}
function collecttablinks(){
	var tabobj=document.getElementById("tabs5");
	//tabobjlinks=tabobj.getElementsByTagName("a");
	if  (tabobj.value !="object" ){	
		var tabobj=document.getElementById("tabs6");
		tabobjlinks=tabobj.getElementsByTagName("a");
	}else{
		tabobjlinks=tabobj.getElementsByTagName("a");
	}
	
}

function detectSourceindex(aobject){
	for (i=0; i<tabobjlinks.length; i++){
		if (aobject==tabobjlinks[i]){
			tabsourceindex=i //source index of tab bar relative to other tabs
			break
		}
	}
}

function do_onload(){
	collecttablinks()
	expandcontent(initialtab[1], tabobjlinks[initialtab[0]-1])
}

if (window.addEventListener)
	window.addEventListener("load", do_onload, false)
else if (window.attachEvent)
	window.attachEvent("onload", do_onload)
else if (document.getElementById)
	window.onload=do_onload


