
//Specify highlight behavior. "TD" to highlight table cells, "TR" to highlight the entire row:
var highlightbehavior="TD"

var ns6=document.getElementById&&!document.all
var ie=document.all


function changeto(e,highlightcolor){

source=ie? event.srcElement : e.target
if (source.tagName=="TABLE")
return
while(source.tagName!=highlightbehavior && source.tagName!="HTML")
source=ns6? source.parentNode : source.parentElement
if (source.style.backgroundColor!=highlightcolor&&source.id!="ignore"){
	source.style.backgroundColor=highlightcolor
}
}



function change(newcolor,obj){

	
if(document.getElementById){
var el = document.getElementById(obj);
	
for (var i=1; i<14; i++){
	var ar = document.getElementById("main"+i);
	//ar.style.backgroundColor = "#FF9900";  //"#22A2C0";
}

for (var x=1; x<40; x++){
	var ar2 = document.getElementById("submain"+x);
	//ar2.style.backgroundColor = "#FF9900"; //"#F1F1F1";
}
			
el.style.backgroundColor = newcolor
		
}

}

function changesub(newcolor,obj){

	
if(document.getElementById){
var el = document.getElementById(obj);
	
for (var i=1; i<40; i++){
	var ar = document.getElementById("submain"+i);
	//ar.style.backgroundColor = "#FF9900"; //"#F1F1F1";
}
			
el.style.backgroundColor = newcolor
		
}

}



function contains_ns6(master, slave) { //check if slave is contained by master
while (slave.parentNode)
if ((slave = slave.parentNode) == master)
return true;
return false;
}

function changeback(e,originalcolor){
if (ie&&(event.fromElement.contains(event.toElement)||source.contains(event.toElement)||source.id=="ignore")||source.tagName=="TABLE")
return
else if (ns6&&(contains_ns6(source, e.relatedTarget)||source.id=="ignore"))
return
if (ie&&event.toElement!=source||ns6&&e.relatedTarget!=source)
source.style.backgroundColor=originalcolor
}

/***********************************************
* Switch Menu script- by Martial B of http://getElementById.com/
* Modified by Dynamic Drive for format & NS4/IE4 compatibility
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/

if (document.getElementById){ //DynamicDrive.com change
document.write('<style type="text/css">\n')
document.write('.submenu{display: none;font-size: 10px;}\n')
document.write('.child{display: none; font-size: 10px;}\n')
document.write('</style>\n')
}

function SwitchMenu(obj){
	if(document.getElementById){
	var el = document.getElementById(obj);
	var ar = document.getElementById("masterspan").getElementsByTagName("span"); //DynamicDrive.com change
		if(el.style.display != "block"){ //DynamicDrive.com change
			for (var i=0; i<ar.length; i++){
				if (ar[i].className=="submenu") //DynamicDrive.com change
				ar[i].style.display = "none";
			}
			el.style.display = "block";
		}else{
			el.style.display = "none";
		}
	}
}

function SwitchMenu2(obj){
	if(document.getElementById){
	var el = document.getElementById(obj);
	var ar = document.getElementById("masterspan").getElementsByTagName("span"); //DynamicDrive.com change
		if(el.style.display != "block"){ //DynamicDrive.com change
			for (var i=0; i<ar.length; i++){
				if (ar[i].className=="child") //DynamicDrive.com change
				ar[i].style.display = "none";
			}
			el.style.display = "block";
		}else{
			el.style.display = "none";
		}
	}
}
