function querystring(key)
{
	var value = null;
	for (var i=0;i<querystring.keys.length;i++)
	{
		if (querystring.keys[i]==key)
		{
			value = querystring.values[i];
			break;
		}
	}
	return value;
}

querystring.keys = new Array();
querystring.values = new Array();

function querystring_Parse()
{
	var query = window.location.search.substring(1);
	var pairs = query.split("&");

	for (var i=0;i<pairs.length;i++)
	{
		var pos = pairs[i].indexOf('=');
		if (pos >= 0)
		{
			var argname = pairs[i].substring(0,pos);
			var value = pairs[i].substring(pos+1);
			querystring.keys[querystring.keys.length] = argname;
			querystring.values[querystring.values.length] = value;
		}
	}
}

querystring_Parse(); 
var entryString = querystring("source");
var pinString = querystring("pin");
var signupPinString = querystring("signup_pin");

          
<!--
// The TrackTag variable refers to the location of the
// base action tag. In the actual implementation this 
// action tag will point to a 1x1 pixel GIF.
var TrackTag = "http://switch.atdmt.com/action/"

// The URL passed from the SWF will be appended to TrackTag.
// The image will be loaded into the img src tags below the 
// Flash ad's OBJECT tag.
function GetActionTag(URL){ 
	if (GetActionTag) { 
		document.action_tag.src = TrackTag + URL;
	}
}

var _hbEC=0,_hbE=new Array;function _hbEvent(a,b){b=_hbE[_hbEC++]=new Object();b._N=a;b._C=0;return b;}
var hbx=_hbEvent("pv");hbx.vpc="HBX0200u";hbx.gn="ehg-bmwna.hitbox.com";



//BEGIN EDITABLE SECTION
//CONFIGURATION VARIABLES
//=====================================
// NOTE: BMWUSA PROD hbx.acct line must be uncommented when pushed to 
// live site. BMWUSA TEST Account should be removed when pushed live.
//BMWUSA TEST Account
//hbx.acct="DM530911HGZE10EN3";//ACCOUNT NUMBER(S)
//BMWUSA PROD Account
hbx.acct="DM5312020MRC10EN3";//ACCOUNT NUMBER(S)
//=====================================
hbx.pn="E93+Microsite+landing";//PAGE NAME(S)
hbx.mlc="/E93+Microsite";//MULTI-LEVEL CONTENT CATEGORY
hbx.pndef="title";//DEFAULT PAGE NAME
hbx.ctdef="full";//DEFAULT CONTENT CATEGORY


//OPTIONAL PAGE VARIABLES
//ACTION SETTINGS
hbx.fv="";//FORM VALIDATION MINIMUM ELEMENTS OR SUBMIT FUNCTION NAME
hbx.lt="none";//LINK TRACKING
hbx.dlf="n";//DOWNLOAD FILTER
hbx.dft="n";//DOWNLOAD FILE NAMING
hbx.elf="n";//EXIT LINK FILTER

//SEGMENTS AND FUNNELS
hbx.seg="";//VISITOR SEGMENTATION
hbx.fnl="";//FUNNELS

//CAMPAIGNS
hbx.cmp="";//CAMPAIGN ID
hbx.cmpn="";//CAMPAIGN ID IN QUERY
hbx.dcmp="";//DYNAMIC CAMPAIGN ID
hbx.dcmpn="";//DYNAMIC CAMPAIGN ID IN QUERY
hbx.dcmpe="";//DYNAMIC CAMPAIGN EXPIRATION
hbx.dcmpre="";//DYNAMIC CAMPAIGN RESPONSE EXPIRATION
hbx.hra="";//RESPONSE ATTRIBUTE
hbx.hqsr="";//RESPONSE ATTRIBUTE IN REFERRAL QUERY
hbx.hqsp="";//RESPONSE ATTRIBUTE IN QUERY
hbx.hlt="";//LEAD TRACKING
hbx.hla="";//LEAD ATTRIBUTE
hbx.gp="";//CAMPAIGN GOAL
hbx.gpn="";//CAMPAIGN GOAL IN QUERY
hbx.hcn="";//CONVERSION ATTRIBUTE
hbx.hcv="";//CONVERSION VALUE
hbx.cp="null";//LEGACY CAMPAIGN
hbx.cpd="";//CAMPAIGN DOMAIN

//CUSTOM VARIABLES
hbx.ci="";//CUSTOMER ID
hbx.hc1="";//CUSTOM 1
hbx.hc2="";//CUSTOM 2
hbx.hc3="";//CUSTOM 3
hbx.hc4="";//CUSTOM 4
hbx.hrf="";//CUSTOM REFERRER
hbx.pec="";//ERROR CODES

//INSERT CUSTOM EVENTS

//END EDITABLE SECTION