﻿ //Identifying the Country Code and Language Code Starts here
//?cntry_cd=SA&lang_cd=en

var omni_langCd="ar";
var ctryCd="";
var formAlert="هذه الخدمة غير متوفرة حالياً في العراق";
if(location.href.indexOf("/action/")>0) // Shop & Buy tool
{
	var xloc=location.href;
	if(xloc.indexOf("newPage=")>0) ctryCd=xloc.substr(xloc.indexOf("newPage=")+8,2); // For Optin Form
	else if(xloc.indexOf("cntry_cd=")>0)
	{
		if(xloc.substr(xloc.indexOf("cntry_cd=")+9,2)!="ME")
			ctryCd=xloc.substr(xloc.indexOf("cntry_cd=")+9,2); // For CIF
		else
			ctryCd=xloc.substr(xloc.indexOf("cntryCd=")+8,2); // For Contact Us
	}
	else if(xloc.indexOf("cntryCd=")>0) ctryCd=xloc.substr(xloc.indexOf("cntryCd=")+8,2); // For Contact Us	
}
else // Static page
{
	var xloc=location.href;
	if(xloc.indexOf("cntryCd=")>0) ctryCd=xloc.substr(xloc.indexOf("cntryCd=")+8,2);
}

function MM_preloadImages() { //v3.0
  var d=document; 
  if(d.images)
  { 
  	if(!d.MM_p) d.MM_p=new Array();
    var i,
	j=d.MM_p.length,a=MM_preloadImages.arguments; 
	for(i=0; i<a.length; i++)
    	if (a[i].indexOf("#")!=0)
		{ 
		d.MM_p[j]=new Image; 
		d.MM_p[j++].src=a[i];
		}
	}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
	d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

var country_list = new Array();
country_list[0] = new Array();
country_list[0][0] = "0";
country_list[0][1] = "Select a Country";
country_list[1] = new Array();
country_list[1][0] = "BH";
country_list[1][1] = "البحريـن";
country_list[2] = new Array();
country_list[2][0] = "JO";
country_list[2][1] = "الأردن";
country_list[3] = new Array();
country_list[3][0] = "KW";
country_list[3][1] = "الكويت";
country_list[4] = new Array();
country_list[4][0] = "LB";
country_list[4][1] = "لبنـان";
country_list[5] = new Array();
country_list[5][0] = "OM";
country_list[5][1] = "عمـان";
country_list[6] = new Array();
country_list[6][0] = "QA";
country_list[6][1] = "قطر";
country_list[7] = new Array();
country_list[7][0] = "SA";
country_list[7][1] = "المملكة العربية السعودية";
country_list[8] = new Array();
country_list[8][0] = "SY";
country_list[8][1] = "سورية";
country_list[9] = new Array();
country_list[9][0] = "AE";
country_list[9][1] = "الإمارات العربية المتحدة";
country_list[10] = new Array();
country_list[10][0] = "EG";
country_list[10][1] = "مصر";
country_list[11] = new Array();
country_list[11][0] = "IQ";
country_list[11][1] = "العراق";


var model_list = new Array();
model_list[0] = new Array();
model_list[0][0] = "0";
model_list[0][1] = "شركة جنرال موتورز";
model_list[1] = new Array();
model_list[1][0] = "006";
model_list[1][1] = "كاديلاك";
model_list[2] = new Array();
model_list[2][0] = "001";
model_list[2][1] = "شـﭭـروليه";
model_list[3] = new Array();
model_list[3][0] = "012";
model_list[3][1] = "جي أم سي";
model_list[4] = new Array();
model_list[4][0] = "019";
model_list[4][1] = "أوﭘـل";
model_list[5] = new Array();
model_list[5][0] = "015";
model_list[5][1] = "ساب";
model_list[6] = new Array();
model_list[6][0] = "018";
model_list[6][1] = "هامَر";
model_list[7] = new Array();
model_list[7][0] = "1000";
model_list[7][1] = "حلول الأساطيل";
model_list[8] = new Array();
model_list[8][0] = "gmnext";
model_list[8][1] = "GM إلى الأمام";


function callCountry(cntryCode)
{
	if (cntryCode == "0")
	{
		return;
	}
	else
	{
		location.href="/GBPServiceMgr2.dyn?CntryCd=ME&LangCd=ar&WebSiteID=GBPME&ReqsType=Pull&ServiceName=RequestBrochure&NampltCd=999^pageredirect&SellingSrc=72&cnInput=999/index.html^"+cntryCode;
	}
}

function showHide(X)
{
	X="vac"+X;
	if(document.getElementById(X).style.display == 'none')
	{
		document.getElementById(X).style.display = ''
	}
	else
	{
		document.getElementById(X).style.display = 'none'
	}
}
//Opens the Chevroletlive.com Lumina Page.
function lumina_banner()
{
	
	window.open("http://www.chevroletlive.com/ChevroletMyLife/lumina/home_ara.aspx","","");
}
function callModel(modelCode)
{
	if (modelCode=='001')
	{
		//var abs_path="/GBPServiceMgr2.dyn?CntryCd=ME&LangCd=ar&WebSiteID=GBPME&ReqsType=Pull&ServiceName=RequestBrochure&NampltCd=001^pageredirect&SellingSrc=72&cnInput=001/index.html^"+ctryCd;
		//location.href= abs_path;
		if(ctryCd != "EG")
		{
			//window.open("http://www.chevroletarabia.com/GBPServiceMgr2.dyn?CntryCd=ME&LangCd=ar&WebSiteID=GBPME&ReqsType=Pull&ServiceName=RequestBrochure&NampltCd=001^pageredirect&SellingSrc=72&cnInput=001/index.html^"+ctryCd,"","");
			window.open("http://" + ctryCd + "-ar.chevroletarabia.com","","");
		}
		else
		{
		//	location.href="http://www.chevrolet.gmegypt.com"
			window.open("http://www.chevrolet.gmegypt.com/GBPServiceMgr2.dyn?CntryCd=ME&LangCd=ar&WebSiteID=GBPME&ReqsType=Pull&ServiceName=RequestBrochure&NampltCd=001^pageredirect&SellingSrc=72&cnInput=001/index.html^"+ctryCd,"","");
		}
	}
	if (modelCode=='006')
	{	
		if(ctryCd != "IQ")
		{
			//location.href='/GBPServiceMgr2.dyn?CntryCd='+ctryCd+'&LangCd=ar&WebSiteID=GBP'+ctryCd+'&ReqsType=Pull&ServiceName=RequestBrochure&NampltCd=999&SellingSrc=72&cnInput=006/index.html';
			window.open("http://www.cadillacarabia.com/GBPServiceMgr2.dyn?CntryCd=ME&LangCd=ar&WebSiteID=GBPME&ReqsType=Pull&ServiceName=RequestBrochure&NampltCd=006^pageredirect&SellingSrc=72&cnInput=006/index.html^"+ctryCd,"","");
		}
		else
		{
			alert("كاديلاك غير متوفرة في العراق");
		}
	}
	if (modelCode=='012')
	{
		//location.href='/content_data/LAAM/'+ctryCd+'/ar/GBP'+ctryCd+'/GMC/index.html';
		if (ctryCd != "SY")
		{
			if(ctryCd != "IQ")
			{
				//abs_path="/GBPServiceMgr2.dyn?CntryCd=ME&LangCd=ar&WebSiteID=GBPME&ReqsType=Pull&ServiceName=RequestBrochure&NampltCd=012^pageredirect&SellingSrc=72&cnInput=012/index.html^"+ctryCd;
				//location.href= abs_path;
				window.open("http://www.gmcarabia.com/GBPServiceMgr2.dyn?CntryCd=ME&LangCd=ar&WebSiteID=GBPME&ReqsType=Pull&ServiceName=RequestBrochure&NampltCd=012^pageredirect&SellingSrc=72&cnInput=012/index.html^"+ctryCd,"","");
			}
			else
			{
				alert("جي ام سي غير متوفرة في العراق");
			}
		}
		else
		{
			x=window.confirm(" GMC is not available in Syria. \n Press OK to go to the Country Selector page for GMCArabia.com. \n Press Cancel to stay on this page.");
			if (x)
			{
				//location.href = "/content_data/LAAM/ME/en/GBPME/cs/012/index.html";
				window.open("http://www.gmcarabia.com","","");
			}
		}
	}
	
	if (modelCode=='015')
	{
		if(ctryCd != "IQ")
		{
			var isSelected=window.confirm("موقع ساب متوفر باللغة الإنجليزية فقط. يرجى الضغط على الزر OK للمتابعة باللغة الإنجليزية أو الزر Cancel للبقاء هنا.");
			if(isSelected)
			{
				//var abs_path="/GBPServiceMgr2.dyn?CntryCd=ME&LangCd=en&WebSiteID=GBPME&ReqsType=Pull&ServiceName=RequestBrochure&NampltCd=015^pageredirect&SellingSrc=72&cnInput=015/main/docs/saab/index.html^"+ctryCd;
			//location.href= abs_path;
			window.open("http://www.saabarabia.com/GBPServiceMgr2.dyn?CntryCd=ME&LangCd=en&WebSiteID=GBPME&ReqsType=Pull&ServiceName=RequestBrochure&NampltCd=015^pageredirect&SellingSrc=72&cnInput=015/main/docs/saab/index.html^"+ctryCd,"","");
			}
		}
		else
		{
			alert("ساب غير متوفرة في العراق");
		}
	}
	if (modelCode=='019')
	{
		if(ctryCd == "IQ")
		{
			
				alert("الموقع تحت الانشاء ");
		}
		else
		{
			if(ctryCd != "EG")
			{
			var isSelected=window.confirm("موقع أوبل متوفر باللغة الإنجليزية فقط. يرجى الضغط على الزر OK للمتابعة باللغة الإنجليزية أو الزر Cancel للبقاء هنا.");
		
			if(isSelected)
			{
				//window.open("http://www.opelarabia.com/GBPServiceMgr2.dyn?CntryCd=ME&LangCd=en&WebSiteID=GBPME&ReqsType=Pull&ServiceName=RequestBrochure&NampltCd=019^pageredirect&SellingSrc=72&cnInput=019/index.html^"+ctryCd,"","");
				window.open("http://www.opelarabia.com","","");
			}
			}
			else
			{
				//location.href="/GBPServiceMgr2.dyn?CntryCd=ME&LangCd=ar&WebSiteID=GBPME&ReqsType=Pull&ServiceName=RequestBrochure&NampltCd=019^pageredirect&SellingSrc=72&cnInput=019/index.html^"+ctryCd;
				window.open("http://www.opel.gmegypt.com/GBPServiceMgr2.dyn?CntryCd=ME&LangCd=ar&WebSiteID=GBPME&ReqsType=Pull&ServiceName=RequestBrochure&NampltCd=019^pageredirect&SellingSrc=72&cnInput=019/index.html^"+ctryCd,"","");
			}
			
		}
	}
	if (modelCode=='999')
	{
		//location.href='/content_data/LAAM/'+ctryCd+'/ar/GBP'+ctryCd+'/corp/index.html';
		call_page('999/index.html')
	}
	if (modelCode=='1000')
	{
		call_fleet();
	}
	if (modelCode=='1001')
	{
		//location.href='/content_data/LAAM/'+ctryCd+'/ar/GBP'+ctryCd+'/corp/advantage.html';
		call_page('999/advantage.html')
	}
	if (modelCode=='018')
	{
		if(ctryCd != "IQ")
		{
				call_hummer();
		}
		else
		{
			alert("هامر غير متوفرة في العراق");
		}
	}
	
	if(modelCode == "gmnext"){
		window.open("http://www.gmnext.com/","","");
	}
}

function populateCountry()
{
	document.write("<select name=s1 class='dropdown' onChange='callCountry(this.value)'>");
	for (var i= 1; i< country_list.length; i++)
	{
		document.write("<option value="+country_list[i][0]+">"+country_list[i][1]+"</option>");
	}
	document.write("</select>");
	document.write('<scr'+'ipt>for (i=0;i<document.all["s1"].options.length;i++){ if (document.all["s1"].options[i].value=="'+ctryCd+'") document.all["s1"].options[i].selected = true}</scr'+'ipt>');
}

/*function populateBrand()
{
	document.write("<select name=s2 class='dropdown1' onChange='callModel(this.value)'>");
	for (var i= 0; i< model_list.length; i++)
	{
			//If the country is Syria we need to Skip GMC from the Brandlist
			if(location.href.indexOf("/SY/")>0)
			{	if (i!=3)
					document.write("<option value="+model_list[i][0]+">"+model_list[i][1]+"</option>");
			}
			else
				document.write("<option value="+model_list[i][0]+">"+model_list[i][1]+"</option>");
	}
	document.write("</select>");
	document.write('<scr'+'ipt>document.all["s2"].options[0].selected = true</scr'+'ipt>');
}*/
/* New code added for Brand Population for Egypt and Iraq by Siva on 22-Mar-2006 */
function populateBrand()
{
	if (ctryCd != 'EG' && ctryCd != 'IQ')
	{
	document.write("<select name=s2 class='dropdown1' onChange='callModel(this.value)'>");
		for (var i= 0; i< model_list.length; i++)
	{
			//If the country is Syria we need to Skip GMC from the Brandlist
			if(location.href.indexOf("/SY/")>0)
			{	if (i!=3)
					document.write("<option value="+model_list[i][0]+">"+model_list[i][1]+"</option>");
			}
			else
				document.write("<option value="+model_list[i][0]+">"+model_list[i][1]+"</option>");
	}
	document.write("</select>");
	document.write('<scr'+'ipt>document.all["s2"].options[0].selected = true</scr'+'ipt>');
	}
	else
	{
		if (ctryCd != 'IQ')
		{
		document.write("<select name=s2 class='dropdown1' onChange='callModel(this.value)'>");
		document.write("<option value="+model_list[0][0]+">"+model_list[0][1]+"</option>");
		document.write("<option value="+model_list[2][0]+">"+model_list[2][1]+"</option>");
		document.write("<option value="+model_list[4][0]+">"+model_list[4][1]+"</option>");
		document.write("<option value="+model_list[7][0]+">"+model_list[7][1]+"</option>");
		document.write("</select>");
		document.write('<scr'+'ipt>document.all["s2"].options[0].selected = true</scr'+'ipt>');
		}
		else
		{
		document.write("<select name=s2 class='dropdown1' onChange='callModel(this.value)'>");
		document.write("<option value="+model_list[0][0]+">"+model_list[0][1]+"</option>");
		document.write("<option value="+model_list[2][0]+">"+model_list[2][1]+"</option>");
		document.write("<option value="+model_list[7][0]+">"+model_list[7][1]+"</option>");
		document.write("</select>");
		document.write('<scr'+'ipt>document.all["s2"].options[0].selected = true</scr'+'ipt>');
		}
	}
}

function lumina()
{
	alert("This will take you to Lumina Site")
}
function call_fleet()
{
	if(ctryCd != "EG")
	{
	window.open("/GBPServiceMgr2.dyn?CntryCd=BV&LangCd=ar&WebSiteID=GBPBV&ReqsType=Pull&ServiceName=EntryForm&cfInput=test","Fleet","height=450,width=650,left=150,top=120,status=yes,toolbar=no,menubar=no,scrollbars=yes,resizable=yes");
	return;
	}
	else
	{
		call_page('999/gm_fleet.html');
	}
}

//Hummer Arabia
function call_hummer()
{
	
	//alert("Hummer Arabia Arabic Version is Under Construction");
	if(ctryCd != "IQ")
	{
		//location.href="/content_data/LAAM/ME/en/GBPME/018/index.html"
		window.open("http://www.hummerarabia.com/content_data/LAAM/ME/ar/GBPME/018/index.html","","")
	}
	else
	{
		alert("هامر غير متوفرة في العراق");
	}
}
function call_page(targURL)
{
   	var cntryCode=ctryCd;
          var BaseURL="/GBPServiceMgr2.dyn?CntryCd=ME&LangCd=ar&WebSiteID=GBPME&ReqsType=Pull&ServiceName=RequestBrochure&NampltCd=999^pageredirect&SellingSrc=72&cnInput=";
          newURLValue=targURL;
          var targetURL="";
          var windowName="";
          var windowParams="";
          switch(call_page.arguments.length)
          {
                   case 0:
                             alert("No Parameters found\n Improper Usage of Function\n\n Usage 1: call_page('001/<target HTML file>');\n Usage 2: call_page('999/<target HTML file>','Y');\n Usage 3: call_page('001/<target HTML file>','<window name>','<window parameters>');");
                             break;
                   case 1:
                             targetURL=targURL; //Target URL
newURLValue=targetURL; //Target path assigned to this Global variable. Used in Popup opened.
                             if(targetURL.indexOf("http://")==0)
                                      location.href=targetURL;
                             else
                                      location.href=BaseURL+targetURL+"^"+cntryCode; //Open URL in same window using RFB include action
                             break;
                   case 2:
                             targetURL=call_page.arguments[0]; //Target URL
                             windowParams=call_page.arguments[1]; //Target Window Parameters
                             if(windowParams.toUpperCase()=="Y")
                             {
                                      window.open(targetURL); //Open in a blank window
                             }
                             if(windowParams.toUpperCase()=="OPENER")
                             {
                                      window.opener.location.href=BaseURL+targetURL+"^"+cntryCode;
									  self.window.close();
									   //Open in a parent window
                             }
                             break;
                   case 3:
                             targetURL=call_page.arguments[0]; //Target URL
                             windowName=call_page.arguments[1]; //Target Window Name
                             windowParams=call_page.arguments[2]; //Target Window Parameters
                             if(targetURL.indexOf("http://")==0)
                             {
				window.open(targetURL,windowName,windowParams); //Website to be Open in a new window (name mentioned in windowName).
                             }
                             else
                             {

				newURLValue=targetURL; //Target path assigned to this Global variable. Used in Popup opened.
				/*if(targetURL == "001/imagegallary.html")
				{
					var positionID = "top=xx,left=xx";
				}*/
				window.open(BaseURL+targetURL+"^"+cntryCode,windowName,windowParams); //Open in a new window (name mentioned in windowName).

                             }
                             break;
          }
}
function TopNav()
{
document.write("<table width='780' border='1' cellpadding='0' cellspacing='0'><tr><td width='5%' valign='top'><a href=javascript:goto(0,'N');><img src='/content_data/LAAM/ME/ar/GBPME/999/G1/images/gmlogo.gif' width='44' height='43' border='0'></a></td><td valign='top'><img src='/content_data/LAAM/ME/ar/GBPME/999/G1/images/spacer.gif' width='3' height='1'></td><td valign='top'><table width='100%' border='0' cellspacing='0' cellpadding='0'><tr><td width='200' height='20' align='right' bgcolor='#003063'><a href=javascript:goto(1,'N');><img src='/content_data/LAAM/ME/ar/GBPME/999/G1/images/gcc_corp_site.gif' width='75' height='13' border='0'></a>&nbsp;</td><td bgcolor='#003063'><table width='100%' border='0' cellspacing='0' cellpadding='0'><tr><td width='411' align='left'> <img src='/content_data/LAAM/ME/ar/GBPME/999/G1/images/gcc_corp_home_owner.gif' width='139' height='15' border='0' usemap='#Map2MapMapMap2'><img src='/content_data/LAAM/ME/ar/GBPME/999/G1/images/arabic_text.jpg' width='38' height='15' border='0' usemap='#Map3MapMapMap2'><map name='Map3MapMapMap2'><area shape='rect' coords='3,3,35,14' href=javascript:goto(19,'N');></map> </td><td width='119' align='right'><scr"+ "ipt>populateCountry();</scr"+"ipt></td></tr></table><map name='Map2MapMapMap2'><area shape='rect' coords='81,0,137,22' href=javascript:goto(7,'N');><area shape='rect' coords='10,2,70,14' href=javascript:goto(8,'N'); target='_top'></map><map name='Map2MapMapMap2'><area shape='rect' coords='5,1,31,23' href=javascript:goto(7,'N');><area shape='rect' coords='45,2,130,14' href=javascript:goto(8,'N');></map></td></tr><tr><td height='23' align='right' bgcolor='#9CCFFF'>&nbsp; <scr"+ "ipt>populateBrand/scr"+"ipt><img src='/content_data/LAAM/ME/ar/GBPME/999/G1/images/spacer.gif' height='6' width='1'> </td><td bgcolor='#9CCFFF'><table width='100%' border='0' cellspacing='0' cellpadding='0'><tr><td width='44%'>&nbsp;</td><td width='56%' align='left'><img src='/content_data/LAAM/ME/ar/GBPME/999/G1/images/top_link.gif' width='465' height='17' border='0' usemap='#MapMapMapMap2'><map name='MapMapMapMap2'><area shape='rect' coords='86,4,164,14' href=javascript:goto(6,'N');><area shape='rect' coords='176,4,233,14' href=javascript:goto(22,'N');><area shape='rect' coords='3,2,75,14' href=javascript:goto(23,'N');><area shape='rect' coords='243,3,282,15' href=javascript:goto(5,'N');><area shape='rect' coords='293,2,355,14' href=javascript:goto(4,'N');><area shape='rect' coords='357,4,385,15' href=javascript:goto(3,'N');><area shape='rect' coords='396,1,469,15' href=javascript:goto(2,'N');></map> </td></tr></table></td></tr></table></td></tr></table><map name='Map2'><area shape='rect' coords='5,1,31,23' href=javascript:goto(7,'N');><area shape='rect' coords='45,2,130,14' href=javascript:goto(8,'N'); target='_top'></map><table width='100%' border='0' cellspacing='0' cellpadding='0'><tr><td align='left' valign='top' bgcolor='#FFFFFF'><img src='/content_data/LAAM/ME/ar/GBPME/999/G1/images/spacer.gif' width='1' height='1'></td></tr></table><map name='Map'><area shape='rect' coords='3,3,78,15' href=javascript:goto(2,'N');><area shape='rect' coords='88,3,124,14' href=javascript:goto(3,'N');><area shape='rect' coords='135,2,178,15' href=javascript:goto(4,'N');><area shape='rect' coords='188,2,244,14' href=javascript:goto(5,'N');><area shape='rect' coords='250,1,288,15' href=javascript:goto(6,'N');></map><map name='Map2'><area shape='rect' coords='5,1,31,23' href=javascript:goto(7,'N');><area shape='rect' coords='45,2,130,14' href=javascript:goto(8,'N');></map>")
}

var path="/content_data/LAAM/ME/ar/GBPME/999/G1/images";
function TopNav_ar()
{
document.write(
"<table width='780' height='43' border='0' cellpadding='0' cellspacing='0'>"+
"    <tr> "+
"      <td width='44' valign='top'><a href=javascript:goto(0,'N');><img src='/content_data/LAAM/ME/ar/GBPME/999/G1/images/gmlogo.gif' width='44' height='43' border='0'></a></td>"+
"      <td valign='top'><img src='/content_data/LAAM/ME/ar/GBPME/999/G1/images/spacer.gif' width='3' height='1'></td>"+
"      <td valign='top'><table width='100%' border='0' cellspacing='0' cellpadding='0'>"+
"          <tr> "+
"            <td width='200' height='20' align='right' bgcolor='#003063'><a href=javascript:goto(1,'N');> "+
"              <img src='/content_data/LAAM/ME/ar/GBPME/999/G1/images/gcc_corp_site.gif' width='75' height='13' border='0'></a>&nbsp; "+
"            </td>"+
"            <td align='right' bgcolor='#003063'><table width='100%' border='0' cellspacing='0' cellpadding='0'>"+
"                <tr> "+
"                  <td width='411' align='left'> <img src='/content_data/LAAM/ME/ar/GBPME/999/G1/images/gcc_corp_home_owner.gif' width='139' height='15' border='0' usemap='#Map2MapMap'><img src='/content_data/LAAM/ME/ar/GBPME/999/G1/images/arabic_text.jpg' width='38' height='15' border='0' usemap='#Map3MapMap'> "+
"                    <map name='Map3MapMap'>"+
"                      <area shape='rect' coords='2,2,34,13' href=javascript:goto(19,'N');>"+
"                    </map> </td>"+
"                  <td width='119' align='right'><scri" + "pt>populateCountry()</scri" + "pt></td>"+
"                </tr>"+
"              </table></td>"+
"          </tr>"+
"          <tr> "+
"            <td height='23' align='right' bgcolor='#9CCFFF'><img src='/content_data/LAAM/ME/ar/GBPME/999/G1/images/spacer.gif' width='2' height='8'> "+
"              <scr" + "ipt>populateBrand()</scr" + "ipt> <img src='/content_data/LAAM/ME/ar/GBPME/999/G1/images/spacer.gif' height='6' width='1'> "+
"            </td>"+
"            <td bgcolor='#9CCFFF'><table width='100%' border='0' cellspacing='0' cellpadding='0'>"+
"                <tr> "+
"                  <td width='44%'>&nbsp;</td>"+
"                  <td width='56%' align='left'><img src='/content_data/LAAM/ME/ar/GBPME/999/G1/images/top_link.gif' width='465' height='17' border='0' usemap='#MapMapMap'> "+
"                    <map name='MapMapMap'>"+
"                      <area shape='rect' coords='85,4,166,14' href=javascript:goto(6,'N');>"+
"                      <area shape='rect' coords='243,2,279,13' href=javascript:goto(5,'N');>"+
"                      <area shape='rect' coords='291,2,348,14' href=javascript:goto(4,'N');>"+
"                      <area shape='rect' coords='357,3,383,14' href=javascript:goto(3,'N');>"+
"                      <area shape='rect' coords='393,1,461,16' href=javascript:goto(2,'N');>"+
"                      <area shape='rect' coords='174,4,234,17' href=javascript:goto(22,'N');>"+
"                      <area shape='rect' coords='6,3,74,14' href=javascript:goto(23,'N');>"+
"                    </map> </td>"+
"                </tr>"+
"              </table></td>"+
"          </tr>"+
"        </table>"+
"        <map name='Map2MapMap'>"+
"          <area shape='rect' coords='7,2,71,14' href=javascript:goto(7,'N'); target='_top'>"+
"        </map> <map name='Map2MapMap'>"+
"          <area shape='rect' coords='5,1,31,23' href=javascript:goto(7,'N');>"+
"          <area shape='rect' coords='45,2,130,14' href=javascript:goto(8,'N');>"+
"        </map></td>"+
"    </tr>"+
"  </table>");
}

//Corp links .js
function dealerLocatorCountry()
{
//	location.href="/content_data/LAAM/SA/ar/GBPSA/corp/locator_01.html"
	//location.href="/GBPServiceMgr2.dyn?CntryCd="+ctryCd+"&LangCd=ar&WebSiteID=GBP"+ctryCd+"&ReqsType=Pull&ServiceName=DealerLocator&NampltCd=999&SellngSrc=72";
	if (ctryCd != "EG")
	{
		location.href="/content_data/LAAM/ME/ar/GBPME/999/G1/dllocator.html?namplt_cd=999&cntryCd="+ctryCd+"&lang_cd=ar^"+ctryCd;
	}
	else
	{
	location.href="/content_data/LAAM/ME/ar/GBPME/999/EG/dllocator.html?namplt_cd=999&cntryCd="+ctryCd+		"&lang_cd=ar^"+ctryCd;
	}

}

function showroomCountry()
{
	//location.href="/content_data/LAAM/"+ctryCd+"/ar/GBP"+ctryCd+"/corp/showroom/showroom.html"
	call_page('999/showroom_new.html');
}

/*function advisorCountry()
{
	//location.href="/content_data/LAAM/SA/ar/GBPSA/corp/advisor_01.html"
	location.href="/GBPServiceMgr2.dyn?CntryCd="+ctryCd+"&LangCd=ar&WebSiteID=GBP"+ctryCd+"&ReqsType=Pull&ServiceName=VehicleSelectionGuide";

}*/

function reqBrochureCountry()
{
	
	//location.href="/content_data/LAAM/SA/ar/GBPSA/corp/locator_05.html"
if(ctryCd == 'IQ')
{
	alert(formAlert);
}
else{	
		var x_url ="";
		try
		{
			//x_url = "/GBPServiceMgr2.dyn?CntryCd="+ctryCd+"&LangCd=ar&WebSiteID=GBP"+ctryCd+"&ReqsType=Pull&ServiceName=RequestBrochure&NampltCd=999&SellingSrc=72&MerchModlDesgtr="+mmd+"&ModelCode="+mmd.substring(0,2)+"&cnInput=cnInput";
			x_url="/GBPServiceMgr2.dyn?CntryCd=ME&LangCd=ar&WebSiteID=GBPME&ReqsType=Pull&ServiceName=TestDrive&NampltCd=999^^RB^N^"+ctryCd+"^&SellingSrc=72&MerchModlDesgtr=1BBSE&ModelCode=1B";
		}
		catch(e)
		{
			//x_url="/GBPServiceMgr2.dyn?CntryCd="+ctryCd+"&LangCd=ar&WebSiteID=GBP"+ctryCd+"&ReqsType=Pull&ServiceName=RequestBrochure&NampltCd=999&SellingSrc=72&cnInput=cnInput";
			x_url="/GBPServiceMgr2.dyn?CntryCd=ME&LangCd=ar&WebSiteID=GBPME&ReqsType=Pull&ServiceName=TestDrive&NampltCd=999^^RB^N^"+ctryCd+"^&SellingSrc=72&MerchModlDesgtr=1BBSE&ModelCode=1B";
		}
		//location.href=x_url;
		window.open(x_url,"Fleet","width=700,height=600,left=150,top=80,scrollbars=yes,resizable=disabled");
		
}
}

function bookTestdriveCountry()
{
//	location.href="/content_data/LAAM/SA/ar/GBPSA/corp/locator_04.html"
	if(ctryCd != 'EG' && ctryCd != 'IQ')
	{
		var URLVar ="";
		try
		{
			//URLVar="/GBPServiceMgr2.dyn?CntryCd="+ctryCd+"&LangCd=ar&WebSiteID=GBP"+ctryCd+"&ReqsType=Pull&ServiceName=TestDrive&NampltCd=999&SellingSrc=72&MerchModlDesgtr="+mmd+"&ModelCode="+ mmd.substring(0,2);
		URLVar="/GBPServiceMgr2.dyn?CntryCd=ME&LangCd=ar&WebSiteID=GBPME&ReqsType=Pull&ServiceName=TestDrive&NampltCd=999^^TD^N^"+ctryCd+"^&SellingSrc=72&MerchModlDesgtr=1BBSE&ModelCode=1B";
		}
		catch(e)
		{
			//URLVar="/GBPServiceMgr2.dyn?CntryCd="+ctryCd+"&LangCd=ar&WebSiteID=GBP"+ctryCd+"&ReqsType=Pull&ServiceName=TestDrive&NampltCd=999&SellingSrc=72&MerchModlDesgtr=1BBSE&ModelCode=1B";
		URLVar="/GBPServiceMgr2.dyn?CntryCd=ME&LangCd=ar&WebSiteID=GBPME&ReqsType=Pull&ServiceName=TestDrive&NampltCd=999^^TD^N^"+ctryCd+"^&SellingSrc=72&MerchModlDesgtr=1BBSE&ModelCode=1B";
		}
		//location.href=URLVar;
		window.open(URLVar,"Fleet","width=700,height=600,left=150,top=80,scrollbars=yes,resizable=disabled");
	}
	else {
	if(ctryCd =='EG')
	{alert("القيادة التجريبية غير متوفرة في مصر");}
	else{if(ctryCd == 'IQ')alert(formAlert);}}
}
//Request for Brochure Link from New DealerLocator 
function callRequestBrochureDL(namepltcd,ctryCd,dlrname)
{
	if(ctryCd == 'IQ')
	{
		alert(formAlert);
	}
	else{
	dealerName_from_DL = dlrname;
	dlrname="DLR";
	
	var x_url ="";
		try
		{
			//x_url = "/GBPServiceMgr2.dyn?CntryCd="+ctryCd+"&LangCd=en&WebSiteID=GBP"+ctryCd+"&ReqsType=Pull&ServiceName=RequestBrochure&NampltCd=999&SellingSrc=72&MerchModlDesgtr="+mmd+"&ModelCode="+mmd.substring(0,2)+"&cnInput=cnInput";
			x_url="/GBPServiceMgr2.dyn?CntryCd=ME&LangCd=ar&WebSiteID=GBPME&ReqsType=Pull&ServiceName=TestDrive&NampltCd=999^^RB^N^"+ctryCd+"^"+dlrname+"&SellingSrc=72&MerchModlDesgtr=1BBSE&ModelCode=1B";
	
		}
		catch(e)
		{
			//x_url="/GBPServiceMgr2.dyn?CntryCd="+ctryCd+"&LangCd=en&WebSiteID=GBP"+ctryCd+"&ReqsType=Pull&ServiceName=RequestBrochure&NampltCd=999&SellingSrc=72&cnInput=cnInput";
			x_url="/GBPServiceMgr2.dyn?CntryCd=ME&LangCd=ar&WebSiteID=GBPME&ReqsType=Pull&ServiceName=TestDrive&NampltCd=999^^RB^N^"+ctryCd+"^"+dlrname+"&SellingSrc=72&MerchModlDesgtr=1BBSE&ModelCode=1B";
	
		}
		//location.href=x_url;
		window.open(x_url,"Fleet","width=700,height=600,left=150,top=80,scrollbars=yes,resizable=disabled");
}
}
//Test Drive from New DealerLocator 
function callTestDriveDL(namepltcd,ctryCd,dlrname)
{
if(ctryCd != 'EG' && ctryCd != 'IQ')
{
dealerName_from_DL = dlrname;
dlrname="DLR";

var URLVar ="";
	try
	{
	//	URLVar="/GBPServiceMgr2.dyn?CntryCd="+ctryCd+"&LangCd=en&WebSiteID=GBP"+ctryCd+"&ReqsType=Pull&ServiceName=TestDrive&NampltCd=999&SellingSrc=72&MerchModlDesgtr="+mmd+"&ModelCode="+ mmd.substring(0,2);
	URLVar="/GBPServiceMgr2.dyn?CntryCd=ME&LangCd=ar&WebSiteID=GBPME&ReqsType=Pull&ServiceName=TestDrive&NampltCd=999^^TD^N^"+ctryCd+"^"+dlrname+"&SellingSrc=72&MerchModlDesgtr=1BBSE&ModelCode=1B";

	}
	catch(e)
	{
	URLVar="/GBPServiceMgr2.dyn?CntryCd=ME&LangCd=ar&WebSiteID=GBPME&ReqsType=Pull&ServiceName=TestDrive&NampltCd=999^^TD^N^"+ctryCd+"^"+dlrname+"&SellingSrc=72&MerchModlDesgtr=1BBSE&ModelCode=1B";
	}
	//location.href=URLVar;
	window.open(URLVar,"Fleet","width=700,height=600,left=150,top=80,scrollbars=yes,resizable=disabled");
}
else {
	if(ctryCd =='EG')
	{alert("القيادة التجريبية غير متوفرة في مصر");}
	else{if(ctryCd == 'IQ')alert(formAlert);}}
}

corp_header_links = new Array();

//corp_header_links[0]="http://www.gm.com";
corp_header_links[0]="javascript:call_page('999/index.html');";
corp_header_links[1]="javascript:call_page('999/index.html');";
corp_header_links[2]="javascript:dealerLocatorCountry();";//"/content_data/LAAM/ME/ar/GBPME/999/G1/dllocator.html?namplt_cd=999&cntryCd="+ctryCd+"&lang_cd=en";
corp_header_links[3]="/GBPServiceMgr2.dyn?CntryCd=ME&LangCd=ar&WebSiteID=GBPME&ReqsType=Pull&ServiceName=Search&NampltCd=999";
corp_header_links[4]="javascript:call_page('999/sitemap.html');";
corp_header_links[5]="#";
corp_header_links[6]="javascript:call_page('999/gm_privacy.html');";
corp_header_links[7]="javascript:call_page('999/index.html');";
corp_header_links[8]="#";// GM Link
corp_header_links[9]="javascript:call_page('999/gm_vision_mission.html');";//vision & mission
corp_header_links[10]="javascript:call_page('999/gm_history.html');";//gm history
corp_header_links[11]="javascript:call_page('999/gm_news.html');";//gm news
corp_header_links[12]="javascript:call_page('999/gmdifference.html');";//gm difference
corp_header_links[13]="javascript:call_fleet();";//gm fleet
//corp_header_links[14]="javascript:call_page('999/advantage.html');";//advantage
corp_header_links[15]="javascript:call_page('999/gm_promotions.html');";//promotions
corp_header_links[16]="#";//gm link
corp_header_links[17]="javascript:call_page('999/fun_ent1.html');";//fun n ent
corp_header_links[18]="javascript:call_page('999/games.html');";//Safety
corp_header_links[19]="#";
corp_header_links[20]="#";
corp_header_links[22]="javascript:call_page('999/gm_copyright.html');";
corp_header_links[23]="javascript:call_page('999/gm_copyright.html');";



function goto(index,pop)
{
	var i = index;
	var flag= pop;
	if (i==5)
	{
	if(ctryCd == 'IQ')
	{
	alert("لاي معلومات يرجى الاتصال بمركز اتصالات العملاء ٩٧١٤٣١٤٣٤٦+");
	}
	else{
		var URLVar="/GBPServiceMgr2.dyn?CntryCd=ME&LangCd=ar&WebSiteID=GBPME&ReqsType=Pull&ServiceName=ContactSector&NampltCd=999^"+ctryCd;//"/GBPServiceMgr2.dyn?CntryCd=ME&LangCd=en&WebSiteID=GBPME&ReqsType=Pull&ServiceName=VehicleComparator&cnInput=test&NampltCd=015";
	window.open(URLVar,"Fleet","width=700,height=600,left=150,top=80,scrollbars=yes,resizable=disabled");
	}}
	if (i==8)
	{
	if(ctryCd == 'IQ')
	{
	alert(formAlert);
	}
	else{
		window.open("/GBPServiceMgr2.dyn?CntryCd=BV&LangCd=ar&WebSiteID=GBPBV&ReqsType=Pull&ServiceName=EntryForm&regInput=test","Fleet","width=700,height=600,left=150,top=80,scrollbars=yes,resizable=yes");
		return;
	}
	}
	if (i==16)
	{
	if(ctryCd == 'IQ')
	{
	alert(formAlert);
	}
	else{
		window.open("/GBPServiceMgr2.dyn?CntryCd=BV&LangCd=ar&WebSiteID=GBPBV&ReqsType=Pull&ServiceName=EntryForm&regInput=test","Fleet","width=700,height=600,left=150,top=80,scrollbars=yes,resizable=yes");
		return;
	}
}
	if (i==13)
	{
		if (ctryCd != "EG" )
		{
		//window.open("/content_data/LAAM/ME/ar/GBPME/GMFleet/main/fleet_index.htm","Fleet","width=650,height=500,left=150,top=120,scrollbars=yes,resizable=yes");
		window.open("/GBPServiceMgr2.dyn?CntryCd=BV&LangCd=ar&WebSiteID=GBPBV&ReqsType=Pull&ServiceName=EntryForm&cfInput=test","Fleet","width=650,height=500,left=150,top=120,scrollbars=yes,resizable=yes");
		return;
		}
		else{
		call_page('999/gm_fleet.html');
		}
	}
	if(i==19)
	{
		var page_url = location.href;
		if (page_url.indexOf("action") > 0)
		{
			var isSelected = window.confirm("The selected action will reset the information for your session. To continue this action, click OK. To cancel, click CANCEL");
			if(isSelected)
				//location.href = "/content_data/LAAM/"+ctryCd+"/ar/GBP"+ctryCd+"/corp/index.htm";
						var BaseURL="/GBPServiceMgr2.dyn?CntryCd=ME&LangCd=en&WebSiteID=GBPME&ReqsType=Pull&ServiceName=RequestBrochure&NampltCd=999^pageredirect&SellingSrc=72&cnInput=999/index.html^"+ctryCd;
		 location.href=BaseURL;
			return;
		}
		else
		{
			var langPosition = page_url.indexOf("/ar");
			location.href = page_url.substring(0,langPosition) +"/en"+page_url.substring(langPosition+3,page_url.length);
			return;
		}
	}
	
	if(i==20)
	{
		//alert("This will take you to Opt in Form")
		if(ctryCd == 'IQ')
	{
	alert(formAlert);
	}
	else{
		window.open("/GBPServiceMgr2.dyn?CntryCd=ME&LangCd=ar&WebSiteID=GBPME&ReqsType=Pull&ServiceName=EntryForm&newPage="+ctryCd+"&NampltCd=999","Fleet","width=650,height=500,left=150,top=80,scrollbars=yes,resizable=yes");
		return;
	}}
	//	alert (i + " " + flag + " " + corp_header_links[i]);
	location.href=corp_header_links[i];
}


var model_id = new Array();
model_pages = new Array();

model_id[0] = "OA";
model_pages[0] = "/GBPServiceMgr2.dyn?CntryCd=ME&LangCd=en&WebSiteID=GBPME&ReqsType=Pull&ServiceName=RequestBrochure&NampltCd=019^pageredirect&SellingSrc=72&cnInput=019/OA/OA_home.html^"+ctryCd;

model_id[1] = "OB";
model_pages[1] = "/GBPServiceMgr2.dyn?CntryCd=ME&LangCd=en&WebSiteID=GBPME&ReqsType=Pull&ServiceName=RequestBrochure&NampltCd=019^pageredirect&SellingSrc=72&cnInput=019/OB/OB_home.html^"+ctryCd;

model_id[2] = "OC";
model_pages[2] = "/GBPServiceMgr2.dyn?CntryCd=ME&LangCd=en&WebSiteID=GBPME&ReqsType=Pull&ServiceName=RequestBrochure&NampltCd=019^pageredirect&SellingSrc=72&cnInput=019/OC/OC_home.html^"+ctryCd;

model_id[3] = "OM";
model_pages[3] = "/GBPServiceMgr2.dyn?CntryCd=ME&LangCd=en&WebSiteID=GBPME&ReqsType=Pull&ServiceName=RequestBrochure&NampltCd=019^pageredirect&SellingSrc=72&cnInput=019/OM/OM_home.html^"+ctryCd;

model_id[4] = "OV";
model_pages[4] = "/GBPServiceMgr2.dyn?CntryCd=ME&LangCd=en&WebSiteID=GBPME&ReqsType=Pull&ServiceName=RequestBrochure&NampltCd=019^pageredirect&SellingSrc=72&cnInput=019/OV/OV_home.html^"+ctryCd;

model_id[5] = "OO";
model_pages[5] = "/GBPServiceMgr2.dyn?CntryCd=ME&LangCd=en&WebSiteID=GBPME&ReqsType=Pull&ServiceName=RequestBrochure&NampltCd=019^pageredirect&SellingSrc=72&cnInput=019/index.html^"+ctryCd;

model_id[6] = "OZ";
model_pages[6] = "/GBPServiceMgr2.dyn?CntryCd=ME&LangCd=en&WebSiteID=GBPME&ReqsType=Pull&ServiceName=RequestBrochure&NampltCd=019^pageredirect&SellingSrc=72&cnInput=019/OZ/OZ_home.html^"+ctryCd;

model_id[7] = "6C";
//model_pages[7] ="/GBPServiceMgr2.dyn?CntryCd=ME&LangCd=ar&WebSiteID=GBPME&ReqsType=Pull&ServiceName=RequestBrochure&NampltCd=006^pageredirect&SellingSrc=72&cnInput=006/6C/cts_pho_exteriorphotos.html^"+ctryCd
model_pages[7] ="http://www.cadillacarabia.com/content_data/LAAM/ME/ar/GBPME/cadillac/CTS/gallery_exterior.html";


///GBPServiceMgr2.dyn?CntryCd="+ctryCd+"&LangCd=ar&WebSiteID=GBP"+ctryCd+"&ReqsType=Pull&ServiceName=RequestBrochure&NampltCd=006&SellingSrc=72&cnInput=006/6C/cts_pho_exteriorphotos.html^"+ctryCd;


model_id[8] = "6D";
//model_pages[8] = "/GBPServiceMgr2.dyn?CntryCd=ME&LangCd=ar&WebSiteID=GBPME&ReqsType=Pull&ServiceName=RequestBrochure&NampltCd=006^pageredirect&SellingSrc=72&cnInput=006/6D/dts_pho_exteriorphotos.html^"+ctryCd;
//GBPServiceMgr2.dyn?CntryCd="+ctryCd+"&LangCd=ar&WebSiteID=GBP"+ctryCd+"&ReqsType=Pull&ServiceName=RequestBrochure&NampltCd=999&SellingSrc=72&cnInput=006/6D/deville_pho_exteriorphotos.html";
model_pages[8] = "http://www.cadillacarabia.com/content_data/LAAM/ME/ar/GBPME/cadillac/DTS/gallery_exterior.html";

model_id[9] = "6E";
//model_pages[9] = "/GBPServiceMgr2.dyn?CntryCd=ME&LangCd=ar&WebSiteID=GBPME&ReqsType=Pull&ServiceName=RequestBrochure&NampltCd=006^pageredirect&SellingSrc=72&cnInput=006/6E/escalade_pho_exteriorphotos.html^"+ctryCd;
//model_pages[9] = "/GBPServiceMgr2.dyn?CntryCd=ME&LangCd=ar&WebSiteID=GBPME&ReqsType=Pull&ServiceName=RequestBrochure&NampltCd=006^pageredirect&SellingSrc=72&cnInput=006/G1/escalage_ar.html^"+ctryCd;
model_pages[9] = "http://www.cadillacarabia.com/content_data/LAAM/ME/ar/GBPME/cadillac/Escalade/gallery_exterior.html";

model_id[10] = "6S";
//model_pages[10] = "/GBPServiceMgr2.dyn?CntryCd=ME&LangCd=ar&WebSiteID=GBPME&ReqsType=Pull&ServiceName=RequestBrochure&NampltCd=006^pageredirect&SellingSrc=72&cnInput=006/6S/sts_pho_exteriorphotos.html^"+ctryCd;
model_pages[10] = "http://www.cadillacarabia.com/content_data/LAAM/ME/ar/GBPME/cadillac/STS/gallery_exterior.html";

model_id[11] = "4E";
model_pages[11] = "/GBPServiceMgr2.dyn?CntryCd=ME&LangCd=ar&WebSiteID=GBPME&ReqsType=Pull&ServiceName=RequestBrochure&NampltCd=012^pageredirect&SellingSrc=72&cnInput=012/4E/4E_home.html^"+ctryCd;

model_id[12] = "4S";
model_pages[12] = "/GBPServiceMgr2.dyn?CntryCd=ME&LangCd=ar&WebSiteID=GBPME&ReqsType=Pull&ServiceName=RequestBrochure&NampltCd=012^pageredirect&SellingSrc=72&cnInput=012/4S/4S_home.html^"+ctryCd;

model_id[13] = "4U";
model_pages[13] = "/GBPServiceMgr2.dyn?CntryCd=ME&LangCd=ar&WebSiteID=GBPME&ReqsType=Pull&ServiceName=RequestBrochure&NampltCd=012^pageredirect&SellingSrc=72&cnInput=012/4U/4U_home.html^"+ctryCd;

model_id[14] = "4Y";
model_pages[14] = "/GBPServiceMgr2.dyn?CntryCd=ME&LangCd=ar&WebSiteID=GBPME&ReqsType=Pull&ServiceName=RequestBrochure&NampltCd=012^pageredirect&SellingSrc=72&cnInput=012/4Y/4Y_home.html^"+ctryCd;

model_id[15] = "SC";
model_pages[15] = "93_CONV/index.html";

model_id[16] = "SS";
model_pages[16] = "93_S/index.html";

model_id[17] = "SE";
model_pages[17] = "95/index.html";

model_id[18] = "SG";
model_pages[18] = "93_WAGON/index.html";

model_id[19] = "1Z";
model_pages[19] = "/GBPServiceMgr2.dyn?CntryCd=ME&LangCd=ar&WebSiteID=GBPME&ReqsType=Pull&ServiceName=RequestBrochure&NampltCd=001^pageredirect&SellingSrc=72&cnInput=001/1Z/1ZL4D_overview.html^"+ctryCd

//Spark
model_id[20] = "1K";
//model_pages[20] = "/GBPServiceMgr2.dyn?CntryCd=ME&LangCd=ar&WebSiteID=GBPME&ReqsType=Pull&ServiceName=RequestBrochure&NampltCd=001^pageredirect&SellingSrc=72&cnInput=001/1K/1K_home.html^"+ctryCd
model_pages[20] = "http://" + ctryCd + "-ar.chevroletarabia.com/vehicles/view_all_vehicles/cars/spark/index.html";

//Caprice
model_id[21] = "1C";
//model_pages[21] = "/GBPServiceMgr2.dyn?CntryCd=ME&LangCd=ar&WebSiteID=GBPME&ReqsType=Pull&ServiceName=RequestBrochure&NampltCd=001^pageredirect&SellingSrc=72&cnInput=001/1C/1C_home.html^"+ctryCd
model_pages[21] = "http://" + ctryCd + "-ar.chevroletarabia.com/vehicles/view_all_vehicles/cars/caprice/index.html";

//Lumina
model_id[22] = "1L";
//model_pages[22] = "/GBPServiceMgr2.dyn?CntryCd=ME&LangCd=ar&WebSiteID=GBPME&ReqsType=Pull&ServiceName=RequestBrochure&NampltCd=001^pageredirect&SellingSrc=72&cnInput=001/1L/1L_home.html^"+ctryCd
model_pages[22] = "http://" + ctryCd + "-ar.chevroletarabia.com/vehicles/view_all_vehicles/cars/lumina/index.html";

//Optra
model_id[23] = "1P";
//model_pages[23] = "/GBPServiceMgr2.dyn?CntryCd=ME&LangCd=ar&WebSiteID=GBPME&ReqsType=Pull&ServiceName=RequestBrochure&NampltCd=001^pageredirect&SellingSrc=72&cnInput=001/1P/1PT5D_overview.html^"+ctryCd
model_pages[23] = "http://" + ctryCd + "-ar.chevroletarabia.com/vehicles/view_all_vehicles/cars/optra/index.html";

//Colorado
model_id[24] = "2R";
//model_pages[24] = "/GBPServiceMgr2.dyn?CntryCd=ME&LangCd=ar&WebSiteID=GBPME&ReqsType=Pull&ServiceName=RequestBrochure&NampltCd=001^pageredirect&SellingSrc=72&cnInput=001/1R/1R_home.html^"+ctryCd
model_pages[24] = "http://" + ctryCd + "-ar.chevroletarabia.com/vehicles/view_all_vehicles/trucks_vans/colorado/index.html";

//Tahoe
model_id[25] = "1T";
//model_pages[25] = "/GBPServiceMgr2.dyn?CntryCd=ME&LangCd=ar&WebSiteID=GBPME&ReqsType=Pull&ServiceName=RequestBrochure&NampltCd=001^pageredirect&SellingSrc=72&cnInput=001/1T/1T_home.html^"+ctryCd
model_pages[25] = "http://" + ctryCd + "-ar.chevroletarabia.com/vehicles/view_all_vehicles/crossovers_suvs/tahoe/index.html";

model_id[26] = "1U";
//model_pages[26] = "/GBPServiceMgr2.dyn?CntryCd=ME&LangCd=ar&WebSiteID=GBPME&ReqsType=Pull&ServiceName=RequestBrochure&NampltCd=001^pageredirect&SellingSrc=72&cnInput=001/1U/1U_home.html^"+ctryCd
model_pages[26] = "http://" + ctryCd + "-ar.chevroletarabia.com/vehicles/view_all_vehicles/crossovers_suvs/suburban/index.html";

model_id[27] = "1W";
model_pages[27] = "/GBPServiceMgr2.dyn?CntryCd=ME&LangCd=ar&WebSiteID=GBPME&ReqsType=Pull&ServiceName=RequestBrochure&NampltCd=001^pageredirect&SellingSrc=72&cnInput=001/1W/1W_home.html^"+ctryCd

//Corvette
model_id[28] = "1Y";
//model_pages[28] = "/GBPServiceMgr2.dyn?CntryCd=ME&LangCd=ar&WebSiteID=GBPME&ReqsType=Pull&ServiceName=RequestBrochure&NampltCd=001^pageredirect&SellingSrc=72&cnInput=001/1Y/1Y_home.html^"+ctryCd
model_pages[28] = "http://" + ctryCd + "-ar.chevroletarabia.com/vehicles/view_all_vehicles/cars/corvette_family/index.html";

//Express
model_id[29] = "1X";
//model_pages[29] = "/GBPServiceMgr2.dyn?CntryCd=ME&LangCd=ar&WebSiteID=GBPME&ReqsType=Pull&ServiceName=RequestBrochure&NampltCd=001^pageredirect&SellingSrc=72&cnInput=001/1X/1X_home.html^"+ctryCd
model_pages[29] = "http://" + ctryCd + "-ar.chevroletarabia.com/vehicles/view_all_vehicles/trucks_vans/express/index.html";

model_id[30] = "1O";
//model_pages[30] = "/GBPServiceMgr2.dyn?CntryCd=ME&LangCd=ar&WebSiteID=GBPME&ReqsType=Pull&ServiceName=RequestBrochure&NampltCd=001^pageredirect&SellingSrc=72&cnInput=001/1O/1OL4D_overview.html^"+ctryCd
model_pages[30] = "http://" + ctryCd + "-ar.chevroletarabia.com/vehicles/view_all_vehicles/cars/aveo/index.html";

//Epica
model_id[31] = "1E";
//model_pages[31] = "/GBPServiceMgr2.dyn?CntryCd=ME&LangCd=ar&WebSiteID=GBPME&ReqsType=Pull&ServiceName=RequestBrochure&NampltCd=001^pageredirect&SellingSrc=72&cnInput=001/1E/1E_home.html^"+ctryCd
model_pages[31] = "http://" + ctryCd + "-ar.chevroletarabia.com/vehicles/view_all_vehicles/cars/epica/index.html";

model_id[32] = "6X";
//model_pages[32] = "/GBPServiceMgr2.dyn?CntryCd=ME&LangCd=ar&WebSiteID=GBPME&ReqsType=Pull&ServiceName=RequestBrochure&NampltCd=006^pageredirect&SellingSrc=72&cnInput=006/6X/ext_pho_exteriorphotos.html^"+ctryCd;
model_pages[32] = "http://www.cadillacarabia.com/content_data/LAAM/ME/ar/GBPME/cadillac/EXT/gallery_exterior.html";

model_id[33] = "6V";
//model_pages[33] = "/GBPServiceMgr2.dyn?CntryCd=ME&LangCd=ar&WebSiteID=GBPME&ReqsType=Pull&ServiceName=RequestBrochure&NampltCd=006^pageredirect&SellingSrc=72&cnInput=006/6V/esv_pho_exteriorphotos.html^"+ctryCd;
model_pages[33] = "http://www.cadillacarabia.com/content_data/LAAM/ME/ar/GBPME/cadillac/ESV/gallery_exterior.html";

model_id[34] = "OS";
model_pages[34] = "/GBPServiceMgr2.dyn?CntryCd=ME&LangCd=en&WebSiteID=GBPME&ReqsType=Pull&ServiceName=RequestBrochure&NampltCd=019^pageredirect&SellingSrc=72&cnInput=019/OS/OS_home.html^"+ctryCd;

//Avalance
model_id[35] = "1A";
//model_pages[35] = "/GBPServiceMgr2.dyn?CntryCd=ME&LangCd=ar&WebSiteID=GBPME&ReqsType=Pull&ServiceName=RequestBrochure&NampltCd=001^pageredirect&SellingSrc=72&cnInput=001/1A/1A_home.html^"+ctryCd
model_pages[35] = "http://" + ctryCd + "-ar.chevroletarabia.com/vehicles/view_all_vehicles/trucks_vans/avalanche/index.html";

model_id[36] = "4X";
model_pages[36] = "/GBPServiceMgr2.dyn?CntryCd=ME&LangCd=ar&WebSiteID=GBPME&ReqsType=Pull&ServiceName=RequestBrochure&NampltCd=012^pageredirect&SellingSrc=72&cnInput=012/4X/4X_home.html^"+ctryCd;

model_id[37] = "1G";
model_pages[37] = "/GBPServiceMgr2.dyn?CntryCd=ME&LangCd=ar&WebSiteID=GBPME&ReqsType=Pull&ServiceName=RequestBrochure&NampltCd=001^pageredirect&SellingSrc=72&cnInput=001/1G/1G_home.html^"+ctryCd

model_id[38] = "6L";
//model_pages[38] = "/GBPServiceMgr2.dyn?CntryCd=ME&LangCd=ar&WebSiteID=GBPME&ReqsType=Pull&ServiceName=RequestBrochure&NampltCd=006^pageredirect&SellingSrc=72&cnInput=006/6L/xlr_pho_exteriorphotos.html^"+ctryCd;
model_pages[38] = "http://www.cadillacarabia.com/content_data/LAAM/ME/ar/GBPME/cadillac/XLR/gallery_exterior.html"

model_id[39] = "6R";
//model_pages[39] = "/GBPServiceMgr2.dyn?CntryCd=ME&LangCd=ar&WebSiteID=GBPME&ReqsType=Pull&ServiceName=RequestBrochure&NampltCd=006^pageredirect&SellingSrc=72&cnInput=006/6R/srx_pho_exteriorphotos.html^"+ctryCd;
model_pages[39] = "http://www.cadillacarabia.com/content_data/LAAM/ME/ar/GBPME/cadillac/SRX/gallery_exterior.html";

model_id[40] = "8S";
model_pages[40] = "/content_data/LAAM/ME/ar/GBPME/018/flash/home.html";

model_id[41] = "8H";
model_pages[41] = "/content_data/LAAM/ME/ar/GBPME/018/flash/home.html";

model_id[42] = "8J";
model_pages[42] = "/content_data/LAAM/ME/ar/GBPME/018/flash/home.html";

//Optra
model_id[43] = "1R";
//model_pages[43] = "/GBPServiceMgr2.dyn?CntryCd=ME&LangCd=ar&WebSiteID=GBPME&ReqsType=Pull&ServiceName=RequestBrochure&NampltCd=001^pageredirect&SellingSrc=72&cnInput=001/1P/1PLSE_overview.html^"+ctryCd
model_pages[43] = "http://" + ctryCd + "-ar.chevroletarabia.com/vehicles/view_all_vehicles/cars/optra/index.html";

model_id[44] = "1N";
model_pages[44] = "/GBPServiceMgr2.dyn?CntryCd=ME&LangCd=ar&WebSiteID=GBPME&ReqsType=Pull&ServiceName=RequestBrochure&NampltCd=001^pageredirect&SellingSrc=72&cnInput=001/1N/1N_home.html^"+ctryCd

model_id[45] = "1B";
model_pages[45] = "/GBPServiceMgr2.dyn?CntryCd=ME&LangCd=ar&WebSiteID=GBPME&ReqsType=Pull&ServiceName=RequestBrochure&NampltCd=001^pageredirect&SellingSrc=72&cnInput=001/1B/1B_home.html^"+ctryCd

model_id[46] = "OR";
model_pages[46] = "/GBPServiceMgr2.dyn?CntryCd=ME&LangCd=ar&WebSiteID=GBPME&ReqsType=Pull&ServiceName=RequestBrochure&NampltCd=019^pageredirect&SellingSrc=72&cnInput=019/OR/OR_home.html^"+ctryCd

model_id[47] = "4A";
model_pages[47] = "/GBPServiceMgr2.dyn?CntryCd=ME&LangCd=ar&WebSiteID=GBPME&ReqsType=Pull&ServiceName=RequestBrochure&NampltCd=012^pageredirect&SellingSrc=72&cnInput=012/4A/4A_dimensions.html^"+ctryCd;

model_id[48] = "4B";
model_pages[48] = "/GBPServiceMgr2.dyn?CntryCd=ME&LangCd=ar&WebSiteID=GBPME&ReqsType=Pull&ServiceName=RequestBrochure&NampltCd=012^pageredirect&SellingSrc=72&cnInput=012/4B/4B_dimensions.html^"+ctryCd;

//Silverado
model_id[49] = "1D";
//model_pages[49] = "/GBPServiceMgr2.dyn?CntryCd=ME&LangCd=ar&WebSiteID=GBPME&ReqsType=Pull&ServiceName=RequestBrochure&NampltCd=001^pageredirect&SellingSrc=72&cnInput=001/1D/1D_home.html^"+ctryCd
model_pages[49] = "http://" + ctryCd + "-ar.chevroletarabia.com/vehicles/view_all_vehicles/trucks_vans/silverado/index.html";

model_id[50] = "4L";
model_pages[50] = "/GBPServiceMgr2.dyn?CntryCd=ME&LangCd=ar&WebSiteID=GBPME&ReqsType=Pull&ServiceName=RequestBrochure&NampltCd=012^pageredirect&SellingSrc=72&cnInput=012/4D/4D_home.html^"+ctryCd;

model_id[51] = "4D";
model_pages[51] = "/GBPServiceMgr2.dyn?CntryCd=ME&LangCd=ar&WebSiteID=GBPME&ReqsType=Pull&ServiceName=RequestBrochure&NampltCd=012^pageredirect&SellingSrc=72&cnInput=012/4D/4D_home.html^"+ctryCd;

model_id[52] = "6B";
//model_pages[52] = "/GBPServiceMgr2.dyn?CntryCd=ME&LangCd=ar&WebSiteID=GBPME&ReqsType=Pull&ServiceName=RequestBrochure&NampltCd=006^pageredirect&SellingSrc=72&cnInput=006/G1/sedan_ar.html^"+ctryCd;
model_pages[52] = "http://www.cadillacarabia.com/content_data/LAAM/ME/ar/GBPME/cadillac/BLS/gallery_exterior.html";

//Captiva
model_id[53] = "1H";
//model_pages[53] = "/GBPServiceMgr2.dyn?CntryCd=ME&LangCd=ar&WebSiteID=GBPME&ReqsType=Pull&ServiceName=RequestBrochure&NampltCd=001^pageredirect&SellingSrc=72&cnInput=001/1H/1H_home.html^"+ctryCd;
model_pages[53] = "http://" + ctryCd + "-ar.chevroletarabia.com/vehicles/view_all_vehicles/crossovers_suvs/captiva/index.html";

model_id[54] = "SX";
model_pages[54] = "97_X/index.html";

model_id[55] = "4C";
model_pages[55] = "/GBPServiceMgr2.dyn?CntryCd=ME&LangCd=ar&WebSiteID=GBPME&ReqsType=Pull&ServiceName=RequestBrochure&NampltCd=012^pageredirect&SellingSrc=72&cnInput=012/4C/4C_home.html^"+ctryCd;

model_id[56] = "1I";
//model_pages[56] = "/GBPServiceMgr2.dyn?CntryCd=ME&LangCd=ar&WebSiteID=GBPME&ReqsType=Pull&ServiceName=RequestBrochure&NampltCd=001^pageredirect&SellingSrc=72&cnInput=001/1I/1I_home.html^"+ctryCd
model_pages[56] = "http://" + ctryCd + "-ar.chevroletarabia.com/vehicles/view_all_vehicles/cars/camaro/index.html";

model_id[57] = "1J";
model_pages[57] = "/GBPServiceMgr2.dyn?CntryCd=ME&LangCd=ar&WebSiteID=GBPME&ReqsType=Pull&ServiceName=RequestBrochure&NampltCd=001^pageredirect&SellingSrc=72&cnInput=001/1J/1J_home.html^"+ctryCd

//Cruze
model_id[58] = "1F";
//model_pages[58] = "/GBPServiceMgr2.dyn?CntryCd=ME&LangCd=ar&WebSiteID=GBPME&ReqsType=Pull&ServiceName=RequestBrochure&NampltCd=001^pageredirect&SellingSrc=72&cnInput=001/1F/1F_home.html^"+ctryCd
model_pages[58] = "http://" + ctryCd + "-ar.chevroletarabia.com/vehicles/view_all_vehicles/cars/cruze/index.html";

model_id[59] = "4T";
model_pages[59] ="/GBPServiceMgr2.dyn?CntryCd=ME&LangCd=en&WebSiteID=GBPME&ReqsType=Pull&ServiceName=RequestBrochure&NampltCd=012^pageredirect&SellingSrc=72&cnInput=012/4T/4T_home.html^"+ctryCd;

model_id[60] = "6CV";
model_pages[60] = "http://www.cadillacarabia.com/content_data/LAAM/ME/ar/GBPME/cadillac/CTS/gallery_exterior.html";

model_id[61] = "8T";
model_pages[61] = "http://www.hummer.com/hummerjsp/home.jsp";

model_id[62] = "1V";
//model_pages[62] = "/GBPServiceMgr2.dyn?CntryCd=ME&LangCd=ar&WebSiteID=GBPME&ReqsType=Pull&ServiceName=RequestBrochure&NampltCd=001^pageredirect&SellingSrc=72&cnInput=001/1O/1O_home.html^"+ctryCd
model_pages[62] = "http://" + ctryCd + "-ar.chevroletarabia.com/vehicles/view_all_vehicles/cars/aveo5/index.html";

model_id[63] = "6P";
model_pages[63] = "http://www.cadillacarabia.com/content_data/LAAM/ME/ar/GBPME/cadillac/Escalade/platinum.html";

//Traverse
model_id[64] = "1S";
//model_pages[64] = "/GBPServiceMgr2.dyn?CntryCd=ME&LangCd=ar&WebSiteID=GBPME&ReqsType=Pull&ServiceName=RequestBrochure&NampltCd=001^pageredirect&SellingSrc=72&cnInput=001/1S/1S_home.html^"+ctryCd
model_pages[64] = "http://" + ctryCd + "-ar.chevroletarabia.com/vehicles/view_all_vehicles/crossovers_suvs/traverse/index.html";

//Malibu
model_id[65] = "1M";
//model_pages[65] ="/GBPServiceMgr2.dyn?CntryCd=ME&LangCd=ar&WebSiteID=GBPME&ReqsType=Pull&ServiceName=RequestBrochure&NampltCd=001^pageredirect&SellingSrc=72&cnInput=001/1M/1M_home.html^"+ctryCd;
model_pages[65] = "http://" + ctryCd + "-ar.chevroletarabia.com/vehicles/view_all_vehicles/cars/malibu/index.html";

function call_model(modelCode)
{

var gccURLpage="/content_data/LAAM/ME/en/GBPME/015/G2/main/GLOBAL/en/model/";
var levURLpage="/content_data/LAAM/ME/en/GBPME/015/main/GLOBAL/en/model/";

for (i=0;i<model_id.length ;i++ )
{
	if (modelCode==model_id[i])
	{
		if(modelCode=="OA" || modelCode=="OB" || modelCode=="OC" || modelCode=="OM" || modelCode=="OS" || modelCode=="OV" || modelCode=="OZ")
		{
			var isSelected=window.confirm("موقع أوبل متوفر باللغة الإنجليزية فقط. يرجى الضغط على الزر OK للمتابعة باللغة الإنجليزية أو الزر Cancel للبقاء هنا.");
			if(isSelected)
			{
				window.open(model_pages[i],'targetwindow','toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,left=0,top=0');
				break;
			}
		}
		else if(modelCode=="SG" || modelCode=="SE" || modelCode=="SS" || modelCode=="SC" || modelCode=="SX")
		{
			var isSelected=window.confirm("موقع ساب متوفر باللغة الإنجليزية فقط. يرجى الضغط على الزر OK للمتابعة باللغة الإنجليزية أو الزر Cancel للبقاء هنا.");
			if(isSelected)
			{
				if(ctryCd=='JO' || ctryCd=='LB' || ctryCd=='SY')
				{
					
					var targetL=gccURLpage+model_pages[i];
					window.open(targetL,'targetwindow','toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,left=0,top=0')
		//width='+screen.width+',height='+(screen.height-200)
		break;
				}
			else if(ctryCd=='AE' || ctryCd=='BH' || ctryCd=='OM' || ctryCd=='QA' || ctryCd=='KW' || ctryCd=='SA' || ctryCd=='IQ')
				{
					
					var targetG=levURLpage+model_pages[i];
					window.open(targetG,'targetwindow','toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,left=0,top=0')
		//width='+screen.width+',height='+(screen.height-200)
		break;
				}
			else{ }
			}
		}

		//added for bls n escalade
		/*else if (modelCode=="6B" || modelCode=="6E")
		{
			//location.href=model_pages[i];
			window.open(model_pages[i],'targetwindow','height=575,width=620,left=150,top=120,status=yes,toolbar=no,menubar=no,scrollbars=yes,resizable=no')
			//width='+screen.width+',height='+(screen.height-200)
			break;
		}
		*/
		//
		
		else 
		{
			//location.href=model_pages[i];
			window.open(model_pages[i],'targetwindow','toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,left=0,top=0')
			//width='+screen.width+',height='+(screen.height-200)
			break;
		}
	}

}

//alert("Model Code:"+modelCode)
}

function fleet_contact()
{
alert('Add your code  here')
}

function callSaab()
{
	x=window.confirm("Saab is not available in Syria. \n Press OK to go to the Country Selector page for SaabArabia.com. \n Press Cancel to stay on this page.");
	if (x)
	{
		location.href = "/content_data/LAAM/ME/en/GBPME/cs/saab/index.html";
	}
}

function callGMC()
{
	x=window.confirm("GMC is not available in Syria. \n Press OK to go to the Country Selector page for GMCArabia.com. \n Press Cancel to stay on this page.");
	if (x)
	{
		location.href = "/content_data/LAAM/ME/en/GBPME/cs/012/index.html";
	}
}


//All Pop-up is closed by Mathan by 30th July 2004 7.35PM
// Cookie Section Starts here...  //
/*
var expDays = 1; // number of days the cookie should last


function GetCookie (name) 
{  
	var arg = name + "=";  
	var alen = arg.length;
	var clen = document.cookie.length;

	var i = 0;  
	while (i < clen) 
	{    
		var j = i + alen; 

		if (document.cookie.substring(i, j) == arg)
			return getCookieVal (j);    
		i = document.cookie.indexOf(" ", i) + 1;  
		//alert(i);
		if (i == 0) break;   
	}  
	return null;
}


function SetCookie (name, value) 
{  
	//alert("Name :" +name +  "   Value:"+value);
	var argv = SetCookie.arguments;  
	var argc = SetCookie.arguments.length;  
//	var expires = (argc > 2) ? argv[2] : null;  
	var path = (argc > 3) ? argv[3] : null;  
	var domain = (argc > 4) ? argv[4] : null;  
	var secure = (argc > 5) ? argv[5] : false;  
	document.cookie = name + "=" + escape (value) + 
	((path == null) ? "" : ("; path=" + path)) +  
	((domain == null) ? "" : ("; domain=" + domain)) +    
	((secure == true) ? "; secure" : "");
//	((expires == null) ? "" : ("; expires=" + expires.toGMTString())) + 
}


function DeleteCookie (name) 
{  
	var exp = new Date("January 1, 1970");
	var cval = GetCookie (name);
	document.cookie = name + "=" + cval + "; expires=" + exp.toGMTString();
}

var exp = new Date(); 
exp.setTime(exp.getTime() + (expDays*1*1*60*1000));

function amt()
{
	var count = GetCookie('count')
	if(count == null) 
	{
	SetCookie('count','1')
	return 1
	}
	else 
	{
		var newcount = parseInt(count) + 1;
		DeleteCookie('count')
		SetCookie('count',newcount,exp)
		return count
   }
}

function getCookieVal(offset) 
{
		var endstr = document.cookie.indexOf (";", offset);
		if (endstr == -1)
		endstr = document.cookie.length;
		return unescape(document.cookie.substring(offset, endstr));
}


function checkCount(popCookie,win_name,winoption,loadevent)
{
		
			var count = GetCookie(popCookie);
			//alert("Count:"+count+ "  name:" + popCookie);
			if (count == null) 
			{
				count=1;
				SetCookie(popCookie, count, exp);
				
				OpenWindow(win_name,winoption);
				//win=window.open(page, "", windowprops);
				//win.blur();
			}
			else 
			{
				count++;
				//SetCookie('count', count, exp);
			}
}

var kill_date = new Date();
// Cookie Section ends here...  //


//Class Function 
function page_Class(pageURL,SurveyName,winOptions,Loadevent,targetCountry)
{
  this.pageURL = pageURL;
  this.SurveyName = SurveyName;
  this.WinOptions = winOptions;
  this.Loadevent = Loadevent;
  this.targetCountry=targetCountry
 }


//Array list contains the URL , Survey / Form , Form opening options , Load Event
var page_List=new Array();
page_List[0]=new page_Class("corp","Survey2","popback","page_enter","AE^BH^JO^KW^LB^OM^QA^SA^SY"); 
//page_List[1]=new page_Class("advantage","Survey1","popup","page_enter","SA");

var win_name;
var Survey_flag=false;
for(i=0;i<page_List.length;i++)
{
	var temp_Ctry_List=new Array();
	temp_Ctry_List=page_List[i].targetCountry.split("^");
	for(j=0;j<temp_Ctry_List.length;j++)
	{
		if(temp_Ctry_List[j]==ctryCd)
		{
			//alert(temp_Ctry_List[j] + "Countrycode:"+ctryCd)
			if(location.href.indexOf(page_List[i].pageURL)>0)
				{
						
						
						if(page_List[i].SurveyName=="Survey1")
							{
								Survey_flag=true;	
								//alert(page_List[i].SurveyName);
							}
							else if(page_List[i].SurveyName=="Survey2")
							{	
								Survey_flag=true;
								//alert(page_List[i].SurveyName);
							}
							
							//Cookie Start
							if(Survey_flag) //If Survey ==true
							{
									var setcookiename=page_List[i].SurveyName;
									//var setcookiename= page_List[i].WinOptions+"_"+page_List[i].SurveyName+"_"+ctryCd+"_ar"+"_"+"Corp";
									win_name=page_List[i].SurveyName;
									var win_option1=page_List[i].WinOptions;
									var load_event=page_List[i].Loadevent;
									
									//alert("Page :"+page_List[i].Loadevent);
								if (page_List[i].Loadevent=="page_exit")
									{
										document.write("<body onunload='javascript:onExit(setcookiename,win_name,win_option1,load_event);'>");
										//alert("Page Inside :"+page_List[i].Loadevent);
									}
								else
									{
										var param = self.location.search;
										if(param!="")
										{
											SetCookie("Survey2", 1, exp);
										}
										else
										{
											checkCount(setcookiename,win_name,page_List[i].WinOptions,page_List[i].Loadevent);
										}
									}
							}
							//Cookie End
				}
		}
	}

	
}


function OpenWindow(WinName,winoption)
{	
	if(WinName=="Survey1")
	{
	var windowprops = "width=290,height=350,location=no,toolbar=no,menubar=no,scrollbars=no,resizable=yes";
	var win=window.open("/content_data/LAAM/ME/en/GBPME/"+WinName+"_ar.html",WinName,windowprops);
	if (winoption=="popback")
	{
		win.blur()
	}
	}

	if(WinName=="Survey2")
	{

	var x=screen.width;
	var y=screen.height;
	positn="left="+Math.floor((x-641)/2)+",top="+Math.floor((y-583)/2);
	var windowprops="resizable=yes,width=641,height=583,"+positn+",scrollbars=yes";
	var win=window.open("http://web.refleks.com/index.php?surveyid=11667&newlang=ar&refc=Corporate",WinName,windowprops);
	if (winoption=="popback")
	{
		win.blur()
	}

	}


}

function onExit(popCookie,win_name,winoption,loadevent)
{
	//alert("OnExit fuct :"+popCookie+ "  Name:" + win_name+ "  Option:" + winoption+ "  Event:" + loadevent);
	checkCount(popCookie,win_name,winoption,loadevent)
}

function checkClosed()
{
	if(window.screenTop>10000)
	{
		DeleteCookie("corpbnr");
		var x=screen.width;
		var y=screen.height; positn="left="+Math.floor((x-641)/2)+",top="+Math.floor((y-583)/2);
		var windowprops="resizable=yes,width=641,height=583,"+positn+",scrollbars=yes";
		var win=window.open("http://web.refleks.com/index.php?surveyid=11667&newlang=ar&refc=Corporate","Survey1",windowprops);
	}		
}

window.onunload=checkClosed;
*/

function popUp(mb,movie){
var mb=mb;
var movie=movie;

var popup = window.open("","Lumina","width=505,height=400left=150,top=120")

var html="<html dir='rtl'><link rel='stylesheet' href='/content_data/LAAM/ME/ar/GBPME/999/includes/fonts.css' type='text/css'><title>Welcome to GMArabia.com - Chevrolet Lumina<"+"/title><meta http-equiv='Content-Type' content='text/html; charset=UTF-8'>"+
"<body leftmargin='0' topmargin='0' marginwidth='0' marginheight='0'>"+
"<table width='100%' border='0' cellpadding='0' cellspacing='0'>"+
  "<tr>"+ 
    "<td width='5%' valign='top'><img src='/content_data/LAAM/ME/en/GBPME/999/images/gmlogo.gif' width='44' height='43' border='0'><"+"/td>"+
    "<td valign='top'><img src='images/spacer.gif' width='2' height='1'><"+"/td>"+
    "<td width='94%' valign='top'><table width='100%' border='0' cellspacing='0' cellpadding='0'>"+
        "<tr>"+ 
          "<td width='80' height='20' align='Left' bgcolor='#003063'> <img "+ "src='/content_data/LAAM/ME/en/GBPME/999/images/gcc_corp_site.gif' width='75' height='13' border='0'>&nbsp; "+
          "<"+"/td>"+
          "<td width='645' align='right' bgcolor='#003063'>&nbsp;<"+"/td>"+
        "<"+"/tr>"+
        "<tr>"+ 
          "<td height='23' align='left' bgcolor='#9CCFFF'>&nbsp; <img src='/content_data/LAAM/ME/en/GBPME/999/images/spacer.gif' height='6' width='1'>"+ 
          "<"+"/td>"+
          "<td align='right' bgcolor='#9CCFFF'>&nbsp;<"+"/td>"+
        "<"+"/tr>"+
      "<"+"/table><"+"/td>"+
  "<"+"/tr>"+
"<"+"/table>"+
"<TABLE WIDTH='100%' BORDER='0' CELLSPACING='1' CELLPADDING='1'>"+
  "<TR bgcolor='#FF9A00'>"+ 
    "<TD height='25' colspan='2' align='center' class='black12b'><font color='#FFFFFF' size='3' face='tahoma'>"+
	"ركن الأفلام - شـفـروليه لومينا</font></font></TD>"+
  "</TR>"+
  "<TR>"+ 
    "<TD height='280' colspan='2' align='center'><br>"+
	"<embed src='/content_data/LAAM/ME/ar/GBPME/tvcommercials/chevrolet/"+mb+"mb/"+movie+".mpg' width='347' height='262'><"+"/embed>"+
      "<BR>"+ 
    "</TD>"+
  "</TR>"+
  "<TR>"+ 
    "<TD width='93%' align='center'>&nbsp;</TD>"+
    "<TD width='7%' align='center'>&nbsp;</TD>"+
  "</TR>"+
"</TABLE>"+
"<table width='100%' cellpading='0', cellspacing='0' border='0' cellpadding='0'>"+
  "<tr>"+ 
    "<td height='17' align='center' class='grey10'><a href='javascript:window.close();' class='black11b'>[إغلاق]</a></td>"+
  "</tr>"+
"</table>"+
"<"+"/body>"+
"<"+"/body>"
popup.document.open();
popup.document.write(html);
}

function sts_content()
{
	document.write("<span class='arsh0'><br>"+
"الذكاء في الأداء، رشاقة عند التسارع، مرونة عند الإنعطاف، وثقة عند التوقّف... هذا بعض من قوّة الأداء التي تُميّز كاديلاك STS، والتي اكتملت بصقلٍ على حلبة السباق الألمانية الشهيرة نربرغرينغ. والنتيجة سيّارة سيدان رياضية لاتقبل أيّ تنازل أو مساومة. منك التعليمات ومنها الاستجابة لدرجة تبدو معها كأنّها تقرأ أفكارك. منك الرغبات ومنها التحقيق تحت عينيك، وأذنيك، وأصابعك، وخصوصاً تحت قدمك اليمنى. كاديلاك STS، سيّارة لا تجرؤ الطرقات على تحدّيها.</span>")
}

function showroom_advisor()
{
if(ctryCd=="EG")
{
document.write("<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000'"+
" codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0' width='617' height='430'>"+
"                <param name='movie' value='/content_data/LAAM/ME/ar/GBPME/999/flash/showroom_advisor_ar_eg.swf?cntryCD="+ctryCd+"&mode=local'>"+
"                <param name='quality' value='high'>"+
"                <embed src='/content_data/LAAM/ME/ar/GBPME/999/flash/showroom_advisor_ar_eg.swf?cntryCD="+ctryCd+"&mode=local' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='617' height='430'></embed></object>")
}
else
{
document.write("<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000'"+
" codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0' width='617' height='430'>"+
"                <param name='movie' value='/content_data/LAAM/ME/ar/GBPME/999/flash/showroom_advisor_ar.swf?cntryCD="+ctryCd+"&mode=local'>"+
"                <param name='quality' value='high'>"+
"                <embed src='/content_data/LAAM/ME/ar/GBPME/999/flash/showroom_advisor_ar.swf?cntryCD="+ctryCd+"&mode=local' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='617' height='430'></embed></object>")
}
}
function populateDealerLocator(){
	
document.write("<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0' width='630' height='420' id='GMME_DL_Prototype' align='middle'>"+
		"<param name='allowScriptAccess' value='sameDomain' />"+
		"<param name='movie' value='/content_data/LAAM/ME/ar/GBPME/999/flash/GMME_Dealerlocator.swf?model=local&namplt_cd=&cntry_cd="+ctryCd+"'/>"+
		"<param name='quality' value='high' />"+
		"<param name='bgcolor' value='#ffffff' />"+
		"<embed src='/content_data/LAAM/ME/ar/GBPME/999/flash/GMME_Dealerlocator.swf?model=local&namplt_cd=&cntry_cd="+ctryCd+"' quality='high' bgcolor='#ffffff' width='690' height='420' name='GMME_DL_Prototype' align='middle' allowScriptAccess='sameDomain' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />"+
		"</object>");
}

function call_lumina_coupe()
{
location.href='/content_data/LAAM/'+ctryCd+'/ar/GBP'+ctryCd+'/chevrolet/models/lumina/lumina_coupe.html';
}

function call_accessories()
{
	//alert("Accessories");
	var x=window.confirm("الأكسسوارات متوفرة باللغة الإنجليزية فقط. يرجى الضغط على الزر OK للمتابعة باللغة الإنجليزية أو الزر Cancel للبقاء هنا.");
			if (x)
			{
			//location.href = "/content_data/LAAM/ME/en/GBPME/cs/012/index.html";
				
				location.href = "/content_data/LAAM/ME/en/GBPME/999/G1/Brand.html?cntryCd="+ctryCd;
			}
		
}

function goChevyLumina()
{
	var BaseURL="http://www.chevroletarabia.com/GBPServiceMgr2.dyn?CntryCd=ME&LangCd=ar&WebSiteID=GBPME&ReqsType=Pull&ServiceName=RequestBrochure&NampltCd=001^pageredirect&SellingSrc=72&cnInput=001/1L/1L_home.html^"+ctryCd;
	window.open(BaseURL);
}

function download_eBrochure(){
	if(ctryCd!="EG")
	{
	var width = 609; //for arabic
	var height = 757;
	
	var left = (window.screen.width-width) / 2;
	var top = (window.screen.height-height) / 2;
	var features = "top="+top+",left="+left+",width="+width+",height="+height+",resizable=no,location=no,scrollbars=no,toolbar=no,menubar=no"
//	var address = "/content_data/LAAM/ME/ar/GBPME/999/G1/ebrochure.html?cntryCd="+ctryCd+"&brand=";
	var address = "http://www.globalbuypower.com/content_data/LAAM/ME/ar/GBPME/999/G1/ebrochure.html?cntryCd="+ctryCd;	
	disWindow = window.open(address, "disclaimer", features);
}
else{
var width = 609; //for arabic
	var height = 757;
	
	var left = (window.screen.width-width) / 2;
	var top = (window.screen.height-height) / 2;
	var features = "top="+top+",left="+left+",width="+width+",height="+height+",resizable=no,location=no,scrollbars=no,toolbar=no,menubar=no"
//	var address = "/content_data/LAAM/ME/ar/GBPME/999/G1/ebrochure.html?cntryCd="+ctryCd+"&brand=";
	var address = "/GBPServiceMgr2.dyn?CntryCd=ME&LangCd=ar&WebSiteID=GBPME&ReqsType=Pull&ServiceName=TestDrive&NampltCd=999^^DEB^N^EG^&SellingSrc=72&MerchModlDesgtr=BSE&ModelCode=1B";	
	disWindow = window.open(address, "disclaimer", features);
}
}