
function openWindowLink(objUrl)
{
window.open(objUrl,'mywindow','width=' + screen.width + ', height=' + screen.height + ',left=0, top=0,toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,copyhistory=yes,resizable=yes');
}
function callWindow()
{
	//alert("hi");
	window.open('http://www.gmsa.com/content_data/LAAM/ZA/en/GBPZA/999/header/fleet_connection/sign_up_newsletter.html?modelCd=999','mywindow','width='+ screen.width + ', height='+ screen.height + ',left=0, top=0,toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,copyhistory=yes,resizable=yes');
}

function color_all(num)
{
	for(var i=1;i<=num;i++)
	{
		document.getElementById("link_"+i).className='menuFont';
	}
}

function highlight_menu(id,classname)
{
	if(modelName=="2B")
	{
		no=11;
	}
	else if(modelName=="2C")
	{
		no=11;
	}
	else if(modelName=="8")
	{
		no=11;
	}
	color_all(no);
	document.getElementById(id).className=classname;
}

function closeAll()
{
//alert("hii..");
document.getElementById("div_Spec").style.display="none";
document.getElementById("div_Spec2").style.display="none";
//document.getElementById("div_Spec3").style.display="none";
document.getElementById("div_Price").style.display="none";
document.getElementById("div_finance").style.display="none";
document.getElementById("div_Spec11").style.display="none";
document.getElementById("div_Gal").style.display="none";

}
/*
function hide_menu(mod,val,parent)
{
	//document.getElementById("track").style.display="inline-block";
	
if(mod=="Spec")
{
	
			if (document.getElementById("div_Spec").style.display=="none"||document.getElementById("div_Spec2").style.display=="none"||document.getElementById("div_Spec3").style.display=="none")
			{
			closeAll();
			
				document.getElementById("div_Spec").style.display="";
				document.getElementById("div_Spec2").style.display="";
				//document.getElementById("div_Spec3").style.display="";
				//document.getElementById("div_AftSal4").style.display="";
				//document.all.div_model_img.src="leftnav_blue_arrow_down.gif";
					;
			
			}
			else
			{
				document.getElementById("div_Spec").style.display="none";
				document.getElementById("div_Spec2").style.display="none";
				//document.getElementById("div_Spec3").style.display="none";
				//document.getElementById("div_AftSal4").style.display="none";
				//document.all.div_model_img.src="leftnav_blue_arrow_right.gif";
			
			}
		}
	else{


				if (document.getElementById("div_"+mod).style.display=="none")
			{
			closeAll();

			if(val==1)
			{
			document.getElementById("div_"+parent).style.display="";
			if(parent=='Spec')
				{
				document.getElementById("div_Spec").style.display="";
				document.getElementById("div_Spec2").style.display="";
				//document.getElementById("div_Spec3").style.display="";

				}else
				{
					document.getElementById("div_Spec").style.display="none";
				document.getElementById("div_Spec2").style.display="none";
				//document.getElementById("div_Spec3").style.display="none";
				}



					}


				document.getElementById("div_"+mod).style.display="";
				//document.all.div_model_img.src="leftnav_blue_arrow_down.gif";
					
			
			}
			else
			{
			document.getElementById("div_"+mod).style.display="none";
				//document.all.div_model_img.src="leftnav_blue_arrow_right.gif";
			
			}
		
		}	
	

}

*/
function populateleftNav()
{
	

//alert(ss);
var tempfolder;
var xloc=location.href;
//modelName=xloc.substr(xloc.indexOf("modelCd=")+8,2);
modelName=pageId;


if(modelName=="2B")
{
tempfolder="corsa";
}
else if(modelName=="2C")
{
tempfolder="corsaclassic";
}
else if(modelName=="8")
{
tempfolder="commercial";
}

//alert(modelName+tempfolder)
//If Corsa
var toContent="<TABLE height='100%' cellSpacing=0 cellPadding=0 width='100%' border=0 class=whiteCell>"+
 " <TBODY>"+
 //Start
 "    <TR>"+ 
"      <TD bgColor=blue colSpan=2 height=6></TD>"+
"    </TR>"+
"    <TR id=div_Spec >"+ 

"      <TD> <TABLE cellSpacing=0 cellPadding=0 width='100%' border=0>"+
"          <TBODY>"+
"            <TR>"+ 
"              <TD width='10' height=2></TD>"+
"              <TD></TD>"+
"            </TR>"+
"            <TR>"+ 
"              <TD width='13'><IMG src='/content_data/LAAM/ZA/en/GBPZA/019/images/leftnav_blue_arrow_right.gif' width='12' height='14' border=0></TD>"+
"              <TD  class=menuFont>Specifications&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>"+
"            </TR>"+
"            <TR>"+ 
"              <TD height=2></TD>"+
"              <TD></TD>"+
"            </TR>"+
"            <TR   id=div_Spec11 >"+ 
"              <TD></TD>"+
"              <TD> <TABLE cellSpacing=0 cellPadding=0 border=0>"+
"                  <TBODY>"+
"                    <TR>"+ 
"                      <TD></TD>"+
"                      <TD> <TABLE cellSpacing=0 cellPadding=0 border=0>"+
"                          <TBODY>";

var corsaContent= "";
//Need to customise here

var classicContent="";

var commercialContent=" <TR>"+ 
"                              <TD width=10><IMG src='/content_data/LAAM/ZA/en/GBPZA/019/images/leftnav_blue_arrow_right.gif' border=0></TD>"+
"                              <TD><A id=link_11 class=menuFont href='/content_data/LAAM/ZA/en/GBPZA/019/"+tempfolder+"/combo/specifications.html'>Combo</a></TD>"+
"                            </TR>"+
"                            <TR>"+ 
"                              <TD height=2></TD>"+
"                              <TD></TD>"+
"                            </TR>"+
"                            <TR>"+ 
"                              <TD><IMG src='/content_data/LAAM/ZA/en/GBPZA/019/images/leftnav_blue_arrow_right.gif' border=0></TD>"+
"                              <TD><A id=link_10 class=menuFont href='/content_data/LAAM/ZA/en/GBPZA/019/"+tempfolder+"/vivaro/specifications.html'>Vivaro</a></TD>"+
"                            </TR>"+
	"                            <TR>"+ 
/*"                              <TD><IMG src='/content_data/LAAM/ZA/en/GBPZA/019/images/leftnav_blue_arrow_right.gif' border=0></TD>"+
"                              <TD><A id=link_9 class=menuFont href='/content_data/LAAM/ZA/en/GBPZA/019/"+tempfolder+"/movano/specifications.html'>Movano</a></TD>"+*/
"                            </TR>";



var remainingContent= "</TBODY>"+
"                        </TABLE></TD>"+
"                    </TR>"+
"                  </TBODY>"+
"                </TABLE></TD>"+
"            </TR>"+

"          </TBODY>"+
"        </TABLE></TD>"+
"    </TR>"+
"    <TR id=div_Spec2 >"+

"      <TD><TABLE cellSpacing=0 cellPadding=0 width='100%' border=0>"+
"          <TBODY>"+
"            <TR> "+
"              <TD width='10' height=2></TD>"+
"              <TD></TD>"+
"            </TR>"+
"            <TR> "+
"              <TD width='15'><IMG src='/content_data/LAAM/ZA/en/GBPZA/019/images/leftnav_blue_arrow_right.gif' width='12' height='14' border=0></TD>"+
"              <TD class=menuFont><A id=link_8 class=menuFont href='/content_data/LAAM/ZA/en/GBPZA/019/"+tempfolder+"/fullspec_download.html'>Downloadable Specifications</A></TD>"+
"            </TR>"+
"            <TR> "+
"              <TD height=2></TD>"+
"              <TD></TD>"+
"            </TR>"+
"            <TR></TR>"+
"          </TBODY>"+
"        </TABLE></TD>"+
"    </TR>"+


//End
"    <TR id=div_Spec > "+
"      <TD></TD>"+
"      <TD>"+
"        </TD>"+
"    </TR>"+

"    <TR> "+
"      <TD bgColor=red colSpan=2 height=6></TD>"+
"    </TR>"+

"    <TR id=div_Gal > "+

"      <TD> <TABLE cellSpacing=0 cellPadding=0 border=0>"+
"          <TBODY>"+
	"            <TR  > "+
"              <TD><IMG src='/content_data/LAAM/ZA/en/GBPZA/019/images/leftnav_red_arrow_right.gif' border=0></TD>"+
"              <TD><A id=link_7 class=menuFont href='/content_data/LAAM/ZA/en/GBPZA/019/"+tempfolder+"/downloadable_brochure.html'>Downloadable Brochure</A></TD>"+
"            </TR>"+
"            <TR> "+
"              <TD><IMG src='/content_data/LAAM/ZA/en/GBPZA/019/images/leftnav_red_arrow_right.gif' border=0></TD>"+
"              <TD class=menuFont>Gallery&nbsp;&nbsp;&nbsp;&nbsp;</TD>"+
"            </TR>"+
"            <TR> "+
"              <TD height=2></TD>"+
"             <TD></TD>"+
"           <TR id=div_Gallery > "+
"              <TD></TD>"+
"              <TD> <TABLE cellSpacing=0 cellPadding=0 border=0>"+
"                  <TBODY>"+
"                    <TR> "+
"                      <TD></TD>"+
"                      <TD> <TABLE cellSpacing=0 cellPadding=0 border=0>"+
"                          <TBODY>"+
"                          <TR> "+
"                              <TD width=10><IMG src='/content_data/LAAM/ZA/en/GBPZA/019/images/leftnav_red_arrow_right.gif' border=0></TD>"+
"                              <TD><A id=link_6 class=menuFont href='/content_data/LAAM/ZA/en/GBPZA/019/"+tempfolder+"/combo/gallery.html'>Combo</a></TD>"+
"                            </TR>"+
"                            <TR> "+
"                              <TD><IMG src='/content_data/LAAM/ZA/en/GBPZA/019/images/leftnav_red_arrow_right.gif' border=0></TD>"+
"                              <TD><A id=link_5 class=menuFont href='/content_data/LAAM/ZA/en/GBPZA/019/"+tempfolder+"/vivaro/gallery.html'>Vivaro</a></TD>"+
"                            </TR>"+
	"                            <TR> "+
/*"                              <TD><IMG src='/content_data/LAAM/ZA/en/GBPZA/019/images/leftnav_red_arrow_right.gif' border=0></TD>"+
"                              <TD><A id=link_4 class=menuFont href='/content_data/LAAM/ZA/en/GBPZA/019/"+tempfolder+"/movano/gallery.html'>Movano</a></TD>"+*/
"                            </TR>"+

"                          </TBODY>"+
"                        </TABLE></TD>"+
"                    </TR>"+
"                  </TBODY>"+
"                </TABLE></TD>"+
"            </TR>"+

		"            <TR  > "+
"              <TD><IMG src='/content_data/LAAM/ZA/en/GBPZA/019/images/leftnav_red_arrow_right.gif' border=0></TD>"+
"              <TD><A id=link_3 class=menuFont href='/content_data/LAAM/ZA/en/GBPZA/019/showroom_advisor/showroom.html?modelCd=8'>Opel Showroom</A></TD>"+
"            </TR>"+
	"                            <TR> "+
"                              <TD height=2></TD>"+
"                              <TD></TD>"+
"                            </TR>"+

"            <TR> "+
"              <TD height=2></TD>"+
"              <TD></TD>"+
"            </TR>"+


"          </TBODY>"+
"        </TABLE></TD>"+
"    </TR>"+
"    <TR> "+
"      <TD bgColor=green colSpan=2 height=6></TD>"+
"    </TR>"+


"    <TR id=div_finance > "+

"      <TD><TABLE cellSpacing=0 cellPadding=0 width='100%' border=0>"+
"          <TBODY>"+
"           <TR> "+
"              <TD height=2></TD>"+
"             <TD></TD>"+
"            </TR>"+

"    <TR> "+
"                              <TD width=10><IMG src='/content_data/LAAM/ZA/en/GBPZA/019/images/leftnav_green_arrow_right.gif' border=0></TD>"+
"                              <TD><A id=link_2 class=menuFont href='/content_data/LAAM/ZA/en/GBPZA/019/"+tempfolder+"/price.html'>Price List</a></TD>"+
"                            </TR>"+



"          </TBODY>"+
"        </TABLE></TD>"+
"    </TR>"+






 //Track & Trace Starts
"<TR valign='top' id='track' style='display:none'><TD valign='top' colspan='2'><table width='100%' height='100%'>"+
"      <TR valign='top'> "+
"      <TD bgColor=orange colSpan=2 height=6></TD>"+
"    </TR>"+
"     <TR valign='top'> "+
"      <TD width=10><IMG src='/content_data/LAAM/ZA/en/GBPZA/019/images/leftnav_orange_arrow_right.gif' border=0></TD>"+
"      <TD><A class=selectorangeFont >Track & Trace</A></TD>"+
"    </TR>"+
"       <TR> "+
"      <TD></TD>"+
"      <TD> <TABLE cellSpacing=0 cellPadding=0 border=0>"+
"          <TBODY>"+
"            <TR> "+
"              <TD><IMG src='/content_data/LAAM/ZA/en/GBPZA/019/images/leftnav_orange_arrow_right.gif' border=0></TD>"+
"	                 <TD><A id=link_20 class=selectorangeFont href='#' >User Query</A></TD>"+
"            </TR>"+

"          </TBODY>"+
"        </TABLE></TD>"+
"  </TR></table></TD>"+
"</TR>"+

 //Track & Trace Ends
// Fleet Starts
"      <TR id='order' style='display:none'><TD colspan='2'><table border=0 align=left cellSpacing=0 cellPadding=0 >"+
"	  <TR> "+
"      <TD bgColor=orange colSpan=2 height=6></TD>"+
"    </TR>"+
"     <TR> "+
"      <TD ><IMG src='/content_data/LAAM/ZA/en/GBPZA/019/images/leftnav_orange_arrow_right.gif' border=0></TD>"+
"      <TD><A class=selectorangeFont >FLEET CONNECTION </A></TD>"+
"    </TR>"+
"       <TR> "+
"      <TD></TD>"+
"      <TD> <TABLE align=left cellSpacing=0 cellPadding=0 border=0>"+
"          <TBODY>"+
"            <TR> "+
"              <TD><IMG src='/content_data/LAAM/ZA/en/GBPZA/019/images/leftnav_orange_arrow_right.gif' border=0></TD>"+
"	                 <TD><A id=link_20 class=menuFont  href='#' onclick=openWindowLink('http://www.gmsa.com/content_data/LAAM/ZA/en/GBPZA/999/header/fleet_connection/fleet_connection.html') >Welcome to Our Fleet Connection</A></TD>"+
"            </TR>"+
"		            <TR> "+
"              <TD><IMG src='/content_data/LAAM/ZA/en/GBPZA/019/images/leftnav_orange_arrow_right.gif' border=0></TD>"+
"	                 <TD><A id=link_20 class=menuFont  href='#' onclick=openWindowLink('http://www.gmsa.com/content_data/LAAM/ZA/en/GBPZA/999/header/fleet_connection/dealer_network.html') >Our Fleet Representatives</A></TD>"+
"            </TR>"+
"				            <TR> "+
"              <TD><IMG src='/content_data/LAAM/ZA/en/GBPZA/019/images/leftnav_orange_arrow_right.gif' border=0></TD>"+
"	                 <TD><A id=link_20 class=selectorangeFont href='#'>Government Subsidised Buyer Enquiry</A></TD>"+
"            </TR>"+
	"    <TR> "+
"                              <TD width=10><IMG src='/content_data/LAAM/ZA/en/GBPZA/019/images/leftnav_orange_arrow_right.gif' border=0></TD>"+
"                              <TD><A id=link_1 class=menuFont href='javascript:callWindow();'  >Sign Up for our Fleet NewsLetter</a></TD>"+
"                            </TR>"+

"          </TBODY>"+
"        </TABLE></TD>"+
"    </TR>"+
"    <TR> "+
"      <TD bgColor=#e5eaf4 colSpan=2 height='100%'></TD>"+
"    </TR>"+
"	  </table></TD></TR>"+
"    <TR> "+
"      <TD bgColor=#e5eaf4 colSpan=2 height='100%'></TD>"+
"    </TR>"+
//Fleet Ends
"</TABLE>";

if(modelName=="2B")
{
toContent+=corsaContent+remainingContent;
}

else
{
toContent+=commercialContent+remainingContent;
}
//alert(pageId);
document.write(toContent);
	if(modelName=="2B")
	{
		no=11;
	}
	else if(modelName=="2C")
	{
		no=11;
	}
	else if(modelName=="8")
	{
		no=11;
	}
	 color_all(no);
}







