
/***********************************************
* DD Tab Menu script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/

//Set tab to intially be selected when page loads:
//[which tab (1=first tab), ID of tab content to display]:
var initialtab=["sc1","sc2","sc3","sc4","sc5","sc6","sc7","sc8"]

//Turn menu into single level image tabs (completely hides 2nd level)?
var turntosingle=0 //0 for no (default), 1 for yes

//Disable hyperlinks in 1st level tab images?
var disabletablinks=0 //0 for no (default), 1 for yes

////////Stop editting////////////////

var previoustab=""

if (turntosingle==1)
document.write('<style type="text/css">\n#tabcontentcontainer{display: none;}\n</style>')

function expandcontent(cid, aobject){
if (disabletablinks==1)
aobject.onclick=new Function("return false")
if (document.getElementById){
highlighttab(aobject)
if (turntosingle==0){
if (previoustab!="")
document.getElementById(previoustab).style.display="none"
document.getElementById(cid).style.display="block"
previoustab=cid
}
}
}


function vosst()
{
var fulllocation=document.location.toString()
	var noxind=0
fulllocation=fulllocation.toLowerCase()
if(fulllocation!="" && fulllocation.indexOf("/")!=-1 && fulllocation.indexOf(".php")!=-1)
{
if(fulllocation.indexOf("index")!=-1)
	{
return(0)
	}
if(fulllocation.indexOf("nadlan")!=-1)
	{
return(1)
	}
if(fulllocation.indexOf("combinations")!=-1)
	{
return(2)
	}
if(fulllocation.indexOf("inheritance")!=-1)
	{
return(4)
	}
if(fulllocation.indexOf("personal-state")!=-1)
	{
return(3)
	}
if(fulllocation.indexOf("notaryon")!=-1)
	{
return(5)
	}
if(fulllocation.indexOf("start")!=-1)
	{
return(6)
	}
if(fulllocation.indexOf("contact")!=-1)
	{
return(7)
	}

}
return(0)
}










function highlighttab(aobject){
if (typeof tabobjlinks=="undefined")
collecttablinks()
for (i=0; i<tabobjlinks.length; i++)
tabobjlinks[i].className=""
aobject.className="current"
}

function collecttablinks(){
var tabobj=document.getElementById("tablist")
tabobjlinks=tabobj.getElementsByTagName("A")
}

function do_onload(){
collecttablinks()
	var te=vosst()
	expandcontent(initialtab[te], tabobjlinks[te])
}

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


