
function VSTracking() {
	var vsObjectMap = {};
	vsObjectMap["destinationAddress.city"] = new vsObject("name", "value", "", "", "city");
	vsObjectMap["destinationAddress.stateProvince"] = new vsObject("name", "value", "", "", "state");
	vsObjectMap["destinationAddress.country"] = new vsObject("name", "value", "", "", "country");
	vsObjectMap["checkInDateMonth"] = new vsObject("name", "value", "", "", "");
	vsObjectMap["checkInDateDay"] = new vsObject("name", "value", "", "", "");
	vsObjectMap["checkInDate"] = new vsObject("name", "value", "", "", "");
	vsObjectMap["marriottRewardsNumber"] = new vsObject("name", "value", "", "", "");

	if ( document.forms[0].elements["country"] )
	{
	    var country = document.forms[0].elements["country"].value;
		if ( country == "UK" || country == "AU" )
		{
			var output;
			var newScript=document.createElement('script') ;
			var rand = Math.random();
			var a = Math.floor(rand * 10000000);
			output ='https://www.marriott.com/common/js/tracking.js?Log=1';
			output+='&PAGENAME=' + escape(document.title)  + '&URL='+ escape(document.location);
			output+='&REFERRER='+escape(document.referrer)+'&num='+a;
			output+=''; 
			newScript.src=output;
			document.body.appendChild(newScript); 
		}
	}
}

addLoadEvent(VSTracking);



