document.write('<script src="/content_data/AP/IN/en/GBPIN/999/js/s_code.js"></script>');
/**function omnitureImpl(secTextValue)
{
	alert("SecText Value is"+secTextValue);

   
		if(secTextValue=="News")
		{
			s.pageName="GMAP | IN | CORPORATE | INFORMATION | NEWS | LINK | EN | HTML";
			alert(" Page Name "+s.pageName);
			s.prop1="GMAP | IN | CORPORATE | INFORMATION | NEWS"; 
			s.prop2="GMAP | IN | CORPORATE | INFORMATION";
			s.prop3="GMAP | IN | CORPORATE | INFORMATION";
		}
		else if(secTextValue=="Racing")
		{
			s.pageName="GMAP | IN | CORPORATE | EXTRAS | RACING | LINK | EN | HTML";
			alert(" Page Name "+s.pageName);
			s.prop1="GMAP | IN | CORPORATE | EXTRAS | RACING | LINK"; 
			s.prop2="GMAP | IN | CORPORATE | EXTRAS";
			s.prop3="GMAP | IN | CORPORATE | EXTRAS";

		}
		else if(secTextValue=="Find a Dealer")
		{
			s.pageName="GMAP | IN | INFORMATION | FIND A DEALER | CITY SELECTION | EN | HTML";
			alert(" Page Name "+s.pageName);
			s.prop1="GMAP | IN | INFORMATION | FIND A DEALER | CITY SELECTION"; 
			s.prop2="GMAP | IN | INFORMATION | FIND A DEALER |";
			s.prop3="GMAP | IN | INFORMATION | FIND A DEALER |";
		}
		else if(secTextValue=="Find a Service Centre")
		{
			s.pageName="GMAP | IN | INFORMATION | FIND A SERVICE CENTRE | CITY SELECTION | EN | HTML";
			alert(" Page Name "+s.pageName);
			s.prop1="GMAP | IN | INFORMATION | FIND A SERVICE CENTRE | CITY SELECTION"; 
			s.prop2="GMAP | IN | INFORMATION | FIND A DEALER";
			s.prop3="GMAP | IN | INFORMATION | FIND A DEALER";
		}

		s.server="gm.co.in"
		s.channel=""
		s.pageType=""
		s.prop4="GMAP | IN | CORPORATE";
		s.prop5="GMAP | IN";
		s.prop6="GMAP";
		/* E-commerce Variables */
		/**s.campaign=""
		s.state=""
		s.zip=""
		s.events=""
		s.products=""
		s.purchaseID=""
		s.eVar1=""
		s.eVar2=""
		s.eVar3=""
		s.eVar4=""
		s.eVar5=""
		alert(s.prop1 + "\n" + s.prop2 + "\n" + s.prop3 + "\n" + s.prop4 + "\n" + s.prop5 + "\n" + s.prop6 + "\n" + s.pageName);
		/************* DO NOT ALTER ANYTHING BELOW THIS LINE ! **************/
	//	var s_code=s.t();if(s_code)document.write(s_code)
//}



var menu = new Array();
var navgroups = new Array();
//mac IE does not support the push method, so we give it a brain with prototyping
if (typeof((new Array()).push) == "undefined") { 
function push() { for (var i = 0 ; i < arguments.length ; i++) { this[this.length] = arguments[i]; } } 
Array.prototype.push = push; } 
// **************************************************
// 				FIRST level menu items
// **************************************************

menu.push({uid:"C00",text:"The Company",color:"blue"});
menu.push({uid:"A00",text:"Automotive",color:"green"});


// **************************************************
// 						COMPANY
// **************************************************
// Company
navgroups["C00"] = new Array();
navgroups["C00"].push({uid:"CI0",text:"About GM",url:"/content_data/AP/IN/en/GBPIN/999/about_gm.html",omniture:"inner_page"});
navgroups["C00"].push({uid:"CR0",text:"Careers",url:"/content_data/AP/IN/en/GBPIN/999/career.html",omniture:"t1"});
navgroups["C00"].push({uid:"CP0",text:"IMS Policy",url:"/content_data/AP/IN/en/GBPIN/999/gm_imsPolicy.html",omniture:"t2"});
//navgroups["C00"].push({uid:"CG0",text:"News", target:"_blank",url:"/content_data/AP/IN/en/GBPIN/001/BRANDSITE/news.html",omniture:"t3"});
//navgroups["C00"].push({uid:"CV0",text:"Racing", target:"_blank",url:"/content_data/AP/IN/en/GBPIN/001/BRANDSITE/racing.html",omniture:"t5"});
navgroups["C00"].push({uid:"CD0",text:"Genuine Accessories",url:"/content_data/AP/IN/en/GBPIN/001/accessories.html",omniture:"t4"});
// Automotive
navgroups["A00"] = new Array();
navgroups["A00"].push({uid:"AX0",text:"Find a Dealer ",target:"_blank",url:"/content_data/AP/IN/en/GBPIN/001/dealer-locator.html",omniture:"t55"});
navgroups["A00"].push({uid:"AW0",text:"Find a Service Centre",target:"_blank",url:"/content_data/AP/IN/en/GBPIN/001/service-centre.html",omniture:"t56"});


// **************************************************
// 						FUNCTIONS
// **************************************************

function writeMenu() {
	
	document.writeln('<table cellpadding="0" cellspacing="0" border="0" width="150">');
	document.writeln('<tr><td><img src="/content_data/AP/IN/en/GBPIN/999/images/leftnav_spacer.gif" border="0" width="1" height="30" /></td></tr></table>');

	for(topIndex=0; topIndex<menu.length; topIndex++) {
		
		var topUid = menu[topIndex].uid;
		var topText = menu[topIndex].text;
		var topColor = menu[topIndex].color;
		document.writeln('<table cellpadding="0" cellspacing="0" border="0" width="150">');
		if(topIndex==0){
		document.writeln('<tr><td  height="10" bgcolor="#0235B5"></td></tr>');
		}else{
		document.writeln('<tr><td  height="10" bgcolor="#019A01"></td></tr>');
		}
		document.writeln('<tr><td height="20" colspan="2" class="leftheading"><a href="javascript:showMenu('+topIndex+',-1,\''+topColor+'\');">'+topText+'</td></tr>');
		document.writeln('</table>');

		if(navgroups[topUid] != null) {
		
			document.writeln('<div id="navDiv:'+topIndex+'" style="display:none;">');
			document.writeln('<table cellpadding="0" cellspacing="0" border="0" width="150">');
				for(secIndex=0; secIndex<navgroups[topUid].length; secIndex++) {
					var secUid = navgroups[topUid][secIndex].uid;
					var secText = navgroups[topUid][secIndex].text;
					var secUrl = navgroups[topUid][secIndex].url;
					var secOmnit= navgroups[topUid][secIndex].omniture;

					/**if(navgroups[topUid][secIndex].text=="News")
					{
						omnitureImpl('News');
					}	
					else if(navgroups[topUid][secIndex].text=="Racing")
					{
						omnitureImpl('Racing');
					}	
					else if(navgroups[topUid][secIndex].text=="Find a Dealer")
					{
						omnitureImpl('Find a Dealer');
					}
					else if(navgroups[topUid][secIndex].text=="Find a Service Centre")
					{
						omnitureImpl('Find a Service Centre');
					}*/

					//var secLinktype;
					//var secOmniture;
	
					if(navgroups[topUid][secIndex].target != null){
						secTarget = 'navgroups[topUid][secIndex].target';
						//secLinkType = 'e';
					}else{
						secTarget = '_self';
						//secLinkType = 'o';
					}	
					
					/*if(navgroups[topUid][secIndex].omniture != null){
						secOmniture = '"GM - Left Nav - '+navgroups[topUid][secIndex].omniture+'"';
					}else{
						secOmniture = "not assigned";
					}*/
					if(secUrl != null) {
							document.writeln('<tr><td width="12" style="padding-left:10px"><img id="navArw:'+topIndex+':'+secIndex+'" src="/content_data/AP/IN/en/GBPIN/999/images/leftnav_arrow_right.gif"/></td>');
						
						if(s_pageName == secOmnit){
						
								document.writeln('<td width="138" class="navSec"><a href="'+secUrl+'" target="'+secTarget+'" class="navSecLink1">'+secText+'</a></td></tr>');
								}else{
								document.writeln('<td width="138" class="navSec"><a href="'+secUrl+'" target="'+secTarget+'" class="navSecLink">'+secText+'</a></td></tr>');
								}		
					} else {
						document.writeln('<tr><td valign="top" width="12"></td>');
						document.writeln('<td width="138" class="navSec"><a href="javascript:showMenu('+topIndex+','+secIndex+',\''+topColor+'\');"  target="'+secTarget+'"  class="navSecLink">'+secText+'</a></td></tr>');
						
						
					}

					if(navgroups[secUid] != null) {
							
						document.writeln('</table><div id="navDiv:'+topIndex+':'+secIndex+'" style="display:none;">');
						document.writeln('<table cellpadding="0" cellspacing="0" border="0" width="150">');

						for(terIndex=0; terIndex<navgroups[secUid].length; terIndex++) {

							var terUid = navgroups[secUid][terIndex].uid;
							var terText = navgroups[secUid][terIndex].text;
							var terUrl = navgroups[secUid][terIndex].url;
							var terLinkType;
							var terOmniture;
							
							var terClass = "navTerLinkHover"+topColor.substr(0,1).toUpperCase()+topColor.substr(1);

							if(navgroups[secUid][terIndex].target != null){
								terTarget = 'target="'+navgroups[secUid][terIndex].target+'"';
								terLinkType = 'e';
							}else{
								terTarget = 'target="_top"';
								terLinkType = 'o';
							}	
							if(navgroups[secUid][terIndex].omniture != null){
								terOmniture = '"GM - Left Nav - '+navgroups[secUid][terIndex].omniture+'"';
							}else{
								terOmniture = "not assigned";
							}
							//alert("Prem sundar")
							document.writeln('<tr><td class="navTer"><a id="navLnk:'+topIndex+':'+secIndex+':'+terIndex+'" href="'+terUrl+'" onClick=\'s_linkType="'+terLinkType+'";s_linkName='+terOmniture+';s_lnk=s_co(this);s_gs("gmgmcom");\' '+terTarget+' class="'+terClass+'">'+terText+'</a></td></tr>');
						}

						document.writeln('</table></div><table cellpadding="0" cellspacing="0" border="0" width="150">');
					}
				}

			document.writeln('</table></div>');
			document.writeln('<table cellpadding="0" cellspacing="0" border="0" width="150">');
			
		}
		
	}
document.writeln('<tr bgcolor="#cccccc"><td><img src="/include/nav/home/images/spacer.gif" alt="" border="0" width="150" height="1" /></td></tr></table>');
	//document.writeln('<table cellpadding="0" cellspacing="0" border="0" width="150">');
	//document.writeln('<tr><td><img src="/include/nav/home/images/leftnav_bottom_1px.gif" alt="" border="0" width="150" height="1" /></td></tr></table>');
}

var currentTop = null;
var currentSec = null;
var currentColor = null;

function showMenu(topIndex, secIndex, color) {
	if(currentTop != null)
		document.getElementById('navDiv:'+currentTop).style.display = "none";

	if(currentSec != null) {

		document.getElementById('navDiv:'+currentSec).style.display = "none";
		document.getElementById('navArw:'+currentSec).src = "/include/nav/leftnav/images/leftnav_"+currentColor+"_arrow_right.gif";
	}
	if(s_pageName === ""){
	document.getElementById('navDiv:'+topIndex).style.display = "none";
	s_pageName = "ttt";
		}else{
			document.getElementById('navDiv:'+topIndex).style.display = "block";
		}
	
	currentTop = topIndex;

	if(secIndex != -1) {

		document.getElementById('navDiv:'+topIndex+':'+secIndex).style.display = "block";
		//document.getElementById('navArw:'+topIndex+':'+secIndex).src = "/include/nav/leftnav/images/leftnav_"+color+"_arrow_down.gif";
		
		currentSec = topIndex+':'+secIndex;
		currentColor = color;
	}
}

function showNavState(uid) {
	
	var topUid = uid.charAt(0)+"00";
	var secUid = uid.charAt(0)+uid.charAt(1)+"0";
	var terUid = uid;

	var topIndex = null;
	var secIndex = null;
	var terIndex = null;

	for(i=0; i<menu.length; i++) {

		if(menu[i].uid == topUid) {

			topIndex = i;
			color = menu[i].color;
		}
	}

	if(navgroups[topUid] != null)
		for(i=0; i<navgroups[topUid].length; i++)
			if(navgroups[topUid][i].uid == secUid)
				secIndex = i;

	/*if(navgroups[secUid] != null)
		for(i=0; i<navgroups[secUid].length; i++)
			if(navgroups[secUid][i].uid == terUid)
				terIndex = i;*/

	if(topIndex != null) {

		if(secIndex == null) {

			showMenu(topIndex,-1,color);
		
		} else {
			showMenu(topIndex,-1,color);
		
			//if(terIndex != null)
				//document.getElementById('navLnk:'+topIndex+':'+secIndex+':'+terIndex).className = "navTerLink"+color.substr(0,1).toUpperCase()+color.substr(1);
		}
	}
}

var oldNavMap = new Array();

oldNavMap["Company"] = "C00";
oldNavMap["Automotive"] = "A00";




function showOldNavState(params) {
	
	var section = null;
	var layer = null;
	var page = null;

	var topUid = null;
	var secUid = null;
	var terUid = null;

	var pairs = params.split("&");
	var oldNavPages = new Array();

	for(i=0; i<pairs.length; i++) {
		
		pair = pairs[i].split("=");
		name = pair[0];
		value = pair[1];

		if(name == "section")
			section = value;

		if(name == "layer")
			layer = value;

		if(name == "page")
			page = value;
	}
	
	if(page != null)
		if(page.length == 2)
			if(page.charAt(0) == "0")
				page = page.charAt(1);

	if(oldNavMap[section] != null)
		topUid = oldNavMap[section];

	if(layer != section && oldNavMap[layer] != null)
		secUid = oldNavMap[layer][0];

	if(page != null && navgroups[secUid] != null)
		terUid = oldNavMap[layer][(parseInt(page)+1)];

	if(terUid != null)
		showNavState(terUid);
	else
		if(secUid != null)
			showNavState(secUid);
		else
			showNavState(topUid);
}
