/*
if (document.getElementById){
document.write('<style type="text/css">\n')
document.write('.submenu{display: none;}\n')
document.write('</style>\n')
}
*/

function SwitchMenu(obj,link)
{


	if(document.getElementById){
	var el = document.getElementById(obj);
	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";
		}
		else
		{
			el.style.display = "none";
		}
	
		// Redirect to home page
		if (link =="Home")
		{
			location.href="/index.asp";
		}
		else if (link =="about")
		{
			location.href="/company/about.asp?mnu=0&subid=0";
		}
		else if (link =="Contact")
		{
			location.href="/Company/Contact.asp?mnu=8&subid=8_1";
		}
		else if (link =="News")
		{
			location.href="/News/News.asp?mnu=7&subid=0_1";
		}
		else if (link =="Careers")
		{
			location.href="/Careers/careers.asp?mnu=4&subid=4_1";
		}
		else if (link =="Process")
		{
			location.href="/process/Quality-Assurance.asp?mnu=3&subid=3_1";
		}
		else if (link =="ShowCase")
		{
			location.href="/ShowCase/Portfolio.asp?mnu=6&subid=6_1";
		}
		else if (link =="Services")
		{
			location.href="/services/Custom-Application-Development.asp?mnu=2&subid=2_1";
		}	
		else if (link =="Partners")
		{
			location.href="/Partners/Partnering-Opportunities.asp?mnu=5&subid=5_1";
		}	
		else if (link =="offshore")
		{
			location.href="/offshore-services/IT-Outsourcing.asp?mnu=1&subid=1_1";
		}	
		
	}
	
}
/*
if (document.getElementById)
{ 
document.write('<style type="text/css">\n')
document.write('.submenu{display: none;}\n')
document.write('</style>\n')
}
*/

function ChColor(obj,mnuid){
	if(document.getElementById)
	{
	var el = document.getElementById(obj);
	var mdiv = document.getElementById('mnu'+mnuid);
	mdiv.style.backgroundColor = "#FF6900";
	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";
			
		}else{
			el.style.display = "none";
		}
	}
	
}

function NoMenu(obj,mnuid){
	if(document.getElementById)
	{
	var el = document.getElementById(obj);
	var mdiv = document.getElementById('mnu'+mnuid);
	//mdiv.style.backgroundColor = "#FF0000";
	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";
			
		}else{
			el.style.display = "none";
		}
	}
	
}


function onOver(obj)
{
	//alert(obj.style.backgroundColor);
	if(obj.style.backgroundColor != "#ff6900")
	{
		obj.style.backgroundColor='#709FCF';
	}
}

function onOut(obj)
{
	//alert(obj.style.backgroundColor);
	if(obj.style.backgroundColor != "#ff6900")
	{
		obj.style.backgroundColor='#336699';
	}
}


function onSubOver(obj)
{
	//alert(obj.style.backgroundColor );
	if(obj.style.backgroundColor != "#ffd1b3")
	{
		obj.style.backgroundColor='#ffd9bf';
	}
}

function onSubOut(obj)
{
	//alert(obj.style.color );
	if(obj.style.backgroundColor != "#ffd1b3")
	{
		obj.style.backgroundColor='#cccccc';
	}
}

function ChSubColor(obj)
{
	//alert(obj);
	var mx_subId = obj;
	var mx_name="";
	//alert(mx_subId + '--');
	if (mx_subId =='1_1')
	{
		mx_name = "/offshore-services/IT-Outsourcing.asp?mnu=1&subid=1_1";
		var el = document.getElementById(mx_name);
		el.style.backgroundColor = "#FFD1B3";
	}
	else if (mx_subId == '1_2')
	{
		mx_name = "/offshore-services/Uniface-Solutions.asp?mnu=1&subid=1_2";
		var el = document.getElementById(mx_name);
		//alert(el.id);
		el.style.backgroundColor = "#FFD1B3";
	}
	else if (mx_subId =='1_3')
	{
		mx_name = "/offshore-services/dotnet-Solutions.asp?mnu=1&subid=1_3";
		var el = document.getElementById(mx_name);
		//alert(el.id);
		el.style.backgroundColor = "#FFD1B3";
	}
	else if (mx_subId =='1_4')
	{
		mx_name = "/offshore-services/Lotus-Notes-Solutions.asp?mnu=1&subid=1_4";
		var el = document.getElementById(mx_name);
		//alert(el.id);
		el.style.backgroundColor = "#FFD1B3";
	}
	else if (mx_subId =='1_5')
	{
		mx_name = "/offshore-services/ColdFusion-Solutions.asp?mnu=1&subid=1_5";
		var el = document.getElementById(mx_name);
		//alert(el.id);
		el.style.backgroundColor = "#FFD1B3";
	}
	
	else if (mx_subId =='1_6')
	{
		mx_name = "/offshore-services/XML-Solutions.asp?mnu=1&subid=1_6";
		var el = document.getElementById(mx_name);
		//alert(el.id);
		el.style.backgroundColor = "#FFD1B3";
	}
	else if (mx_subId =='1_7')
	{
		mx_name = "/offshore-services/Systems-Programming-Solutions.asp?mnu=1&subid=1_7";
		var el = document.getElementById(mx_name);
		//alert(el.id);
		el.style.backgroundColor = "#FFD1B3";
	}
	
	else if (mx_subId =='1_8')
	{
		mx_name = "/offshore-services/Java-J2EE-Solutions.asp?mnu=1&subid=1_8";
		var el = document.getElementById(mx_name);
		//alert(el.id);
		el.style.backgroundColor = "#FFD1B3";
	}
	
	else if (mx_subId =='2_1')
	{
		mx_name = "/services/Custom-Application-Development.asp?mnu=2&subid=2_1";
		var el = document.getElementById(mx_name);
		//alert(el.id);
		el.style.backgroundColor = "#FFD1B3";
	}
	else if (mx_subId =='2_2')
	{
		mx_name = "/services/Outsourced-Product-Development.asp?mnu=2&subid=2_2";
		var el = document.getElementById(mx_name);
		//alert(el.id);
		el.style.backgroundColor = "#FFD1B3";
	}
	else if (mx_subId =='2_3')
	{
		mx_name = "/services/Outsourced-Application-Maintenance.asp?mnu=2&subid=2_3";
		var el = document.getElementById(mx_name);
		//alert(el.id);
		el.style.backgroundColor = "#FFD1B3";
	}
	else if (mx_subId =='2_4')
	{
		mx_name = "/services/Outsourced-Software-Testing.asp?mnu=2&subid=2_4";
		var el = document.getElementById(mx_name);
		//alert(el.id);
		el.style.backgroundColor = "#FFD1B3";
	}
	else if (mx_subId =='2_5')
	{
		mx_name = "/services/Outsourced-Application-Migration.asp?mnu=2&subid=2_5";
		var el = document.getElementById(mx_name);
		//alert(el.id);
		el.style.backgroundColor = "#FFD1B3";
	}
	
	
	else if (mx_subId =='3_1')
	{
		mx_name = "/process/Quality-Assurance.asp?mnu=3&subid=3_1";
		var el = document.getElementById(mx_name);
		el.style.backgroundColor = "#FFD1B3";
		
	}
	else if (mx_subId =='3_2')
	{
		mx_name = "/process/Software-Development-Lifecycle.asp?mnu=3&subid=3_2";
		var el = document.getElementById(mx_name);
		el.style.backgroundColor = "#FFD1B3";
	}
	else if (mx_subId =='4_1')
	{
		mx_name = "/Careers/careers.asp?mnu=4&subid=4_1";
		var el = document.getElementById(mx_name);
		el.style.backgroundColor = "#FFD1B3";
	}
	else if (mx_subId =='4_2')
	{
		mx_name = "/Careers/Current-Job-Openings.asp?mnu=4&subid=4_2";
		var el = document.getElementById(mx_name);
		el.style.backgroundColor = "#FFD1B3";
	}
	else if (mx_subId =='7_1')
	{
		mx_name = "/News/News.asp?mnu=7&subid=7_1";
		var el = document.getElementById(mx_name);
		el.style.backgroundColor = "#FFD1B3";
	}
	
	else if (mx_subId =='5_1')
	{
		mx_name = "/Partners/Partnering-Opportunities.asp?mnu=5&subid=5_1";
		var el = document.getElementById(mx_name);
		el.style.backgroundColor = "#FFD1B3";
	}
	else if (mx_subId =='5_2')
	{
		mx_name = "/Partners/Partner-Enquiries-Form.asp?mnu=5&subid=5_2";
		var el = document.getElementById(mx_name);
		el.style.backgroundColor = "#FFD1B3";
	}
	else if (mx_subId =='6_1')
	{
		mx_name = "/ShowCase/Portfolio.asp?mnu=6&subid=6_1";
		var el = document.getElementById(mx_name);
		el.style.backgroundColor = "#FFD1B3";
	}
	else if (mx_subId =='6_2')
	{
		mx_name = "/ShowCase/SMB-Ebiz-Starter-Packs.asp?mnu=6&subid=6_2";
		var el = document.getElementById(mx_name);
		el.style.backgroundColor = "#FFD1B3";
	}
	
}
// handling sub menu click
function onSubClk(obj)
{
	var menu_ID = obj.id;
	location.href=menu_ID;
	
}

