

//COMMON VARIABLES
// From include/commonjsvars
var cp1564687 = "http://cdn.eyewonder.com/100125/adWdrDemos/1564687/";

		// From include/commonjsvars
	
var ew1564687_bannerWidth = 120;
var ew1564687_bannerHeight = 90;
var ew1564687_fullWidth = 120;
var ew1564687_fullHeight = 90;


if (typeof(mpck) != "undefined") mpck_1564687 = mpck;
if (typeof(mpcrid) != 'undefined') mpcrid_1564687 = mpcrid;


var ew_cacheBuster = new Date().getTime();
var ew_cacheBusterReplaceArray = new Array("\\[timestamp\\]", "\\[cachebuster\\]", "\\[random\\]", "\\[randnum\\]"); 	


function ew_getProtocol(cp)
{
	if (cp.indexOf("https://") != -1)
		return "https://";
	else
		return "http://";
}
var ew1564687_protocol = ew_getProtocol("http://cdn.eyewonder.com/100125/adWdrDemos/1564687/");



function parseParam(name) {
 	var query = window.location.search;
 	var pos = query.indexOf(name+"=");	
	var pos2 = 0;
 	if (pos != -1) {
 	    pos = pos+name.length+1;
 		pos2 = query.indexOf("&", pos);
 		if (pos2 != -1) {
 			return query.substring(pos, pos2);
 		} else {
			return query.substring(pos);
 		}
 	} else {
 		return null;
 	}
}
if (parseParam("ew_pubVars") != null)
	var ew_pubVars = parseParam("ew_pubVars");
if (parseParam("ew_clickPrepend") != null)
{
	var clickTagFramePrepend = parseParam("ew_clickPrepend") + "[ewclickthru]";

	
	if (clickTagFramePrepend == "[ewclickthru]")
		clickTagFramePrepend = "[ewclickthru]";
		

}


//RESEARCH TAGS


//TRACKING VARIABLES
// From include/tracking	
	

var ew1564687_startTime = ew_getTime1564687();



var ew1564687_imgArray = new Array(); 
var ew1564687_imgArrayCounter = 0; 

function ew_addImage1564687(img)
{
	ew1564687_imgArray[ew1564687_imgArrayCounter] = document.createElement("img");
	ew1564687_imgArray[ew1564687_imgArrayCounter].setAttribute("src", img); 
	ew1564687_imgArrayCounter++; 
}

function ew1564687_otrk(img, extra)
{
	ew_addImage1564687(cp1564687+img+'?ewbust='+new Date().getTime()+extra);
	return '';
}

function ew1564687_otrk_nobust(img, extra)
{
	ew_addImage1564687(cp1564687+img+'?ewbust=0'+extra);
	return '';
}

function ew1564687_ctrk(type, info)
{ 

}

function ew1564687_ctrk_nobust(type, info)
{ 

}

function ew_thirdpartytrackingcachebust1564687(trkURL)
{
	
	for(var i = 0; i < ew_cacheBusterReplaceArray.length; i++)
	{
		trkURL = trkURL.replace(new RegExp(ew_cacheBusterReplaceArray[i],"gi"), ew_cacheBuster); 
	}
	
	return trkURL;
}


function ew_getTime1564687() { var ew_t = new Date(); return ew_t.getTime();}



function onLoadTracker1564687() { var ew_t = ew_getTime1564687()-ew1564687_startTime; ew1564687_ctrk('onload',ew_t); return ew1564687_otrk('ewtrack_onload.gif','&info='+ew_t); }
function flashTracker1564687() { ew1564687_ctrk('creative',''); return ew1564687_otrk('ewtrack_v.gif',''); }
	
function impressionTracker1564687() { ew1564687_ctrk('impression',''); return ew1564687_otrk('ewtrack.gif',''); }

function flashfailoverTracker1564687() { ew1564687_ctrk('failover_flash',''); return ew1564687_otrk('ewtrack_ff.gif',''); }
function failoverTracker1564687() {  ew1564687_ctrk('failover_img',''); return ew1564687_otrk('ewtrack_f.gif',''); }

function failoverReasonBrowserTracker1564687() {  ew1564687_ctrk('fail_reason_browser',''); return ew1564687_otrk('ewtrack_rb.gif',''); }
function failoverReasonFlashTracker1564687() { ew1564687_ctrk('fail_reason_flash',''); return ew1564687_otrk('ewtrack_rf.gif',''); }
function flashSupportTracker1564687(verStr) { ew1564687_ctrk('flash_support_'+verStr,''); return ew1564687_otrk('ewtrack_'+verStr+'.gif',''); }
function weSupportTracker1564687() { var ew_t = ew_getTime1564687()-ew1564687_startTime; ew1564687_ctrk('wesupport',ew_t); return ew1564687_otrk('ewtrack_wesupport.gif','&info='+ew_t); } 


// Expiration count versions of the _f, _ff, and _v trackers for AIM and ICQ cookie versions
function flashTrackerCache1564687(expCount) { ew1564687_ctrk('creative_aim_exposure',expCount); return ew1564687_otrk('ewtrack_v'+expCount+'.gif',''); }
function flashfailoverTrackerCache1564687(expCount) { ew1564687_ctrk('failover_flash_aim_exposure',expCount); return ew1564687_otrk('ewtrack_ff'+expCount+'.gif',''); }
function failoverTrackerCache1564687(expCount) {  ew1564687_ctrk('failover_img_aim_exposure',expCount); return ew1564687_otrk('ewtrack_f'+expCount+'.gif',''); }



// Out of band tracker request for Flash to call through External Interface
function ew1564687_outOfBandTrackRequest(url)
{
	ew_addImage1564687(url);
}

// Send out the current location
function ew_urlTracker()
{

	return '';
}


document.writeln(impressionTracker1564687());	


// Log the URL for troubleshooting purposes
document.writeln(ew_urlTracker());


	
	// Third Party Impression Tracking


function ew_thirdpartytracking1564687()
{	
	for (var i = 0; i < ew1564687_thirdPartyTrackers.length ; i++)
	{
		if (ew1564687_thirdPartyTrackers[i] != "")
		ew_addImage1564687(ew_thirdpartytrackingcachebust1564687(ew1564687_thirdPartyTrackers[i]));
	}
}

var ew1564687_thirdPartyTrackers = new Array("","","","","","");

ew_thirdpartytracking1564687();

	

	

var isApproval = true;

//DESIGN VARIABLES


if (typeof(clickTagFramePrepend) == "undefined")
	var clickTagFramePrepend = "[ewclickthru]";
clickTagFramePrepend = clickTagFramePrepend.replace("[%ewclickthru%]", "[ewclickthru]");	// Legacy conversion for tags prior to 7/24/2006


if (clickTagFramePrepend == "[ewclickthru]")
	clickTagFramePrepend = "[ewclickthru]";

var ew_mpUsedClickthruMagic = false;


if (ew_mpUsedClickthruMagic == false)
{
var failclickTag = clickTagFramePrepend.replace("[ewclickthru]","http://www.attvideoshare.com");
var	clickTag1 = clickTagFramePrepend.replace("[ewclickthru]","http://www.attvideoshare.com");
var p_clickTag1 = clickTagFramePrepend.replace("[ewclickthru]","http://www.attvideoshare.com");

}





function ew_clickTagCacheBust(_ct)
{
	
	for(var i = 0; i < ew_cacheBusterReplaceArray.length; i++)
		_ct = _ct.replace(new RegExp(ew_cacheBusterReplaceArray[i],"gi"), ew_cacheBuster); 
	if (_ct.indexOf("ord=") >= 0)
		_ct = _ct.split("ord=")[0] + "ord=" + ew_cacheBuster;
	return _ct;
}


clickTag1 = ew_clickTagCacheBust(clickTag1);
p_clickTag1 = ew_clickTagCacheBust(p_clickTag1);

failclickTag = ew_clickTagCacheBust(failclickTag);



if (typeof(failclickTag) == "undefined")
	var failclickTag = "http://www.attvideoshare.com";	//define it anyway because it is referenced (even if not really used)
	

//AUTHENTICATION 

	
/*** Begin include/authentication:AUTHENTICATION_SHORT ***/

var ua = ' ' + navigator.userAgent.toLowerCase();
var isIe = (ua.indexOf('msie') >= 0);
var isNav4 = ((ua.indexOf('mozilla') >= 0) && (ua.indexOf('compatible') == -1) && (parseInt(navigator.appVersion) < 5));
var isWin = (ua.indexOf('win') >= 0);
var isWinVista = false;
var isLinux = (ua.indexOf('linux') >= 0);
var isMac = (ua.indexOf('mac') >= 0);
//Opera
var isOpera = (ua.indexOf('opera') > 0);
if (isOpera)	// Opera's string is almost identical to IE's
	isIe = false;
//KHTML browsers
var ew_isSafari = (ua.indexOf('applewebkit') > 0);
var isKonqueror = (ua.indexOf('konqueror')>0);
// GECKO(Mozilla) browsers
// isGecko will also include Netscape 6+, Epiphany, Galeon, Camino, K-Meleon, etc
// safari says (like gecko) in it's UA string, but safari uses KHTML engine
var isGecko = (ua.indexOf('gecko/') > 0);
var isCamino = (ua.indexOf('camino/') > 0);

// Check for Vista
if(isWin)
{
	isWinVista = (ua.indexOf('windows nt 6.0') >= 0);
}

/*** End include/authentication:AUTHENTICATION_SHORT ***/

	

/*** Begin include/authentication:AUTHENTICATION ***/

// Check how old the gecko version is for the part following "gecko/" in the UA string
var geckoDate;
var geckoRevisionString;
var geckoRevision;
var geckoRevisionMajor;
var geckoRevisionMinor;

var webkitVersion;
if (isGecko)
{
	function ew_getGeckoRevisionString(ua)	// Keep temp variables from being placed into window object
	{
		var tempStr = ua.split("rv:");
		return tempStr[1].split(")")[0];
	}

	geckoRevisionString = ew_getGeckoRevisionString(ua);
	geckoRevision = parseFloat(geckoRevisionString);
	geckoRevisionMajor=parseFloat(geckoRevisionString.split(".")[0] )
	geckoRevisionMinor=parseFloat(geckoRevisionString.split(".")[1]+ "." + geckoRevisionString.split(".")[2])
	geckoDate = parseInt(ua.substr(ua.indexOf('gecko/')+6,8));
}
var ieVersion;
if (isIe)
{
	ieVersion = ua.substr(ua.indexOf('msie')+5,4);
	if (ieVersion.indexOf(';') > 0)
		ieVersion = ieVersion.substr(0,3);
}
var operaVersion
if (isOpera)
{
	operaVersion = ua.substr(ua.indexOf('opera')+6,4);
}
if (ew_isSafari)
{
    webkitVersion = parseInt(ua.substr(ua.indexOf('applewebkit')+12,4));

}
var ew1564687_weSupport = false;
var failReason = "browser";	// Reason we failed over
 
	
/*** Begin include/authentication:AUTHENTICATION_FLASH ***/

var isFlash7up = false;	
var isFlash8up = false; 
var isFlash9up = false; 
var isFlashFailover = false; 
var isFlash9Pre28 = false;	

var ew1564687_flashVersion = new Array(0,0,0);
var ew1564687_flashVersionMajor = 0;
var ew1564687_flashVersionMinor = 0;

// Check Flash info
function ew1564687_getFlashVersion()
{

	if(isIe)
	{
		var checkStr = "ShockwaveFlash.ShockwaveFlash.7";
		if (isWinVista)
			checkStr = "ShockwaveFlash.ShockwaveFlash.9";
		try {
			var swf = new ActiveXObject(checkStr.toString()).GetVariable("$version");
			var ver = swf.substring(swf.indexOf(" "));
			ew1564687_flashVersion = ver.split(",");
		} catch ( e )
		{
			ew1564687_flashVersion = new Array(0,0,0); // Below Flash 7
		}
	} else if( isGecko || isOpera || ew_isSafari )
	{
		ver = new Array();
		var desc = navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin.description; 
		desc = desc.split(" ");
	
		ver[0] = desc[2].split(".")[0];
		ver[1] = desc[2].split(".")[1];
		ver[2] = desc[desc.length-1].split("r")[1]; // Last element of array.. compensates in differences between Mac + Windows
		
		if( ver[0] >= 7 ) ew1564687_flashVersion = ver;
	}
	
	ew1564687_flashVersionMajor = ew1564687_flashVersion[0] + "." + ew1564687_flashVersion[1];
	ew1564687_flashVersionMinor = ew1564687_flashVersion[2];
}


if (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"])
	var navPlugin = (navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin);

if (navPlugin || (isIe && isWin))
{
	ew1564687_getFlashVersion();
	isFlash9up = (ew1564687_flashVersionMajor>=9);
	isFlash8up = (ew1564687_flashVersionMajor>=8);
	isFlash7up = (ew1564687_flashVersionMajor>=7);
	isFlashFailover = (ew1564687_flashVersionMajor>=6);
	isFlash9Pre28 = (ew1564687_flashVersionMajor == 9 && ew1564687_flashVersionMinor < 28);

	if( isWinVista && isFlash9up && isFlash9Pre28 && isIe) 
	{ 
		// Vista requires 9,0,28,0 and up for proper behavior in IE
		ew1564687_weSupport = false;
		failReason = "vistaflash";		
	}
}
else
	isFlash7up = false;
	
/*** End include/authentication:AUTHENTICATION_FLASH ***/

	
	
// Do a an exclusive check for support to protect page contents for rare and untested browsers
if(isGecko || ew_isSafari || (isIe && isWin && ieVersion >= 6) || (isOpera && operaVersion >= 8)) 
{
	// Support Mozilla-based browsers (i.e. Firefox), Safari Mac, 
	// and IE browsers (IE 6/Win and AOL Explorer), and Opera >= 8
	failReason = "none";
	ew1564687_weSupport = true;

	// Do we support Flash 7?
	if (!isFlash7up)
	{
		ew1564687_weSupport = false;
		failReason = "flash";
	}
}
else
{
	// Still attempt a flash failover if browser isn't supported
	failReason = "browser"
	ew1564687_weSupport = false;
}

if (ew_isSafari)
{
	if (webkitVersion < 400)
	{
		ew1564687_weSupport = false;
		failReason = "browser";
	}
}



	

var ew1564687_turnOffExecution = false;



if (!ew1564687_turnOffExecution && isFlash8up)
	document.writeln(flashSupportTracker1564687("8"));

if (!ew1564687_turnOffExecution && isFlash9up)
	document.writeln(flashSupportTracker1564687("9"));

if (!ew1564687_turnOffExecution && isFlash9up && (isFlash9Pre28==false))
	document.writeln(flashSupportTracker1564687("9_0_28_0"));


/*** End include/authentication:AUTHENTICATION ***/

	

//UPDATE: We previously only supported MySpace Messenger in IE. 
//Now we provide approvalTags for Firefox, Safari, with popup/expand emulation ...  9/10/2007
var ew1564687_useFakeApprovalPopup = true;


//CUSTOM FUNCTIONS

	
weSupport = ew1564687_weSupport; 
ew1564687_turnOffExecutionBackup = ew1564687_turnOffExecution; 
	



var ew1564687_localConnectionUUID;
function ew_setUpLocalConnectionUUID1564687()
{
	var ewwin;
	if ( typeof(topWin) == "undefined")
		ewwin = window;
	else
		ewwin = topWin;
	
	if ( typeof( ewwin.ew_localConnectionUUID ) == "undefined")
	{
            ewwin.ew_localConnectionUUID = (new Date().getTime());
	}
       
	ew1564687_localConnectionUUID = ewwin.ew_localConnectionUUID;
}
ew_setUpLocalConnectionUUID1564687();



var ew1564687_context = window; 
var ew1564687_flashObjectWindow = window;
var ew1564687_mainFunctionWindow = window;	
/* Note: The objects won't be present until the page is fully loaded */

/* Use ew_getSWFTag<id> to return either the object or embed tag depending on the browser  */
function ew_getSWFTag1564687()
{ 
	if (isGecko || isOpera)	
		return ew_getEmbedTag1564687();
	else
		return ew_getObjectTag1564687();
}

/* The two functions below shouldn't generally be used, and ew_getSWFTag<id> should be used instead */
function ew_getObjectTag1564687()
{ 
	if (ew1564687_flashObjectWindow.document.getElementById("ewad1564687"))
		return ew1564687_flashObjectWindow.document.getElementById("ewad1564687");
	else
		return null;
}
function ew_getEmbedTag1564687() 
{
	if (ew1564687_flashObjectWindow.document.getElementById("ewembed1564687"))
		return ew1564687_flashObjectWindow.document.getElementById("ewembed1564687");
	else
		return null;
}

//POSITIONING FUNCTIONS 
function findPosX(obj) {
	var curleft = obj.offsetLeft;
	if (obj.offsetParent) {
		while (obj.offsetParent) {
			obj = obj.offsetParent;
			if ((isIe || ew_isSafari || isOpera) && obj.tagName.toUpperCase() == "BODY") break;
			curleft += obj.offsetLeft;
		}
	}
	else if (obj.x)
		curleft += obj.x;
	return curleft;
}

function findPosY(obj) {
	var curtop = obj.offsetTop;
	if (obj.offsetParent) {
		while (obj.offsetParent) {
			obj = obj.offsetParent;
			if ((isIe || ew_isSafari || isOpera) && obj.tagName.toUpperCase() == "BODY") break;
			curtop += obj.offsetTop;
		}
	}
	else if (obj.y)
		curtop += obj.y;
	return curtop;
}


var ew1564687_debugShowErrors = false;		// Whether to throw errors in JS-Flash functionality when encountered


/* ########################################  BEGIN CUSTOM FUNCTIONS #################################################### */

/* Begin ad-specific custom functions */



/*  End ad-specific custom functions */

/*  ############################################################################################# */

/*  Begin execution-specific custom functions */



/*  End execution-specific custom functions */

/* #########################################  END CUSTOM FUNCTIONS #################################################### */

	

ew1564687_weSupport = weSupport; 
ew1564687_turnOffExecution = ew1564687_turnOffExecutionBackup;
	
	

var ew1564687_errorObject;

function ew_throwJSError1564687()
{
	var e = ew1564687_errorObject;
	
	var emsg = "";
	try	{ 
		if (isIe)
		{
			emsg = e.name + ": " + e.description;
		}
		if (isGecko)
		{
			emsg = e.name + ": " + e.message + " in file " + e.fileName + " on line " + e.lineNumber + "\n Stack: \n " + e.stack;
		}
		if (ew_isSafari)
		{
			emsg = e.name + ": " +  e.message + " on line " + e.line;
		}
		if (isOpera)
		{
			emsg = e.message + " on line " + e["opera#sourceloc"];
		}
		ew1564687_debugExternalInterfaceErrorMessage = emsg;
	}
	catch(e)
	{
		ew1564687_debugExternalInterfaceErrorMessage = "Failure in external interface";
	}
	
	if (ew1564687_debugShowErrors == true)
	{
		throw(ew1564687_errorObject);	/* Note: When a custom function causes an error, IE will say the error occurred here, but it didn't :-) The error message will give an idea of where the error is, or check in Firefox */
	}
}


function ew_delegate1564687( functionName )
{
	var ew_args = new Array();
		
	for( var i = 1; i < arguments.length; i++ )
		ew_args[i-1] = arguments[i];
	try
	{
		return ew1564687_mainFunctionWindow[functionName].apply( ew1564687_mainFunctionWindow, ew_args );
	}
	catch (e)
	{
		ew1564687_errorObject = e;
		var dummy = setTimeout(ew_throwJSError1564687, 1);
		return null;
	}
}



function ew_isAvailableExternalInterface1564687()
{
	var flashObj = ew_getSWFTag1564687();
	if (typeof(flashObj) == "undefined" || flashObj == null || typeof(flashObj.ew_isAvailable) == "undefined" || !flashObj.ew_isAvailable())
		return false;
	return true;
}


var ew1564687_debugExternalInterfaceErrorMessage = "";

// Usage: ew_callExternalInterface<id>("functionName","arg1","arg2", ...);
function ew_callExternalInterface1564687(functionName)
{

	if (!ew_isAvailableExternalInterface1564687())
	{
		ew1564687_debugExternalInterfaceErrorMessage = "Object doesn't support External Interface.";
		return null;
	}
	
	var flashObj = ew_getSWFTag1564687();	

	if (typeof(flashObj[functionName]) == "undefined" || flashObj[functionName] == null)
	{
		ew1564687_debugExternalInterfaceErrorMessage = "Object doesn't support this method.";
		return null;
	}

	var ew_args = new Array();
	var ew_argsString = "";
			
	for( var i = 1; i < arguments.length; i++ )
	{
		if (i!=1)
			ew_argsString += ",";
		ew_argsString += "ew_args[" + (i-1) +  "]";
		ew_args[i-1] = arguments[i];
	}
		
	var execString = 'flashObj.'+functionName+'('+ew_argsString+')';
	try {
	return eval(execString);	
	}
	catch (e)
	{
		ew1564687_errorObject = e;
		var dummy = setTimeout(ew_throwJSError1564687, 1);
		return null;
	}	

}
	

// FLASH


/*** Begin include/flash:FLASH8 ***/



var ew1564687_flvNames = "";
var ew1564687_creativeName = "AIM-120x90_v2_FL7.swf";
var ew1564687_swfVersion = 7;


/*** Begin include/flash:FLASH8COMMON ***/
function ew_getfNames(flvvideos,flashBool)
{
	for(var i = 0; i < flashBool.length; i++)
	{
		if(flashBool[i] == "true")
		{
			flvvideos[i] = "fl8_" + flvvideos[i];
		}
	}
	return flvvideos.join(",");
}

function ew_setupCreative(flash7Creative, flash8Creative, flash9Creative)
{
	if (isFlash9up && flash9Creative != "" && !isFlash9Pre28)
	{
		ew1564687_swfVersion = 9;
		return flash9Creative;
	}
	else if (isFlash8up && flash8Creative != "")
	{
		ew1564687_swfVersion = 8;
		return flash8Creative;
	}
	else if (isFlash7up && flash7Creative != "")
	{
		ew1564687_swfVersion = 7;
		return flash7Creative;
	}
	else /* no creative. failover */
	{
		ew1564687_weSupport=false;
		failReason = "nocreative";
		return flash7Creative;	// return anyway, even if not used
	}
}
/*** End include/flash:FLASH8COMMON ***/



function ew_setupFlash8Videos()
{
	var flvvideos = new String("").split(',');
	var flashBool = new String("").split(',');
	ew1564687_flvNames = ew_getfNames(flvvideos,flashBool);
}

ew1564687_creativeName = ew_setupCreative("AIM-120x90_v2_FL7.swf","AIM-120x90_v2_FL8.swf","");

if (isFlash8up && (ew1564687_swfVersion >= 8))
	ew_setupFlash8Videos();

/*** End include/flash:FLASH8 ***/

/*** Begin include/flash:FLASHVARS ***/

var ew1564687_adMode = "prog";


var ew1564687_videoPath = "http://cdn.eyewonder.com/100125/video/";


var ew1564687_videoID = '';



if (typeof(isIFrameContent) != "undefined" && isIFrameContent)
	ew_qaReportUUID = topWin.ew_qaReportUUID;


if(typeof(parseParam)=="undefined")
{	
	function parseParam(name) {
		var query = window.location.search;
		var pos = query.indexOf(name+"=");	
		var pos2 = 0;
		if (pos != -1) {
			pos = pos+name.length+1;
			pos2 = query.indexOf("&", pos);
			if (pos2 != -1) {
				return query.substring(pos, pos2);
			} else {
				return query.substring(pos);
			}
		} else {
			return null;
		}
	}
}
if (typeof(ew_qaReportUUID)=="undefined")
{
	ew_qaReportUUID = parseParam("qaUUID");
	if(ew_qaReportUUID == null)
		ew_qaReportUUID = "common";
}	






function ew_verifyPrepend(url)
{
	var newUrl = url;
	if (url.indexOf("http") != 0 || url.indexOf("ftp") != 0)
	{
		if (url.indexOf("http") != -1)
		{
			newUrl = url.substr(url.indexOf("http"));
		}
		else if (url.indexOf("ftp") != -1)
		{
			newUrl = url.substr(url.indexOf("ftp"));
		}
	}
	return newUrl;
}

var ewclicktags1564687 = ''
	+ '&clickTag1='+escape(ew_verifyPrepend(clickTag1));

if( typeof( ew1564687_flashvarsExtra ) == "undefined" )
	var ew1564687_flashvarsExtra = "";


var ew1564687_browserEngine = "unknown";
if (isGecko)
	ew1564687_browserEngine = "gecko";
else if (isIe)
	ew1564687_browserEngine = "ie";
else if (isOpera)
	ew1564687_browserEngine = "opera";
else if (ew_isSafari)
	ew1564687_browserEngine = "webkit";


var ew1564687_adTypeID = '30';
var ew1564687_adType = 'MySpaceIM Buddy List';
if (ew1564687_adTypeID=='22' || ew1564687_adType=="Interstitial")
	ew1564687_adTypeID = '5';

if (ew1564687_adTypeID=='30')
	ew1564687_adTypeID = '8';



var ew1564687_customFlashString = ''; 
if (ew1564687_customFlashString != '') 
	{ 
		ew1564687_customFlashString = '&' + ew1564687_customFlashString.replace(/\|/g, '&'); 
	} 


if (typeof(ew1564687_localConnectionUUID) == "undefined")
	ew1564687_localConnectionUUID = (new Date().getTime());






var flashvarsClickTagPrepend = "[ewclickthru]";
if (typeof(clickTagFramePrepend) != 'undefined')
	flashvarsClickTagPrepend = clickTagFramePrepend;
	

var ewflashvars1564687 = 'ewbase='+cp1564687
	+ '&bwfile=bwtest.swf'
	+ '&creative=' + ew1564687_creativeName
	+ '&vLength='
	+ '&bw=56,90,135,300,450,600'
	+ '&buf=5,4,3,2,2,2'
	+ '&flv=' + ew1564687_flvNames
	+ '&flvId=0'
	+ '&formatId='+ew1564687_adTypeID
	+ '&aInit='+'user'   // AIM or Windows Live Messenger
	+ '&vInit='
	+ '&videoID='+ew1564687_videoID
	+ '&videoPath='+ew1564687_videoPath
	+ '&adId=1564687'
	+ '&adMode=' + ew1564687_adMode
	+ '&trkUrl=http://cdn.eyewonder.com/100125/'
	+ '&swfVersion=' + ew1564687_swfVersion
	+ '&browserEngine=' + ew1564687_browserEngine // ie, gecko, webkit, or opera
	+ '&qaReportUUID=' + ew_qaReportUUID
	+ '&localConnectionUUID=' + ew1564687_localConnectionUUID
	+ '&edgeDetect=none' 
	+ '&clickTagPrepend=' + escape(flashvarsClickTagPrepend)
	+ ew1564687_flashvarsExtra
	+ ew1564687_customFlashString
 + ewclicktags1564687;

/*** End include/flash:FLASHVARS ***/


// POPUP CODE
var ew1564687_popupRef;	// Global reference to popup window
var toggle = false;
function operaToggle()
{
	toggle = !(toggle);
	if(toggle)
	{
		ew_popup();
	}
	else { ew_hidePopup(); }
}


/*** Begin include/flash:FLASH8PANEL ***/



var ew1564687_panelCreativeName = "AIM-300x250_v2_FL7.swf";
var ew1564687_panelflvNames = "Cingular-ATT Video Share - gorilla 115x115,Cingular-ATT Video Share - ski 115x115,Cingular-ATT Video Share - goats 115x115";





function ew_setupFlash8PanelVideos()
{
	var flvvideos = new String("Cingular-ATT Video Share - gorilla 115x115,Cingular-ATT Video Share - ski 115x115,Cingular-ATT Video Share - goats 115x115").split(',');
	var flashBool = new String("true,true,true").split(',');
	ew1564687_panelflvNames = ew_getfNames(flvvideos,flashBool);
}

ew1564687_panelCreativeName = ew_setupCreative("AIM-300x250_v2_FL7.swf","AIM-300x250_v2_FL8.swf","");

if (isFlash8up && (ew1564687_swfVersion >= 8))
	ew_setupFlash8PanelVideos();
	
/*** End include/flash:FLASH8PANEL ***/

	

var ewpanel_flashvars1564687 = 'ewbase='+cp1564687
	+ '&bwfile=bwtest.swf'
	+ '&creative=' + ew1564687_panelCreativeName
	+ '&vLength=18.8,15.8,13.8'
	+ '&bw=56,90,135,300,450,600'
	+ '&buf=5,4,3,2,2,2'
	+ '&flv=' + ew1564687_panelflvNames
	+ '&flvId=0'
	+ '&aInit=user'
	+ '&vInit=host'
	+ '&videoID=6854,6855,6853'
	+ '&videoPath='+ew1564687_videoPath
	+ '&adId=1564687'
	+ '&adMode=' + ew1564687_adMode
	+ '&trkUrl=http://cdn.eyewonder.com/100125/'
	+ '&swfVersion=' + ew1564687_swfVersion
	+ '&qaReportUUID=' + ew_qaReportUUID
	+ '&localConnectionUUID=' + ew1564687_localConnectionUUID
	+ ew1564687_flashvarsExtra
	+ ew1564687_customFlashString
	+'&clickTag1='+escape(p_clickTag1)
	;

function ew_generatePanelHTML(){

var flashPanel1564687 =''
	+'<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="' + ew1564687_protocol + 'fpdownload.adobe.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="300" height="250" id="ewad1564687" align="middle" tabindex="-1">'
	+'<param name="allowScriptAccess" value="always">'
	+'<param name="movie" value="'+cp1564687+ew1564687_panelCreativeName+'">'
	+'<param name="quality" value="high">'
	+'<param name="allowFullScreen" value="true">'
	+'<param name="bgcolor" value="white">'
	+'<param name="base" value="'+cp1564687+'">'
	+'<param name="wmode" value="window" />'
	+'<param name="FlashVars" value="'+ewpanel_flashvars1564687+'" />'
	+'<embed id="ewembed1564687"  src="'+cp1564687+ew1564687_panelCreativeName+'" base="'+cp1564687+'" wmode="window" quality="high" bgcolor="white" width="300" height="250" name="ewad1564687" FlashVars="'+ewpanel_flashvars1564687+'" align="middle" allowScriptAccess="always" allowFullScreen="true"  type="application/x-shockwave-flash" pluginspage="' + ew1564687_protocol + 'adobe.com/go/getflashplayer">'
	+'</object>';
	
	return flashPanel1564687;
	
}

function findPosX(obj) {
	var curleft = obj.offsetLeft;
	if (obj.offsetParent) {
		while (obj.offsetParent) {
			obj = obj.offsetParent;
			curleft += obj.offsetLeft;			
		}
	}
	else if (obj.x)
		curleft += obj.x;
	return curleft;
}

function findPosY(obj) {
	var curtop = obj.offsetTop;
	if (obj.offsetParent) {
		while (obj.offsetParent) {
			obj = obj.offsetParent;
			curtop += obj.offsetTop;			
		}
	}
	else if (obj.y)
		curtop += obj.y;
		
	return curtop;
}

/* Begin popup stuff */
if (typeof(doHide) == 'undefined')
  var ew_doHide = true;
var hideTimer;
if (typeof(ew1564687_useHideTimer) == 'undefined')
	var ew1564687_useHideTimer = true;
var isDemo = true;
if(isDemo)
	ew1564687_useHideTimer = false;
function ew_popup()
{
	ew1564687_popupRef=window.createPopup();
	var _e=ew1564687_popupRef.document.body;
	_e.style.backgroundColor="transparent";
	_e.style.border="none";
	_e.innerHTML=ew_generatePanelHTML();

	ew1564687_popupRef.document.getElementById("ewad1564687").onmouseout=ew_hidePopupMouseOut;
	ew1564687_popupRef.document.getElementById("ewad1564687").onmouseover=ew_getFocus;
	
	var adX = findPosX( document.getElementById('ewad1564687') );
	var adY = findPosY( document.getElementById('ewad1564687') );
	
	ew1564687_popupRef.show( adX + (120 - 300) ,adY,300,250,document.body);
	if (ew1564687_useHideTimer==true)
		hideTimer = window.setTimeout("ew1564687_popupRef.hide()", 2000);	
}

function ew_fake_popup()
{
	ew1564687_popupRef = document.getElementById('fakePopupViaIFrame');
	if(ew1564687_popupRef  == null)
	{
		
		var pop = document.createElement('div');
		pop.setAttribute('id','fakePopupViaIFrame');
		ew1564687_popupRef = pop;
		document.body.appendChild(pop);
	}
	if(ew1564687_popupRef.innerHTML == "")
	{
		var adid = 'ewad1564687';
		var ad = document.getElementById(adid);
		var adY = findPosY( ad );
		if(isCamino)
		{
			adY = adY - 35;
		}
		else if(!(isIe || ew_isSafari || isOpera)) adY = adY - 30;
		if(isMac && isGecko) adY = adY - 3;
		var adX = findPosX( ad );
		adX = adX - 300 + 120;
		var srcStr = cp1564687+'mymsgrPopup.html?null='+'&clickTag1='+escape(p_clickTag1)+'&qaUUID='+ew_qaReportUUID;
		var ifr = '<iframe id="ew_popup_IFRAME" height="250"'
		+'width="300" scrolling="no" border="0" frameborder="0" src="'+srcStr+'"></iframe>';
		
		ew1564687_popupRef.innerHTML = ifr;
		if(isIe)
		{
			ew1564687_popupRef.style.cssText='position: absolute; visibility: visible; z-index: 100; left: '+adX+'px; top: '+adY+'px; border-width: 0px;';
		}
		else
		{
			ew1564687_popupRef.setAttribute('style','position: absolute; visibility: visible; z-index: 100; left: '+adX+'px; top: '+adY+'px; border-width: 0px;');
		}
		if (window.addEventListener) ew1564687_popupRef.addEventListener('mouseout',ew_hidePopupMouseOut,false);
		else if (window.attachEvent) ew1564687_popupRef.attachEvent("onmouseout",ew_hidePopupMouseOut);
		if (window.addEventListener) ew1564687_popupRef.addEventListener('mouseover',ew_getFocus,false);
		else if (window.attachEvent) ew1564687_popupRef.attachEvent("onmouseover",ew_getFocus);
		if (ew1564687_useHideTimer==true)
			hideTimer = window.setTimeout("ew_hidePopupMouseOut()", 2000);	
		ad.parentNode.style.visibility = "hidden";
	}
}

function ew_hidePopupMouseOut()
{
	if( ew_doHide ) 
	{
		var dummy = setTimeout(ew_hidePopup,10);	
	}
}

function ew_hidePopup()
{
	ew1564687_popupRef.hide();
}

function ew_fake_hidePopup()
{
	var ad = document.getElementById('ewad1564687');
	ad.parentNode.style.visibility = "visible";
	var framediv = document.getElementById('fakePopupViaIFrame');
	framediv.innerHTML = "";
}

function ew_getFocus()
{
	if(ew1564687_useFakeApprovalPopup == false)
		ew1564687_popupRef.document.parentWindow.focus();
	if (typeof(hideTimer) != 'undefined')
		window.clearTimeout(hideTimer); 	
}

function ew_disableRolloff()
{
	ew_doHide = false;
}

function ew_enableRolloff()
{
	ew_doHide = true;
}

if (ew1564687_useFakeApprovalPopup)
{
	ew_popup = ew_fake_popup;
	ew_hidePopup = ew_fake_hidePopup;
	if(isOpera)
	{
	var opera_w = document.createElement('div');
	opera_w.setAttribute('id','opera_warning');
	opera_w.setAttribute('align','right');
	opera_w.setAttribute('style',' color: red; position: absolute; top: 550px; width: 99%;');
	document.body.appendChild(opera_w);
	opera_w.innerHTML = '<table bgcolor="white" width="400" height="160" border="1" cellpadding="10" cellspacing="3">'+
  '<tr><td width="225" height="160">Full functionality for Opera is not supported in this release.  Please use a different browser if you want the ad to behave as it would in a real scenario.    If the flash doesn\'t respond to mouse events, you can use this:</td>' +
  '<td width="175" height="160" align="right"><input type="checkbox" name="forceOpera" id="forceOpera" onclick="operaToggle()"> Force open/close? </input></td>' +
  '</tr>'+
'</table>';
	}
}


	var ew_isInternetExplorer = isIe;
	function ewad1564687_DoFSCommand(command, args) 
	{
		if ( command == "popup" ) 
		{
			ew_popup();
		}
		
		if ( command == "closeWindow" )
		{
			ew_hidePopup();
		}
		
		if ( command == "disableRolloff" )
		{
			ew_disableRolloff();
		}
		
		if ( command == "enableRolloff" )
		{
			ew_enableRolloff();
		}	
	
	}

	if (isIe) document.writeln('<script language="JScript" for="ewad1564687" event="FSCommand(command, args)">ewad1564687_DoFSCommand(command, args);</script>');
	



//EYEWONDER FLASH OBJECT
var flashHTML1564687 = ''
	+'<div style="position: absolute; top: 0; left: 0;">'
	+'<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="' + ew1564687_protocol + 'fpdownload.adobe.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="120" height="90" id="ewad1564687" align="middle">'
	+'<param name="allowScriptAccess" value="always">'
	+'<param name="movie" value="'+cp1564687+ew1564687_creativeName+'">'
	+'<param name="quality" value="high">'
	+'<param name="allowFullScreen" value="true">'
	+'<param name="bgcolor" value="#FFFFFF">'
	+'<param name="base" value="'+cp1564687+'">'
	+'<param name="wmode" value="window" />'
	+'<param name="flashvars" value="'+ewflashvars1564687+'" />'
	+'<embed id="ewembed1564687"  src="'+cp1564687+ew1564687_creativeName+'" base="'+cp1564687+'" wmode="window" quality="high" bgcolor="#FFFFFF" width="120" height="90" name="ewad1564687" flashvars="'+ewflashvars1564687+'" align="middle" allowScriptAccess="always" allowFullScreen="true" type="application/x-shockwave-flash" pluginspage="' + ew1564687_protocol + 'adobe.com/go/getflashplayer">'
	+'</object>'
	+'</div>';

function setFailover(flashFail,imgFail){
	var retVal = "";
	var flashfailoverHTML1564687 ='<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="' + ew1564687_protocol + 'fpdownload.adobe.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,0,0" width="120" height="90" id="ewfaildesign" align="middle">'
		+'<param name="allowScriptAccess" value="always">'
		+'<param name="movie" value="'+cp1564687+flashFail+'">'
		+'<param name="quality" value="high">'
		+'<param name="bgcolor" value="#FFFFFF">'
		+'<param name="wmode" value="window">'
		+'<param name="flashvars" value="clickTag='+escape(failclickTag)+'" />'
		+'<embed id="ewembed1564687"  src="'+cp1564687+flashFail+'" flashvars="clickTag='+escape(failclickTag)+'" quality="high" wmode="window" bgcolor="#FFFFFF" width="120" height="90" name="ewfaildesign" align="middle" allowScriptAccess="always" type="application/x-shockwave-flash" base="'+cp1564687+'" pluginspage="' + ew1564687_protocol + 'adobe.com/go/getflashplayer">'
		+'</object>';

	var failoverHTML1564687 = '<a href="'+failclickTag+'" target="_blank"><img src="'+cp1564687+imgFail+'" border="0"></a>';
	if(!ew1564687_turnOffExecution&&isFlashFailover&&false) {
		retVal += flashfailoverHTML1564687;
		retVal += flashfailoverTracker1564687();
	}
	else {
		retVal += failoverHTML1564687;
		if(!ew1564687_turnOffExecution)
			retVal += failoverTracker1564687();
		else
			retVal += failoverTurnOffExecutionTracker1564687();
	}
	
	return retVal;
}

//appends flash ad div to the banner div (called on page load)


//SERVE THE APPROPRIATE FILE
if(ew1564687_weSupport) {

	document.writeln(weSupportTracker1564687());
	document.writeln(flashHTML1564687);	
	document.writeln(flashTracker1564687());
}
else { //serve failover
	document.writeln(setFailover("","failover.gif"));
	// Reason for failover
	if (failReason == "browser")
		document.writeln(failoverReasonBrowserTracker1564687());
	else if (failReason == "flash")
		document.writeln(failoverReasonFlashTracker1564687());
}

if (ew1564687_weSupport)
	document.writeln(onLoadTracker1564687());	// We don't use onLoad in MySpaceIM

function checkDayTime(){
	// Force host
	return false;
}



