var dlrname="";
//alert(dlrname);
var NampltCd="";
var MMD="";
var FormPage="";
var FuncID="";
var cntry_cd="SA";
var campInfo="no";
var dlrId="";
var ID = "noinfo";
//alert(dlrId+"testing for camp"+campInfo);
//alert("country"+cntry_cd);
//------ Cookie Deletion------
function HandleOnClose(){

		 if (event.clientY < 0) {
			delCookie('title');
			delCookie('fname');
			delCookie('mname');
			delCookie('lname');
			delCookie('emailAddress');
			delCookie('emailtype');
			delCookie('inputFld1');
						//-------Added newly on 21.05.05-----
			delCookie('countryother');
			delCookie('cityother');

			delCookie('country');
			delCookie('selectcity');
			delCookie('home1');
			delCookie('home2');
			delCookie('home3');
			delCookie('mobile1');
			delCookie('mobile2');
			delCookie('mobile3');
			delCookie('work1');
			delCookie('work2');
			delCookie('work3');
			delCookie('address');
			delCookie('postCode');
		 }
		 

}
function getCookie(NameOfCookie)
{ 
	if (document.cookie.length > 0) //Does the document.cookie object have any data?
	{ 
		//alert(document.cookie.length);
		begin = document.cookie.indexOf(NameOfCookie+"="); 
		if (begin != -1) 
		{ 
		//	alert(begin);
			begin += NameOfCookie.length+1; 
		//	alert(begin);
			end = document.cookie.indexOf(";", begin);
		//	alert(end);
			if (end == -1) 
				end = document.cookie.length;
			//	alert("END:"+end);

				//alert(NameOfCookie+":"+(document.cookie.substring(begin, end)));
			return unescape(document.cookie.substring(begin, end));
				

		} 
	}

	return null; 
}

function delCookie (NameOfCookie) 
{ 
	
	if (getCookie(NameOfCookie)) 
	{
		document.cookie = NameOfCookie + "=" + "; expires=Thu, 01-Jan-70 00:00:01 GMT";
	}
}
//---------------cookie deletion end

function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}
//-->

	//------ Parsing the XML using XMLDOM -------
	var xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
	function loadXML(xmlFile)
	{

	 xmlDoc.async="false";
	 xmlDoc.loadXML(xmlFile);
	 xmlObj=xmlDoc.documentElement;
	var nn=1;
	//------ population of Brand dropdown ------
	for (m=1;m<=xmlObj.getElementsByTagName("Brand").length;m++)
	{
	var temp=xmlObj.getElementsByTagName("Brand")[m-1].getAttribute("namplt_desc")
	var tempcd=xmlObj.getElementsByTagName("Brand")[m-1].getAttribute("namplt_cd")
	//alert(xmlObj.getElementsByTagName("Brand")[m-1].getAttribute("selling_cnty").indexOf(cntry_cd));
	if(xmlObj.getElementsByTagName("Brand")[m-1].getAttribute("selling_cntry").indexOf(cntry_cd)>=0)
		{
		
			document.formpage.Brand.options[nn] = new Option(temp,tempcd);
			nn=nn+1;
		}
	
	}
}
function Fn_BrandValidation()
{
		if(document.formpage.Brand.value==0)
		{
			alert('Brand Not Available');
			document.formpage.Brand.focus();
		}else
		{
				//	location.href=action;
		}
}
function Fn_XMLJSPLoad()
{
////clearing original
			var tbl  = document.getElementById('id_selectall');
			var cols= tbl.getElementsByTagName('td');
			  for (var row=0; row<cols.length;row++) 
			  {
				cols[row].style.display='none';
			   }
			var tbl  = document.getElementById('id_clearall');
			var cols= tbl.getElementsByTagName('td');
			for (var row=0; row<cols.length;row++) 
			  {
				cols[row].style.display='none';
			   }

			var tbl  = document.getElementById('id_SO');
			var cols= tbl.getElementsByTagName('td');
			for (var row=0; row<cols.length;row++) 
			  {
				cols[row].style.display='none';
			   }

			var tbl  = document.getElementById('id_TD');
			var cols= tbl.getElementsByTagName('td');
			  for (var row=0; row<cols.length;row++) 
			  {
				cols[row].style.display='none';
			   }
		
			var tbl  = document.getElementById('id_RB');
			var cols= tbl.getElementsByTagName('td');
			for (var row=0; row<cols.length;row++) 
			  {
				cols[row].style.display='none';
				}
			var tbl  = document.getElementById('id_SA');
			var cols= tbl.getElementsByTagName('td');
			for (var row=0; row<cols.length;row++) 
			  {
				cols[row].style.display='none';
			 }
			var tbl  = document.getElementById('id_To');
			var cols= tbl.getElementsByTagName('td');
			  for (var row=0; row<cols.length;row++) 
			  {
				cols[row].style.display='none';
			 }
			var tbl  = document.getElementById('id_BM');
			var cols= tbl.getElementsByTagName('td');
		  for (var row=0; row<cols.length;row++) 
			  {
			cols[row].style.display='none';
			 }

//
var er=' <BrandMaster><Brand namplt_cd = "001" namplt_desc = "Chevrolet" selling_cntry="GBPAE^GBPBH^GBPJO^GBPKW^GBPLB^GBPOM^GBPQA^GBPSA^GBPSY^GBPIQ^GBPEG"/><Brand namplt_cd = "012" namplt_desc = "GMC" selling_cntry="GBPAE^GBPBH^GBPJO^GBPKW^GBPLB^GBPOM^GBPQA^GBPSA"/></BrandMaster>';
loadXML(er);
Fn_BrandModelPopulation();
}

var eng='<hi><ModelMaster><Model namplt_cd="001" namplt_desc="Chevrolet" model_cd="Select" model_name="Select Chevrolet" selling_cntry="GBPAE^GBPBH^GBPJO^GBPKW^GBPLB^GBPOM^GBPQA^GBPSA^GBPSY^GBPIQ^GBPEG" segments="HatchBack" min_price="15000^28000^3600^0^27990^11000^2995^29000^27990^0^0" max_price="55000^28000^3600^0^27990^11000^2995^29000^27990^0^0" currency_symbol="AED^AED^BHD^JD^KD^US$^OR^QR^Saudi Riyal^Syrian Currency^EGD" corner_pt="5000^5100^500^2500^500^500^500^5000^5000^2500^500" more_info="" campaign_country="" campaign_flag="" service_available="TD^RB"/><Model namplt_cd="001" namplt_desc="Chevrolet" model_cd="Spark" model_name="Chevrolet Spark" selling_cntry="GBPAE^GBPBH^GBPJO^GBPKW^GBPLB^GBPOM^GBPQA^GBPSA^GBPSY^GBPIQ^GBPEG" segments="HatchBack" min_price="15000^28000^3600^0^27990^11000^2995^29000^27990^0^0" max_price="55000^28000^3600^0^27990^11000^2995^29000^27990^0^0" currency_symbol="AED^AED^BHD^JD^KD^US$^OR^QR^Saudi Riyal^Syrian Currency^EGD" corner_pt="5000^5100^500^2500^500^500^500^5000^5000^2500^500" more_info="" campaign_country="" campaign_flag="" service_available="TD^RB"/><Model namplt_cd="001" namplt_desc="Chevrolet" model_cd ="Aveo4doors" model_name = "Chevrolet Aveo 4-door" selling_cntry="GBPAE^GBPBH^GBPJO^GBPKW^GBPLB^GBPOM^GBPQA^GBPSA^GBPSY^GBPIQ^GBPEG"  segments="Sedan"  min_price ="28000^3600^0^27990^11000^2995^29000^27990^0^12345"  max_price="55000^28000^3600^0^27990^11000^2995^29000^27990^0^12345"  currency_symbol = "AED^BHD^JD^KD^US$^OR^QR^Saudi Riyal^Syrian Currency^AED"  corner_pt = "5000^500^2500^500^500^500^5000^5000^2500^5000"  more_info=""  campaign_country = ""  campaign_flag = "" service_available ="TD^RB"/><Model namplt_cd="001" namplt_desc="Chevrolet" model_cd="Aveo5doors" model_name="Chevrolet Aveo 5-door" selling_cntry="GBPAE^GBPBH^GBPJO^GBPKW^GBPLB^GBPOM^GBPQA^GBPSA^GBPSY^GBPIQ^GBPEG" segments="HatchBack" min_price ="28000^3600^0^27990^11000^2995^29000^27990^0^12345"  max_price="55000^28000^3600^0^27990^11000^2995^29000^27990^0^12345"  currency_symbol = "AED^BHD^JD^KD^US$^OR^QR^Saudi Riyal^Syrian Currency^AED"  corner_pt = "5000^500^2500^500^500^500^5000^5000^2500^5000"  more_info="" campaign_country="" campaign_flag="" service_available="TD^RB"/><Model namplt_cd="001" namplt_desc="Chevrolet" model_cd="Optra4doors" model_name="Chevrolet Optra 4-door" selling_cntry="GBPAE^GBPBH^GBPJO^GBPKW^GBPLB^GBPOM^GBPQA^GBPSA^GBPSY^GBPIQ^GBPEG" segments="Sedan" min_price="15000^34900^4700^0^0^0^3649^36000^34990^0^12345" max_price="55000^34900^4700^0^0^0^3649^36000^34990^0^12345" currency_symbol="AED^AED^BHD^JD^KD^US$^OR^QR^Saudi Riyal^Syrian Currency^AED" corner_pt="5000^5100^500^2500^500^500^500^5000^5000^2500^5000" more_info="" campaign_country="" campaign_flag="" service_available="TD^RB"/><Model namplt_cd="001" namplt_desc="Chevrolet" model_cd="Optra5doors" model_name="Chevrolet Optra 5-door" selling_cntry="GBPAE^GBPBH^GBPJO^GBPKW^GBPLB^GBPOM^GBPQA^GBPSA^GBPSY^GBPIQ^GBPEG" segments="HatchBack" min_price="15000^0^0^0^0^0^0^0^0^0^0" max_price="55000^0^0^0^0^0^0^0^0^0^0" currency_symbol="AED^AED^BHD^JD^KD^US$^OR^QR^Saudi Riyal^Syrian Currency^EG$" corner_pt="5000^5100^500^2500^500^500^500^5000^5000^2500^50000" more_info="" campaign_country="" campaign_flag="" service_available="TD^RB"/><Model namplt_cd="001" namplt_desc="Chevrolet" model_cd="OptraWagon" model_name="Chevrolet Optra Wagon" selling_cntry="GBPAE^GBPBH^GBPJO^GBPKW^GBPLB^GBPOM^GBPQA^GBPSA^GBPSY^GBPIQ" segments="Wagon" min_price="15000^0^0^0^0^0^0^0^0^0" max_price="55000^0^0^0^0^0^0^0^0^0" currency_symbol="AED^AED^BHD^JD^KD^US$^OR^QR^Saudi Riyal^Syrian Currency" corner_pt="5000^5100^500^2500^500^500^500^5000^5000^2500" more_info="" campaign_country="" campaign_flag="" service_available="TD^RB"/><Model namplt_cd="001" namplt_desc="Chevrolet" model_cd="Epica" model_name="Chevrolet Epica" selling_cntry="GBPAE^GBPBH^GBPJO^GBPKW^GBPLB^GBPOM^GBPQA^GBPSA^GBPSY^GBPIQ" segments="Sedan" min_price="15000^41000^4900^0^41990^16000^4395^49000^41990^0" max_price="55000^41000^4900^0^41990^16000^4395^49000^41990^0" currency_symbol="AED^AED^BHD^JD^KD^US$^OR^QR^Saudi Riyal^Syrian Currency" corner_pt="5000^5100^500^2500^500^500^500^5000^5000^2500" more_info="" campaign_country="" campaign_flag="" service_available="TD^RB"/><Model namplt_cd="001" namplt_desc="Chevrolet" model_cd="Corvette" model_name="Chevrolet Corvette" selling_cntry="GBPAE^GBPBH^GBPKW^GBPLB^GBPQA^GBPSA" segments="Sports/coupe" min_price="15000^173518^17921^13998^74488^171401^177782" max_price="55000^197671^20415^16003^84925^195259^202595" currency_symbol="AED^AED^BHD^KD^US$^QR^Saudi Riyal" corner_pt="5000^5100^500^500^500^5000^5000" more_info="" campaign_country="" campaign_flag="" service_available="TD^RB"/><Model namplt_cd="001" namplt_desc="Chevrolet" model_cd="LuminaSS" model_name="Chevrolet Lumina Coupe SS" selling_cntry="GBPAE^GBPBH^GBPJO^GBPKW^GBPLB^GBPOM^GBPQA^GBPSA" segments="Sports/coupe" min_price="15000^0^0^0^0^0^0^0^0" max_price="55000^0^0^0^0^0^0^0^0" currency_symbol="AED^AED^BHD^JD^KD^US$^OR^QR^Saudi Riyal" corner_pt="5000^5100^500^2500^500^500^500^5000^5000" more_info="" campaign_country="" campaign_flag="" service_available="TD^RB"/><Model namplt_cd="001" namplt_desc="Chevrolet" model_cd="LuminaSedan" model_name="Chevrolet Lumina Sedan" selling_cntry="GBPAE^GBPBH^GBPJO^GBPKW^GBPLB^GBPOM^GBPQA^GBPSA" segments="Sedan" min_price="15000^63244^6532^23645^4873^21390^6670^62473^67084" max_price="55000^80075^9262^34293^7068^37810^9458^88589^82260" currency_symbol="AED^AED^BHD^JD^KD^US$^OR^QR^Saudi Riyal" corner_pt="5000^5100^500^2500^500^500^500^5000^5000" more_info="" campaign_country="" campaign_flag="" service_available="TD^RB"/><Model namplt_cd="001" namplt_desc="Chevrolet" model_cd="Caprice" model_name="Chevrolet Caprice" selling_cntry="GBPAE^GBPBH^GBPJO^GBPKW^GBPLB^GBPOM^GBPQA^GBPSA" segments="Sedan" min_price="15000^83809^10090^31927^6580^35272^8839^82787^86097" max_price="55000^114023^454534545^44096^9088^48328^12026^112632^117137" currency_symbol="AED^AED^BHD^JD^KD^US$^OR^QR^Saudi Riyal" corner_pt="5000^5100^500^2500^500^500^500^5000^5000" more_info="" campaign_country="GBPAE^GBPBH" campaign_flag="ON" service_available="TD^RB"/><Model namplt_cd="001" namplt_desc="Chevrolet" model_cd="Uplander" model_name="Chevrolet Uplander " selling_cntry="GBPAE^GBPBH^GBPJO^GBPKW^GBPLB^GBPOM^GBPQA^GBPSA" segments="Van" min_price="15000^0^0^0^0^0^0^0^0" max_price="55000^0^0^0^0^0^0^0^0" currency_symbol="AED^AED^BHD^JD^KD^US$^OR^QR^Saudi Riyal" corner_pt="2500^2500^2500^2500^2500^2500^2500^2500" more_info="" campaign_country="" campaign_flag="" service_available="TD^RB"/><Model namplt_cd="001" namplt_desc="Chevrolet" model_cd="Express" model_name="Chevrolet Express" selling_cntry="GBPAE^GBPJO^GBPKW^GBPLB^GBPOM^GBPQA" segments="Van" min_price="15000^87839^0^6873^37609^9331^86768" max_price="55000^94638^0^7437^40546^10048^93481" currency_symbol="AED^AED^JD^KD^US$^OR^QR" corner_pt="5000^5100^2500^500^500^500^5000" more_info="" campaign_country="" campaign_flag="" service_available="TD^RB"/><Model namplt_cd="001" namplt_desc="Chevrolet" model_cd="TrailBlazer" model_name="Chevrolet TrailBlazer" selling_cntry="GBPAE^GBPBH^GBPJO^GBPKW^GBPLB^GBPOM^GBPQA^GBPSA" segments="4x4" min_price="15000^81253^8391^30579^6327^34763^8610^80262^82787" max_price="55000^87614^9048^33141^6855^37512^9281^86545^89322" currency_symbol="AED^AED^BHD^JD^KD^US$^OR^QR^Saudi Riyal" corner_pt="5000^5100^500^2500^500^500^500^5000^5000" more_info="" campaign_country="" campaign_flag="" service_available="TD^RB"/><Model namplt_cd="001" namplt_desc="Chevrolet" model_cd="Tahoe" model_name="Chevrolet Tahoe" selling_cntry="GBPAE^GBPJO^GBPKW^GBPLB^GBPOM^GBPQA^GBPBH^GBPSA" segments="4x4" min_price="111661^42753^8842^48088^11822^110299^0^11822^110299" max_price="120108^46155^9544^51738^12713^118643^0^51738^12713" currency_symbol="AED^JD^KD^US$^OR^QR^Syrian Currency^Saudi Riyal^BHD" corner_pt="5000^2500^500^500^500^5000^2500^51738^12713" more_info="" campaign_country="" campaign_flag="" service_available="TD^RB"/><Model namplt_cd="001" namplt_desc="Chevrolet" model_cd="ChevySub" model_name="Chevrolet Suburban" selling_cntry="GBPAE^GBPJO^GBPKW^GBPLB^GBPOM^GBPQA^GBPBH^GBPSA" segments="4x4" min_price="15000^123322^0^9810^53127^13069^121817^0" max_price="55000^149250^0^11963^64331^15803^147429^0" currency_symbol="AED^JD^KD^US$^OR^QR^BHD^Saudi Riyal" corner_pt="5000^5100^2500^500^500^500^5000^0" more_info="" campaign_country="" campaign_flag="" service_available="TD^RB"/></ModelMaster><ModelMaster>  <Model  namplt_cd = "006"  namplt_desc = "Cadillac"  model_cd = "6B"  model_name = "Cadillac BLS"  selling_cntry = "GBPAE^GBPBH^GBPJO^GBPKW^GBPLB^GBPOM^GBPQA^GBPSA^GBPSY"  segments = "Sedan^Luxury"  min_price = "0^0^0^0^0^0^0^0^0"  max_price = "0^0^0^0^0^0^0^0^0"  currency_symbol = "AED^BHD^JD^KD^US$^OR^QR^Saudi Riyal^Syrian Currency"  corner_pt = "5000^500^2500^500^500^500^5000^5000^2500"  more_info = ""  campaign_country = "GBPBH"  campaign_flag = "" service_available ="TD^RB"/><Model  namplt_cd = "006"  namplt_desc = "Cadillac"  model_cd = "6C"  model_name = "Cadillac CTS"  selling_cntry = "GBPAE^GBPBH^GBPJO^GBPKW^GBPLB^GBPOM^GBPQA^GBPSA^GBPSY"  segments = "Sedan^Luxury^Sports/coupe"  min_price = "124282^12931^40168^9903^53243^13265^123675^99999^0"  max_price = "137311^14276^48028^10984^58873^14639^136544^147618^0"  currency_symbol = "AED^BHD^JD^KD^US$^OR^QR^Saudi Riyal^Syrian Currency"  corner_pt = "5000^500^2500^500^500^500^5000^5000^2500"  more_info = "The power. The technology. And the prestige synonymous with Cadillac, DeVeille embodies it all as the world&apos;s favorite luxury sedan. And for 2003, DeVille sets the technological standard. Consided Night Vision, the revers 4.6l Northstar V8, Ultrasonic Rear Parking Assit, and StabiliTrak as only DeVille presents them."  campaign_country = ""  campaign_flag = "" service_available ="TD^RB"/> <Model  namplt_cd = "006"  namplt_desc = "Cadillac"  model_cd = "6S"  model_name = "Cadillac STS"  selling_cntry = "GBPAE^GBPBH^GBPJO^GBPKW^GBPLB^GBPOM^GBPQA^GBPSA^GBPSY"  segments = "Sedan^Luxury"  min_price = "0^0^0^0^0^0^0^0^0"  max_price = "0^0^0^0^0^0^0^0^0"  currency_symbol = "AED^BHD^JD^KD^US$^OR^QR^Saudi Riyal^Syrian Currency"  corner_pt = "5000^500^2500^500^500^500^5000^5000^2500"  more_info = "INTUITIVE PERFORMANCE Performance-tuned at the famed Nurburgring race circuit in Germany, STS has been created to produce the vigorous acceleration, dynamic cornering, and confident braking of a no-compromise sports sedan. So responsive to your commands that it seems to anticipate your intentions, this is a car that will make your desires come true right before your eyes, ears, fingertips, and especially your right foot. The road doesn t stand a chance."  campaign_country = ""  campaign_flag = "" service_available ="TD^RB"/> <Model  namplt_cd = "006"  namplt_desc = "Cadillac"  model_cd = "6D"  model_name = "Cadillac DTS"  selling_cntry = "GBPAE^GBPBH^GBPJO^GBPKW^GBPLB^GBPOM^GBPQA^GBPSA^GBPSY"  segments = "Sedan^Luxury"  min_price = "187259^19435^73238^15130^80456^19908^185882^156815^0"  max_price = "211478^21936^82992^17141^90922^22462^209806^178592^0"  currency_symbol = "AED^BHD^JD^KD^US$^OR^QR^Saudi Riyal^Syrian Currency"  corner_pt = "5000^500^2500^500^500^500^5000^5000^2500"  more_info = "The power. The technology. And the prestige synonymous with Cadillac, DeVeille embodies it all as the world&apos;s favorite luxury sedan. And for 2003, DeVille sets the technological standard. Consided Night Vision, the revers 4.6l Northstar V8, Ultrasonic Rear Parking Assit, and StabiliTrak as only DeVille presents them."  campaign_country = ""  campaign_flag = "" service_available ="TD^RB"/> <Model  namplt_cd = "006"  namplt_desc = "Cadillac"  model_cd = "6R"  model_name = "Cadillac SRX"  selling_cntry = "GBPAE^GBPBH^GBPJO^GBPKW^GBPLB^GBPOM^GBPQA^GBPSA^GBPSY"  segments = "Luxury"  min_price = "0^0^0^0^0^0^0^0^0"  max_price = "0^0^0^0^0^0^0^0^0"  currency_symbol = "AED^BHD^JD^KD^US$^OR^QR^Saudi Riyal^Syrian Currency"  corner_pt = "5000^500^2500^500^500^500^5000^5000^2500"  more_info = ""  campaign_country = ""  campaign_flag = "" service_available ="TD^RB"/> <Model  namplt_cd = "006"  namplt_desc = "Cadillac"  model_cd = "6E"  model_name = "Cadillac Escalade"  selling_cntry = "GBPAE^GBPBH^GBPJO^GBPKW^GBPLB^GBPOM^GBPQA^GBPSA^GBPSY"  segments = "4x4^Luxury"  min_price = "211278^21821^82543^17048^91112^22344^208704^189138^0"  max_price = "211278^21821^82543^17048^91112^22344^208704^189138^0"  currency_symbol = "AED^BHD^JD^KD^US$^OR^QR^Saudi Riyal^Syrian Currency"  corner_pt = "5000^500^2500^500^500^500^5000^5000^2500"  more_info = "With a 345-horsepower engine, Escalade is the world&apos;s most powerful SUV and it has the muscle to back up its bold, distinctive style."  campaign_country = ""  campaign_flag = "" service_available ="TD^RB"/> <Model  namplt_cd = "006"  namplt_desc = "Cadillac"  model_cd = "6X"  model_name = "Cadillac Escalade EXT"  selling_cntry = "GBPAE^GBPBH^GBPJO^GBPKW^GBPLB^GBPOM^GBPQA^GBPSA^GBPSY"  segments = "4x4^Luxury"  min_price = "181000^18500^0^0^0^19000^179000^183000^0"  max_price = "181000^18500^0^0^0^19000^179000^183000^0"  currency_symbol = "AED^BHD^JD^KD^US$^OR^QR^Saudi Riyal^Syrian Currency"  corner_pt = "5000^500^2500^500^500^500^5000^5000^2500"  more_info = ""  campaign_country = ""  campaign_flag = "" service_available ="TD^RB"/> <Model  namplt_cd = "006"  namplt_desc = "Cadillac"  model_cd = "6V"  model_name = "Cadillac Escalade ESV"  selling_cntry = "GBPAE^GBPBH^GBPJO^GBPKW^GBPLB^GBPOM^GBPQA^GBPSA^GBPSY"  segments = "4x4^Luxury"  min_price = "201000^20500^0^0^0^21000^198000^205000^0"  max_price = "201000^20500^0^0^0^21000^198000^205000^0"  currency_symbol = "AED^BHD^JD^KD^US$^OR^QR^Saudi Riyal^Syrian Currency"  corner_pt = "5000^500^2500^500^500^500^5000^5000^2500"  more_info = ""  campaign_country = ""  campaign_flag = "" service_available ="TD^RB"/> </ModelMaster> <ModelMaster><Model  namplt_cd = "015"  namplt_desc = "SAAB"  model_cd = "SC"  model_name = "SAAB 9-3 Convertible"  selling_cntry = "GBPAE^GBPBH^GBPJO^GBPKW^GBPLB^GBPOM^GBPQA^GBPSA^GBPSY"  segments = "Sedan^Sports/coupe^Luxury"  min_price = "96000^11200^0^0^34880^10400^108999^102000^0"  max_price = "111000^12950^0^0^44150^12000^123999^120000^0"  currency_symbol = "AED^BHD^JD^KD^US$^OR^QR^Saudi Riyal^Syrian Currency"  corner_pt = "5000^500^2500^500^500^500^5000^5000^2500"  more_info = "With the top down, the Saab 9-3 Convertible gives a unique driving experience and a pleasurable sensation of being present. And when the well-insulated top is up, it is comfortable, quiet and warm enough to withstand an Arctic winter. Choose between two turbo engines and three different versions. Added to this, we offer a number of options just so that you can add your own individual appeal to the interior design."  campaign_country = ""  campaign_flag = "" service_available ="TD^RB"/> <Model  namplt_cd = "015"  namplt_desc = "SAAB"  model_cd = "SS"  model_name = "SAAB 9-3 Sports Sedan"  selling_cntry = "GBPAE^GBPBH^GBPJO^GBPKW^GBPLB^GBPOM^GBPQA^GBPSA^GBPSY"  segments = "Sedan^Sports/coupe^Luxury"  min_price = "69000^7950^0^0^24900^7300^79999^75000^0"  max_price = "107500^12650^0^0^37080^11750^121999^117000^0"  currency_symbol = "AED^BHD^JD^KD^US$^OR^QR^Saudi Riyal^Syrian Currency"  corner_pt = "5000^500^2500^500^500^500^5000^5000^2500"  more_info = "Saab 9-3 Sport Sedan is an entirely new car. But at the same time the Saab tradition for innovation, safety and driving characteristics is maintained. Powerful smooth engines, a completely new rear axle and fantastic brakes contribute to ensuring that the Saab 9-3 Sport Sedan is at home on any type of road. You can choose from a variety of Saab Forms and a number of new and exciting features."  campaign_country = ""  campaign_flag = "" service_available ="TD^RB"/> <Model  namplt_cd = "015"  namplt_desc = "SAAB"  model_cd = "SE"  model_name = "SAAB 9-5 Sedan"  selling_cntry = "GBPAE^GBPBH^GBPJO^GBPKW^GBPLB^GBPOM^GBPQA^GBPSA^GBPSY"  segments = "Sedan^Luxury"  min_price = "83000^9650^0^0^33810^8925^94999^89000^0"  max_price = "995000^14300^0^0^50310^13325^135999^133000^0"  currency_symbol = "AED^BHD^JD^KD^US$^OR^QR^Saudi Riyal^Syrian Currency"  corner_pt = "5000^500^2500^500^500^500^5000^5000^2500"  more_info = "Already from the outside you will notice that the Saab 9-5 Sedan is roomy, comfortable and elegant. When you take it out on the road it reveals the other sides of its character with fantastic driving pleasure, excellent performance and world-class safety. Those of you who spend a lot of time behind the wheel will enjoy the Saab 9-5 Sedan. Choose from our different Saab Forms and six turbo engines, two of which are diesel."  campaign_country = ""  campaign_flag = "" service_available ="TD^RB"/> </ModelMaster> <ModelMaster><Model  namplt_cd = "012"  namplt_desc = "GMC"  model_cd = "Select"  model_name = "Select GMC"  selling_cntry = "GBPAE^GBPBH^GBPJO^GBPKW^GBPLB^GBPOM^GBPQA^GBPSA"  segments = "4x4"  min_price = "109533^11312^41647^8611^46932^11599^108197^97163"  max_price = "117404^13359^49629^10256^55496^13689^127773^114867"  currency_symbol = "AED^BHD^JD^KD^US$^OR^QR^Saudi Riyal"  corner_pt = "5000^500^2500^500^500^500^5000^5000"  more_info = "Don&apos;t be deceived by it&apos;s tough looking exterior – riding in an Envoy means experiencing comfort you may never have expected. Its smooth ride, expansive passenger and cargo room, accommodating amenities, quiet interior and smooth engine performance all contribute to the comfort you deserve. Adding to the enjoyment is the optional entertainment system, which includes a DVD player with a flip-down 7-inch color monitor, along with a 6-disc CD player and Bose digital speakers. Envoy has also been designed with the strongest frame and most powerful engine in its class. So you can always experience Envoy&apos;s luxury - with or without the benefit of a road."  campaign_country = ""  campaign_flag = "" service_available ="TD^RB"/> <Model  namplt_cd = "012"  namplt_desc = "GMC"  model_cd = "Enovy"  model_name = "GMC Envoy"  selling_cntry = "GBPAE^GBPBH^GBPJO^GBPKW^GBPLB^GBPOM^GBPQA^GBPSA"  segments = "4x4"  min_price = "109533^11312^41647^8611^46932^11599^108197^97163"  max_price = "117404^13359^49629^10256^55496^13689^127773^114867"  currency_symbol = "AED^BHD^JD^KD^US$^OR^QR^Saudi Riyal"  corner_pt = "5000^500^2500^500^500^500^5000^5000"  more_info = "Don&apos;t be deceived by it&apos;s tough looking exterior – riding in an Envoy means experiencing comfort you may never have expected. Its smooth ride, expansive passenger and cargo room, accommodating amenities, quiet interior and smooth engine performance all contribute to the comfort you deserve. Adding to the enjoyment is the optional entertainment system, which includes a DVD player with a flip-down 7-inch color monitor, along with a 6-disc CD player and Bose digital speakers. Envoy has also been designed with the strongest frame and most powerful engine in its class. So you can always experience Envoy&apos;s luxury - with or without the benefit of a road."  campaign_country = ""  campaign_flag = "" service_available ="TD^RB"/> <Model  namplt_cd = "012"  namplt_desc = "GMC"  model_cd = "EnvoyXL"  model_name = "GMC Envoy XL"  selling_cntry = "GBPAE^GBPBH^GBPJO^GBPKW^GBPLB^GBPOM^GBPQA^GBPSA"  segments = "4x4"  min_price = "0^0^0^0^0^0^0^0"  max_price = "0^0^0^0^0^0^0^0"  currency_symbol = "AED^BHD^JD^KD^US$^OR^QR^Saudi Riyal"  corner_pt = "5000^500^2500^500^500^500^5000^5000"  more_info = "The desirable new Envoy XL features a comfortable third-row seat to accommodate a total of seven occupants. Even being behind the wheel is a delight, especially with the leather-wrapped steering wheel with mounted controls for the audio system, A/C and the Driver Information Center. Meanwhile, Envoy XL&apos;s Vortec 5300 V8 features the new Displacement on Demand (DOD) technology, which deactivates four of the eight cylinders when extra power is not needed. This helps you conserve fuel because you consume only the amount of power you need. But when you&apos;re feeling adventurous, its 324 hp lets you flaunt Envoy XL&apos;s good looks virtually anywhere – if you can stand the attention, that is."  campaign_country = ""  campaign_flag = "" service_available ="TD^RB"/><Model  namplt_cd = "012"  namplt_desc = "GMC"  model_cd = "Yukon"  model_name = "GMC Yukon"  selling_cntry = "GBPAE^GBPBH^GBPJO^GBPKW^GBPLB^GBPOM^GBPQA^GBPSA"  segments = "4x4"  min_price = "128387^13260^0^10167^55291^13593^126821^113858"  max_price = "151475^15644^0^12083^65268^16028^149627^134483"  currency_symbol = "AED^BHD^JD^KD^US$^OR^QR^Saudi Riyal"  corner_pt = "5000^500^2500^500^500^500^5000^5000"  more_info = "Yukon is the ultimate in power and comfort. From its 327-horsepower Vortec 5300 V8 to its rugged ladder-frame chassis and advanced four-wheel drive system, Yukon is the most capable 4x4 in its class. But while it&apos;s fully equipped for rugged challenges, Yukon&apos;s redesigned interior provides high levels of safety and comfort, making any adventure a truly enjoyable experience."  campaign_country = ""  campaign_flag = "" service_available ="TD^RB"/> <Model  namplt_cd = "012"  namplt_desc = "GMC"  model_cd = "YukonXL"  model_name = "GMC Yukon XL"  selling_cntry = "GBPAE^GBPBH^GBPJO^GBPKW^GBPLB^GBPOM^GBPQA^GBPSA"  segments = "4x4"  min_price = "141806^0^0^11281^61090^15027^140076^125846"  max_price = "216031^0^0^17442^93164^22856^213395^192153"  currency_symbol = "AED^BHD^JD^KD^US$^OR^QR^Saudi Riyal"  corner_pt = "5000^500^2500^500^500^500^5000^5000"  more_info = "Challengers come and go, but legends live on. As do the Suburban and Suburban Denali. At the top of the lineup is the incredible Vortec 8100 V8 engine, pumping 356 hp and 476 lb-ft of torque. More than powerful, Suburban maintains its reputation as a family vehicle, thanks to a comprehensive safety package and an inviting interior that features spacious seating, an optional DVD entertainment system and a six-disc in-dash CD changer. Suburban Denali, on the other hand, offers top-of-the-line luxury. Few competitors can match its plush interior and none can compete with its array of refined amenities. Versatile, reliable, and remarkably comfortable, the Suburban and Suburban Denali remain the Middle East s most ideal family SUVs. "  campaign_country = ""  campaign_flag = "" service_available ="TD^RB"/><Model  namplt_cd = "012"  namplt_desc = "GMC"  model_cd = "YukonDenali"  model_name = "GMC Yukon Denali"  selling_cntry = "GBPAE^GBPBH^GBPJO^GBPKW^GBPLB^GBPOM^GBPQA^GBPSA"  segments = "4x4"  min_price = "109533^11312^41647^8611^46932^11599^108197^97163"  max_price = "117404^13359^49629^10256^55496^13689^127773^114867"  currency_symbol = "AED^BHD^JD^KD^US$^OR^QR^Saudi Riyal"  corner_pt = "5000^500^2500^500^500^500^5000^5000"  more_info = "Don&apos;t be deceived by it&apos;s tough looking exterior – riding in an Envoy means experiencing comfort you may never have expected. Its smooth ride, expansive passenger and cargo room, accommodating amenities, quiet interior and smooth engine performance all contribute to the comfort you deserve. Adding to the enjoyment is the optional entertainment system, which includes a DVD player with a flip-down 7-inch color monitor, along with a 6-disc CD player and Bose digital speakers. Envoy has also been designed with the strongest frame and most powerful engine in its class. So you can always experience Envoy&apos;s luxury - with or without the benefit of a road."  campaign_country = ""  campaign_flag = "" service_available ="TD^RB"/><Model  namplt_cd = "012"  namplt_desc = "GMC"  model_cd = "YukonXLDenali"  model_name = "GMC Yukon XL Denali"  selling_cntry = "GBPAE^GBPBH^GBPJO^GBPKW^GBPLB^GBPOM^GBPQA^GBPSA"  segments = "4x4"  min_price = "141806^0^0^11281^61090^15027^140076^125846"  max_price = "216031^0^0^17442^93164^22856^213395^192153"  currency_symbol = "AED^BHD^JD^KD^US$^OR^QR^Saudi Riyal"  corner_pt = "5000^500^2500^500^500^500^5000^5000"  more_info = "Challengers come and go, but legends live on. As do the Suburban and Suburban Denali. At the top of the lineup is the incredible Vortec 8100 V8 engine, pumping 356 hp and 476 lb-ft of torque. More than powerful, Suburban maintains its reputation as a family vehicle, thanks to a comprehensive safety package and an inviting interior that features spacious seating, an optional DVD entertainment system and a six-disc in-dash CD changer. Suburban Denali, on the other hand, offers top-of-the-line luxury. Few competitors can match its plush interior and none can compete with its array of refined amenities. Versatile, reliable, and remarkably comfortable, the Suburban and Suburban Denali remain the Middle East s most ideal family SUVs. "  campaign_country = ""  campaign_flag = "" service_available ="TD^RB"/>&lt;Model namplt_cd = &quot;012&quot; namplt_desc = &quot;GMC&quot; model_cd = &quot;4D&quot; model_name = &quot;GMC Yukon Denali &quot; selling_cntry = &quot;GBPAE^GBPBH^GBPJO^GBPKW^GBPLB^GBPOM^GBPQA^GBPSA&quot; segments = &quot;4x4&quot; min_price = &quot;141806^0^0^11281^61090^15027^140076^125846&quot; max_price = &quot;216031^0^0^17442^93164^22856^213395^192153&quot; currency_symbol = &quot;AED^BHD^JD^KD^US$^OR^QR^Saudi Riyal&quot; corner_pt = &quot;5000^500^2500^500^500^500^5000^5000&quot; more_info = &quot;Challengers come and go, but legends live on. As do the Suburban and Suburban Denali. At the top of the lineup is the incredible Vortec 8100 V8 engine, pumping 356 hp and 476 lb-ft of torque. More than powerful, Suburban maintains its reputation as a family vehicle, thanks to a comprehensive safety package and an inviting interior that features spacious seating, an optional DVD entertainment system and a six-disc in-dash CD changer. Suburban Denali, on the other hand, offers top-of-the-line luxury. Few competitors can match its plush interior and none can compete with its array of refined amenities. Versatile, reliable, and remarkably comfortable, the Suburban and Suburban Denali remain the Middle East s most ideal family SUVs. &quot; campaign_country = &quot;&quot; campaign_flag = &quot;&quot; service_available =&quot;TD^RB&quot;/&gt;&lt;Model namplt_cd = &quot;012&quot; namplt_desc = &quot;GMC&quot; model_cd = &quot;4U&quot; model_name = &quot;GMC Yukon XL Denali &quot; selling_cntry = &quot;GBPAE^GBPBH^GBPJO^GBPKW^GBPLB^GBPOM^GBPQA^GBPSA&quot; segments = &quot;4x4&quot; min_price = &quot;141806^0^0^11281^61090^15027^140076^125846&quot; max_price = &quot;216031^0^0^17442^93164^22856^213395^192153&quot; currency_symbol = &quot;AED^BHD^JD^KD^US$^OR^QR^Saudi Riyal&quot; corner_pt = &quot;5000^500^2500^500^500^500^5000^5000&quot; more_info = &quot;Challengers come and go, but legends live on. As do the s and Suburban Denali. At the top of the lineup is the incredible Vortec 8100 V8 engine, pumping 356 hp and 476 lb-ft of torque. More than powerful, Suburban maintains its reputation as a family vehicle, thanks to a comprehensive safety package and an inviting interior that features spacious seating, an optional DVD entertainment system and a six-disc in-dash CD changer. Suburban Denali, on the other hand, offers top-of-the-line luxury. Few competitors can match its plush interior and none can compete with its array of refined amenities. Versatile, reliable, and remarkably comfortable, the Suburban and Suburban Denali remain the Middle East s most ideal family SUVs. &quot; campaign_country = &quot;&quot; campaign_flag = &quot;&quot; service_available =&quot;TD^RB&quot;/&gt; </ModelMaster> <ModelMaster><Model  namplt_cd = "018"  namplt_desc = "Hummer"  model_cd = "8J"  model_name = "Hummer H3"  selling_cntry = "GBPAE^GBPBH^GBPJO^GBPKW^GBPLB^GBPOM^GBPSA"  segments = "4x4^Luxury"  min_price = "0^0^0^0^0^0"  max_price = "0^0^0^0^0^0"  currency_symbol = "BHD^JD^KD^US$^OR^Saudi Riyal"  corner_pt = "500^2500^500^500^500^5000"  more_info = ""  campaign_country = ""  campaign_flag = "" service_available ="TD^RB"/><Model  namplt_cd = "018"  namplt_desc = "Hummer"  model_cd = "8S"  model_name = "Hummer H2 SUT"  selling_cntry = "GBPAE^GBPBH^GBPJO^GBPKW^GBPLB^GBPOM^GBPSA"  segments = "4x4^Luxury"  min_price = "0^0^0^0^0^0"  max_price = "0^0^0^0^0^0"  currency_symbol = "BHD^JD^KD^US$^OR^Saudi Riyal"  corner_pt = "500^2500^500^500^500^5000"  more_info = ""  campaign_country = ""  campaign_flag = "" service_available ="TD^RB"/> <Model  namplt_cd = "018"  namplt_desc = "Hummer"  model_cd = "8H"  model_name = "Hummer H2"  selling_cntry = "GBPAE^GBPBH^GBPJO^GBPKW^GBPLB^GBPOM^GBPQA^GBPSA"  segments = "4x4^Luxury"  min_price = "0^0^0^0^0^0^0"  max_price = "0^0^0^0^0^0^0"  currency_symbol = "BHD^JD^KD^US$^OR^QR^Saudi Riyal"  corner_pt = "500^2500^500^500^500^5000^5000"  more_info = ""  campaign_country = ""  campaign_flag = "" service_available ="TD^RB"/> </ModelMaster> <ModelMaster><Model  namplt_cd = "019"  namplt_desc = "Opel"  model_cd = "OC"  model_name = "Opel Corsa"  selling_cntry = "GBPAE^GBPBH^GBPJO^GBPKW^GBPLB^GBPOM^GBPQA^GBPSA^GBPSY"  segments = "HatchBack^Sedan"  min_price = "36000^3683^11000^2960^0^3761^35560^36635^0"  max_price = "46000^4706^11000^3782^0^4806^45438^46811^0"  currency_symbol = "AED^BHD^JD^KD^US$^OR^QR^Saudi Riyal^Syrian Currency"  corner_pt = "5000^500^2500^500^500^500^5000^5000^2500"  more_info = "The Opel Corsa - a car small enough to fit into your life, yet big enough to fit your life into."  campaign_country = ""  campaign_flag = "" service_available ="TD^RB"/> <Model  namplt_cd = "019"  namplt_desc = "Opel"  model_cd = "OB"  model_name = "Opel Astra Cabrio"  selling_cntry = "GBPJO^GBPLB^GBPSY"  segments = "Sports/coupe"  min_price = "0^0^0"  max_price = "0^0^0"  currency_symbol = "JD^US$^Syrian Currency"  corner_pt = "2500^500^2500"  more_info = ""  campaign_country = ""  campaign_flag = "" service_available ="TD^RB"/> <Model  namplt_cd = "019"  namplt_desc = "Opel"  model_cd = "OA"  model_name = "Opel Astra"  selling_cntry = "GBPAE^GBPBH^GBPJO^GBPKW^GBPLB^GBPOM^GBPQA^GBPSA^GBPSY^GBPEG"  segments = "Sedan^HatchBack^Wagon"  min_price = "50000^5115^11700^4111^0^5224^49389^50882^0^0"  max_price = "50000^5115^11700^4111^0^5224^49389^50882^0^0"  currency_symbol = "AED^BHD^JD^KD^US$^OR^QR^Saudi Riyal^Syrian Currency^EG"  corner_pt = "5000^500^2500^500^500^500^5000^5000^2500^2500"  more_info = "A triumph of form and function, designed to exceed your expectations, not your budget."  campaign_country = ""  campaign_flag = "" service_available ="TD^RB"/> <Model  namplt_cd = "019"  namplt_desc = "Opel"  model_cd = "OZ"  model_name = "Opel Zafira"  selling_cntry = "GBPJO^GBPLB^GBPSY"  segments = "Van"  min_price = "16000^0^0"  max_price = "16000^0^0"  currency_symbol = "JD^US$^Syrian Currency"  corner_pt = "2500^500^2500"  more_info = ""  campaign_country = ""  campaign_flag = "" service_available ="TD^RB"/> <Model  namplt_cd = "019"  namplt_desc = "Opel"  model_cd = "OV"  model_name = "Opel Vectra"  selling_cntry = "GBPAE^GBPBH^GBPJO^GBPKW^GBPLB^GBPOM^GBPQA^GBPSA^GBPSY^GBPEG"  segments = "Sedan^HatchBack"  min_price = "67000^6855^22000^5509^0^7000^66182^68182^0^0"  max_price = "77000^7878^22000^6331^0^8045^76060^78358^0^0"  currency_symbol = "AED^BHD^JD^KD^US$^OR^QR^Saudi Riyal^Syrian Currency^EG"  corner_pt = "5000^500^2500^500^500^500^5000^5000^2500^2500"  more_info = "Whatever you look for in a car, there is an Opel Vectra that will help you make the right moves to realising your dreams.Explore the world of the Opel Vectra and discover how Vectra suits your driving needs with quality, safety and style."  campaign_country = ""  campaign_flag = "" service_available ="TD^RB"/> <Model  namplt_cd = "019"  namplt_desc = "Opel"  model_cd = "OS"  model_name = "Opel Signum"  selling_cntry = "GBPAE^GBPBH^GBPJO^GBPKW^GBPLB^GBPOM^GBPQA^GBPSA^GBPSY"  segments = "HatchBack"  min_price = "0^0^0^0^0^0^0^0^0"  max_price = "0^0^0^0^0^0^0^0^0"  currency_symbol = "AED^BHD^JD^KD^US$^OR^QR^Saudi Riyal^Syrian Currency"  corner_pt = "5000^500^2500^500^500^500^5000^5000^2500"  more_info = "Signum heralds a revolution in automotive architecture. Based on its extra-long wheelbase, Signum delivers a new concept in interior space, individual flexibility and driving refinement."  campaign_country = ""  campaign_flag = "" service_available ="TD^RB"/> <Model  namplt_cd = "019"  namplt_desc = "Opel"  model_cd = "OM"  model_name = "Opel Combo"  selling_cntry = "GBPJO^GBPLB^GBPSY"  segments = "Van"  min_price = "0^0^0"  max_price = "0^0^0"  currency_symbol = "JD^US$^Syrian Currency"  corner_pt = "2500^500^2500"  more_info = ""  campaign_country = ""  campaign_flag = "" service_available ="TD^RB"/> </ModelMaster></hi>';
			

		

function Fn_XMLModelPopulation()
{


 xmlDoc.async="false";
 xmlDoc.loadXML(eng);
 xmlObj1=xmlDoc.documentElement;
 tem=document.formpage.Model.options.length
 document.formpage.Model.length=0
 var n=0;
for (i=0;i<xmlObj1.getElementsByTagName("Model").length;i++)
{
	if(xmlObj1.getElementsByTagName("Model")[i].getAttribute("namplt_cd")==document.formpage.Brand.value)
	{
	var temp1=xmlObj1.getElementsByTagName("Model")[i].getAttribute("model_name")
	var tempMcd=xmlObj1.getElementsByTagName("Model")[i].getAttribute("model_cd")
	//alert(xmlObj1.getElementsByTagName("Model")[i].getAttribute("selling_cntry").indexOf(cntry_cd));
	if(xmlObj1.getElementsByTagName("Model")[i].getAttribute("selling_cntry").indexOf(cntry_cd)>=0)
		{

					document.formpage.Model.options[n] = new Option(temp1,tempMcd);
					if(n==0)
						{
							var mcode=temp1;
						}
					n=n+1;
		}
	}
}

	if (document.formpage.Brand.selectedIndex==0){
		
		var txt  = document.getElementById("tr_service");
		txt.style.display = 'none';

		// ----- Hiding the Request selection label---------
		var txt  = document.getElementById("id_head");
		txt.style.display = 'none';

		var txt  = document.getElementById("tr_submit");
		txt.style.display = 'none';

		 document.formpage.Model.length = 0;
		 document.formpage.Model.options[0]=new Option("Select");
		 document.formpage.Model.options[0].value="";
		 return ;
	}

Fn_Servicepopulation(mcode);
}


var curHost = self.location.host;
var param = self.location.search;
function Fn_Servicepopulation(model)
{
//clearing original
	var txt  = document.getElementById("tr_service");
	if(cntry_cd!="EG")
		txt.style.display = "block";
	
	var tbl  = document.getElementById('id_head');
	tbl.style.display='block';
		
	var tbl  = document.getElementById('tr_submit');
	tbl.style.display='block';
			
	var tbl  = document.getElementById('id_selectall');
	tbl.style.display='none';

			//var cols= tbl.getElementsByTagName('td');
		//	  for (var row=0; row<cols.length;row++) 
		//	  {
			//	cols[row].style.display='none';
			//   }
			var tbl  = document.getElementById('id_clearall');
									tbl.style.display='none';
 	/*var cols= tbl.getElementsByTagName('td');
			  for (var row=0; row<cols.length;row++) 
			  {
				cols[row].style.display='none';
			   }
	*/	 
			var tbl  = document.getElementById('id_SO');
									tbl.style.display='none';

	/*		var cols= tbl.getElementsByTagName('td');
			  for (var row=0; row<cols.length;row++) 
			  {
				cols[row].style.display='none';
			   }*/
			var tbl  = document.getElementById('id_TD');
									tbl.style.display='none';

		/*	var cols= tbl.getElementsByTagName('td');
			  for (var row=0; row<cols.length;row++) 
			  {
				cols[row].style.display='none';
			   }*/
			var tbl  = document.getElementById('id_RB');
									tbl.style.display='none';

			/*var cols= tbl.getElementsByTagName('td');
		  for (var row=0; row<cols.length;row++) 
			  {
				cols[row].style.display='none';
			 }*/
			var tbl  = document.getElementById('id_SA');
									tbl.style.display='none';

		/*	var cols= tbl.getElementsByTagName('td');
			  for (var row=0; row<cols.length;row++) 
			  {
				cols[row].style.display='none';
			 }*/
			var tbl  = document.getElementById('id_To');
									tbl.style.display='none';

		/*	var cols= tbl.getElementsByTagName('td');
			  for (var row=0; row<cols.length;row++) 
			  {
				cols[row].style.display='none';
			 }
*/

			var tbl  = document.getElementById('id_BM');
									tbl.style.display='none';
/*
			var cols= tbl.getElementsByTagName('td');

			  for (var row=0; row<cols.length;row++) 
			  {
				cols[row].style.display='none';
			}*/
	// ******code for service population******
	xmlDoc.async="false";
//alert(model)
 xmlDoc.loadXML(eng);
 xmlObj1=xmlDoc.documentElement;
 var service =new Array()
 for (i=0;i<xmlObj1.getElementsByTagName("Model").length;i++)
{

	 if(xmlObj1.getElementsByTagName("Model")[i].getAttribute("model_cd")==model)

	{
	service[i]=xmlObj1.getElementsByTagName("Model")[i].getAttribute("service_available");
	//alert(service[i]+i)
	var valueRequest=service[i].split("^");
		for(j1=0;j1<valueRequest.length;j1++)
	{

		if (valueRequest[j1]=="TD")
		{
			var tbl  = document.getElementById('id_TD');
			if(cntry_cd=="EG")
			{
			tbl.style.display='none';
			}
			else{
			tbl.style.display='block';
			}

			var cols= tbl.getElementsByTagName('td');

		  for (var row=0; row<cols.length;row++) 
			  {
				cols[row].style.display='block';
			   }
		}
		//RB
		if (valueRequest[j1]=="RB")
		{

			var tbl  = document.getElementById('id_RB');
			tbl.style.display='block';

			var cols= tbl.getElementsByTagName('td');

		  for (var row=0; row<cols.length;row++) 
			  {
				cols[row].style.display='block';
			 }
		}

//sa
		if (valueRequest[j1]=="SA")
		{

			var tbl  = document.getElementById('id_SA');
									tbl.style.display='block';

			var cols= tbl.getElementsByTagName('td');

	  for (var row=0; row<cols.length;row++) 
		  {
			cols[row].style.display='block';
		 }
		}



//TO
if (valueRequest[j1]=="TO")
		{

			var tbl  = document.getElementById('id_To');
									tbl.style.display='block';

			var cols= tbl.getElementsByTagName('td');

	  for (var row=0; row<cols.length;row++) 
		  {
			cols[row].style.display='block';
		 }
		}


//BM
if (valueRequest[j1]=="BM")
		{

			var tbl  = document.getElementById('id_BM');
									tbl.style.display='block';

			var cols= tbl.getElementsByTagName('td');

	  for (var row=0; row<cols.length;row++) 
		  {
			cols[row].style.display='block';
		 }
		}


//SO
if (valueRequest[j1]=="SO")
		{

			var tbl  = document.getElementById('id_SO');
									tbl.style.display='block';

			var cols= tbl.getElementsByTagName('td');

	  for (var row=0; row<cols.length;row++) 
		  {
			cols[row].style.display='block';
		 }
		}


	}

//select and clearall links
	var tbl  = document.getElementById('id_selectall');
	tbl.style.display = 'block';
	var cols= tbl.getElementsByTagName('td');
		 for (var row=0; row<cols.length;row++) 
			  {
				cols[row].style.display='block';
			   }


	var tbl  = document.getElementById('id_clearall');
	tbl.style.display = 'block';
	
			var cols= tbl.getElementsByTagName('td');
		  for (var row=0; row<cols.length;row++) 
			  {
				cols[row].style.display='block';
			   }

	}
}
}

function Fn_BrandModelPopulation()
{

		NampltCd="999" 
	
	
	//---checking to hide the Brand dropdown when coming from brand/Model---
	if (NampltCd == "999"){
		Fn_XMLModelPopulation();

	}
	if (NampltCd != "999")
	{	//alert("the brand site"+NampltCd);
		document.formpage.Brand.value=NampltCd;
		document.formpage.Brand.disabled=false;
		document.formpage.Brand.visible=true;
		Fn_XMLModelPopulation();
		}

	
			MMD="";
		
			FormPage="BMS";
		
			FuncID="TD";
		

	
	if(MMD.length>0)
	{
		strModelCd=MMD.substring(0,2);
		//alert("model page"+strModelCd);
		document.formpage.Model.value=strModelCd;
		Fn_Servicepopulation(strModelCd);
		//document.formpage.Model.disabled=true;

		document.formpage.Model.visible=false;
	}
	preselect(document.formpage.checkbox);
}
	

//var NampltCd="";
var ModelCode="";
var FuncID="";

FuncID='TD';
var lang_cd="en";

function sub(field) {
	
		document.getElementById("TH_alertField").innerHTML="";
		document.getElementById("id_services_alertField").innerHTML="";
		document.getElementById("id_brand_alertField").innerHTML="";
			var tbl  = document.getElementById('table');
			var cols= tbl.getElementsByTagName('tr');
		  for (var row=0; row<cols.length;row++) 
			  {
				cols[row].style.display='block';
			   }

	     if(document.formpage.Brand.value==0)
			{
	
	//	alert('Brand Not Available');
		document.getElementById("TH_alertField").innerHTML="<font color='red'><b>Errors</b></font>";
		document.getElementById("id_brand_alertField").innerHTML="Please Select a Brand";
		document.formpage.Brand.focus();
		}else
		{

		var queryParam = "";
		for (i = 0; i < field.length; i++)
		{
			if(field[i].checked == true){
			queryParam=queryParam+"^"+field[i].value;
			}
		}
if (queryParam=="")
{
		document.getElementById("TH_alertField").innerHTML="<font color='red'><b>Errors</b></font>";
		document.getElementById("id_services_alertField").innerHTML="Check atleast one option";

	//alert("Check atleast one option");
}	
else
	{

		document.getElementById("TH_alertField").innerHTML="";
		document.getElementById("id_services_alertField").innerHTML="";
		document.getElementById("id_brand_alertField").innerHTML="";
		var tbl  = document.getElementById('table');
			var cols= tbl.getElementsByTagName('tr');

		  for (var row=0; row<cols.length;row++) 
			  {
				cols[row].style.display='none';
			   }

//formpage.action="detail.asp";
queryParam=queryParam.substring(1);

//---------21.05.05  sending values to next page---------------
document.formpage.txtBrand.value = document.formpage.Brand.options[document.formpage.Brand.selectedIndex].text;
document.formpage.txtModel.value = document.formpage.Model.options[document.formpage.Model.selectedIndex].text;

action="/action/vlCNInputAction?pageID=TD&cntry_cd="+cntry_cd+"&lang_cd="+lang_cd+"&website_cd=GBPSA&MMNAMPLT="+NampltCd+"&MerchModlDesgtr="+document.formpage.txtModel.value+"&FormPage=FRM&FuncID="+document.formpage.txtBrand.value+"&serviceID="+queryParam+"&dlrname="+document.formpage.Brand.value+"&dlrId="+dlrId+"&campInfo="+campInfo+"&ID="+ID;
location.href=action;
}
}
}

function checkAll(field)
{
for (i = 0; i < field.length; i++)
	field[i].checked = true ;
}

function uncheckAll(field)
{
for (i = 0; i < field.length; i++)
	field[i].checked = false ;
}

function preselect(field){
for (i = 0; i < field.length; i++)
	if(FuncID==field[i].value){
	field[i].checked = true;
	}
}
