var omni_langCd="en";
var ctryCd="";
var lgCd="";
var dealerName_from_DL;
var loc = location.href;
if(loc.indexOf("cntryCd")==-1)
{
	location.href="/content_data/LAAM/ME/en/GBPME/cs/019/index.html";
}
else 
{
	ctryCd=loc.substr(loc.indexOf("cntryCd")+8,2);
	if(ctryCd!="AE" && ctryCd!="BH" && ctryCd!="JO" && ctryCd!="KW" && ctryCd!="LB" && ctryCd!="OM" && ctryCd!="QA" && ctryCd!="SA" && ctryCd!="SY" && ctryCd!="EG")
	{
		location.href="/content_data/LAAM/ME/en/GBPME/cs/019/index.html";
	}
}
		
lgCd="/en/";

//Changing the Flag Image Dynamically;
document.write("<div id='flagDiv' name='flagDiv' style='position:absolute;  left:703px; top:24px; width:46px; height:31px; z-index:101; visibility: visible'><img src='/content_data/LAAM/ME/en/GBPME/019/images/"+ctryCd+".gif'></div>");


function MM_findObj(n, d) { //v3.0
  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); return x;
}
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
function MM_showHideLayers() { //v3.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 callPage(targURL)
{
	var xloc=location.href;
	var cntryCode= xloc.substr(xloc.indexOf("cntryCd=")+8,2);
	var BaseURL="/GBPServiceMgr2.dyn?CntryCd=ME&LangCd=en&WebSiteID=GBPME&ReqsType=Pull&ServiceName=RequestBrochure&NampltCd=019^pageredirect&SellingSrc=72&cnInput=";
	newURLValue=targURL;
	var targetURL="";
	var windowName="";
	var windowParams="";
	switch(callPage.arguments.length)
	{
		case 0:
			alert("No Parameters found\n Improper Usage of Function\n\n Usage 1: callPage('019/<target HTML file>');\n Usage 2: callPage('019/<target HTML file>','Y');\n Usage 3: callPage('019/<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=callPage.arguments[0]; //Target URL
			windowParams=callPage.arguments[1]; //Target Window Parameters
			if(windowParams.toUpperCase()=="Y")
			{
				if(targetURL.indexOf("http://")==0)
				{
					window.open(targetURL); //Open in a blank window
				}
				else
				{
					window.open("http://"+self.location.host+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=callPage.arguments[0]; //Target URL
			windowName=callPage.arguments[1]; //Target Window Name
			windowParams=callPage.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
			{
				targetURL=callPage.arguments[0]; //Target URL
				windowName=callPage.arguments[1]; //Target Window Name
				windowParams=callPage.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.
				window.open(BaseURL+targetURL,windowName,windowParams); //Open in a new window (name mentioned in windowName).
				}
			}
			break;
	}
}


/*Global Variable*/
var bgImgPath="";
var bnrImgURL="";
var bnrALT="";

function image_Class(mdl,bgImg,homepgURL)
{
	this.mdl=mdl;
	this.bgImg=bgImg;
	this.homepgURL=homepgURL;
}

// Populates bottom Promotional Banners for All Opel Static Pages based on the model parameter value. 
//For Shop & Buy tools, the model parameter is not available and hence catch block executes the statements for populating the Promo Banners.

function populatePromoBanners()
{
	try
	{
		 //Banner for Model Pages
	if(ctryCd != "EG")
	{	 
		if(model=="astra" || model=="astracabrio" || model=="combo" || model=="corsa" || model=="vectra" || model=="zafira" || model=="signum")
		{
			document.write("<table width='780' height='75' border='0' cellpadding='0' cellspacing='0'>"+
			"  <tr> "+
			"    <td width='20'><img src='/content_data/LAAM/ME/en/GBPME/019/images/spacer.gif' width='20' height='8'></td>"+
			"    <td width='135'><a href='javascript:callDLocForThisVehicle();'><img src='/content_data/LAAM/ME/en/GBPME/019/images/toolLocateDealer_corsa.gif' width='134' height='50' border='0'></a></td>"+
			"    <td width='20'><img src='/content_data/LAAM/ME/en/GBPME/019/images/spacer.gif' width='20' height='8'></td>"+
			"    <td width='135'><a href='javascript:callBookTDriveForThisVehicle();'><img src='/content_data/LAAM/ME/en/GBPME/019/images/toolTestdrive_corsa.gif' width='134' height='50' border='0'></a></td>"+
			"    <td width='20'><img src='/content_data/LAAM/ME/en/GBPME/019/images/spacer.gif' width='20' height='8'></td>"+
			"    <td width='134'><a href='javascript:callReqBrochureForThisVehicle();'><img src='/content_data/LAAM/ME/en/GBPME/019/images/toolBrochure.gif' width='134' height='50' border='0'></a></td>"+
			"    <td width='20'><img src='/content_data/LAAM/ME/en/GBPME/019/images/spacer.gif' width='20' height='8'></td>"+
			"    <td width='140'><a href='javascript:callReqBrochureForThisVehicle();'><img src='/content_data/LAAM/ME/en/GBPME/019/images/spacer.gif' width='140' height='1' border='0'></a></td>"+
			"    <td width='20'><img src='/content_data/LAAM/ME/en/GBPME/019/images/spacer.gif' width='20' height='8'></td>"+
			"    <td width='136'><img src='/content_data/LAAM/ME/en/GBPME/019/images/spacer.gif' width='136' height='1'></td>"+
			"  </tr>"+
			"</table>");
		}
	}
	else{
		if(model=="astra" || model=="astracabrio" || model=="combo" || model=="corsa" || model=="vectra" || model=="zafira" || model=="signum")
		{
			document.write("<table width='780' height='75' border='0' cellpadding='0' cellspacing='0'>"+
			"  <tr> "+
			"    <td width='20'><img src='/content_data/LAAM/ME/en/GBPME/019/images/spacer.gif' width='20' height='8'></td>"+
			"    <td width='135'><a href='javascript:callDLocForThisVehicle();'><img src='/content_data/LAAM/ME/en/GBPME/019/images/toolLocateDealer_corsa.gif' width='134' height='50' border='0'></a></td>"+
			
			"    <td width='134'><a href='javascript:callReqBrochureForThisVehicle();'><img src='/content_data/LAAM/ME/en/GBPME/019/images/toolBrochure.gif' width='134' height='50' border='0'></a></td>"+
			"    <td width='20'><img src='/content_data/LAAM/ME/en/GBPME/019/images/spacer.gif' width='20' height='8'></td>"+
			"    <td width='140'><a href='javascript:callReqBrochureForThisVehicle();'><img src='/content_data/LAAM/ME/en/GBPME/019/images/spacer.gif' width='140' height='1' border='0'></a></td>"+
			"    <td width='20'><img src='/content_data/LAAM/ME/en/GBPME/019/images/spacer.gif' width='20' height='8'></td>"+
			"    <td width='136'><img src='/content_data/LAAM/ME/en/GBPME/019/images/spacer.gif' width='136' height='1'></td>"+
			"  </tr>"+
			"</table>");
		}
	}
		//For Opel Homepage, Brandsite Pages and Showroom Segment Pages
		if(ctryCd !="EG")
		{
		if(model=="home" || model=="brandsite" || model=="showroom")
		{
			document.write("<table width='780' height='75' border='0' cellpadding='0' cellspacing='0'>"+
			"  <tr> "+
			"    <td width='20'><img src='/content_data/LAAM/ME/en/GBPME/019/images/spacer.gif' width='20' height='8'></td>"+
			"    <td width='134'><a href='javascript:callDLocForThisVehicle();'><img src='/content_data/LAAM/ME/en/GBPME/019/images/toolLocateDealer_corsa.gif' width='134' height='50' border='0'></a></td>"+
			"    <td width='20'><img src='/content_data/LAAM/ME/en/GBPME/019/images/spacer.gif' width='20' height='8'></td>"+
			"    <td width='134'><a href='javascript:callBookTDriveForThisVehicle();'><img src='/content_data/LAAM/ME/en/GBPME/019/images/toolTestdrive_corsa.gif' width='134' height='50' border='0'></a></td>"+
			"    <td width='20'><img src='/content_data/LAAM/ME/en/GBPME/019/images/spacer.gif' width='20' height='8'></td>"+
			"    <td width='134'><a href='javascript:callReqBrochureForThisVehicle();'><img src='/content_data/LAAM/ME/en/GBPME/019/images/toolBrochure.gif' width='134' height='50' border='0'></a></td>"+
			"    <td width='20'><img src='/content_data/LAAM/ME/en/GBPME/019/images/spacer.gif' width='20' height='8'></td>"+
			"    <td width='134'><a href='javascript:callReqBrochureForThisVehicle();'><img src='/content_data/LAAM/ME/en/GBPME/019/images/spacer.gif' width='134' height='1' border='0'></a></td>"+
			"	<td width='20'><img src='/content_data/LAAM/ME/en/GBPME/019/images/spacer.gif' width='20' height='8'></td>"+
			"    <td width='134'><a href='javascript:callReqBrochureForThisVehicle();'><img src='/content_data/LAAM/ME/en/GBPME/019/images/spacer.gif' width='134' height='1' border='0'></a></td>"+
			"	<td width='10'><img src='/content_data/LAAM/ME/en/GBPME/019/images/spacer.gif' width='10' height='8'></td>"+
			"  </tr>"+
			"</table>");
			if(model=="home") // Homepage Random image picker script
			{
				var max_limit=0;
				var image_List=new Array(); //Image List
				image_List[0]=new image_Class("Opel Astra","/content_data/LAAM/ME/en/GBPME/019/images/OA_backgrd-Ecard2.jpg","javascript:callPage('019/OA/OA_home.html');");
				image_List[1]=new image_Class("Opel Corsa","/content_data/LAAM/ME/en/GBPME/019/images/OC_backgroundLanding0A.jpg","javascript:callPage('019/OC/OC_home.html');");
				image_List[2]=new image_Class("Opel Signum","/content_data/LAAM/ME/en/GBPME/019/images/OS_backgroundLanding0N.jpg","javascript:callPage('019/OS/OS_home.html');");
				image_List[3]=new image_Class("Opel Astra Cabrio","/content_data/LAAM/ME/en/GBPME/019/images/OB_backECard3.jpg","javascript:callPage('019/OB/OB_home.html');");
				image_List[4]=new image_Class("Opel Zafira","/content_data/LAAM/ME/en/GBPME/019/images/OZ_backgrd-Ecard6.jpg","javascript:callPage('019/OZ/OZ_home.html');");
				if(ctryCd=="AE" || ctryCd=="BH" || ctryCd=="KW" || ctryCd=="OM" || ctryCd=="QA" || ctryCd=="SA") //Setting Max Limit
				{
					max_limit=2; //3 Models (0 to 2)
				}
	
				if(ctryCd=="JO" || ctryCd=="LB" || ctryCd=="SY") //Setting Max Limit
				{
					max_limit=4; //5 Models (0 to 4)
				}
				
				
				var randNum=Math.floor(Math.random()*(max_limit+1)); //Generating a Random number based on max_limit (number of models available)
				if(ctryCd=="EG")
				{
					randNum=5;
					image_List[5]=new image_Class("Opel Corsa","/content_data/LAAM/ME/en/GBPME/019/images/OR_backgroundLanding0A.jpg","javascript:callPage('019/OR/OR_home.html');");
				}
				bgImgPath=image_List[randNum].bgImg;
				bnrImgURL=image_List[randNum].homepgURL;
				bnrALT=image_List[randNum].mdl;
				document.getElementById("backgroundImage").background=bgImgPath;
				document.getElementById("homepgURL").href=bnrImgURL;
				document.getElementById("modlSpacer").alt=bnrALT;
			}
		}
		}
		else{
		//For Opel Homepage, Brandsite Pages and Showroom Segment Pages
		if(model=="home" || model=="brandsite" || model=="showroom")
		{
			document.write("<table width='780' height='75' border='0' cellpadding='0' cellspacing='0'>"+
			"  <tr> "+
			"    <td width='20'><img src='/content_data/LAAM/ME/en/GBPME/019/images/spacer.gif' width='20' height='8'></td>"+
			"    <td width='134'><a href='javascript:callDLocForThisVehicle();'><img src='/content_data/LAAM/ME/en/GBPME/019/images/toolLocateDealer_corsa.gif' width='134' height='50' border='0'></a></td>"+
		"    <td width='20'><img src='/content_data/LAAM/ME/en/GBPME/019/images/spacer.gif' width='20' height='8'></td>"+
			"    <td width='134'><a href='javascript:callReqBrochureForThisVehicle();'><img src='/content_data/LAAM/ME/en/GBPME/019/images/toolBrochure.gif' width='134' height='50' border='0'></a></td>"+
			"    <td width='20'><img src='/content_data/LAAM/ME/en/GBPME/019/images/spacer.gif' width='20' height='8'></td>"+
			"    <td width='134'><a href='javascript:callReqBrochureForThisVehicle();'><img src='/content_data/LAAM/ME/en/GBPME/019/images/spacer.gif' width='134' height='50' border='0'></a></td>"+
			"    <td width='20'><img src='/content_data/LAAM/ME/en/GBPME/019/images/spacer.gif' width='20' height='8'></td>"+
			"    <td width='134'><a href='javascript:callReqBrochureForThisVehicle();'><img src='/content_data/LAAM/ME/en/GBPME/019/images/spacer.gif' width='134' height='1' border='0'></a></td>"+
			"	<td width='20'><img src='/content_data/LAAM/ME/en/GBPME/019/images/spacer.gif' width='20' height='8'></td>"+
			"    <td width='134'><a href='javascript:callReqBrochureForThisVehicle();'><img src='/content_data/LAAM/ME/en/GBPME/019/images/spacer.gif' width='134' height='1' border='0'></a></td>"+
			"	<td width='10'><img src='/content_data/LAAM/ME/en/GBPME/019/images/spacer.gif' width='10' height='8'></td>"+
			"  </tr>"+
			"</table>");
			if(model=="home") // Homepage Random image picker script
			{
				var max_limit=0;
				var image_List=new Array(); //Image List
				image_List[0]=new image_Class("Opel Astra","/content_data/LAAM/ME/en/GBPME/019/images/OA_backgrd-Ecard2.jpg","javascript:callPage('019/OA/OA_home.html');");
				image_List[1]=new image_Class("Opel Corsa","/content_data/LAAM/ME/en/GBPME/019/images/OC_backgroundLanding0A.jpg","javascript:callPage('019/OC/OC_home.html');");
				image_List[2]=new image_Class("Opel Signum","/content_data/LAAM/ME/en/GBPME/019/images/OS_backgroundLanding0N.jpg","javascript:callPage('019/OS/OS_home.html');");
				image_List[3]=new image_Class("Opel Astra Cabrio","/content_data/LAAM/ME/en/GBPME/019/images/OB_backECard3.jpg","javascript:callPage('019/OB/OB_home.html');");
				image_List[4]=new image_Class("Opel Zafira","/content_data/LAAM/ME/en/GBPME/019/images/OZ_backgrd-Ecard6.jpg","javascript:callPage('019/OZ/OZ_home.html');");
				if(ctryCd=="AE" || ctryCd=="BH" || ctryCd=="KW" || ctryCd=="OM" || ctryCd=="QA" || ctryCd=="SA") //Setting Max Limit
				{
					max_limit=2; //3 Models (0 to 2)
				}
	
				if(ctryCd=="JO" || ctryCd=="LB" || ctryCd=="SY") //Setting Max Limit
				{
					max_limit=4; //5 Models (0 to 4)
				}
				
				
				var randNum=Math.floor(Math.random()*(max_limit+1)); //Generating a Random number based on max_limit (number of models available)
				if(ctryCd=="EG")
				{
					randNum=5;
					image_List[5]=new image_Class("Opel Corsa","/content_data/LAAM/ME/en/GBPME/019/images/OR_backgroundLanding0A.jpg","javascript:callPage('019/OR/OR_home.html');");
				}
				bgImgPath=image_List[randNum].bgImg;
				bnrImgURL=image_List[randNum].homepgURL;
				bnrALT=image_List[randNum].mdl;
				document.getElementById("backgroundImage").background=bgImgPath;
				document.getElementById("homepgURL").href=bnrImgURL;
				document.getElementById("modlSpacer").alt=bnrALT;
			}
		}
		}
	}
	catch(e) // Applicable for all Opel Fusion tools (used in opelfooter_(en/ar).jsp)
	{
		document.write("<table width='780' height='75' border='0' cellpadding='0' cellspacing='0'>"+
		"  <tr> "+
		"    <td width='20'><img src='/content_data/LAAM/ME/en/GBPME/019/images/spacer.gif' width='20' height='8'></td>"+
		"    <td width='134'><a href='javascript:callDLocForThisVehicle();'><img src='/content_data/LAAM/ME/en/GBPME/019/images/toolLocateDealer_corsa.gif' width='134' height='50' border='0'></a></td>"+
		"    <td width='20'><img src='/content_data/LAAM/ME/en/GBPME/019/images/spacer.gif' width='20' height='8'></td>"+
		"    <td width='134'><a href='javascript:callBookTDriveForThisVehicle();'><img src='/content_data/LAAM/ME/en/GBPME/019/images/toolTestdrive_corsa.gif' width='134' height='50' border='0'></a></td>"+
		"    <td width='20'><img src='/content_data/LAAM/ME/en/GBPME/019/images/spacer.gif' width='20' height='8'></td>"+
		"    <td width='134'><a href='javascript:callReqBrochureForThisVehicle();'><img src='/content_data/LAAM/ME/en/GBPME/019/images/toolBrochure.gif' width='134' height='50' border='0'></a></td>"+
		"    <td width='20'><img src='/content_data/LAAM/ME/en/GBPME/019/images/spacer.gif' width='20' height='8'></td>"+
		"    <td width='134'><a href='javascript:callReqBrochureForThisVehicle();'><img src='/content_data/LAAM/ME/en/GBPME/019/images/spacer.gif' width='134' height='1' border='0'></a></td>"+
		"	<td width='20'><img src='/content_data/LAAM/ME/en/GBPME/019/images/spacer.gif' width='20' height='8'></td>"+
		"    <td width='134'><a href='javascript:callReqBrochureForThisVehicle();'><img src='/content_data/LAAM/ME/en/GBPME/019/images/spacer.gif' width='134' height='1' border='0'></a></td>"+
		"	<td width='10'><img src='/content_data/LAAM/ME/en/GBPME/019/images/spacer.gif' width='10' height='8'></td>"+
		"  </tr>"+
		"</table>");
	}
}

// Populates Opel Flash for All the Countries. Also passes country Code to the Flash

function populateFlashNav() 
{
	if(ctryCd != "EG")
	{
	var flash_content="<OBJECT  classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0' ID='menu' name='menu' WIDTH=778 HEIGHT=196><PARAM NAME=movie VALUE='/content_data/LAAM/ME/en/GBPME/019/flash/menu_en.swf?cntryCD="+ctryCd+"'><PARAM NAME='quality' VALUE='high'><PARAM NAME=salign VALUE=LT><PARAM NAME=wmode VALUE='transparent'><PARAM NAME=bgcolor VALUE=#FFFFFF><PARAM NAME=PLAY value=true><param name='menu' value='false'><EMBED src='/content_data/LAAM/ME/en/GBPME/019/flash/menu_en.swf?cntryCD="+ctryCd+"'  WIDTH=778 HEIGHT=196 NAME='menu' PLAY=true quality=high salign=LT wmode=transparent bgcolor=#FFFFFF TYPE='application/x-shockwave-flash' PLUGINSPAGE='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash' menu='false'></EMBED></OBJECT>";
	try // variable "model" not available for Shop & Buy Tools so Try;
	{
		if(model=="home") // If Homepage, once activated, keep the First Menu Open.
		{
			flash_content="<OBJECT  classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0' ID='menu' name='menu' WIDTH=778 HEIGHT=196><PARAM NAME=movie VALUE='/content_data/LAAM/ME/en/GBPME/019/flash/menu_en.swf?firsmenu=true&cntryCD="+ctryCd+"'><PARAM NAME='quality' VALUE='high'><PARAM NAME=salign VALUE=LT><PARAM NAME=wmode VALUE='transparent'><PARAM NAME=bgcolor VALUE=#FFFFFF><PARAM NAME=PLAY value=true><param name='menu' value='false'><EMBED src='/content_data/LAAM/ME/en/GBPME/019/flash/menu_en.swf?firsmenu=true&cntryCD="+ctryCd+"'  WIDTH=778 HEIGHT=196 NAME='menu' PLAY=true quality=high salign=LT wmode=transparent bgcolor=#FFFFFF TYPE='application/x-shockwave-flash' PLUGINSPAGE='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash' menu='false'></EMBED></OBJECT>";
		}
		document.write(flash_content);
	}
	catch(e) // variable "model" not available only for Shop & Buy Tools so Exception caught here and Populates flash;
	{
		document.write(flash_content);
	}
	}
	else{var flash_content="<OBJECT  classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0' ID='menu' name='menu' WIDTH=778 HEIGHT=196><PARAM NAME=movie VALUE='/content_data/LAAM/ME/en/GBPME/019/flash/menu_en_eg.swf?cntryCD="+ctryCd+"'><PARAM NAME='quality' VALUE='high'><PARAM NAME=salign VALUE=LT><PARAM NAME=wmode VALUE='transparent'><PARAM NAME=bgcolor VALUE=#FFFFFF><PARAM NAME=PLAY value=true><param name='menu' value='false'><EMBED src='/content_data/LAAM/ME/en/GBPME/019/flash/menu_en_eg.swf?cntryCD="+ctryCd+"'  WIDTH=778 HEIGHT=196 NAME='menu' PLAY=true quality=high salign=LT wmode=transparent bgcolor=#FFFFFF TYPE='application/x-shockwave-flash' PLUGINSPAGE='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash' menu='false'></EMBED></OBJECT>";
	try // variable "model" not available for Shop & Buy Tools so Try;
	{
		if(model=="home") // If Homepage, once activated, keep the First Menu Open.
		{
			flash_content="<OBJECT  classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0' ID='menu' name='menu' WIDTH=778 HEIGHT=196><PARAM NAME=movie VALUE='/content_data/LAAM/ME/en/GBPME/019/flash/menu_en_eg.swf?firsmenu=true&cntryCD="+ctryCd+"'><PARAM NAME='quality' VALUE='high'><PARAM NAME=salign VALUE=LT><PARAM NAME=wmode VALUE='transparent'><PARAM NAME=bgcolor VALUE=#FFFFFF><PARAM NAME=PLAY value=true><param name='menu' value='false'><EMBED src='/content_data/LAAM/ME/en/GBPME/019/flash/menu_en_eg.swf?firsmenu=true&cntryCD="+ctryCd+"'  WIDTH=778 HEIGHT=196 NAME='menu' PLAY=true quality=high salign=LT wmode=transparent bgcolor=#FFFFFF TYPE='application/x-shockwave-flash' PLUGINSPAGE='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash' menu='false'></EMBED></OBJECT>";
		}
		document.write(flash_content);
	}
	catch(e) // variable "model" not available only for Shop & Buy Tools so Exception caught here and Populates flash;
	{
		document.write(flash_content);
	}
	}
}

//Functions for All Pages (Terms & Conditions and Privacy & Security)

function callLegal()
{
	callPage('019/disclaimer.html');

}

function callPrivacy()
{
	callPage('019/privacy.html');
}

function callCopyright()
{
	var urlParams=new Array();
	urlParams=location.href.split(".html");
	location.href="/content_data/LAAM/ME/en/GBPME/019/G1/disclaimer.html#copyright"+urlParams[1];
}
function callSearch()
{
//	URLVar="/content_data/LAAM/SA/en/GBPSA/opel/BRANDSITE/search.htm";
	URLVar ="/GBPServiceMgr2.dyn?CntryCd="+ctryCd+"&LangCd=en&WebSiteID=GBP"+ctryCd+"&ReqsType=Pull&ServiceName=Search&NampltCd=019";
	location.href=URLVar;
}

function callSitemap()
{
	callPage('019/sitemap.html');
}

function callContactUs()
{
	//URLVar="/content_data/LAAM/SA/en/GBPSA/opel/shop_n_buy/contact.htm";
	URLVar="/GBPServiceMgr2.dyn?CntryCd=ME&LangCd=en&WebSiteID=GBPME&ReqsType=Pull&ServiceName=ContactSector&NampltCd=019^"+ctryCd;
	//location.href=URLVar;
	window.open(URLVar,"Fleet","width=700,height=600,left=150,top=80,scrollbars=yes,resizable=disabled");
}

//Functions for Showroom pages (Bottom Promo banners)

function callFindThisVehicle()
{
}


function callConfigThis()
{

}
//Request for Brochure Link from New DealerLocator 

function callRequestBrochureDL(namepltcd,ctryCd,dlrname)
{

dealerName_from_DL=dlrname;
dlrname="DLR";
var x_url ="";
	try
	{
		x_url="/GBPServiceMgr2.dyn?CntryCd=ME&LangCd=en&WebSiteID=GBPME&ReqsType=Pull&ServiceName=TestDrive&NampltCd=019^^RB^N^"+ctryCd+"^"+dlrname+"&SellingSrc=72&MerchModlDesgtr=1BBSE&ModelCode=1B";

	}
	catch(e)
	{
		x_url="/GBPServiceMgr2.dyn?CntryCd=ME&LangCd=en&WebSiteID=GBPME&ReqsType=Pull&ServiceName=TestDrive&NampltCd=019^^RB^N^"+ctryCd+"^"+dlrname+"&SellingSrc=72&MerchModlDesgtr=1BBSE&ModelCode=1B";

	}
	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" )
	{
	dealerName_from_DL=dlrname;
	dlrname="DLR";
	var URLVar ="";
	try
	{
		URLVar="/GBPServiceMgr2.dyn?CntryCd=ME&LangCd=en&WebSiteID=GBPME&ReqsType=Pull&ServiceName=TestDrive&NampltCd=019^^TD^N^"+ctryCd+"^"+dlrname+"&SellingSrc=72&MerchModlDesgtr=1BBSE&ModelCode=1B";
	}
	catch(e)
	{
		URLVar="/GBPServiceMgr2.dyn?CntryCd=ME&LangCd=en&WebSiteID=GBPME&ReqsType=Pull&ServiceName=TestDrive&NampltCd=019^^TD^N^"+ctryCd+"^"+dlrname+"&SellingSrc=72&MerchModlDesgtr=1BBSE&ModelCode=1B";
	}
	window.open(URLVar,"Fleet","width=700,height=600,left=150,top=80,scrollbars=yes,resizable=disabled");
	}
	else
	{
	alert("Test drive faclilty is not available in Egypt")
	}
}

function callReqBrochureForThisVehicle()
{	
	
	var x_url ="";
	try
	{
		x_url="/GBPServiceMgr2.dyn?CntryCd=ME&LangCd=en&WebSiteID=GBPME&ReqsType=Pull&ServiceName=TestDrive&NampltCd=019^^RB^N^"+ctryCd+"^&SellingSrc=72&MerchModlDesgtr=1BBSE&ModelCode=1B";	
	}
	catch(e)
	{
		x_url="/GBPServiceMgr2.dyn?CntryCd=ME&LangCd=en&WebSiteID=GBPME&ReqsType=Pull&ServiceName=TestDrive&NampltCd=019^^RB^N^"+ctryCd+"^&SellingSrc=72&MerchModlDesgtr=1BBSE&ModelCode=1B";	
	}
	window.open(x_url,"Fleet","width=700,height=600,left=150,top=80,scrollbars=yes,resizable=disabled");

	
}

function callDLocForThisVehicle()
{
	callPage('019/dllocator.html');
}

function callBookTDriveForThisVehicle()
{
	if(ctryCd != "EG" )
	{
	var URLVar ="";
	try
	{
		URLVar="/GBPServiceMgr2.dyn?CntryCd=ME&LangCd=en&WebSiteID=GBPME&ReqsType=Pull&ServiceName=TestDrive&NampltCd=019^^TD^N^"+ctryCd+"^&SellingSrc=72&MerchModlDesgtr=1BBSE&ModelCode=1B";
	}
	catch(e)
	{
		URLVar="/GBPServiceMgr2.dyn?CntryCd=SA&LangCd=en&WebSiteID=GBPSA&ReqsType=Pull&ServiceName=TestDrive&NampltCd=019^^TD^N^"+ctryCd+"^&SellingSrc=72&MerchModlDesgtr=1BBSE&ModelCode=1B";
	}
	window.open(URLVar,"Fleet","width=700,height=600,left=150,top=80,scrollbars=yes,resizable=disabled");
	}
	else
	{
	alert("Facility not available")
	}
}

//Functions for General Pages (Bottom Promo Links)

function callConfig()
{
	callConfigThis();
}

function callReqBrochure()
{
	var x_url ="";
	try
	{
		x_url="/GBPServiceMgr2.dyn?CntryCd=ME&LangCd=en&WebSiteID=GBPME&ReqsType=Pull&ServiceName=TestDrive&NampltCd=019^^RB^N&SellingSrc=72&MerchModlDesgtr=OCB5D&ModelCode=5D";
	}
	catch(e)
	{
		x_url="/GBPServiceMgr2.dyn?CntryCd=ME&LangCd=en&WebSiteID=GBPME&ReqsType=Pull&ServiceName=TestDrive&NampltCd=019^^RB^N&SellingSrc=72&MerchModlDesgtr=OCB5D&ModelCode=5D";
	}
	window.open(x_url,"Fleet","width=700,height=600,left=150,top=80,scrollbars=yes,resizable=disabled");
}

function callDLoc()
{
	callPage('019/dllocator.html');
}

function callBookTDrive()
{
	callBookTDriveForThisVehicle();
}

function callArabic()
{
	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 = "/GBPServiceMgr2.dyn?CntryCd=ME&LangCd=en&WebSiteID=GBPME&ReqsType=Pull&ServiceName=RequestBrochure&NampltCd=019^pageredirect&SellingSrc=72&cnInput=019/index.html^"+ctryCd;
		return;
	}
	else
	{
		var curntURL=location.href;
		var arabicURL=curntURL.replace("/en/","/ar/");
		location.href=arabicURL;
	}

}
function callModel(modelCode)
{
	if (modelCode=='001')
	{
		//location.href='/content_data/LAAM/'+ctryCd+'/en/GBP'+ctryCd+'/chevrolet/index.htm';
		//var abs_path="/GBPServiceMgr2.dyn?CntryCd=ME&LangCd=en&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=en&WebSiteID=GBPME&ReqsType=Pull&ServiceName=RequestBrochure&NampltCd=001^pageredirect&SellingSrc=72&cnInput=001/index.html^"+ctryCd,"","");
			}
			else
			{
				window.open("http://www.chevrolet.gmegypt.com/GBPServiceMgr2.dyn?CntryCd=ME&LangCd=en&WebSiteID=GBPME&ReqsType=Pull&ServiceName=RequestBrochure&NampltCd=001^pageredirect&SellingSrc=72&cnInput=001/index.html^"+ctryCd,"","");
			}
			
	}
		if (modelCode=='006')
	{
		if(ctryCd != "EG")	
		{
			//var abs_path=		"/GBPServiceMgr2.dyn?CntryCd=ME&LangCd=en&WebSiteID=GBPME&ReqsType=Pull&ServiceName=RequestBrochure&NampltCd=006^pageredirect&SellingSrc=72&cnInput=006/index.html^"+ctryCd;
			//location.href= abs_path;
			window.open("http://www.cadillacarabia.com/GBPServiceMgr2.dyn?CntryCd=ME&LangCd=en&WebSiteID=GBPME&ReqsType=Pull&ServiceName=RequestBrochure&NampltCd=006^pageredirect&SellingSrc=72&cnInput=006/index.html^"+ctryCd,"","");
		}
		else
		{
			alert("Not Available");
		}
	}
	if (modelCode=='012')
	{
		if(ctryCd=="SY" || ctryCd=="EG")
		{
			if(ctryCd != "EG")
			{
			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/content_data/LAAM/ME/en/GBPME/cs/012/index.html","","");
			}
			else
			{
				alert("Not Available")
			}
		}
		else
		{
			//var abs_path="/GBPServiceMgr2.dyn?CntryCd=ME&LangCd=en&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=en&WebSiteID=GBPME&ReqsType=Pull&ServiceName=RequestBrochure&NampltCd=012^pageredirect&SellingSrc=72&cnInput=012/index.html^"+ctryCd,"","");
		}
	}
	if (modelCode=='015')
	{
		if(ctryCd != "EG")
		{
			//var abs_path="//GBPServiceMgr2.dyn?CntryCd=ME&LangCd=en&WebSiteID=GBPME&ReqsType=Pull&ServiceName=RequestBrochure&NampltCd=012^pageredirect&SellingSrc=72&cnInput=012/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("Not Available");
		}	
	}
	if (modelCode=='019')
	{
		return;
	}
	if (modelCode=='999')
	{
		//var abs_path=	"/GBPServiceMgr2.dyn?CntryCd=ME&LangCd=en&WebSiteID=GBPME&ReqsType=Pull&ServiceName=RequestBrochure&NampltCd=999^pageredirect&SellingSrc=72&cnInput=999/index.html^"+ctryCd;
		//location.href=abs_path;
		if(ctryCd != "EG")
		{
			window.open("http://www.gmarabia.com/GBPServiceMgr2.dyn?CntryCd=ME&LangCd=en&WebSiteID=GBPME&ReqsType=Pull&ServiceName=RequestBrochure&NampltCd=999^pageredirect&SellingSrc=72&cnInput=999/index.html^"+ctryCd,"","");
		}
	}
	if (modelCode=='1001')
	{
		//location.href='/content_data/LAAM/'+ctryCd+'/en/GBP'+ctryCd+'/corp/advantage.htm';
		call_page('999/advantage.html');
	}

}
function callCountry(cntryCode)
{
	if (cntryCode == "0")
	{
		return;
	}
	else
	{
		var abs_path="/GBPServiceMgr2.dyn?CntryCd=ME&LangCd=en&WebSiteID=GBPME&ReqsType=Pull&ServiceName=RequestBrochure&NampltCd=019^pageredirect&SellingSrc=72&cnInput=019/index.html^"+cntryCode;
		//location.href= abs_path;
		window.open("http://www.opelarabia.com","OpelArabia","");
		
	}
}
function go_owner()
{
	location.href="/GBPServiceMgr2.dyn?CntryCd=ME&LangCd=en&WebSiteID=GBPME&ReqsType=Pull&ServiceName=EntryForm&regInput=test";
}
function callNewsViaEmail()
{
		window.open("/GBPServiceMgr2.dyn?CntryCd=ME&LangCd=en&WebSiteID=GBPME&ReqsType=Pull&ServiceName=EntryForm&newPage="+ctryCd+"&NampltCd=019","Fleet","width=650,height=500,left=150,top=80,scrollbars=yes,resizable=yes");
		return;
}

function go_hummer()
{
	location.href="/content_data/LAAM/ME/en/GBPME/018/index.html";
}

function go_fleet()
{

	window.open("/content_data/LAAM/ME/en/GBPME/GMFleet/main/fleet_index.htm","Fleet","height=450,width=650,left=150,top=120,status=yes,toolbar=no,menubar=no,scrollbars=yes,resizable=yes");
	return;
	
}

function BottomNav()
{

//Bottom footer;
if(ctryCd != "EG")
{
  	document.write("<table width='764' border='0' cellpadding='0' cellspacing='0' bgcolor='#CCCCCC'>"+
"  <tr class='white10b'> "+
"    <td width='20'><img src='/content_data/LAAM/ME/en/GBPME/019/images/spacer.gif' width='20' height='1'></td>"+
"    <td width='376' valign='middle' class='white10b'><a href=javascript:callCopyright(); class='white10b'>Copyright "+
"      <img src='/content_data/LAAM/ME/en/GBPME/019/images/footer_concat_white.gif' width='9' height='7' border='0'></a><a href=javascript:callPrivacy(); class='white10b'> "+
"      Privacy Statement</a><a href=javascript:callLegal(); class='white10b'> "+
"      <img src='/content_data/LAAM/ME/en/GBPME/019/images/footer_concat_white.gif' width='9' height='7' border='0'> "+
"      Terms &amp; Conditions</a></td>"+
"	<td width='352' height='20' align='right' valign='middle' class='black10b'><a href=javascript:callSitemap(); class='black10b'>Sitemap</a> "+
"      <img src='/content_data/LAAM/ME/en/GBPME/019/images/footer_concat.gif' width='9' height='7'>&nbsp;<a href=javascript:callContactUs(); class='black11'>Contact "+
"      Us</a>"+
"     </td>"+
"    <td width='16'><img src='/content_data/LAAM/ME/en/GBPME/019/images/spacer.gif' width='15' height='8'></td>"+

"  </tr>"+
"</table>" );
}
else{
document.write("<table width='764' border='0' cellpadding='0' cellspacing='0' bgcolor='#CCCCCC'>"+
"  <tr class='white10b'> "+
"    <td width='20'><img src='/content_data/LAAM/ME/en/GBPME/019/images/spacer.gif' width='20' height='1'></td>"+
"    <td width='376' valign='middle' class='white10b'><a href=javascript:callCopyright(); class='white10b'>Copyright "+
"      <img src='/content_data/LAAM/ME/en/GBPME/019/images/footer_concat_white.gif' width='9' height='7' border='0'></a><a href=javascript:callPrivacy(); class='white10b'> "+
"      Privacy Statement</a><a href=javascript:callLegal(); class='white10b'> "+
"      <img src='/content_data/LAAM/ME/en/GBPME/019/images/footer_concat_white.gif' width='9' height='7' border='0'> "+
"      Terms &amp; Conditions</a></td>"+
"	<td width='352' height='20' align='right' valign='middle' class='black10b'><a href=javascript:callArabic();><img src='/content_data/LAAM/ME/en/GBPME/019/images/arabic.gif' width='28' height='10' border='0'></a> <img src='/content_data/LAAM/ME/en/GBPME/019/images/footer_concat.gif' width='9' height='7'>"+
"	<a href=javascript:callSitemap(); class='black10b'>Sitemap</a> "+
"      <img src='/content_data/LAAM/ME/en/GBPME/019/images/footer_concat.gif' width='9' height='7'>&nbsp;<a href=javascript:callContactUs(); class='black11'>Contact "+
"      Us</a>"+
"     </td>"+
"    <td width='16'><img src='/content_data/LAAM/ME/en/GBPME/019/images/spacer.gif' width='15' height='8'></td>"+

"  </tr>"+
"</table>" );
}
}



//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" : "");
	//Copy the code in line no:366 if the cookie is based on timer based((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(); 
}

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=en&refc=Opel","Survey1",windowprops);
	}  
}

window.onunload=checkClosed;

var exp = new Date(); 
exp.setTime(exp.getTime() + (expDays*1*30*60*1000)); //Set the time for half an hour

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("index","Survey1","popup","page_enter","BH"); 
//page_List[1]=new page_Class("opel","Survey2","popback","page_enter","AE^BH^JO^KW^LB^OM^QA^SA^SY"); 
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+"_en"+"_"+"Opel";
									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);
											if(i==0)
											checkCount("Survey1",win_name,page_List[i].WinOptions,page_List[i].Loadevent);
										}
										else
										{
											checkCount(setcookiename,win_name,page_List[i].WinOptions,page_List[i].Loadevent);
										}
									}
							}
							//Cookie End
				}
		}
	}

	
}


function OpenWindow(WinName,winoption)
{	
	if(WinName=="Survey1")
	{
	var x=screen.width;
	var y=screen.height;
	positn="left="+Math.floor((x-306)/2)+",top="+Math.floor((y-330)/2);
	var windowprops = "width=306,height=350,location=no,toolbar=no,menubar=no,scrollbars=no,resizable=yes,"+positn;
	var win=window.open("/content_data/LAAM/BV/en/GBPBV/"+WinName+".htm",WinName,windowprops);
	if (winoption=="popback")
	{
		win.blur()
	}
	}

	if(WinName=="Survey2")
	{
/*	alert(WinName);
	var windowprops = "width=400,height=450,location=no,toolbar=no,menubar=no,scrollbars=no,resizable=yes";
	var win=window.open("http://web.refleks.com/?surveyid=11667&refc=Opel","T1",windowprops);
*/
/*
	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=en&refc=Opel",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)
}

*/

//Links for dynamic links from Opel Flash navigation
function showroom_url(url)
{
	if(url=="astra")
	{
		callPage('019/OA/OA_home.html');
	}
	else if(url=="astracabrio")
	{
		callPage('019/OB/OB_home.html');
	}
	else if(url=="corsa")
	{	
		if(ctryCd != "EG")
		{ 
			callPage('019/OC/OC_home.html');
		}
		else
		{
			callPage('019/OR/OR_home.html');
		}
	}
	else if(url=="combo")
	{
		callPage('019/OM/OM_home.html');
	}
	else if(url=="signum")
	{
		callPage('019/OS/OS_home.html');
	}
	else if(url=="vectra")
	{
		callPage('019/OV/OV_home.html');
	}
	else if(url=="zafira")
	{
		callPage('019/OZ/OZ_home.html');
	}
	else if(url=="showroom")
	{
		callPage('019/showroom.html');
	}
}

function call_games()
{
	callPage('019/games.html');
}

function call_wallpapers()
{
	callPage('019/wallpapers.html');
}

function call_screensavers()
{
	callPage('019/screensavers.html');
}

function call_warranty()
{
	callPage('019/warranty.html');
}

function call_roadside()
{
	callPage('019/roadside.html');
}

function call_about()
{
	callPage('019/about_opel.html');
}

function call_news()
{
	callPage('019/news_01.html');
}

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='625' height='420' id='GMME_DL_Prototype' align='middle'>"+
		"<param name='allowScriptAccess' value='sameDomain'/>"+
		"<param name='movie' value='/content_data/LAAM/ME/en/GBPME/999/flash/GMME_Dealerlocator.swf?model=local&namplt_cd=019&cntry_cd="+ctryCd+"'/>"+
		"<param name='quality' value='high' />"+
		"<param name='bgcolor' value='#ffffff'/>"+
		"<param name='wmode' value='transparent'/>"+
		"<embed src='/content_data/LAAM/ME/en/GBPME/999/flash/GMME_Dealerlocator.swf?model=local&namplt_cd=019&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>");
}
