function throwBeacon(url) {//alert(url);
	var imgTag            = document.createElement('img');	
	imgTag.style.width    = "1px";	
	imgTag.style.height   = "1px";	
	imgTag.style.border   = "0px";	
	imgTag.alt            = "";	
	imgTag.style.position = "absolute";	
	imgTag.style.top      = "0px";	
	imgTag.style.left     = "0px";	
	imgTag.style.zIndex   = "0";	
	imgTag.src            = url;	
	document.body.insertBefore(imgTag, document.body.firstChild);		
}

VideoMMASLogger = function(referre, RMID,  from){

	var domain = "http://fcgi.weather.com/mmas/";
	var gifFile = "/mmas.gif";
	var fmt = "?fmt=flash";
	var from = "&from=" + from;
	var clipLoc = "";
	var clipID = "";
	var clipName = "";
	var collID = "";
	var collName = "";
	var httpReferrer = "&vdr=" + referre;
	var RMIDVal = "&RMID=" + GetCookie("RMID");	
	var cacheBusterRandom;
	var cacheBusterRandomParm;
	
	
	this.logBeacon = function(acollName, acolID, aclipName, aclipID, aclipURL) {
		collName = "&collname=" + escape(acollName);
		collID = "&collid=" + acolID;
		clipName = "&clipname=" + escape(aclipName);
		clipID = "&clipid=" + aclipID;
		clipLoc = "&clip=" + aclipURL;			
		cacheBusterRandom = parseInt(Math.random()*1000000000);
		httpReferrer = "&vdr="+cacheBusterRandom;
		
		throwBeacon(domain + cacheBusterRandom + gifFile + fmt + from + clipLoc + clipID + clipName + collID + collName + httpReferrer + RMIDVal);
		wxtools.log("*********LOGGING MMAS BEACON************")
	}
}

AnalyticusLogger = function(){

	var domain = "http://x.weather.com/bluebox?";
	var cashBusting = "cb=";
	var plId  = "&plId=";
	var lineupId  = "&lineupId=";
	var clipId = "&clipId=";
	var adserverurl = "&adserverurl=";	
	var cacheBusterRandom;
	var cacheBusterRandomParm;
	
	this.logtag = function(playerID, lineupID, titleID, adServerURL) 
	{
		cacheBusterRandom = parseInt(Math.random()*1000000000);
		throwBeacon(domain + cashBusting + cacheBusterRandom + plId + playerID + lineupId + lineupID + clipId + titleID + adserverurl + adServerURL);
		wxtools.log("*********LOGGING ANALYTICOUS BEACON************")
	}	
}

AnalyticusLogger.prototype = {
	logAdIsPlaying:function(playerID, lineupID, titleID, adServerURL)  {
		// let listeners know that an ad is playing
		this.logtag(playerID, lineupID, titleID, adServerURL);
	}

}

ChannelSwapLogger = function()
{
	var domain = "http://misc.weather.com/common/tracking/";
	var cacheBusterRandom;
	var from = "?from=";
	var fileExtension = ".gif";
	var separator = "/";
	var beaconString = "";
	
	this.logChannelSwapBeacon = function(actionID) {
		cacheBusterRandom = parseInt(Math.random()*1000000000);
		beaconString = domain + cacheBusterRandom + separator + from + actionID + fileExtension;
		//throwBeacon(beaconString);
		wxtools.log("*********LOGGING Channel SWAP BEACON************")
	}
}




