function callUberFlood()
{
	var axel = Math.random()+"";
	var a = axel * 10000000000000;
	
	var iframe = document.createElement('iframe');
	iframe.setAttribute( 'src', "http://fls.doubleclick.net/activityi;src=1311136;type=audiusa;cat=request;ord=1;num=" + a + "?" );
	iframe.setAttribute( 'WIDTH', "1" );
	iframe.setAttribute( 'HEIGHT', "1" );
	iframe.setAttribute( 'FRAMEBORDER', "0" );
	
  	document.body.appendChild( iframe );
}

function openAlertPopup( url, name, options, alertmsg )
{
	var popup = window.open( url, name, options );
	if( !popup ) alert( alertmsg );
}

// Spotlight Tagson Click
function tragsonClick() {
	var click1 = new Image();
	var axel = Math.random() + "";
	var ord = axel * 1000000000000000000;
	click1.src = 'http://ad.doubleclick.net/activity;src=123456;type=test123;cat=test456;ord=' + ord + '?';
}

function readCookie(name) {
	var nameEQ = name + "=";
	var ca = document.cookie.split(';');
	for(var i=0;i < ca.length;i++) {
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
	}
	return null;
}

$(document).ready(function() {
	if( s ){
		s.linkTrackVars="eVar50"; 
		s.eVar50 = uniqueID();
		s.tl(true,'o','uniqueID');
	}
});

function uniqueID(){
	var cookie = readCookie( "userID" );
	if( cookie != null ){
		return cookie;
	} else {
		var userID = guid();
		createCookie( "userID", userID, 90 );
		return userID;
	}
}

function getUid(){
	return uniqueID();
}

function S4() {
   return (((1+Math.random())*0x10000)|0).toString(16).substring(1);
}
function guid() {
   return (S4()+S4()+"-"+S4()+"-"+S4()+"-"+S4()+"-"+S4()+S4()+S4());
}

function hostFromUrl( url ){
	var match = /((https?):\/\/([-\w\.]+)+(:\d+)?)(\/([~\-#\w\/_\.]*)?(\?\S+)?)?/i.exec( url );
	return match == null ? "" : match[1];
}

function createCookie(name,value,days) {
	if (days) {
		var date = new Date();
		date.setTime(date.getTime()+(days*24*60*60*1000));
		var expires = "; expires="+date.toGMTString();
	}
	else var expires = "";
	document.cookie = name+"="+value+expires+"; path=/";
}


function eraseCookie(name) {
	createCookie(name,"",-1);
}
