window.onload = function() {
	// BEGIN VARS FOR FLASH DETECTION
	var requiredMajorVersion = 8;
	var requiredMinorVersion = 0;
	var requiredRevision = 0;
	var hasReqestedVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);
	// END VARS FOR FLASH DETECTION
	
	// Check to see if the version meets the requirements for playback
	if (hasReqestedVersion) {
		showHome();
	} else {
		window.location = "../";
	}
	
	cobaltRemarketingTag();
	
	elem = document.body;
    iframe = document.createElement("div");
    iframe.id = "SEEiframe";
	iframe.innerHTML = "<iframe src=\"http://www.lexus.com/yourlexusdealer/SSE.html\" width=\"1\" height=\"1\" style=\"border:0;\"></iframe>";
    elem.appendChild(iframe);
}

// Flash Player Version Detection - Rev 1.6
// Detect Client Browser type
// Copyright(c) 2005-2006 Adobe Macromedia Software, LLC. All rights reserved.
var isIE  = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;
var isWin = (navigator.appVersion.toLowerCase().indexOf("win") != -1) ? true : false;
var isOpera = (navigator.userAgent.indexOf("Opera") != -1) ? true : false;

function ControlVersion()
{
	var version;
	var axo;
	var e;

	// NOTE : new ActiveXObject(strFoo) throws an exception if strFoo isn't in the registry

	try {
		// version will be set for 7.X or greater players
		axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");
		version = axo.GetVariable("$version");
	} catch (e) {
	}

	if (!version)
	{
		try {
			// version will be set for 6.X players only
			axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
			
			// installed player is some revision of 6.0
			// GetVariable("$version") crashes for versions 6.0.22 through 6.0.29,
			// so we have to be careful. 
			
			// default to the first public version
			version = "WIN 6,0,21,0";

			// throws if AllowScripAccess does not exist (introduced in 6.0r47)		
			axo.AllowScriptAccess = "always";

			// safe to call for 6.0r47 or greater
			version = axo.GetVariable("$version");

		} catch (e) {
		}
	}

	if (!version)
	{
		try {
			// version will be set for 4.X or 5.X player
			axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");
			version = axo.GetVariable("$version");
		} catch (e) {
		}
	}

	if (!version)
	{
		try {
			// version will be set for 3.X player
			axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");
			version = "WIN 3,0,18,0";
		} catch (e) {
		}
	}

	if (!version)
	{
		try {
			// version will be set for 2.X player
			axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
			version = "WIN 2,0,0,11";
		} catch (e) {
			version = -1;
		}
	}
	
	return version;
}

// JavaScript helper required to detect Flash Player PlugIn version information
function GetSwfVer(){
	// NS/Opera version >= 3 check for Flash plugin in plugin array
	var flashVer = -1;
	
	if (navigator.plugins != null && navigator.plugins.length > 0) {
		if (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]) {
			var swVer2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : "";
			var flashDescription = navigator.plugins["Shockwave Flash" + swVer2].description;
			var descArray = flashDescription.split(" ");
			var tempArrayMajor = descArray[2].split(".");			
			var versionMajor = tempArrayMajor[0];
			var versionMinor = tempArrayMajor[1];
			var versionRevision = descArray[3];
			if (versionRevision == "") {
				versionRevision = descArray[4];
			}
			if (versionRevision[0] == "d") {
				versionRevision = versionRevision.substring(1);
			} else if (versionRevision[0] == "r") {
				versionRevision = versionRevision.substring(1);
				if (versionRevision.indexOf("d") > 0) {
					versionRevision = versionRevision.substring(0, versionRevision.indexOf("d"));
				}
			}
			var flashVer = versionMajor + "." + versionMinor + "." + versionRevision;
		}
	}
	// MSN/WebTV 2.6 supports Flash 4
	else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.6") != -1) flashVer = 4;
	// WebTV 2.5 supports Flash 3
	else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.5") != -1) flashVer = 3;
	// older WebTV supports Flash 2
	else if (navigator.userAgent.toLowerCase().indexOf("webtv") != -1) flashVer = 2;
	else if ( isIE && isWin && !isOpera ) {
		flashVer = ControlVersion();
	}	
	return flashVer;
}

// When called with reqMajorVer, reqMinorVer, reqRevision returns true if that version or greater is available
function DetectFlashVer(reqMajorVer, reqMinorVer, reqRevision)
{
	versionStr = GetSwfVer();
	if (versionStr == -1 ) {
		return false;
	} else if (versionStr != 0) {
		if(isIE && isWin && !isOpera) {
			// Given "WIN 2,0,0,11"
			tempArray         = versionStr.split(" "); 	// ["WIN", "2,0,0,11"]
			tempString        = tempArray[1];			// "2,0,0,11"
			versionArray      = tempString.split(",");	// ['2', '0', '0', '11']
		} else {
			versionArray      = versionStr.split(".");
		}
		var versionMajor      = versionArray[0];
		var versionMinor      = versionArray[1];
		var versionRevision   = versionArray[2];

        	// is the major.revision >= requested major.revision AND the minor version >= requested minor
		if (versionMajor > parseFloat(reqMajorVer)) {
			return true;
		} else if (versionMajor == parseFloat(reqMajorVer)) {
			if (versionMinor > parseFloat(reqMinorVer))
				return true;
			else if (versionMinor == parseFloat(reqMinorVer)) {
				if (versionRevision >= parseFloat(reqRevision))
					return true;
			}
		}
		return false;
	}
}

function AC_AddExtension(src, ext)
{
  if (src.indexOf('?') != -1)
    return src.replace(/\?/, ext+'?'); 
  else
    return src + ext;
}

function AC_Generateobj(objAttrs, params, embedAttrs) 
{ 
    var str = '';
    if (isIE && isWin && !isOpera)
    {
  		str += '<object ';
  		for (var i in objAttrs)
  			str += i + '="' + objAttrs[i] + '" ';
  		for (var i in params)
  			str += '><param name="' + i + '" value="' + params[i] + '" /> ';
  		str += '></object>';
    } else {
  		str += '<embed ';
  		for (var i in embedAttrs)
  			str += i + '="' + embedAttrs[i] + '" ';
  		str += '> </embed>';
    }

    document.write(str);
}

function AC_FL_RunContent(){
  var ret = 
    AC_GetArgs
    (  arguments, ".swf", "movie", "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
     , "application/x-shockwave-flash"
    );
  AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
}

function AC_GetArgs(args, ext, srcParamName, classid, mimeType){
  var ret = new Object();
  ret.embedAttrs = new Object();
  ret.params = new Object();
  ret.objAttrs = new Object();
  for (var i=0; i < args.length; i=i+2){
    var currArg = args[i].toLowerCase();    

    switch (currArg){	
      case "classid":
        break;
      case "pluginspage":
        ret.embedAttrs[args[i]] = args[i+1];
        break;
      case "src":
      case "movie":	
        args[i+1] = AC_AddExtension(args[i+1], ext);
        ret.embedAttrs["src"] = args[i+1];
        ret.params[srcParamName] = args[i+1];
        break;
      case "onafterupdate":
      case "onbeforeupdate":
      case "onblur":
      case "oncellchange":
      case "onclick":
      case "ondblClick":
      case "ondrag":
      case "ondragend":
      case "ondragenter":
      case "ondragleave":
      case "ondragover":
      case "ondrop":
      case "onfinish":
      case "onfocus":
      case "onhelp":
      case "onmousedown":
      case "onmouseup":
      case "onmouseover":
      case "onmousemove":
      case "onmouseout":
      case "onkeypress":
      case "onkeydown":
      case "onkeyup":
      case "onload":
      case "onlosecapture":
      case "onpropertychange":
      case "onreadystatechange":
      case "onrowsdelete":
      case "onrowenter":
      case "onrowexit":
      case "onrowsinserted":
      case "onstart":
      case "onscroll":
      case "onbeforeeditfocus":
      case "onactivate":
      case "onbeforedeactivate":
      case "ondeactivate":
      case "type":
      case "codebase":
        ret.objAttrs[args[i]] = args[i+1];
        break;
      case "id":
      case "width":
      case "height":
      case "align":
      case "vspace": 
      case "hspace":
      case "class":
      case "title":
      case "accesskey":
      case "name":
      case "tabindex":
        ret.embedAttrs[args[i]] = ret.objAttrs[args[i]] = args[i+1];
        break;
      default:
        ret.embedAttrs[args[i]] = ret.params[args[i]] = args[i+1];
    }
  }
  ret.objAttrs["classid"] = classid;
  if (mimeType) ret.embedAttrs["type"] = mimeType;
  return ret;
}

// End Flash Player Version Detection - Rev 1.6


var url_string = String(this.location);
var city_str = url_string.split('yourlexusdealer');
var city = city_str[1].split('/');
var url_array1 = url_string.split('?');


	if(url_array1[1]){
  		var e_array = url_array1[1].split('&');
  		var val_array = new Array();
  		for(i=0;i<=20;i++){
  			if(e_array[i]){
				val_array.push(e_array[i].split('='));
   			}
  		}
  	}
  

var QS = "";
var map = "";
var bannerModel = "";
if(city[1]&&city[1]!="index.html"){
	map=city[1];
}


if(val_array){
	for(j=0; j<val_array.length; j++){
			
		if(val_array[j][0] == "mnum"){
			var modNum = val_array[j][1];
			}

		if(val_array[j][0] == "model"){
			QS += val_array[j][0]+"="+val_array[j][1].toUpperCase();
			var bannerModel = val_array[j][1].toUpperCase();

			}else{
				QS += val_array[j][0]+"="+val_array[j][1];
			}
		}
	}

	if((bannerModel)&&(!modNum)){
		switch(bannerModel){
			case "LS":
				modNum="460";
			break;
			case "GS":
				modNum="460";
			break;
			case "ES":
				modNum="350";
			break;
			case "IS":
				modNum="350";
			break;
			case "SC":
				modNum="430";
			break;
			case "LX":
				modNum="570";
			break;
			case "GX":
				modNum="470";
			break;
			case "RX":
				modNum="350";
			break;
			case "GSH":
				modNum="450";
			break;
			case "HS":
				modNum="250";
			break;
		}
	}

var dmaToMarketLocMap = {
"AlbuquerqueArea": "Albuquerque Area",
"Atlanta": "Atlanta",
"Baltimore": "Baltimore",
"Boston": "Boston",
"ChicagoNWIndiana": "Chicago",
"CincinnatiArea": "Cincinnati",
"ClevelandAkron": "Cleveland",
"ColumbusArea": "Columbus",
"Dallas-FtWorthArea": "Dallas-Fort Worth",
"DenverArea": "Denver",
"DetroitArea": "Detroit",
"FloridaWestCoast": "Tampa/Sarasota",
"FtMyersNaples": "Ft. Myers-Naples",
"GreensboroWinstonSalem": "Greensboro",
"HartfordNewHaven": "Hartford/New Haven",
"Houston": "Houston",
"Jacksonville": "Jacksonville",
"KCArea": "Kansas City",
"MilwaukeeArea": "Milwaukee",
"Nashville": "Nashville",
"NJ-DE-PA": "Philadelphia",
"NorCal": "San Francisco",
"Norfolk": "Norfolk",
"NYNJCT": "New York",
"OrlandoMelbourne": "Orlando/Melbourne",
"PalmBeachTreasureCoast": "West Palm Beach",
"Pittsburgh": "Pittsburgh",
"RaleighDurham": "Raleigh",
"SacramentoModesto": "Sacramento",
"SaltLakeCity": "Salt Lake City",
"SanDiegoCounty": "San Diego",
"SeattleArea": "Seattle",
"SoCal": "Los Angeles",
"SouthFlorida": "Miami/Ft. Lauderdale",
"StLouisArea": "St. Louis",
"Tucson": "Tucson",
"TwinCitiesArea": "Minneapolis",
"Valley": "Phoenix",
"WashDC": "Washington, DC"
}

function getCity() {
var urlArr = location.href.split("/");
return urlArr[urlArr.length-2];
}

function getMarketLoc () {
var city = getCity();
var marketLoc = dmaToMarketLocMap[city];
if (!marketLoc)
marketLoc = "";
//alert("city: " + city + "; marketLoc: " + marketLoc);
return marketLoc;
}

slModel = bannerModel + "_" + modNum;
marketLoc = getMarketLoc();

// HORRIBLE HACK for: http://www.yourlexusdealer.com/SouthFlorida/index.html?jump=spanish&target=cpo
// only for Spanish, only for CPO, only for South Florida
var mapSWFsuffix = "";
if (map == "SouthFlorida")
	mapSWFsuffix = "_sp2";

// Cobalt/Dealer Site tracking parameter cs:e=yld
var DEALER_SITE_CHANNEL = "cs%3Ae%3Dyld";
// CPO campaigns are handled differently
var CPO_DEALER_SITE_CHANNEL = "cs%3Ae%3Dyld";
	
// START Campaign Tracking
// Store campaign id (cid URL param value) in campaign_id cookie (to be detected by BYL, etc and sent to Cobalt)
// Store campaign id (cid URL param value) in campaign_id cookie (to be detected by BYL, etc and sent to Cobalt)
function setCampaignId() {
	// Expiration to year from now
	var CAMAPAIGN_EXPIRATION = new Date();
	CAMAPAIGN_EXPIRATION.setTime(CAMAPAIGN_EXPIRATION.getTime() + 1000 * 60 * 60 * 24 * 365);

	if (!qsVars) {
		// This loads all variables in a querystring into an associative array named qsVars
		// I.e., qsVars[variable_name] == variable_value when querystring is ?variable_name=variable_value&...
		var qsVars = new Array();
		var queryString = location.search;
		if (queryString != "") {
			// -- get rid of ? at start --
			var qsdata = queryString.slice(1,queryString.length);
			var qsvalues = qsdata.split("&");
			for (i=0; i < qsvalues.length; i++) {
				var qsvaluepair = qsvalues[i].split("=");
				qsVars[qsvaluepair[0]] = qsvaluepair[1];
			}
		}
	}

	// URL value detection
	var cid =qsVars['cid'];

	// If cid exists, store it in campaign_id cookie
	if (cid && cid!="") {
		document.cookie="campaign_id="+cid+"; expires="+CAMAPAIGN_EXPIRATION.toGMTString()+"; path=/";
	}
}

function getDealerSiteChannel() {
	var campaignArr = {
		'SSE10LE': {deeplinksuffixCampaign: 'cs:pro=lt1&cs:a=sse10le', description: 'Email, LDA, Generic'},
		'SSE10LEPAC': {deeplinksuffixCampaign: 'cs:pro=lt1&cs:a=sse10lepac', description: 'Email, LDA, Pacific'},
		'SSE10LEWES': {deeplinksuffixCampaign: 'cs:pro=lt1&cs:a=sse10lewes', description: 'Email, LDA, West'},
		'SSE10LECEN': {deeplinksuffixCampaign: 'cs:pro=lt1&cs:a=sse10lecen', description: 'Email, LDA, Central'},
		'SSE10LEKMO': {deeplinksuffixCampaign: 'cs:pro=lt1&cs:a=sse10lekmo', description: 'Email, LDA, KMO'},
		'SSE10LESOU': {deeplinksuffixCampaign: 'cs:pro=lt1&cs:a=sse10lesou', description: 'Email, LDA, South'},
		'SSE10LEEAS': {deeplinksuffixCampaign: 'cs:pro=lt1&cs:a=sse10leeas', description: 'Email, LDA, East'},
		'SSE10NE': {deeplinksuffixCampaign: 'cs:pro=lt1&cs:a=sse10ne', description: 'Email, National, Generic'},
		'SSE10NEPAC': {deeplinksuffixCampaign: 'cs:pro=lt1&cs:a=sse10nepac', description: 'Email, National, Pacific'},
		'SSE10NEWES': {deeplinksuffixCampaign: 'cs:pro=lt1&cs:a=sse10newes', description: 'Email, National, West'},
		'SSE10NECEN': {deeplinksuffixCampaign: 'cs:pro=lt1&cs:a=sse10necen', description: 'Email, National, Central'},
		'SSE10NEKMO': {deeplinksuffixCampaign: 'cs:pro=lt1&cs:a=sse10nekmo', description: 'Email, National, KMO'},
		'SSE10NESOU': {deeplinksuffixCampaign: 'cs:pro=lt1&cs:a=sse10nesou', description: 'Email, National, South'},
		'SSE10NEEAS': {deeplinksuffixCampaign: 'cs:pro=lt1&cs:a=sse10neeas', description: 'Email, National, East'},	
	
		'HYB10NBSTRING': {deeplinksuffixCampaign: 'cs:e=lt1&cs:a=hyb10nbstring', description: 'Banners, National, Hybrid - Strings '},
		'HYB10NstBSTRING': {deeplinksuffixCampaign: 'cs:e=lt1&cs:a=hyb10nstbstring', description: 'Banners, National, Hybrid - Strings (Static)'},
		'HYB10NBDOLL': {deeplinksuffixCampaign: 'cs:e=lt1&cs:a=hyb10nbdoll', description: 'Banners, National, Hybrid - Dolls'},
		'HYB10NstBDOLL': {deeplinksuffixCampaign: 'cs:e=lt1&cs:a=hyb10nstbdoll', description: 'Banners, National, Hybrid - Dolls (Static)'},
		'HYB10NBFEPSTRING': {deeplinksuffixCampaign: 'cs:e=lt1&cs:a=hyb10nbfepstring', description: 'FEP, National, Hybrid - Strings FEP'},
		'HYB10NBFEPDOLL': {deeplinksuffixCampaign: 'cs:e=lt1&cs:a=hyb10nbfepdoll', description: 'FEP, National, Hybrid - Dolls FEP'},
		'HYB10NBFEPH': {deeplinksuffixCampaign: 'cs:e=lt1&cs:a=hyb10nbfeph', description: 'FEP, National, Hybrid - “h” is choice'},
		'HYB10NBFEP99': {deeplinksuffixCampaign: 'cs:e=lt1&cs:a=hyb10nbfep99', description: 'FEP, National, Hybrid - 99%'},
		'HYB10NBPREROLL': {deeplinksuffixCampaign: 'cs:e=lt1&cs:a=hyb10nbpreroll', description: 'Banners, National, Hybrid - Preroll'},
		'HYB10NBGENJPG': {deeplinksuffixCampaign: 'cs:e=lt1&cs:a=hyb10nbgenjpg', description: 'Banners, National, Generic JPG'},
		'HYB10NT': {deeplinksuffixCampaign: 'cs:e=lt1&cs:a=hyb10nt', description: 'Text Links, National, Text Links'},
		'HYB10NmB': {deeplinksuffixCampaign: 'cs:e=lt1&cs:a=hyb10nmb', description: 'Banners, National, Hybrid - Mobile'},
		'HYB10NE': {deeplinksuffixCampaign: 'cs:e=lt1&cs:a=hyb10ne', description: 'Email, National, Email'},
		'HYB10NEConq1': {deeplinksuffixCampaign: 'cs:e=lt1&cs:a=hyb10neconq1', description: 'Email, National, Email Conquest 1'},
		'HYB10NEConq2': {deeplinksuffixCampaign: 'cs:e=lt1&cs:a=hyb10neconq2', description: 'Email, National, Email Conquest 2'},
		'HYB10NEConq3': {deeplinksuffixCampaign: 'cs:e=lt1&cs:a=hyb10neconq3', description: 'Email, National, Email Conquest 3'},
		'HYB10NEConq4': {deeplinksuffixCampaign: 'cs:e=lt1&cs:a=hyb10neconq4', description: 'Email, National, Email Conquest 4'},
		'HYB10NP': {deeplinksuffixCampaign: 'cs:e=lt1&cs:a=hyb10np', description: 'Paid Search, National, Search'},
		'HYB10LT': {deeplinksuffixCampaign: 'cs:e=lt1&cs:a=hyb10lt', description: 'Text Links, LDA, Text Links'},
		'HYB10LE': {deeplinksuffixCampaign: 'cs:e=lt1&cs:a=hyb10le', description: 'Email, LDA, Email'},
		'HYB10LP': {deeplinksuffixCampaign: 'cs:e=lt1&cs:a=hyb10lp', description: 'Paid Search, LDA, Search'},
	
		'SSE10LBDYLEAS': {deeplinksuffixCampaign: 'cs:pro=lt1&cs:a=sse10lbdyleas', description: 'Banners, LDA, SSE 2010 Dynamic Lease'},
		'SSE10LstBDYLEAS': {deeplinksuffixCampaign: 'cs:pro=lt1&cs:a=sse10lstbdyleas', description: 'Banners, LDA, SSE 2010 Dynamic Lease Back up'},
		'SSE10LBCOUNT': {deeplinksuffixCampaign: 'cs:pro=lt1&cs:a=sse10lbcount', description: 'Banners, LDA, SSE 2010 Countdown Flash'},
		'SSE10LstBCOUNT': {deeplinksuffixCampaign: 'cs:pro=lt1&cs:a=sse10lstbcount', description: 'Banners, LDA, SSE 2010 Countdown Static'},
		'SSE10LBCOUNTFULL': {deeplinksuffixCampaign: 'cs:pro=lt1&cs:a=sse10lbcountfull', description: 'Banners, LDA, SSE 2010 Countdown Full Line Flash'},
		'SSE10LstBCOUNTFULL': {deeplinksuffixCampaign: 'cs:pro=lt1&cs:a=sse10lstbcountfull', description: 'Banners, LDA, SSE 2010 Countdown Full Line Static'},
		'SSE10LBGENJPG': {deeplinksuffixCampaign: 'cs:pro=lt1&cs:a=sse10lbgenjpg ', description: 'Banners, LDA, SSE 2010 Generic JPG'},
		'SSE10LBPREROLL': {deeplinksuffixCampaign: 'cs:pro=lt1&cs:a=sse10lbpreroll', description: 'Banners, LDA, SSE 2010 Pre-roll'},
		'SSE10LT': {deeplinksuffixCampaign: 'cs:pro=lt1&cs:a=sse10lt', description: 'Text Links, LDA, SSE 2010 Text Links'},
		'SSE10NT': {deeplinksuffixCampaign: 'cs:pro=lt1&cs:a=sse10nt', description: 'Text Links, National, SSE 2010 Text Links'},
		'SSE10LE': {deeplinksuffixCampaign: 'cs:pro=lt1&cs:a=sse10le', description: 'Email, LDA, SSE 2010 Email'},
		'SSE10NE': {deeplinksuffixCampaign: 'cs:pro=lt1&cs:a=sse10ne', description: 'Email, National, SSE 2010 Email'},
		'SSE10LP': {deeplinksuffixCampaign: 'cs:pro=lt1&cs:a=sse10lp', description: 'Paid Search, LDA, SSE 2010 Search LDA'},
		'SSE10NP': {deeplinksuffixCampaign: 'cs:pro=lt1&cs:a=sse10np', description: 'Paid Search, National, SSE 2010 Search National'},
		'SSE10NBGENJPG': {deeplinksuffixCampaign: 'cs:pro=lt1&cs:a=sse10nbgenjpg ', description: 'Banners, National, SSE 2010 Generic JPG'},
		'SSE10NBPREROLL': {deeplinksuffixCampaign: 'cs:pro=lt1&cs:a=sse10nbpreroll', description: 'Banners, National, SSE 2010 Pre-roll'},
		'SSE10NmB': {deeplinksuffixCampaign: 'cs:pro=lt1&cs:a=sse10nmb', description: 'Mobile , National, SSE 2010 Mobile National'},
		'SSE10LEConqPAC': {deeplinksuffixCampaign: 'cs:pro=lt1&cs:a=sse10leconqpac', description: 'Email, LDA, Pacific'},
		'SSE10LEConqWES': {deeplinksuffixCampaign: 'cs:pro=lt1&cs:a=sse10leconqwes', description: 'Email, LDA, West'},
		'SSE10LEConqCEN': {deeplinksuffixCampaign: 'cs:pro=lt1&cs:a=sse10leconqcen', description: 'Email, LDA, Central'},
		'SSE10LEConqKMO': {deeplinksuffixCampaign: 'cs:pro=lt1&cs:a=sse10leconqkmo', description: 'Email, LDA, KMO'},
		'SSE10LEConqSOU': {deeplinksuffixCampaign: 'cs:pro=lt1&cs:a=sse10leconqsou', description: 'Email, LDA, South'},
		'SSE10LEConqEAS': {deeplinksuffixCampaign: 'cs:pro=lt1&cs:a=sse10leconqeas', description: 'Email, LDA, East'},
		
		'GX09LBFEAT': {deeplinksuffixCampaign: 'cs:pro=lt1&cs:a=gx09lbfeat', description: 'Banners, LDA, GX Features Flash'},
		'GX09LstBFEAT': {deeplinksuffixCampaign: 'cs:pro=lt1&cs:a=gx09lstbfeat', description: 'Banners, LDA, GX Features Static'},
		'GX09LBHERO': {deeplinksuffixCampaign: 'cs:pro=lt1&cs:a=gx09lbhero', description: 'Banners, LDA, GX Heroes Flash'},
		'GX09LstBHERO': {deeplinksuffixCampaign: 'cs:pro=lt1&cs:a=gx09lstbhero', description: 'Banners, LDA, GX Heroes Static'},
		'GX09LBCOMP': {deeplinksuffixCampaign: 'cs:pro=lt1&cs:a=gx09lbcomp', description: 'Banners, LDA, GX Competitive Flash'},
		'GX09LstBCOMP': {deeplinksuffixCampaign: 'cs:pro=lt1&cs:a=gx09lstbcomp', description: 'Banners, LDA, GX Competitive Static'},
		'GX09NBCOMPMDX': {deeplinksuffixCampaign: 'cs:pro=lt1&cs:a=gx09nbcompmdx', description: 'Banners, National, Competitive MDX'},
		'GX09NstBCOMPMDX': {deeplinksuffixCampaign: 'cs:pro=lt1&cs:a=gx09nstbcompmdx', description: 'Banners, National, Competitive MDX Static'},
		'GX09NBCOMPGL': {deeplinksuffixCampaign: 'cs:pro=lt1&cs:a=gx09nbcompgl', description: 'Banners, National, Competitive GL'},
		'GX09NstBCOMPGL': {deeplinksuffixCampaign: 'cs:pro=lt1&cs:a=gx09nstbcompgl', description: 'Banners, National, Competitive GL Static'},
		'GX09NBCOMPX5': {deeplinksuffixCampaign: 'cs:pro=lt1&cs:a=gx09nbcompx5', description: 'Banners, National, Competitive X5'},
		'GX09NstBCOMPX5': {deeplinksuffixCampaign: 'cs:pro=lt1&cs:a=gx09nstbcompx5', description: 'Banners, National, Competitive X5 Static'},
		'GX09NBCOMPQ7': {deeplinksuffixCampaign: 'cs:pro=lt1&cs:a=gx09nbcompq7', description: 'Banners, National, Competitive Q7'},
		'GX09NstBCOMPQ7': {deeplinksuffixCampaign: 'cs:pro=lt1&cs:a=gx09nstbcompq7', description: 'Banners, National, Competitive Q7 Static'},
		'GX09NBCOMPGEN': {deeplinksuffixCampaign: 'cs:pro=lt1&cs:a=gx09nbcompgen', description: 'Banners, National, Competitive Headline'},
		'GX09NstBCOMPGEN': {deeplinksuffixCampaign: 'cs:pro=lt1&cs:a=gx09nstbcompgen', description: 'Banners, National, Competitive Headline Static'},
		'GX09NBNAME': {deeplinksuffixCampaign: 'cs:pro=lt1&cs:a=gx09nbname', description: 'Banners, National, Name Generator '},
		'GX09NstBNAME': {deeplinksuffixCampaign: 'cs:pro=lt1&cs:a=gx09nstbname', description: 'Banners, National, Name Generator  Static'},
		'GX09NBHERO': {deeplinksuffixCampaign: 'cs:pro=lt1&cs:a=gx09nbhero', description: 'Banners, National, Heroes'},
		'GX09NstBHERO': {deeplinksuffixCampaign: 'cs:pro=lt1&cs:a=gx09nstbhero', description: 'Banners, National, Heroes Static'},
		'GX09NBFEAT': {deeplinksuffixCampaign: 'cs:pro=lt1&cs:a=gx09nbfeat', description: 'Banners, National, Features'},
		'GX09NstBFEAT': {deeplinksuffixCampaign: 'cs:pro=lt1&cs:a=gx09nstbfeat', description: 'Banners, National, Features Static'},
		'GX09NBGENJPG': {deeplinksuffixCampaign: 'cs:pro=lt1&cs:a=gx09nbgenjpg', description: 'Banners, National, Generic JPG'},
		'GX09NBPREROLL': {deeplinksuffixCampaign: 'cs:pro=lt1&cs:a=gx09nbpreroll', description: 'Banners, National, Pre-roll'},
		'GX09NmB': {deeplinksuffixCampaign: 'cs:pro=lt1&cs:a=gx09nmb', description: 'Mobile , National, Mobile'},
		'GX09LT': {deeplinksuffixCampaign: 'cs:pro=lt1&cs:a=gx09lt', description: 'Text Links, LDA, Text Links'},
		'GX09NT': {deeplinksuffixCampaign: 'cs:pro=lt1&cs:a=gx09nt', description: 'Text Links, National, Text Links'},
		'GX09LE': {deeplinksuffixCampaign: 'cs:pro=lt1&cs:a=gx09le', description: 'Email, LDA, Email'},
		'GX10NE': {deeplinksuffixCampaign: 'cs:pro=lt1&cs:a=gx10ne', description: 'Email, National, Email'},
		'GX10NECONQ': {deeplinksuffixCampaign: 'cs:pro=lt1&cs:a=gx10neconq', description: 'Email, National, Email Conquest'},
		'GX09LP': {deeplinksuffixCampaign: 'cs:pro=lt1&cs:a=gx09lp', description: 'Paid Search, LDA, Search'},
		'GX09NP': {deeplinksuffixCampaign: 'cs:pro=lt1&cs:a=gx09np', description: 'Paid Search, National, Search'},
		
		'GX10LBBYL': {deeplinksuffixCampaign: 'cs:pro=lt1&cs:a=gx10lbbyl', description: 'Banners, LDA, BYL'},
		'GX10LBSHOP': {deeplinksuffixCampaign: 'cs:pro=lt1&cs:a=gx10lbshop', description: 'Banners, LDA, Shopping'},
		'GX10LstBBYL': {deeplinksuffixCampaign: 'cs:pro=lt1&cs:a=gx10lstbbyl', description: 'Banners, LDA, BYL (Static)'},
		'GX10LstBSHOP': {deeplinksuffixCampaign: 'cs:pro=lt1&cs:a=gx10lstbshop', description: 'Banners, LDA, Shopping (Static)'},
		'GX10LBDYLEAS': {deeplinksuffixCampaign: 'cs:pro=lt1&cs:a=gx10lbdyleas', description: 'Banners, LDA, Dynamic'},
		'GX10LstBDYLEAS': {deeplinksuffixCampaign: 'cs:pro=lt1&cs:a=gx10lstbdyleas', description: 'Banners, LDA, Dynamic (Static)'},
		"GX10NP": {deeplinksuffixCampaign: "cs:pro=lt1&cs:a=gx10np", description: "National, Search"},
		"GX10LP": {deeplinksuffixCampaign: "cs:pro=lt1&cs:a=gx10lp", description: "LDA, Search"},
	
		"DSE09LT": {deeplinksuffixCampaign: "cs:pro=lt1&cs:a=dse09lt", description: "TEXT, LDA, TEXT LINKS"},
		"DSE09NBGIFT": {deeplinksuffixCampaign: "cs:pro=lt1&cs:a=dse09nbgift", description: "Banners, National, Gift Box Flash"},
		"DSE09NstBGIFT": {deeplinksuffixCampaign: "cs:pro=lt1&cs:a=dse09nstbgift", description: "Banners, National, Gift Box Static Backup"},
		"DSE09NT": {deeplinksuffixCampaign: "cs:pro=lt1&cs:a=dse09nt", description: "TEXT, National, TEXT LINKS"},
		"DSE09NBUNIQUE": {deeplinksuffixCampaign: "cs:pro=lt1&cs:a=dse09nbunique", description: "Banners, National, Unique Flash"},
		"DSE09NstBUNIQUE": {deeplinksuffixCampaign: "cs:pro=lt1&cs:a=dse09nstbunique", description: "Banners, National, Unique Static"},	
		"DSE09LBGRILL": {deeplinksuffixCampaign: "cs:pro=lt1&cs:a=dse09lbgrill", description: "Banners, LDA, Grill Flash"},
		"DSE09LstBGRILL": {deeplinksuffixCampaign: "cs:pro=lt1&cs:a=dse09lstbgrill", description: "Banners, LDA, Grill Static"},
		"DSE09LBGIFT": {deeplinksuffixCampaign: "cs:pro=lt1&cs:a=dse09lbgift", description: "Banners, LDA, Gift Box Flash"},
		"DSE09LstBGIFT": {deeplinksuffixCampaign: "cs:pro=lt1&cs:a=dse09lstbgift", description: "Banners, LDA, Gift Box Static"},
		"DSE09LBUNIQUE": {deeplinksuffixCampaign: "cs:pro=lt1&cs:a=dse09lbunique", description: "Banners, LDA, Unique Flash"},
		"DSE09LstBUNIQUE": {deeplinksuffixCampaign: "cs:pro=lt1&cs:a=dse09lstbunique", description: "Banners, LDA, Unique Static"},
		"DSE09LBDYLEAS": {deeplinksuffixCampaign: "cs:pro=lt1&cs:a=dse09lbdyleas", description: "Banners, LDA, Dynamic Lease Flash"},
		"DSE09LstBDYLEAS": {deeplinksuffixCampaign: "cs:pro=lt1&cs:a=dse09lstbdyleas", description: "Banners, LDA, Dynamic Lease Static"},
		"DSE09LmB": {deeplinksuffixCampaign: "cs:pro=lt1&cs:a=dse09lmb", description: "Banners, LDA, Mobile"},
		"DSE09LBGENJPG": {deeplinksuffixCampaign: "cs:pro=lt1&cs:a=dse09lbgenjpg", description: "Banners, LDA, Generic JPG"},
		"DSE09LP": {deeplinksuffixCampaign: "cs:pro=lt1&cs:a=dse09lp", description: "PPC, LDA, Paid Search"},
		"DSE09LE": {deeplinksuffixCampaign: "cs:pro=lt1&cs:a=dse09le", description: "Email, LDA, Email"},
		"DSE09NBGRILL": {deeplinksuffixCampaign: "cs:pro=lt1&cs:a=dse09nbgrill", description: "Banners, National, Grill Flash"},
		"DSE09NstBGRILL": {deeplinksuffixCampaign: "cs:pro=lt1&cs:a=dse09nstbgrill", description: "Banners, National, Grill Static Backup"},
		"DSE09NmB": {deeplinksuffixCampaign: "cs:pro=lt1&cs:a=dse09nmb", description: "Banners, National, Mobile"},
		"DSE09NBGENJPG": {deeplinksuffixCampaign: "cs:pro=lt1&cs:a=dse09nbgenjpg", description: "Banners, National, Generic JPG"},
		"DSE09NP": {deeplinksuffixCampaign: "cs:pro=lt1&cs:a=dse09np", description: "PPC, National, Paid Search"},
		"DSE09NE": {deeplinksuffixCampaign: "cs:pro=lt1&cs:a=dse09ne", description: "Email, National, Email"},
	
		"LS10LBLIFE": {deeplinksuffixCampaign: "cs:pro=lt1&cs:a=ls10lblife", description: "Banners, LDA, Lifestyle"},
		"LS10LstBLIFE": {deeplinksuffixCampaign: "cs:pro=lt1&cs:a=ls10lstblife", description: "Banners, LDA, Lifestyle (static)"},	
		"LS10LBBYL": {deeplinksuffixCampaign: "cs:pro=lt1&cs:a=ls10lbbyl", description: "Banners, LDA, BYL"},
		"LS10LBSHOP": {deeplinksuffixCampaign: "cs:pro=lt1&cs:a=ls10lbshop", description: "Banners, LDA, Shopping"},
		"LS10LstBBYL": {deeplinksuffixCampaign: "cs:pro=lt1&cs:a=ls10lstbbyl", description: "Banners, LDA, BYL (Static)"},
		"LS10LstBSHOP": {deeplinksuffixCampaign: "cs:pro=lt1&cs:a=ls10lstbshop", description: "Banners, LDA, Shopping (Static)"},
		"LS10LBPRE": {deeplinksuffixCampaign: "cs:pro=lt1&cs:a=ls10lbpre", description: "Banners, LDA, Preroll"},
		"LS10LBGENJPG": {deeplinksuffixCampaign: "cs:pro=lt1&cs:a=ls10lbgenjpg", description: "Banners, LDA, Generic Jpeg"},
		"LS10LBLINE": {deeplinksuffixCampaign: "cs:pro=lt1&cs:a=ls10lbline", description: "Banners, LDA, Line Message"},
		"LS10LstBLINE": {deeplinksuffixCampaign: "cs:pro=lt1&cs:a=ls10lstbline", description: "Banners, LDA, Line Message (static)"},
		"LS10LBSCROLL": {deeplinksuffixCampaign: "cs:pro= lt1&cs:a=ls10lbscroll", description: "Banners, LDA, Scrolling"},
		"LS10LstBSCROLL": {deeplinksuffixCampaign: "cs:pro= lt1&cs:a=ls10lbstscroll", description: "Banners, LDA, Scrolling (static)"},
		"LS10LmB": {deeplinksuffixCampaign: "cs:pro=lt1&cs:a=ls10lmb", description: "Banners, LDA, Mobile"},
		"LS10NBPRE": {deeplinksuffixCampaign: "cs:pro=lt1&cs:a=ls10nbpre", description: "Banners, National, Preroll"},
		"LS10NBGENJPG": {deeplinksuffixCampaign: "cs:pro=lt1&cs:a=ls10nbgenjpg", description: "Banners, National, Generic Jpeg"},
		"LS10NBSTACK": {deeplinksuffixCampaign: "cs:pro=lt1&cs:a=ls10nbstack", description: "Banners, National, Stacking"},
		"LS10NBSMART": {deeplinksuffixCampaign: "cs:pro=lt1&cs:a=ls10nbsmart", description: "Banners, National, Smart Stacking"},
		"LS10NBSTACKPUSH": {deeplinksuffixCampaign: "cs:pro=lt1&cs:a=ls10nbstackpush", description: "Banners, National, Pushdown Stacking"},
		"LS10NBLINE": {deeplinksuffixCampaign: "cs:pro=lt1&cs:a=ls10nbline", description: "Banners, National, Line Message"},
		"LS10NBSCROLL": {deeplinksuffixCampaign: "cs:pro=lt1&cs:a=ls10nbscroll", description: "Banners, National, Scrolling"},
		"LS10NBLIFE": {deeplinksuffixCampaign: "cs:pro=lt1&cs:a=ls10nblife", description: "Banners, National, Lifestyle"},
		"LS10NBLIFEPUSH": {deeplinksuffixCampaign: "cs:pro=lt1&cs:a=ls10nblifepush", description: "Banners, National, Lifestyle Pushdown"},
		"LS10NBHUBB": {deeplinksuffixCampaign: "cs:pro=lt1&cs:a=ls10nbhubb", description: "Banners, National, Hubb"},
		"LS10NstBSTACK": {deeplinksuffixCampaign: "cs:pro=lt1&cs:a=ls10nstbstack", description: "Banners, National, Stacking (static)"},
		"LS10NstBSMART": {deeplinksuffixCampaign: "cs:pro=lt1&cs:a=ls10nstbsmart", description: "Banners, National, Smart Stacking (static)"},
		"LS10NstBSTACKPUSH": {deeplinksuffixCampaign: "cs:pro=lt1&cs:a=ls10nstbstackpush", description: "Banners, National, Pushdown Stacking (static)"},
		"LS10NstBLINE": {deeplinksuffixCampaign: "cs:pro=lt1&cs:a=ls10nstbline", description: "Banners, National, Line Message (static)"},
		"LS10NstBSCROLL": {deeplinksuffixCampaign: "cs:pro=lt1&cs:a=ls10nstbscroll", description: "Banners, National, Scrolling (static)"},
		"LS10NstBLIFE": {deeplinksuffixCampaign: "cs:pro=lt1&cs:a=ls10nstblife", description: "Banners, National, Lifestyle (static)"},
		"LS10NstBLIFEPUSH": {deeplinksuffixCampaign: "cs:pro=lt1&cs:a=ls10nstblifepush", description: "Banners, National, Lifestyle Pushdown (static)"},
		"LS10NstBHUBB": {deeplinksuffixCampaign: "cs:pro=lt1&cs:a=ls10nstbhubb", description: "Banners, National, Hubb (static)"},
		"LS10NmB": {deeplinksuffixCampaign: "cs:pro=lt1&cs:a=ls10nmb", description: "Banners, National, Mobile"},
		"LS10NBFORBES": {deeplinksuffixCampaign: "cs:pro=lt1&cs:a=ls10nbforbes", description: "Banners, National, Forbes"},
		"LS10NP": {deeplinksuffixCampaign: "cs:pro=lt1&cs:a=ls10np", description: "PPC, National, Paid Search"},
		"LS10LP": {deeplinksuffixCampaign: "cs:pro=lt1&cs:a=ls10lp", description: "PPC, LDA, Paid Search"},
		"LS10NE": {deeplinksuffixCampaign: "cs:pro=lt1&cs:a=ls10ne", description: "Email, National, Email"},
		"LS10LE": {deeplinksuffixCampaign: "cs:pro=lt1&cs:a=ls10le", description: "Email, LDA, Email"},

		"HSh10NBPEEL": {deeplinksuffixCampaign: "cs:pro=lt1&cs:a=lhs09nbpeel", description: "Banners, National, Peel"},
		"HSh10NBTECH": {deeplinksuffixCampaign: "cs:pro=lt1&cs:a=lhs09nbtech", description: "Banners, National, Tech Selector"},
		"HSh10NBSCI": {deeplinksuffixCampaign: "cs:pro=lt1&cs:a=lhs09nbsci", description: "Banners, National, Science Non-Fiction"},
		"HSh10NBSAT": {deeplinksuffixCampaign: "cs:pro=lt1&cs:a=lhs09nbsat", description: "Banners, National, Satellite"},
		"HSh10NBVID2": {deeplinksuffixCampaign: "cs:pro=lt1&cs:a=lhs09nbvid2", description: "Banners, National, Video 2"},
		"HSh10LBTECH": {deeplinksuffixCampaign: "cs:pro=lt1&cs:a=lhs09lbtech", description: "Banners, LDA, Tech Selector"},
		"HSh10LBBYL": {deeplinksuffixCampaign: "cs:pro=lt1&cs:a=lhs09lbbyl", description: "Banners, LDA, BYL"},
		"HSh10LBSHOP": {deeplinksuffixCampaign: "cs:pro=lt1&cs:a=lhs09lbshop", description: "Banners, LDA, Shopping"},
		"HSh10LBdyleas": {deeplinksuffixCampaign: "cs:pro=lt1&cs:a=lhs09lbdyleas", description: "Banners, LDA, Dynamic Lease"},
		"HSh10NBFEP": {deeplinksuffixCampaign: "cs:pro=lt1&cs:a=lhs09nbfep", description: "Banners, National, Full Episode Player"},
		"HSh10NBGENJPG": {deeplinksuffixCampaign: "cs:pro=lt1&cs:a=lhs09nbgjp", description: "Banners, National, Generic Jpgs"},
		"HSh10NSTBPEEL": {deeplinksuffixCampaign: "cs:pro=lt1&cs:a=lhs09nstbpeel", description: "Banners (Static), National, Peel"},
		"HSh10NSTBTECH": {deeplinksuffixCampaign: "cs:pro=lt1&cs:a=lhs09nstbtech", description: "Banners (Static), National, Tech Selector"},
		"HSh10NSTBSCI": {deeplinksuffixCampaign: "cs:pro=lt1&cs:a=lhs09nstbsci", description: "Banners (Static), National, Science Non-Fiction"},
		"HSh10NSTBSAT": {deeplinksuffixCampaign: "cs:pro=lt1&cs:a=lhs09nstbsat", description: "Banners (Static), National, Satellite"},
		"HSh10NSTBVID2": {deeplinksuffixCampaign: "cs:pro=lt1&cs:a=lhs09nstbvid2", description: "Banners (Static), National, Video 2"},
		"HSh10LSTBTECH": {deeplinksuffixCampaign: "cs:pro=lt1&cs:a=lhs09lstbtech", description: "Banners (Static), LDA, Tech Selector"},
		"HSh10LSTBBYL": {deeplinksuffixCampaign: "cs:pro=lt1&cs:a=lhs09lstbbyl", description: "Banners (Static), LDA, BYL"},
		"HSh10LSTBSHOP": {deeplinksuffixCampaign: "cs:pro=lt1&cs:a=lhs09lstbshop", description: "Banners (Static), LDA, Shopping"},
		"HSh10LSTBdyleas": {deeplinksuffixCampaign: "cs:pro=lt1&cs:a=lhs09lstbdyleas", description: "Banners (Static), LDA, Dynamic Lease"},
		"HSh10NP": {deeplinksuffixCampaign: "cs:pro=lt1&cs:a=lhs09np", description: "PPC, National, Paid Search"},
		"HSh10LP": {deeplinksuffixCampaign: "cs:pro=lt1&cs:a=lhs09lp", description: "PPC, LDA, Paid Search"},
		"HSh10NE": {deeplinksuffixCampaign: "cs:pro=lt1&cs:a=lhs09ne", description: "Email, National, Email"},
		"HSh10LE": {deeplinksuffixCampaign: "cs:pro=lt1&cs:a=lhs09le", description: "Email, LDA, Email"}
	}

	function GetCookie(a){var e,m=" "+document.cookie+";",N=" "+a+"=",s=m.indexOf(N),r="";if(s!=-1){s+=N.length;e=m.indexOf(";",s);r=unescape(m.substring(s,e))}return r}


	var campaignCookie =GetCookie("campaign_id");
	if (campaignCookie && campaignCookie!="" && campaignArr[campaignCookie]) {
		return encodeURIComponent(campaignArr[campaignCookie].deeplinksuffixCampaign);
	} else
		return -1;
}

setCampaignId();
var newChannel = getDealerSiteChannel();
if (newChannel!=-1)
	DEALER_SITE_CHANNEL = newChannel;
// END Campaign Tracking	
	

// PROMO Definitions
// triggername is the name in the name-value pair which is passed by the banner via querystring. 
// triggerval is the value in the name-value pair which is passed by the banner via querystring.

// there can be MULTIPLE triggername/triggerval pairs, to accomodate additional decisioning via the querystring (ie model= processing).

// mapswf is the swf to use for the map section (the regional map which gets pinned)
// promoswf is the swf to display in the top right corner -- the "promo"
// zipswf is the swf to display in the bottom right corner -- the "zip box"
// deeplinksuffix is passed as a flashVar to the PROMO swf as deepLink

// if NO VALUE is present, the DEFAULT will be used.

// examples:
//
// on the querystring value "jump=ICIS", change the promo SWF to be "promo_icis.swf" and send the "/icis" deeplink to the promo
//
// { triggername: ["jump"], triggerval: ["ICIS"], mapswf: "", promoswf: "promo_icis.swf", zipswf: "", deeplinksuffix: "/icis"}
//
// on the querystring values "jump=ICIS" and "model=RX", the promo will be "promo_icis_rx.swf", and will receive the "/rxpromo" deeplink flashvar
//
// { triggername: ["jump", "model"], triggerval: ["ICIS", "RX"], mapswf: "", promoswf: "promo_icis_rx.swf", zipswf: "", deeplinksuffix: "/rxpromo"}
//
//
// flashObjArray[0] will always contain the DEFAULT data.

// default promo is always the first one here, or flashObjArray[0]

/*
Deep linking::
?cs:e=yld = "%3F"+DEALER_SITE_CHANNEL
&cs:e=yld = "%26"+DEALER_SITE_CHANNEL
*/


var flashObjArray = [

// DEFAULT
// Spring Sales Event Campaign
{triggername:[""],triggerval:[""],mapswf:"../LDA_Map_Template.swf?m=lda_map_"+map+".xml",promoswf:"../swf/SpringSE_2010_default_4in1.swf",zipswf:"../DMA_Zip.swf",deeplinksuffix:"%3F"+DEALER_SITE_CHANNEL},

// Querystring catches

{triggername: ["jump"], triggerval: ["CPO2008"], mapswf: "", promoswf: "../sl/cpo2008_promo.swf", zipswf: "", deeplinksuffix: "/PreOwnedVehicleSearch%3F"+CPO_DEALER_SITE_CHANNEL},
{triggername: ["campaign"], triggerval: ["RXMPG"], mapswf: "", promoswf: "../sl/rx_mpg_promo_09.swf", zipswf: "", deeplinksuffix: "%3F"+DEALER_SITE_CHANNEL},
{triggername: ["campaign"], triggerval: ["MPG"], mapswf: "", promoswf: "../sl/rx_mpg_promo_09.swf", zipswf: "", deeplinksuffix: "%3F"+DEALER_SITE_CHANNEL},
{triggername: ["jump"], triggerval: ["PP"], mapswf: "", promoswf: "", zipswf: "", deeplinksuffix: "/NewModelsPageDetails%3F"+DEALER_SITE_CHANNEL},
{triggername: ["jump"], triggerval: ["BYL"], mapswf: "", promoswf: "", zipswf: "", deeplinksuffix: "/NewModelsPageDetails?"+DEALER_SITE_CHANNEL+"%26model="+bannerModel.toLowerCase()},

{triggername: ["jump"], triggerval: ["ICIS"], mapswf: "", promoswf: "../swf/LEXLDA_Intel_Choices_189x293.swf", zipswf: "", deeplinksuffix: "/NewModelsPageDetails%3Fmodel%3DIS250%26"+DEALER_SITE_CHANNEL},
{triggername: ["jump"], triggerval: ["ICRX"], mapswf: "", promoswf: "../swf/LEXLDA_Intel_Choices_189x293.swf", zipswf: "", deeplinksuffix: "/NewModelsPageDetails%3Fmodel%3DRX350%26"+DEALER_SITE_CHANNEL},
{triggername: ["jump"], triggerval: ["ICES"], mapswf: "", promoswf: "../swf/LEXLDA_Intel_Choices_189x293.swf", zipswf: "", deeplinksuffix: "/NewModelsPageDetails%3Fmodel%3DES350%26"+DEALER_SITE_CHANNEL},
{triggername: ["jump"], triggerval: ["ICLS"], mapswf: "", promoswf: "../swf/LEXLDA_Intel_Choices_189x293.swf", zipswf: "", deeplinksuffix: "/NewModelsPageDetails%3Fmodel%3Dls%26"+DEALER_SITE_CHANNEL},

{triggername: ["jump"], triggerval: ["model"], mapswf: "", promoswf: "", zipswf: "", deeplinksuffix: "/NewModelsPageDetails?"+DEALER_SITE_CHANNEL+"%26model="+bannerModel.toLowerCase()},
{triggername: ["jump","model"], triggerval: ["model","GS"], mapswf: "", promoswf: "../swf/lease_promo.swf?dynamicLeaseImagePath=/images/shop_local/default", zipswf: "", deeplinksuffix: "/NewModelsPageDetails%3F"+DEALER_SITE_CHANNEL+"%26model%3Dgs"},
{triggername: ["jump","model"], triggerval: ["model","GX"], mapswf: "", promoswf: "../swf/lease_promo.swf?dynamicLeaseImagePath=/images/shop_local/default", zipswf: "", deeplinksuffix: "/NewModelsPageDetails%3F"+DEALER_SITE_CHANNEL+"%26model%3Dgx"},
{triggername: ["jump","model"], triggerval: ["model","HS"], mapswf: "", promoswf: "../swf/lease_promo.swf?dynamicLeaseImagePath=/images/shop_local/default", zipswf: "", deeplinksuffix: "/NewModelsPageDetails%3F"+DEALER_SITE_CHANNEL+"%26model%3Dhshybrid"},
{triggername: ["jump","model","mnum"], triggerval: ["model","ISC","250"], mapswf: "", promoswf: "../swf/lease_promo.swf?dynamicLeaseImagePath=/images/shop_local/default", zipswf: "", deeplinksuffix: "/NewModelsPageDetails%3F"+DEALER_SITE_CHANNEL+"%26model%3Disc"},

// For Spring Sales Event Campaign
{triggername: ["jump","model"], triggerval: ["model","ES"], mapswf: "", promoswf: "../swf/SSE_lease_promo.swf?dynamicLeaseImagePath=/images/shop_local/SpringSE", zipswf: "", deeplinksuffix: "/NewModelsPageDetails%3F"+DEALER_SITE_CHANNEL+"%26model%3Des"},
{triggername: ["jump","model"], triggerval: ["model","IS"], mapswf: "", promoswf: "../swf/SSE_lease_promo.swf?dynamicLeaseImagePath=/images/shop_local/SpringSE", zipswf: "", deeplinksuffix: "/NewModelsPageDetails%3F"+DEALER_SITE_CHANNEL+"%26model%3Dis"},
{triggername: ["jump","model"], triggerval: ["model","RX"], mapswf: "", promoswf: "../swf/SSE_lease_promo.swf?dynamicLeaseImagePath=/images/shop_local/SpringSE", zipswf: "", deeplinksuffix: "/NewModelsPageDetails%3F"+DEALER_SITE_CHANNEL+"%26model%3Drx"},

// For Core Model Shopping Banners, 5/14/09; i.e. ?jump=core&model=LS
{triggername: ["jump","model"], triggerval: ["core","ES"], mapswf: "", promoswf: "../swf/LDA_DMA_Promo_189x293_6_3_09.swf", zipswf: "", deeplinksuffix: "/NewModelsPageDetails%3F"+DEALER_SITE_CHANNEL+"%26model%3Des"},
{triggername: ["jump","model"], triggerval: ["core","GS"], mapswf: "", promoswf: "../swf/LDA_DMA_Promo_189x293_6_3_09.swf", zipswf: "", deeplinksuffix: "/NewModelsPageDetails%3F"+DEALER_SITE_CHANNEL+"%26model%3Dgs"},
{triggername: ["jump","model"], triggerval: ["core","GSh"], mapswf: "", promoswf: "../swf/LDA_DMA_Promo_189x293_6_3_09.swf", zipswf: "", deeplinksuffix: "/NewModelsPageDetails%3F"+DEALER_SITE_CHANNEL+"%26model%3Dgshybrid"},
{triggername: ["jump","model"], triggerval: ["core","GX"], mapswf: "", promoswf: "../swf/GX_campaign_189x293.swf", zipswf: "", deeplinksuffix: "/NewModelsPageDetails%3F"+DEALER_SITE_CHANNEL+"%26model%3Dgx"},
{triggername: ["jump","model"], triggerval: ["core","LX"], mapswf: "", promoswf: "../swf/LDA_DMA_Promo_189x293_6_3_09.swf", zipswf: "", deeplinksuffix: "/NewModelsPageDetails%3F"+DEALER_SITE_CHANNEL+"%26model%3Dlx"},
{triggername: ["jump","model"], triggerval: ["core","SC"], mapswf: "", promoswf: "../swf/LDA_DMA_Promo_189x293_6_3_09.swf", zipswf: "", deeplinksuffix: "/NewModelsPageDetails%3F"+DEALER_SITE_CHANNEL+"%26model%3Dsc"},
{triggername: ["jump","model"], triggerval: ["core","RX"], mapswf: "", promoswf: "../swf/LDA_DMA_Promo_189x293_6_3_09.swf", zipswf: "", deeplinksuffix: "/NewModelsPageDetails%3F"+DEALER_SITE_CHANNEL+"%26model%3Drx"},
{triggername: ["jump","model"], triggerval: ["core","RXh"], mapswf: "", promoswf: "../swf/LDA_DMA_Promo_189x293_6_3_09.swf", zipswf: "", deeplinksuffix: "/NewModelsPageDetails%3F"+DEALER_SITE_CHANNEL+"%26model%3Drxhybrid"},
{triggername: ["jump","model"], triggerval: ["core","HSh"], mapswf: "", promoswf: "../swf/LDA_DMA_Promo_189x293_6_3_09.swf", zipswf: "", deeplinksuffix: "/NewModelsPageDetails%3F"+DEALER_SITE_CHANNEL+"%26model%3Dhshybrid"},
{triggername: ["jump","model"], triggerval: ["core","IS"], mapswf: "", promoswf: "", zipswf: "", deeplinksuffix: "/NewModelsPageDetails%3F"+DEALER_SITE_CHANNEL+"%26model%3Dis"},

// For BYL Banners, 07/24/09 launch date; i.e. ?jump=BYL&model=LS
{triggername: ["jump","model"], triggerval: ["BYL","ES"], mapswf: "", promoswf: "../swf/LDA_DMA_Promo_189x293_6_3_09.swf", zipswf: "", deeplinksuffix: "/NewModelsPageDetails%3F"+DEALER_SITE_CHANNEL+"%26model%3Des"},
{triggername: ["jump","model"], triggerval: ["BYL","GS"], mapswf: "", promoswf: "../swf/LDA_DMA_Promo_189x293_6_3_09.swf", zipswf: "", deeplinksuffix: "/NewModelsPageDetails%3F"+DEALER_SITE_CHANNEL+"%26model%3Dgs"},
{triggername: ["jump","model"], triggerval: ["BYL","GSh"], mapswf: "", promoswf: "../swf/LDA_DMA_Promo_189x293_6_3_09.swf", zipswf: "", deeplinksuffix: "/NewModelsPageDetails%3F"+DEALER_SITE_CHANNEL+"%26model%3Dgshybrid"},
{triggername: ["jump","model"], triggerval: ["BYL","GX"], mapswf: "", promoswf: "../swf/GX_campaign_189x293.swf", zipswf: "", deeplinksuffix: "/NewModelsPageDetails%3F"+DEALER_SITE_CHANNEL+"%26model%3Dgx"},
{triggername: ["jump","model"], triggerval: ["BYL","LX"], mapswf: "", promoswf: "../swf/LDA_DMA_Promo_189x293_6_3_09.swf", zipswf: "", deeplinksuffix: "/NewModelsPageDetails%3F"+DEALER_SITE_CHANNEL+"%26model%3Dlx"},
{triggername: ["jump","model"], triggerval: ["BYL","SC"], mapswf: "", promoswf: "../swf/LDA_DMA_Promo_189x293_6_3_09.swf", zipswf: "", deeplinksuffix: "/NewModelsPageDetails%3F"+DEALER_SITE_CHANNEL+"%26model%3Dsc"},
{triggername: ["jump","model"], triggerval: ["BYL","RX"], mapswf: "", promoswf: "../swf/LDA_DMA_Promo_189x293_6_3_09.swf", zipswf: "", deeplinksuffix: "/NewModelsPageDetails%3F"+DEALER_SITE_CHANNEL+"%26model%3Drx"},
{triggername: ["jump","model"], triggerval: ["BYL","RXh"], mapswf: "", promoswf: "../swf/LDA_DMA_Promo_189x293_6_3_09.swf", zipswf: "", deeplinksuffix: "/NewModelsPageDetails%3F"+DEALER_SITE_CHANNEL+"%26model%3Drxhybrid"},
{triggername: ["jump","model"], triggerval: ["BYL","HSh"], mapswf: "", promoswf: "../swf/LDA_DMA_Promo_189x293_6_3_09.swf", zipswf: "", deeplinksuffix: "/NewModelsPageDetails%3F"+DEALER_SITE_CHANNEL+"%26model%3Dhshybrid"},

// For GX Campaign: start = 01/06/2010
{triggername: ["jump"], triggerval: ["GX_Features"], mapswf: "", promoswf: "../swf/GX_campaign_189x293.swf", zipswf: "", deeplinksuffix: "/NewModelsPageDetails%3F"+DEALER_SITE_CHANNEL+"%26model%3Dgx"},

// For RX MYCO 2010 Launch
{triggername: ["jump","model","year"], triggerval: ["model","RX","2010"], mapswf: "", promoswf: "../swf/allNewRX2010.swf", zipswf: "", deeplinksuffix: "/NewModelsPageDetails%3Fmodel%3Drx%26"+DEALER_SITE_CHANNEL},
{triggername: ["jump","target"], triggerval: ["spanish","cpo"], mapswf: "", promoswf: "../banner_sp.swf", zipswf: "../DMA_Zip_sp.swf", deeplinksuffix: "&lang=Spanish"},
{triggername: ["jump","target"], triggerval: ["spanish","model"], mapswf:"../LDA_Map_Template.swf?m=lda_map_"+map+mapSWFsuffix+".xml", promoswf: "../banner_sp.swf", zipswf: "../DMA_Zip_sp.swf", deeplinksuffix: "&lang=Spanish"},

// CPO APR Campaign: start = 11/21/08
{triggername: ["jump"], triggerval: ["CPOAPR"], mapswf: "", promoswf: "../swf/cpo_apr_promo.swf", zipswf: "", deeplinksuffix: "/PreOwnedVehicleSearch%3F"+CPO_DEALER_SITE_CHANNEL},
{triggername: ["jump","model"], triggerval: ["CPOAPR","ES"], mapswf: "", promoswf: "../swf/LEX_2010_CPO_APR_ES_189x293.swf", zipswf: "", deeplinksuffix: "/PreOwnedVehicleSearch%3F"+CPO_DEALER_SITE_CHANNEL},
{triggername: ["jump","model"], triggerval: ["CPOAPR","IS"], mapswf: "", promoswf: "../swf/LEX_2010_CPO_APR_IS_189x293.swf", zipswf: "", deeplinksuffix: "/PreOwnedVehicleSearch%3F"+CPO_DEALER_SITE_CHANNEL},

// CPO Magnify Promo: start = 12/10/08
{triggername: ["jump"], triggerval: ["CPOMagnify"], mapswf: "", promoswf: "../swf/CPO_Magnify_189x293.swf", zipswf: "", deeplinksuffix: "/PreOwnedVehicleSearch%3F"+CPO_DEALER_SITE_CHANNEL},

// CPO Xray Promo: start = 12/10/08
{triggername: ["jump"], triggerval: ["CPOXray"], mapswf: "", promoswf: "../swf/09_CPO_XRay_189x293.swf", zipswf: "", deeplinksuffix: "/PreOwnedVehicleSearch%3F"+CPO_DEALER_SITE_CHANNEL},

// CPO Inspection Promo: start = 1/26/09
{triggername: ["jump"], triggerval: ["CPOInspection"], mapswf: "", promoswf: "../swf/CPO_Inspect_Promo_189x293.swf", zipswf: "", deeplinksuffix: "/PreOwnedVehicleSearch%3F"+CPO_DEALER_SITE_CHANNEL},

// CPO 60 to 0 Sales Event: start = 4/3/09
{triggername: ["jump"], triggerval: ["CPO60to0APR"], mapswf: "", promoswf: "../swf/60to0_yld_apr_prm_189x293.swf", zipswf: "", deeplinksuffix: "/PreOwnedVehicleSearch%3F"+CPO_DEALER_SITE_CHANNEL},
{triggername: ["jump"], triggerval: ["CPO60to0"], mapswf: "", promoswf: "../swf/60to0_yld_special_prm_189x293.swf", zipswf: "", deeplinksuffix: "/PreOwnedVehicleSearch%3F"+CPO_DEALER_SITE_CHANNEL},

// CPO Season to Change: start = 9/1/09
{triggername: ["jump"], triggerval: ["CPO_Change_APR"], mapswf: "", promoswf: "../swf/CPO_NOW_APR_189x293.swf", zipswf: "", deeplinksuffix: "/PreOwnedVehicleSearch%3F"+CPO_DEALER_SITE_CHANNEL},
{triggername: ["jump"], triggerval: ["CPO_Change"], mapswf: "", promoswf: "../swf/CPO_NOW_189x293.swf", zipswf: "", deeplinksuffix: "/PreOwnedVehicleSearch%3F"+CPO_DEALER_SITE_CHANNEL},

// For ISC MYCO 2010 Launch
{triggername: ["jump","model","year"], triggerval: ["model","ISC","2010"], mapswf: "", promoswf: "../swf/IS_09_LDA_Powerslide3Car_Promo_189x293.swf", zipswf: "", deeplinksuffix: "/NewModelsPageDetails?model=isc%26"+DEALER_SITE_CHANNEL},
{triggername: ["jump","model","year"], triggerval: ["model","ISF","2009"], mapswf: "", promoswf: "../swf/IS_09_LDA_Powerslide3Car_Promo_189x293.swf", zipswf: "", deeplinksuffix: "/NewModelsPageDetails?model=isf%26"+DEALER_SITE_CHANNEL},
{triggername: ["jump","model","year"], triggerval: ["model","IS","2009"], mapswf: "", promoswf: "../swf/IS_09_LDA_Powerslide3Car_Promo_189x293.swf", zipswf: "", deeplinksuffix: "/NewModelsPageDetails?model=is%26"+DEALER_SITE_CHANNEL},

// CPO Sustaining Promo: start = 6/15/09
{triggername: ["jump"], triggerval: ["cpo_sustaining"], mapswf: "", promoswf: "../swf/CPO_Companion_Parent_189x293.swf", zipswf: "", deeplinksuffix: "/PreOwnedVehicleSearch%3F"+CPO_DEALER_SITE_CHANNEL},

// ES Minor Launch: start = 9/8/09
{triggername: ["jump"], triggerval: ["ES_Minor_launch"], mapswf: "", promoswf: "../swf/ES_minor_launch.swf", zipswf: "", deeplinksuffix: "/NewModelsPageDetails?model=es%26"+DEALER_SITE_CHANNEL},

// HS Launch: start = 9/8/09
{triggername: ["jump"], triggerval: ["HSLaunch"], mapswf: "", promoswf: "../swf/HS_Launch.swf", zipswf: "", deeplinksuffix: "/NewModelsPageDetails?model=hshybrid%26"+DEALER_SITE_CHANNEL},

// LS Line: start = 10/26/09
{triggername: ["jump","model"], triggerval: ["core","LS"], mapswf: "", promoswf: "../swf/LS_Line_Promo_189x293.swf", zipswf: "", deeplinksuffix: "/NewModelsPageDetails%3F"+DEALER_SITE_CHANNEL+"%26model%3Dls"},
{triggername: ["jump","model"], triggerval: ["core","LSh"], mapswf: "", promoswf: "../swf/LS_Line_Promo_189x293.swf", zipswf: "", deeplinksuffix: "/NewModelsPageDetails%3F"+DEALER_SITE_CHANNEL+"%26model%3Dlshybrid"},
{triggername: ["jump","model"], triggerval: ["BYL","LS"], mapswf: "", promoswf: "../swf/LS_Line_Promo_189x293.swf", zipswf: "", deeplinksuffix: "/NewModelsPageDetails%3F"+DEALER_SITE_CHANNEL+"%26model%3Dls"},
{triggername: ["jump","model"], triggerval: ["BYL","LSh"], mapswf: "", promoswf: "../swf/LS_Line_Promo_189x293.swf", zipswf: "", deeplinksuffix: "/NewModelsPageDetails%3F"+DEALER_SITE_CHANNEL+"%26model%3Dlshybrid"},
{triggername: ["jump"], triggerval: ["LS_Scrolling"], mapswf: "", promoswf: "../swf/LS_Line_Promo_189x293.swf", zipswf: "", deeplinksuffix: "/NewModelsPageDetails%3F"+DEALER_SITE_CHANNEL+"%26model%3Dls"},
{triggername: ["jump"], triggerval: ["LS_Line"], mapswf: "", promoswf: "../swf/LS_Line_Promo_189x293.swf", zipswf: "", deeplinksuffix: "/NewModelsPageDetails%3F"+DEALER_SITE_CHANNEL+"%26model%3Dls"}
];

//alert(flashObjArray.length);

// load default content population.

var mapswf = flashObjArray[0].mapswf;
var promoswf = flashObjArray[0].promoswf;
var zipswf = flashObjArray[0].zipswf;
var deeplinksuffix = flashObjArray[0].deeplinksuffix;

var match = 0; // counter for "number of matched QS values"
var matchcount = 0; // this holds the "most matches for the currently chosen promo"
var promohit = 0; // this holds the id of the "currently chosen promo"

for (k=1; k < flashObjArray.length; k++) // loop once for every promo we have in the above array, exclude the default
	{
	match = 0; // reset our counter -- we need to match them ALL search terms or no dice
	//alert(k);
	for(l=0;l<flashObjArray[k].triggername.length;l++) // handle multiple triggers per promo
		{
		if(val_array) // this is all of the name/val pairs which were passed in to the QS
			{
			for(j=0; j<val_array.length; j++) // loop once for every QS name/value pair
				{ 
				if ((val_array[j][0] == flashObjArray[k].triggername[l]) && (val_array[j][1] == flashObjArray[k].triggerval[l])) // we have a match for this n/v pair, let's remember that.
					{
					match++; // increment our match counter
					}
				}
			}
		}	
	if (match == flashObjArray[k].triggername.length) // we matched all of our triggers for this specific promo (in the loop)
		{
		if (match > matchcount) // is this a "better" match than we have already received? (pick the "double match" over the "single match")
			{
			promohit = k;
			matchcount = match;
			}
		}
	}


mapswf = flashObjArray[promohit].mapswf ? flashObjArray[promohit].mapswf : mapswf;
promoswf = flashObjArray[promohit].promoswf ? flashObjArray[promohit].promoswf : promoswf;
zipswf = flashObjArray[promohit].zipswf ? flashObjArray[promohit].zipswf : zipswf;
deeplinksuffix = flashObjArray[promohit].deeplinksuffix ? flashObjArray[promohit].deeplinksuffix : deeplinksuffix;

// Start "Dallas Spring Sales Event Opt-out", 02/19/2010
if (map=="Dallas-FtWorthArea") {
	if (flashObjArray[promohit].triggername[0] == "") {
		promoswf = "../swf/LDA_DMA_Promo_189x293_6_3_09.swf";
		//deeplinksuffix = "";
	}
	else if (flashObjArray[promohit].triggername[0] == "jump" && flashObjArray[promohit].triggername[1] == "model") {
		promoswf = "../swf/lease_promo.swf?dynamicLeaseImagePath=/images/shop_local/default";
		//deeplinksuffix = "";
	}
}
// End "Dallas Spring Sales Event Opt-out"

//console.log ("deep link suffix: " + deeplinksuffix);

var galswf1 = new gallerySWF("lda_map", mapswf, "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000", "http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0", "http://www.macromedia.com/go/getflashplayer", "613", "465", "LDA_Map_Template", "LDA_Map_Template");
galswf1.align = "middle";
galswf1.quality = "high";
galswf1.allowscriptaccess = "samedomain";
galswf1.scale = "exactfit";
galswf1.wmode = "transparent";
galswf1.flashvars = "deepLink=" + deeplinksuffix;
galswf1.bgcolor = "#ffffff";
galswf1.type = "application/x-shockwave-flash";
galswf1.params();
		

var galswf2 = new gallerySWF("banner", promoswf, "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000", "http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0", "http://www.macromedia.com/go/getflashplayer", "189", "293", "incentive", "incentive");
galswf2.align = "middle";
galswf2.quality = "high";
galswf2.allowscriptaccess = "samedomain";
galswf2.scale = "exactfit";
galswf2.wmode = "transparent";
galswf2.bgcolor = "#ffffff";
galswf2.flashvars = "deepLink=" + deeplinksuffix + "&slModel=" + slModel + "&marketLoc=" + marketLoc;
galswf2.type = "application/x-shockwave-flash";
galswf2.params();
	

var galswf3 = new gallerySWF("zipBox", zipswf, "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000", "http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0", "http://www.macromedia.com/go/getflashplayer", "189", "160", "incentive", "incentive");
galswf3.align = "middle";
galswf3.quality = "high";
galswf3.allowscriptaccess = "samedomain";
galswf3.scale = "exactfit";
galswf3.wmode = "transparent";
galswf3.flashvars = "xmlURL=text.xml&dealerSiteChannel=" + DEALER_SITE_CHANNEL;
galswf3.bgcolor = "#ffffff";
galswf3.type = "application/x-shockwave-flash";
galswf3.params();


function showHome(){

WriteImg('mapImgs', '<img src=\"../images/lexusLogo.gif \" id=\"lexusLogo\" /><img src=\"../images/'+map+'_hdr.gif \" id=\"mapHeader\" /><img src=\"../images/clickThePin_hdr.gif \" id=\"pinHeader\" />');
galswf1.write();
galswf2.write();
galswf3.write();
	
s_prop10 = "YLD:"+map;
sendAnalyticsEvent('');

}


function loadMap(map){	

	var url = "../"+map;
	window.location = url;
}


function WriteImg(ID,sText) {
 if (document.layers) {
   var oLayer;
   if(parentID){
     oLayer = eval('document.' + ID + '.document');
   }else{
     oLayer = document.layers[ID].document;
   }
   oLayer.open();
   oLayer.write(sText);
   oLayer.close();
 }
 else if (parseInt(navigator.appVersion)>=5&&navigator.appName=="Netscape") {
   document.getElementById(ID).innerHTML = sText;
 }
 else if (document.all) document.all[ID].innerHTML = sText
} 

var s_pageName;
var s_campaign;
var s_prop10;

function sendAnalyticsEvent(str){
	s=s_account;
	if(str!=null)ns+=","+str;
	void(s_gs(ns));
	return;
}

function sendLinkEvent(str,lnkname){
	ns=s_account;
	if(str!=""&&str!=null)ns+=","+str; s_linkType="o";
	s_lnk=true;
	s_linkName=lnkname;
	svoid(s_gs(ns));
} 

function setPageName(str){
		//alert(str);
		s_prop10=str;
		sendAnalyticsEvent('');
}

// 10/30/09: Cobalt Remarketing Tag initiative
function cobaltRemarketingTag () {
	var dmaCodeArr = {
		"Atlanta": {dmaCode: "524", dmaDescription: "Atlanta"},
		"Baltimore": {dmaCode: "512", dmaDescription: "Baltimore"},
		"Boston": {dmaCode: "506", dmaDescription: "Boston"},
		"ChicagoNWIndiana": {dmaCode: "602", dmaDescription: "Chicago"},
		"CincinnatiArea": {dmaCode: "515", dmaDescription: "Cincinnati"},
		"ClevelandAkron": {dmaCode: "510", dmaDescription: "Cleveland"},
		"ColumbusArea": {dmaCode: "522", dmaDescription: "Columbus"},
		"Dallas-FtWorthArea": {dmaCode: "623", dmaDescription: "Dallas-Ft. Worth"},
		"DenverArea": {dmaCode: "751", dmaDescription: "Denver"},
		"DetroitArea": {dmaCode: "505", dmaDescription: "Detroit"},
		"FloridaWestCoast": {dmaCode: "539", dmaDescription: "Tampa/Sarasota"},
		"FtMyersNaples": {dmaCode: "571", dmaDescription: "Ft. Myers/Naples"},
		"GreensboroWinstonSalem": {dmaCode: "518", dmaDescription: "Greensboro"},
		"HartfordNewHaven": {dmaCode: "533", dmaDescription: "Hartford/New Haven"},
		"Houston": {dmaCode: "618", dmaDescription: "Houston"},
		"Jacksonville": {dmaCode: "561", dmaDescription: "Jacksonville"},
		"KCArea": {dmaCode: "616", dmaDescription: "Kansas City"},
		"MilwaukeeArea": {dmaCode: "617", dmaDescription: "Milwaukee"},
		"Nashville": {dmaCode: "659", dmaDescription: "Nashville"},
		"NJ-DE-PA": {dmaCode: "504", dmaDescription: "Philadelphia"},
		"NorCal": {dmaCode: "807", dmaDescription: "San Francisco"},
		"Norfolk": {dmaCode: "544", dmaDescription: "Norfolk"},
		"NYNJCT": {dmaCode: "501", dmaDescription: "New York"},
		"OrlandoMelbourne": {dmaCode: "534", dmaDescription: "Orlando/Melbourne"},
		"PalmBeachTreasureCoast": {dmaCode: "548", dmaDescription: "West Palm Beach"},
		"Pittsburgh": {dmaCode: "508", dmaDescription: "Pittsburgh"},
		"RaleighDurham": {dmaCode: "560", dmaDescription: "Raleigh"},
		"SacramentoModesto": {dmaCode: "862", dmaDescription: "Sacramento"},
		"SaltLakeCity ": {dmaCode: "770", dmaDescription: "Salt Lake City"},
		"SanDiegoCounty": {dmaCode: "825", dmaDescription: "San Diego"},
		"SeattleArea": {dmaCode: "819", dmaDescription: "Seattle"},
		"SoCal": {dmaCode: "803", dmaDescription: "Los Angeles"},
		"SouthFlorida": {dmaCode: "528", dmaDescription: "Miami/Ft. Lauderdale"},
		"StLouisArea": {dmaCode: "609", dmaDescription: "St. Louis"},
		"Tucson": {dmaCode: "789", dmaDescription: "Tucson "},
		"TwinCitiesArea": {dmaCode: "613", dmaDescription: "Minneapolis"},
		"Valley": {dmaCode: "753", dmaDescription: "Phoenix"},
		"WashDC": {dmaCode: "511", dmaDescription: "Washington, DC"}
	}
	
	var dmaCodeStr = '';
	var dmaStr = getCity();
	if (dmaStr && dmaCodeArr[dmaStr])
		dmaCodeStr = '&dma=' + dmaCodeArr[dmaStr].dmaCode;
	
	var modelStr = '';
	if (bannerModel)
		modelStr = '&model=' + bannerModel.toLowerCase();
	
	var scr = document.createElement('SCRIPT');
	scr.type = 'text/javascript';
	scr.src = "http://view.admission.net/retargeting/displaytracker.js?webid=dmalexus&make=lexus&sitetype=lslp" + modelStr + dmaCodeStr;
	document.getElementsByTagName('HEAD')[0].appendChild(scr);
}

