
if (document.getElementById)
{ 
	document.write('<style type="text/css">\n');
	document.write('.submenu{display: none;}\n');
	document.write('</style>\n');
}

function SwitchMenu(mm,obj){
	if(document.getElementById){
	var el = document.getElementById(obj);
	var mx = document.getElementById(mm);
	
	var mx1 = document.getElementById('m1');
	var mx2 = document.getElementById('m2');
	var mx3 = document.getElementById('m3');
	var mx4 = document.getElementById('m4');
	var mx5 = document.getElementById('m5');
	//var onBGColor = "#990000";
	var onBGColor = "#000080";
	var onTColor = "#FFFFFF";
	var offBGColor = "#ECECFF";
	var offTColor = "#000000";
	
	var ar = document.getElementById("masterdiv").getElementsByTagName("span");
		if(el.style.display != "block"){
			for (var i=0; i<ar.length; i++){
				if (ar[i].className=="submenu")
				ar[i].style.display = "none";
			}
			el.style.display = "block";
			mx.style.background=onBGColor;
			mx.style.color=onTColor;
			
			if (mx != mx1)mx1.style.background=offBGColor;
			if (mx != mx2)mx2.style.background=offBGColor;
			if (mx != mx3)mx3.style.background=offBGColor;
			if (mx != mx4)mx4.style.background=offBGColor;
			if (mx != mx5)mx5.style.background=offBGColor;
			
			if (mx != mx1)mx1.style.color=offTColor;
			if (mx != mx2)mx2.style.color=offTColor;
			if (mx != mx3)mx3.style.color=offTColor;
			if (mx != mx4)mx4.style.color=offTColor;			
			if (mx != mx5)mx5.style.color=offTColor;
			
		}else{
			el.style.display = "none";
			mx.style.background=offBGColor;
			mx.style.color=offTColor;
		}
	}
}

function changebg(id, newClass) {
	identity=document.getElementById(id);
	identity.className=newClass;
}

function displayTitle(id, str)
{
	if(document.getElementById)
	{ 
		document.getElementById(id).innerHTML = str;
	}
	else if (document.all)
	{
    		document.all[id].innerHTML = str;
	}
} 