/* Generated: 11/30/2007  11:06 AM EST. EW Web Code Version: 11.4.1 */




if (inDapIF && inDapMgrIf) {
	if ((navigator.userAgent.toLowerCase()).indexOf('gecko/') > 0)
	{
		document.close();	
		document.open();
	}
}	

//COMMON VARIABLES
// From include/commonjsvars
var cp1388610 = "http://cdn.eyewonder.com/100125/adWdrDemos/1388610/";

		// From include/commonjsvars
	
var ew1388610_bannerWidth = 160;
var ew1388610_bannerHeight = 600;
var ew1388610_fullWidth = 300;
var ew1388610_fullHeight = 600;

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 ew1388610_protocol = ew_getProtocol("http://cdn.eyewonder.com/100125/adWdrDemos/1388610/");
	
	

//RESEARCH TAGS


//TRACKING VARIABLES
// From include/tracking	
	

var ew1388610_startTime = ew_getTime1388610();



var ew1388610_imgArray = new Array(); 
var ew1388610_imgArrayCounter = 0; 

function ew_addImage1388610(img)
{
	ew1388610_imgArray[ew1388610_imgArrayCounter] = document.createElement("img");
	ew1388610_imgArray[ew1388610_imgArrayCounter].setAttribute("src", img); 
	ew1388610_imgArrayCounter++; 
}

function ew1388610_otrk(img, extra)
{
	ew_addImage1388610(cp1388610+img+'?ewbust='+new Date().getTime()+extra);
	return '';
}

function ew1388610_otrk_nobust(img, extra)
{
	ew_addImage1388610(cp1388610+img+'?ewbust=0'+extra);
	return '';
}

function ew1388610_ctrk(type, info)
{ 

}

function ew1388610_ctrk_nobust(type, info)
{ 

}

function ew_thirdpartytrackingcachebust1388610(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_getTime1388610() { var ew_t = new Date(); return ew_t.getTime();}



function onLoadTracker1388610() { var ew_t = ew_getTime1388610()-ew1388610_startTime; ew1388610_ctrk('onload',ew_t); return ew1388610_otrk('ewtrack_onload.gif','&info='+ew_t); }
function flashTracker1388610() { ew1388610_ctrk('creative',''); return ew1388610_otrk('ewtrack_v.gif',''); }
	
function impressionTracker1388610() { ew1388610_ctrk('impression',''); return ew1388610_otrk('ewtrack.gif',''); }

function flashfailoverTracker1388610() { ew1388610_ctrk('failover_flash',''); return ew1388610_otrk('ewtrack_ff.gif',''); }
function failoverTracker1388610() {  ew1388610_ctrk('failover_img',''); return ew1388610_otrk('ewtrack_f.gif',''); }

function failoverReasonBrowserTracker1388610() {  ew1388610_ctrk('fail_reason_browser',''); return ew1388610_otrk('ewtrack_rb.gif',''); }
function failoverReasonFlashTracker1388610() { ew1388610_ctrk('fail_reason_flash',''); return ew1388610_otrk('ewtrack_rf.gif',''); }
function flashSupportTracker1388610(verStr) { ew1388610_ctrk('flash_support_'+verStr,''); return ew1388610_otrk('ewtrack_'+verStr+'.gif',''); }
function weSupportTracker1388610() { var ew_t = ew_getTime1388610()-ew1388610_startTime; ew1388610_ctrk('wesupport',ew_t); return ew1388610_otrk('ewtrack_wesupport.gif','&info='+ew_t); } 


// Expiration count versions of the _f, _ff, and _v trackers for AIM and ICQ cookie versions
function flashTrackerCache1388610(expCount) { ew1388610_ctrk('creative_aim_exposure',expCount); return ew1388610_otrk('ewtrack_v'+expCount+'.gif',''); }
function flashfailoverTrackerCache1388610(expCount) { ew1388610_ctrk('failover_flash_aim_exposure',expCount); return ew1388610_otrk('ewtrack_ff'+expCount+'.gif',''); }
function failoverTrackerCache1388610(expCount) {  ew1388610_ctrk('failover_img_aim_exposure',expCount); return ew1388610_otrk('ewtrack_f'+expCount+'.gif',''); }



// Out of band tracker request for Flash to call through External Interface
function ew1388610_outOfBandTrackRequest(url)
{
	ew_addImage1388610(url);
}

// Send out the current location
function ew_urlTracker()
{

	return '';
}


document.writeln(impressionTracker1388610());	


// Log the URL for troubleshooting purposes
document.writeln(ew_urlTracker());


	
	// Third Party Impression Tracking


function ew_thirdpartytracking1388610()
{	
	for (var i = 0; i < ew1388610_thirdPartyTrackers.length ; i++)
	{
		if (ew1388610_thirdPartyTrackers[i] != "")
		ew_addImage1388610(ew_thirdpartytrackingcachebust1388610(ew1388610_thirdPartyTrackers[i]));
	}
}

var ew1388610_thirdPartyTrackers = new Array("","","","","","");

ew_thirdpartytracking1388610();

	

	

//DESIGN VARIABLES
var ew_adFile_Proxy = cp1388610+"exp_interimDetect.html";


if (typeof(clickTagFramePrepend) == "undefined")
	var clickTagFramePrepend = "[ewclickthru]";
clickTagFramePrepend = clickTagFramePrepend.replace("[%ewclickthru%]", "[ewclickthru]");	// Legacy conversion for tags prior to 7/24/2006

var ew_mpUsedClickthruMagic = false;


if (ew_mpUsedClickthruMagic == false)
{
var failclickTag = clickTagFramePrepend.replace("[ewclickthru]","http://www.us.playstation.com/uncharted/");
var	clickTag1 = clickTagFramePrepend.replace("[ewclickthru]","http://www.us.playstation.com/uncharted/");
}





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);
failclickTag = ew_clickTagCacheBust(failclickTag);



if (typeof(failclickTag) == "undefined")
	var failclickTag = "http://www.us.playstation.com/uncharted/";	//define it anyway because it is referenced (even if not really used)
		

if(typeof(inFIF) == "undefined") // Added to not throw errors if it's not defined.
	var inFIF = false;


var ew_isIFrame = false;	// iframe detection turned off for this site
var ew_interimFile = "";
	


if (typeof(ew_qaInterimFileOverride) != "undefined")	// NEVER set ew_qaInterimFileOverride manually. EyeWonder QA use only.
{
	ew_interimFile = ew_qaInterimFileOverride;
}



	
/*** Begin include/sitespecific/msn:MSN_DAP_SETVARS ***/
if(typeof(inDapIF) == "undefined") // Added to not throw undefined errors if it's not defined.
    var inDapIF = false;  
if(inDapIF)
    ew_isIFrame = false;
if(typeof(inDapMgrIf) == "undefined") // Added to not throw undefined errors if it's not defined.
    var inDapMgrIf = false;  

		    
var ew1388610_MSNDAP_DynIF;	
var ew1388610_MSNDAP_DynIFOrigParent;	
var ew1388610_MSNDAP_DynIFOrigNextChild; 

/*** End include/sitespecific/msn:MSN_DAP_SETVARS ***/


if (ew_isIFrame)
{

	var ew1388610_iFrameQueryStringExtra = "";
}

if (ew_isIFrame)
{
	var ew_containsHTTP = (( ew_interimFile.indexOf("http://") > -1 ) || 
				( ew_interimFile.indexOf("https://") > -1 ));
	if (!ew_containsHTTP)
	{	
		var ref = document.referrer;
		var host='';
		if(ref == '') {
			host = 'http://'+document.domain; 
		}
		else {
			var pos1 = ref.indexOf("://");
			if (pos1 != -1) {
				pos2 = ref.indexOf("/", pos1+3);
				host = ref.substring(0, pos2);
			}
		}
	
		if(ew_interimFile.indexOf('/')==0) {
			ew_interimFile = host+ew_interimFile; 
		}
		else {
			ew_interimFile = host+'/'+ew_interimFile;
		}

	}
}

//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 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 ew1388610_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 ew1388610_flashVersion = new Array(0,0,0);
var ew1388610_flashVersionMajor = 0;
var ew1388610_flashVersionMinor = 0;

// Check Flash info
function ew1388610_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(" "));
			ew1388610_flashVersion = ver.split(",");
		} catch ( e )
		{
			ew1388610_flashVersion = new Array(0,0,0); // Below Flash 7
		}
	} else if( isGecko || isOpera || ew_isSafari )
	{
		ver = new Array();
		var desc = navigator.plugins["Shockwave Flash"].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 ) ew1388610_flashVersion = ver;
	}
	
	ew1388610_flashVersionMajor = ew1388610_flashVersion[0] + "." + ew1388610_flashVersion[1];
	ew1388610_flashVersionMinor = ew1388610_flashVersion[2];
}


if (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"])
	var navPlugin = (navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin);

if (navPlugin || (isIe && isWin))
{
	ew1388610_getFlashVersion();
	isFlash9up = (ew1388610_flashVersionMajor>=9);
	isFlash8up = (ew1388610_flashVersionMajor>=8);
	isFlash7up = (ew1388610_flashVersionMajor>=7);
	isFlashFailover = (ew1388610_flashVersionMajor>=6);
	isFlash9Pre28 = (ew1388610_flashVersionMajor == 9 && ew1388610_flashVersionMinor < 28);

	if( isWinVista && isFlash9up && isFlash9Pre28 && isIe) 
	{ 
		// Vista requires 9,0,28,0 and up for proper behavior in IE
		ew1388610_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";
	ew1388610_weSupport = true;

	// Do we support Flash 7?
	if (!isFlash7up)
	{
		ew1388610_weSupport = false;
		failReason = "flash";
	}
}
else
{
	// Still attempt a flash failover if browser isn't supported
	failReason = "browser"
	ew1388610_weSupport = false;
}

if (ew_isSafari)
{
	if (webkitVersion < 400)
	{
		ew1388610_weSupport = false;
		failReason = "browser";
	}
}



	

var ew1388610_turnOffExecution = false;



if (!ew1388610_turnOffExecution && isFlash8up)
	document.writeln(flashSupportTracker1388610("8"));

if (!ew1388610_turnOffExecution && isFlash9up)
	document.writeln(flashSupportTracker1388610("9"));

if (!ew1388610_turnOffExecution && isFlash9up && (isFlash9Pre28==false))
	document.writeln(flashSupportTracker1388610("9_0_28_0"));


/*** End include/authentication:AUTHENTICATION ***/

	
// We support expandables in Opera 8+ for JS ads & Opera 9+ for Iframe Ads
if (isOpera)
{
	failReason = "browser";
	ew1388610_weSupport = false;
	if ((operaVersion >= 8 && !ew_isIFrame) || (operaVersion >= 9))
	{
		ew1388610_weSupport = true;
		failReason = "none";
	}
}
// Flash doesn't currently honor clipping on *nix browsers (Q1 2006)
if (!isWin && !isMac)
{
    failReason = "flash";
    ew1388610_weSupport = false;
}




var ew1388610_removeFromFlow = false;


//CUSTOM FUNCTIONS

	
weSupport = ew1388610_weSupport; 
ew1388610_turnOffExecutionBackup = ew1388610_turnOffExecution; 
	



var ew1388610_localConnectionUUID;
function ew_setUpLocalConnectionUUID1388610()
{
	var ewwin;
	if ( typeof(topWin) == "undefined")
		ewwin = window;
	else
		ewwin = topWin;
	
	if ( typeof( ewwin.ew_localConnectionUUID ) == "undefined")
	{
            ewwin.ew_localConnectionUUID = (new Date().getTime());
	}
       
	ew1388610_localConnectionUUID = ewwin.ew_localConnectionUUID;
}
ew_setUpLocalConnectionUUID1388610();



var ew1388610_context = window; 
var ew1388610_flashObjectWindow = window;
var ew1388610_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_getSWFTag1388610()
{ 
	if (isGecko || isOpera)	
		return ew_getEmbedTag1388610();
	else
		return ew_getObjectTag1388610();
}

/* The two functions below shouldn't generally be used, and ew_getSWFTag<id> should be used instead */
function ew_getObjectTag1388610()
{ 
	if (ew1388610_flashObjectWindow.document.getElementById("ewad1388610"))
		return ew1388610_flashObjectWindow.document.getElementById("ewad1388610");
	else
		return null;
}
function ew_getEmbedTag1388610() 
{
	if (ew1388610_flashObjectWindow.document.getElementById("ewembed1388610"))
		return ew1388610_flashObjectWindow.document.getElementById("ewembed1388610");
	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) && obj.tagName == "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) && obj.tagName == "BODY") break;
			curtop += obj.offsetTop;			
		}
	}
	else if (obj.y)
		curtop += obj.y;
	return curtop;
}


var ew1388610_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 #################################################### */

	

ew1388610_weSupport = weSupport; 
ew1388610_turnOffExecution = ew1388610_turnOffExecutionBackup;
	
	

var ew1388610_errorObject;

function ew_throwJSError1388610()
{
	var e = ew1388610_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"];
		}
		ew1388610_debugExternalInterfaceErrorMessage = emsg;
	}
	catch(e)
	{
		ew1388610_debugExternalInterfaceErrorMessage = "Failure in external interface";
	}
	
	if (ew1388610_debugShowErrors == true)
	{
		throw(ew1388610_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_delegate1388610( functionName )
{
	var ew_args = new Array();
		
	for( var i = 1; i < arguments.length; i++ )
		ew_args[i-1] = arguments[i];
	try
	{
		return ew1388610_mainFunctionWindow[functionName].apply( ew1388610_mainFunctionWindow, ew_args );
	}
	catch (e)
	{
		ew1388610_errorObject = e;
		var dummy = setTimeout(ew_throwJSError1388610, 1);
		return null;
	}
}



function ew_isAvailableExternalInterface1388610()
{
	var flashObj = ew_getSWFTag1388610();
	if (typeof(flashObj) == "undefined" || flashObj == null || typeof(flashObj.ew_isAvailable) == "undefined" || !flashObj.ew_isAvailable())
		return false;
	return true;
}


var ew1388610_debugExternalInterfaceErrorMessage = "";

// Usage: ew_callExternalInterface<id>("functionName","arg1","arg2", ...);
function ew_callExternalInterface1388610(functionName)
{

	if (!ew_isAvailableExternalInterface1388610())
	{
		ew1388610_debugExternalInterfaceErrorMessage = "Object doesn't support External Interface.";
		return null;
	}
	
	var flashObj = ew_getSWFTag1388610();	

	if (typeof(flashObj[functionName]) == "undefined" || flashObj[functionName] == null)
	{
		ew1388610_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)
	{
		ew1388610_errorObject = e;
		var dummy = setTimeout(ew_throwJSError1388610, 1);
		return null;
	}	

}
	

// FLASH

/*** Begin include/flash:FLASH8 ***/



var ew1388610_flvNames = "PS3 Uncharted - ZoomQuilt - 600x500";
var ew1388610_creativeName = "";
var ew1388610_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)
	{
		ew1388610_swfVersion = 9;
		return flash9Creative;
	}
	else if (isFlash8up && flash8Creative != "")
	{
		ew1388610_swfVersion = 8;
		return flash8Creative;
	}
	else if (isFlash7up && flash7Creative != "")
	{
		ew1388610_swfVersion = 7;
		return flash7Creative;
	}
	else /* no creative. failover */
	{
		ew1388610_weSupport=false;
		failReason = "nocreative";
		return flash7Creative;	// return anyway, even if not used
	}
}
/*** End include/flash:FLASH8COMMON ***/



function ew_setupFlash8Videos()
{
	var flvvideos = new String("PS3 Uncharted - ZoomQuilt - 600x500").split(',');
	var flashBool = new String("true").split(',');
	ew1388610_flvNames = ew_getfNames(flvvideos,flashBool);
}

ew1388610_creativeName = ew_setupCreative("","160x600_uncharted2.swf","");

if (isFlash8up && (ew1388610_swfVersion >= 8))
	ew_setupFlash8Videos();

/*** End include/flash:FLASH8 ***/

/*** Begin include/flash:FLASHVARS ***/

var ew1388610_adMode = "prog";


var ew1388610_videoPath = "http://cdn.eyewonder.com/100125/video/";


var ew1388610_videoID = '8919';



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 ewclicktags1388610 = ''
	+ '&clickTag1='+escape(ew_verifyPrepend(clickTag1));

if( typeof( ew1388610_flashvarsExtra ) == "undefined" )
	var ew1388610_flashvarsExtra = "";


var ew1388610_browserEngine = "unknown";
if (isGecko)
	ew1388610_browserEngine = "gecko";
else if (isIe)
	ew1388610_browserEngine = "ie";
else if (isOpera)
	ew1388610_browserEngine = "opera";
else if (ew_isSafari)
	ew1388610_browserEngine = "webkit";


var ew1388610_adTypeID = '14';
var ew1388610_adType = 'Expandable - Instant Play Video';
if (ew1388610_adTypeID=='22' || ew1388610_adType=="Interstitial")
	ew1388610_adTypeID = '5';

if (ew1388610_adTypeID=='30')
	ew1388610_adTypeID = '8';



var ew1388610_customFlashString = ''; 
if (ew1388610_customFlashString != '') 
	{ 
		ew1388610_customFlashString = '&' + ew1388610_customFlashString.replace(/\|/g, '&'); 
	} 


if (typeof(ew1388610_localConnectionUUID) == "undefined")
	ew1388610_localConnectionUUID = (new Date().getTime());






var flashvarsClickTagPrepend = "[ewclickthru]";
if (typeof(clickTagFramePrepend) != 'undefined')
	flashvarsClickTagPrepend = clickTagFramePrepend;
	

var ewflashvars1388610 = 'ewbase='+cp1388610
	+ '&bwfile=bwtest.swf'
	+ '&creative=' + ew1388610_creativeName
	+ '&vLength=11.7'
	+ '&bw=56,90,135,300,450,600'
	+ '&buf=5,4,3,2,2,2'
	+ '&flv=' + ew1388610_flvNames
	+ '&flvId=0'
	+ '&formatId='+ew1388610_adTypeID
	+ '&aInit='+'user'
	+ '&vInit=host'
	+ '&videoID='+ew1388610_videoID
	+ '&videoPath='+ew1388610_videoPath
	+ '&adId=1388610'
	+ '&adMode=' + ew1388610_adMode
	+ '&trkUrl=http://cdn.eyewonder.com/100125/'
	+ '&swfVersion=' + ew1388610_swfVersion
	+ '&browserEngine=' + ew1388610_browserEngine // ie, gecko, webkit, or opera
	+ '&qaReportUUID=' + ew_qaReportUUID
	+ '&localConnectionUUID=' + ew1388610_localConnectionUUID
	+ '&edgeDetect=none' 
	+ '&clickTagPrepend=' + escape(flashvarsClickTagPrepend)
	+ ew1388610_flashvarsExtra
	+ ew1388610_customFlashString
 + ewclicktags1388610;

/*** End include/flash:FLASHVARS ***/


//EXPAND FUNCTIONS
var ew1388610_isOverflowHidden = false;

//ZINDEX


var ew_maxZIndex = 2147483647;	




/* Debug:
zIndexOverride=

Placement ratio=0.26666666666666666
What is the detected placement:
isLeaderboard=false
isSkyscraper=true
isRectangle=false

Placement-based overrides (used if they exist):
Leaderboard override=
Skyscraper override=
Rectangle override=

Default Z-Index (if not overridden)=10000
*/


var ew1388610_minZIndex = 10000 + 15;
					

var ew1388610_saveZIndex;

function ew_checkOverflowHidden1388610() 
{

	if (inDapIF || inDapMgrIf || inFIF || ew_isSafari)	
		return false;
		
 	var tempNode = ew1388610_flashObjectWindow.document.getElementById("ew_BannerDiv1388610").parentNode; 		
	
	while (tempNode!=null && (tempNode.tagName != "BODY"))
	{
		var computedOverflow;
		if (isIe)
			computedOverflow = tempNode.currentStyle.overflow;
		else
			computedOverflow = document.defaultView.getComputedStyle(tempNode,"").getPropertyValue("overflow");
		if (computedOverflow == "hidden")
			return true;
		 tempNode = tempNode.parentNode;
	}
	
	return false;
	
}



function ew_modifyOverflow1388610()
{
	   
	if (inDapIF || inDapMgrIf)	
		return;
		
	var tempNode = ew1388610_flashObjectWindow.document.getElementById("ew_BannerDiv1388610").parentNode;
	   
	if (isGecko)	// This workaround doesn't work yet in IE 5.5 and Safari 1.3
	{
		while (tempNode!=null && (tempNode.tagName != "BODY"))
		{
			var computedDisplay;
			if (isIe)
				computedDisplay = tempNode.currentStyle.display;
			else
				computedDisplay = document.defaultView.getComputedStyle(tempNode,"").getPropertyValue("display");
			if ((computedDisplay == "block") || (computedDisplay == "table-cell"))
			{
				var computedOverflow;
				if (isIe)
					computedOverflow = tempNode.currentStyle.overflow;
				else
					computedOverflow = document.defaultView.getComputedStyle(tempNode,"").getPropertyValue("overflow");
				if (computedOverflow == "hidden")
				{
					// Change overflow
					tempNode.style.overflow="visible";
				}
			}
			tempNode=tempNode.parentNode;
   		}
	}
}


function ew_modifyZIndex1388610()
{
	if (inDapIF || inDapMgrIf)	
		return;
		
    if (isIe)
    {
		var count = 0;
		var tempElement = ew1388610_flashObjectWindow.document.getElementById("ew_BannerDiv1388610").parentElement; 
		
		// Safari also handles parentElement DOM object, unfortunately
		if (tempElement!=null) 
		{
		      // ew1388610_saveZIndex is used to save the z-indexes before they are changed
			ew1388610_saveZIndex = new Array();
			while (tempElement!=null && tempElement.tagName != "BODY")
			{
				computedDisplay = tempElement.currentStyle.display;
				if ((computedDisplay == "block") || (computedDisplay == "table-cell"))
				{
					if (tempElement.currentStyle.zIndex==0)
					{
						// Save the z-index here
						var tempPair=new Array(2);
						tempPair[0] = tempElement;
						tempPair[1] = tempElement.currentStyle.zIndex;
						ew1388610_saveZIndex[count] = tempPair;
						count++;
						// Now change it
						tempElement.style.zIndex=1;
					}
				}
				tempElement=tempElement.parentElement;
			}
		}

	}
}

function ew_restoreZIndex1388610()
{
	if (inDapIF || inDapMgrIf)	
		return;
		
	// IE6/5.5 restore the values saved in ew_expand
	if (ew1388610_saveZIndex != null)
	{
		// restore the backed up zIndex values
		for (i = 0; i < ew1388610_saveZIndex.length; i++)
		{
			var tempPair = ew1388610_saveZIndex[i];
			var tempElement = tempPair[0];
			var tempZIndex = tempPair[1];
			if (tempElement != null)	// Is the element still on the page?
			{
				tempElement.style.zIndex = tempZIndex;
			}
		}

		ew1388610_saveZIndex = null;	// delete the array
	}
}

function ew_contract1388610()
{
	ew_resize1388610(160, 600, 140, 0);
    
}

function ew_expand1388610()
{
	ew_resize1388610(300, 600, 0, 0);
    
}



function ew_resize1388610(newWidth, newHeight, offsetX, offsetY)
{
	
	if (newWidth > 300 )
		newWidth = 300;
	if (newWidth < 160 )
		newWidth = 160;
	if (newHeight > 600 )
		newHeight = 600;
	if (newHeight < 600 )
		newHeight = 600;
	if (offsetX < 0)
		offsetX = 140;
	if (offsetY < 0)
		offsetY = 0;
	
	
	ew_reset1388610();
	
		
	if (typeof(inDapIF) != "undefined" && inDapIF)
	{
		ew1388610_MSNDAP_Resize(newWidth, newHeight, offsetX, offsetY);
		return;
	}
	
	
	if (newWidth > 160 || newHeight > 600)
	{
		/* Performing an expand. Any expansion-specific code goes here */
		if (isIe)
			ew_modifyZIndex1388610();
	}
	else
	{
		/* Performing a contract. Any contract-specific code goes here */
		if (isIe)
			ew_restoreZIndex1388610();
	}

	if(isIe)
		ew1388610_flashObjectWindow.document.getElementById('ew_shim1388610').style.clip = "rect("+offsetY+"px "+(offsetX+newWidth)+"px "+(offsetY+newHeight)+"px "+offsetX+"px)";
	ew1388610_flashObjectWindow.document.getElementById('ew_FlashDiv1388610').style.clip = "rect("+offsetY+"px "+(offsetX+newWidth)+"px "+(offsetY+newHeight)+"px "+offsetX+"px)";

	
}





function ew_reset1388610()
{
	ew_changeHeight1388610(600);
}

function ew_onmouseout1388610()
{
	
	ew_changeHeight1388610(601);
}

var ew1388610_embed;
var ew1388610_ewad;

function ew_changeHeight1388610(newHeight)
{
	// Define variables only once to speed up execution
	if (typeof(ew1388610_ewad) == "undefined" || ew1388610_ewad == null)
	{
		ew1388610_ewad = ew1388610_flashObjectWindow.document.getElementById("ewad1388610");
		
		
		if (typeof(ew1388610_ewad) == "undefined" || ew1388610_ewad == null)
			return;
		
		if (isGecko || isOpera)
		{
			ew1388610_embed = ew1388610_ewad.firstChild;
			try { 
				while (ew1388610_embed.nodeName != "EMBED")
				{ 
					ew1388610_embed = ew1388610_embed.nextSibling; 
				} 
			} catch(e) { return; } 
		}
	}

	if (isIe || ew_isSafari)
	{
		ew1388610_ewad.style.height=newHeight + "px";
	}

	if (isGecko || isOpera)
	{
		var ew1388610_embed = ew1388610_ewad.firstChild;
		try {
			while (ew1388610_embed.nodeName != "EMBED")
			{

				ew1388610_embed = ew1388610_embed.nextSibling;
				ew1388610_embed.height = newHeight;
				ew1388610_embed.style.height = newHeight + "px";
			}
		} catch(e) { return; }
	}
}

var ew_marginVal = "";


var flashHTML1388610='<div id="ew_BannerDiv1388610" style="visibility: visible; position: relative; overflow:visible; '+ew_marginVal+'width:160px; height:600px; z-index: ' + ew1388610_minZIndex + '">'
+'<img src="'+cp1388610+'dot.gif" border="0" id="ew_initFrame1388610">'	
	+'</div>';

//EYEWONDER FLASH OBJECT
var flashHTMLonLoad1388610='<div id="ew_FlashDiv1388610" onmouseout="ew_onmouseout1388610()" style="visibility: visible; position: absolute; top: -0px; left: -140px; width:300px; height:600px; clip: rect(0px 300px 600px 140px); z-index: ' + (ew1388610_minZIndex+2) + '">'
	+'<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="' + ew1388610_protocol + 'fpdownload.adobe.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="300" height="600" id="ewad1388610" align="middle">'
	+'<param name="allowScriptAccess" value="always">'
	+'<param name="movie" value="'+cp1388610+ew1388610_creativeName+'">'
	+'<param name="quality" value="high">'
	+'<param name="bgcolor" value="#FFFFFF">'
	+'<param name="base" value="'+cp1388610+'">'
	+'<param name="wmode" value="transparent">'
	+'<param name="FlashVars" value="'+ewflashvars1388610+'" >'
	+'<embed id="ewembed1388610" src="'+cp1388610+ew1388610_creativeName+'" base="'+cp1388610+'" wmode="transparent" quality="high" bgcolor="#FFFFFF" width="300" height="600" name="ewad1388610" FlashVars="'+ewflashvars1388610+'" align="middle" allowScriptAccess="always" type="application/x-shockwave-flash" pluginspage="' + ew1388610_protocol + 'adobe.com/go/getflashplayer">'
	+'</object>'
	+'</div>'
	+'<div style="position:absolute;top:0px;left:0px;z-index:0"><img src="'+cp1388610+'dot.gif" id="trackingImage1388610" width="1" height="1" border="0"></div>';

if(isIe)
	flashHTMLonLoad1388610 +='<iframe id="ew_shim1388610" src="about:blank" noresize="true" scrolling="no" display="none" frameborder=0 marginheight=0 marginwidth=0 style="filter:progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0);visibility: visible;position:absolute;top: -0px; left: -140px; width:300px; height:600px;clip: rect(0px 300px 600px 140px);z-index: ' + ew1388610_minZIndex + '"></iframe>';


//EYEWONDER FLASH FAILOVER OBJECT
var flashfailoverHTML1388610 ='<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="' + ew1388610_protocol + 'fpdownload.adobe.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,0,0" width="160" height="600" id="ewfailad1388610" align="middle">'
	+'<param name="allowScriptAccess" value="always">'
	+'<param name="movie" value="'+cp1388610+'">'
	+'<param name="quality" value="high">'
	+'<param name="bgcolor" value="#FFFFFF">'
	+'<param name="wmode" value="opaque">'
	+'<param name="FlashVars" value="clickTag='+escape(failclickTag)+'" >'
	+'<embed id="ewembed1388610"  src="'+cp1388610+'" flashvars="clickTag='+escape(failclickTag)+'" quality="high" bgcolor="#FFFFFF" width="160" height="600" name="ewfaildesign" align="middle" allowScriptAccess="always" wmode="opaque"  type="application/x-shockwave-flash" base="'+cp1388610+'" pluginspage="' + ew1388610_protocol + 'adobe.com/go/getflashplayer">'
	+'</object>';

//EYEWONDER FAILOVER
var failoverHTML1388610 = '<a href="http://www.eyewonderlabs.com/ct.cfm?ewbust=0&file=http://cdn.eyewonder.com/100125/adWdrDemos/1388610/failover.jpg&eid=1388610&name=Clickthru-failover&num=1&time=0&diff=0&click='+escape(failclickTag)+'" target="_blank"><img src="'+cp1388610+'failover.jpg" border="0"></a>';



//IFRAME HTML (if ad served in IFrame)
if(ew_isIFrame) { 
	var mpTrkStr = "";
	
	
	var ew1388610_interimWidth = 1;
	var ew1388610_interimHeight = 1;
	
	var attributesExtra = "";
	var styleExtra = "";
	
	
	if (typeof(ew_pubInfo) == "undefined" || ew_pubInfo == null)
		ew_pubInfo = "";

	if (isIe)
		attributesExtra = 'allowtransparency="true"';
	var iframeHTML1388610 = '<iframe id="ew_expAd" border="0"  width="'+ew1388610_interimWidth+'" height="'+ew1388610_interimHeight+'" noresize'
	+ ' style="position: absolute; top: 0px; left: 0px; ' + styleExtra + '" ' + attributesExtra
	+ ' scrolling="No" frameborder="0" marginheight="0" marginwidth="0" src="'
	+ ew_interimFile+'?url='+cp1388610+'exp_Inc.js'
	+ '?interim='+escape(ew_interimFile)
		+ '&clickTagFramePrepend='+escape(clickTagFramePrepend)
	+ '&iframeURL='+escape(document.URL)
	+ '&cp='+escape(cp1388610)
	+ '&extra='+escape(ew1388610_iFrameQueryStringExtra)
	+ '&stime='+escape(ew1388610_startTime)
	+ '&cb='+escape(ew_cacheBuster)
	+ '&pubinfo='+escape(ew_pubInfo)
	+ mpTrkStr
	
	+ '"></iframe>';
}


		
/*** Begin include/sitespecific/msn:MSN_DAP_EXPANDABLE_JS_MAIN ***/

	
	/*** Begin include/sitespecific/msn:MSN_DAP_MAIN_COMMON ***/

		
function ew_delegate( functionName )
{
	var ew_args = new Array();
		
	for( var i = 1; i < arguments.length; i++ )
		ew_args[i-1] = arguments[i];
	try
	{
		return ew1388610_mainFunctionWindow[functionName].apply( ew1388610_mainFunctionWindow, ew_args );
	}
	catch (e)
	{
		ew1388610_errorObject = e;
		var dummy = setTimeout(ew_throwJSError1388610, 1);
		return null;
	}
}	


function ew1388610_MSNDAP_isWLM()
{
	try {
		if (parent.document.domain.indexOf("mail.live.com") != -1)
		{
			return true;
		}
	}
	catch(e) {}
	
	return false;
}
	
var ew1388610_MSNDAP_executionPath = "none";
function ew1388610_MSNDAP_weSupport()
{

	
	if(isIe && parent.document.readyState == 'complete') // page is already finished loading?
		ew_onLoad1388610();
	else
	{
		
		ew1388610_MSNDAP_executionPath = "none";	// For debugging purposes only
		try // Attempt to bust out of iframe
		{
			var ew_test_bustout = parent.document.body;
			ew1388610_MSNDAP_executionPath = "try";
		}
		catch(e)
		{
			if (window.addEventListener) parent.addEventListener("load",ew_onLoad1388610,false);
			else if (window.attachEvent) parent.attachEvent("onload",ew_onLoad1388610);
				ew1388610_MSNDAP_executionPath = "catch";
		}
		finally
		{
			ew_onLoad1388610();
			ew1388610_MSNDAP_executionPath = "finally";
		}
	}	
}



if (inDapMgrIf)
	document.writeln('<div id="MSNDAPADVANCED_MAIL_searchDiv" style="position: absolute; width: 1px; height: 1px; left: 0px; top: 0px;"></div>');	

function ew1388610_MSNDAPADVANCED_MAIL_Workaround_Firefox_Throbber()
{
	if (isGecko)
	{
		try{
			if (inDapIF && typeof(parent.ew_MSNDAP) == "undefined")	
			{
				parent.ew_MSNDAP = new Object();
			}

						
			parent.eval(ew_getEvalFunction1388610("firefoxClose"));		

		}
		catch(e)
		{
			if (typeof(parent.ew_MSNDAP.fc) != "undefined")	
				delete parent.ew_MSNDAP.fc;
			parent.ew_MSNDAP.caughtError = e;
			var dummy = setTimeout(ew1388610_MSNDAPADVANCED_MAIL_Workaround_Firefox_Throbber, 500);	
		}
	}
}





/*** End include/sitespecific/msn:MSN_DAP_MAIN_COMMON ***/
	
 

/*** Begin include/sitespecific/msn:MSN_DAP_ADVANCED_MAIL_EXPANDCONTRACT_WORKAROUND ***/


function ew_setfocus1388610()
{

	if (typeof(inDapMgrIf) == "undefined" || !inDapMgrIf || !isIe)
		return;
		
	var myInput = ajDiv1388610.contentWindow.document.createElement("input");
	myInput.type = "checkbox";
	
	ajDiv1388610.contentWindow.document.body.appendChild( myInput );
	
	var myDiv = ajDiv1388610.contentWindow.document.createElement("div");
	myDiv.style.width = "1px";
	myDiv.style.height = "1px";
	myDiv.style.overflow = "hidden";
	
	ajDiv1388610.contentWindow.document.body.appendChild( myDiv );
	
	myDiv.appendChild( myInput );
	
	myInput.focus();
	
	myDiv.parentNode.removeChild( myDiv );
}

/*** End include/sitespecific/msn:MSN_DAP_ADVANCED_MAIL_EXPANDCONTRACT_WORKAROUND ***/



if (inDapMgrIf == true && !((isIe && ieVersion >= "6.0")  ))
{
	if (isGecko && (ua.indexOf('firefox/2') > 0))
		ew1388610_weSupport = true;
	else
	{
	ew1388610_weSupport = false;
	failReason = "DapAdvanced";
	}
}

//MSN DAP POSITION CHECK FUNCTION
var ew1388610_MSNDAP_origPos_x = 0;
var ew1388610_MSNDAP_origPos_y = 0;
var ew1388610_MSNDAP_positionCheckTimer;

var ajDiv1388610  = null;
var ewshim1388610  = null;

function ew1388610_MSNDAP_positionCheckDoReposition(obj,posX,posY)
{
	if (typeof(obj) == "undefined" || !obj)
		return;
		
	obj.style.visibility = "hidden";    // Prevents errors

	obj.style.left = posX + "px";
	obj.style.top = posY + "px"; 

	obj.style.visibility = "visible";
}

function ew1388610_MSNDAP_positionCheck()
{
	var findObj = null;
	if (!inDapMgrIf)
		findObj = parent.document.getElementById("ew_fillerDiv1388610");
	else
		findObj = ew1388610_MSNDAP_DynIF;

	if (inDapMgrIf) 
	{ 
		if (typeof(findObj) == "undefined" || findObj==null) 
		{
			if ((navigator.userAgent.toLowerCase()).indexOf('gecko/') > 0)
			{
					try
					{
						ajDiv1388610.style.height="0px"; 
						ajDiv1388610.style.display="none";
						window.clearTimeout(ew1388610_MSNDAP_positionCheckTimer);
					}
					catch(e) {  }
					return;
			} else { return; }
		}
	}

	try {
	    if(!inDapIF)
		    return;

		var posX = -140;
		var posY = -0;
		posX += parseInt(ew1388610_MSNDAP_findPosX(findObj), 10);
		posY += parseInt(ew1388610_MSNDAP_findPosY(findObj), 10);

	    if (posX != ew1388610_MSNDAP_origPos_x || posY != ew1388610_MSNDAP_origPos_y)
	    {
	        ew1388610_MSNDAP_origPos_x = posX;
	        ew1388610_MSNDAP_origPos_y = posY;
			
			if (!inDapMgrIf && typeof(ew1388610_MSNDAP_DynIF) != "undefined" && ew1388610_MSNDAP_DynIF != null)
			{
				ew1388610_MSNDAP_positionCheckDoReposition(ew1388610_MSNDAP_DynIF,posX,posY);
			}
			else if (inDapMgrIf && typeof(ajDiv1388610) != "undefined" && ajDiv1388610 != null)
			{
				ew1388610_MSNDAP_positionCheckDoReposition(ajDiv1388610,posX,posY);
				if (ewshim1388610)
					ew1388610_MSNDAP_positionCheckDoReposition(ewshim1388610,posX,posY);
			}
	 
	    }
	}
	catch(e)
	{
		// Do nothing
	}
ew1388610_MSNDAP_positionCheckTimer = setTimeout(ew1388610_MSNDAP_positionCheck, 75);
}

function ew1388610_MSNDAP_findPosX(obj) {
	var curleft = obj.offsetLeft;
	if (obj.offsetParent) {
		while (obj.offsetParent) {
			obj = obj.offsetParent;
			if (isIe && obj.tagName == "BODY") break;
			curleft += obj.offsetLeft;
		}
	}
	else if (obj.x) curleft += obj.x;
	return curleft;
}

function ew1388610_MSNDAP_findPosY(obj) {
	var curtop = obj.offsetTop;
	if (obj.offsetParent) {
		while (obj.offsetParent) {
			obj = obj.offsetParent;
			if (isIe && obj.tagName == "BODY") break;
			curtop += obj.offsetTop;			
		}
	}
	else if (obj.y) curtop += obj.y;
	return curtop;
}

function ew1388610_MSNDAP_Resize(newWidth, newHeight, offsetX, offsetY)
{
	

	if (typeof(inDapIF) == "undefined" || !inDapIF )
		return;

	if (newWidth > 160 || newHeight > 600)
	{
		/* Performing an expand. Any expansion-specific code goes here */
		if (typeof(inDapMgrIf) != "undefined" && inDapMgrIf && isIe)
			ew_setfocus1388610();	// Give focus to ad
	}
	else
	{
		/* Performing a contract. Any contract-specific code goes here */
	}

	if (typeof(inDapMgrIf) == "undefined" || !inDapMgrIf)
	{
		
		if (typeof(ew1388610_MSNDAP_DynIF) != "undefined" && ew1388610_MSNDAP_DynIF != null)
			ew1388610_MSNDAP_DynIF.style.clip = "rect("+offsetY+"px "+(offsetX+newWidth)+"px "+(offsetY+newHeight)+"px "+offsetX+"px)";
		if(isIe)
			ew1388610_flashObjectWindow.document.getElementById('ew_shim1388610').style.clip = "rect("+offsetY+"px "+(offsetX+newWidth)+"px "+(offsetY+newHeight)+"px "+offsetX+"px)"; 
	}
	else
	{
		
		if (typeof(ajDiv1388610) != "undefined" && ajDiv1388610 != null)
			ajDiv1388610.style.clip = "rect("+offsetY+"px "+(offsetX+newWidth)+"px "+(offsetY+newHeight)+"px "+offsetX+"px)";
		if (isIe && typeof(ewshim1388610) != "undefined" && ewshim1388610 != null)
			ewshim1388610.style.clip = "rect("+offsetY+"px "+(offsetX+newWidth)+"px "+(offsetY+newHeight)+"px "+offsetX+"px)";
	}
	ew1388610_flashObjectWindow.document.getElementById('ew_FlashDiv1388610').style.clip = "rect("+offsetY+"px "+(offsetX+newWidth)+"px "+(offsetY+newHeight)+"px "+offsetX+"px)";
}


 

/*** Begin include/sitespecific/msn:MSN_DAP_ADVANCED_MAIL_EXPANDCONTRACT_WORKAROUND ***/


function ew_setfocus1388610()
{

	if (typeof(inDapMgrIf) == "undefined" || !inDapMgrIf || !isIe)
		return;
		
	var myInput = ajDiv1388610.contentWindow.document.createElement("input");
	myInput.type = "checkbox";
	
	ajDiv1388610.contentWindow.document.body.appendChild( myInput );
	
	var myDiv = ajDiv1388610.contentWindow.document.createElement("div");
	myDiv.style.width = "1px";
	myDiv.style.height = "1px";
	myDiv.style.overflow = "hidden";
	
	ajDiv1388610.contentWindow.document.body.appendChild( myDiv );
	
	myDiv.appendChild( myInput );
	
	myInput.focus();
	
	myDiv.parentNode.removeChild( myDiv );
}

/*** End include/sitespecific/msn:MSN_DAP_ADVANCED_MAIL_EXPANDCONTRACT_WORKAROUND ***/



function ew_getEvalFunction1388610( functionName )
{

 

	var functions = new Object();

	functions["mainTimer"] =  function mainTimer()
	{
		ew_MSNDAP.interval = 150;
		ew_MSNDAP.mtCounter = 0;	
		if (typeof(ew_MSNDAP.mt) == "undefined" && !ew_MSNDAP.mt) 
		{
			ew_MSNDAP.mt = function()
			{
				ew_MSNDAP.mtCounter++;	
				if (typeof(ew_MSNDAP.ul) != "undefined" && ew_MSNDAP.ul)
					ew_MSNDAP.ul();
				if (typeof(ew_MSNDAP.fc) != "undefined" && ew_MSNDAP.fc)
					ew_MSNDAP.fc();
				ew_MSNDAP.ulTimer = setTimeout(ew_MSNDAP.mt, ew_MSNDAP.interval);
			}
			ew_MSNDAP.mt();
		}
	}

	functions["scrollFix300x250"] = function scrollFix300x250()	
	{
		if (typeof(ew_MSNDAP.sf) == "undefined" && !ew_MSNDAP.sf) 
		{
			ew_MSNDAP.sf = function(ffObj)
			{
				if (ffObj.flashbannerWidth == 300 && ffObj.flashbannerHeight > 150 )
				{
					if (typeof(ffObj)!= "undefined" && typeof(ffObj.refDapFrame) != "undefined" && typeof(ffObj.refDapFrame.parentNode) != "undefined" && typeof(ffObj.refDapFrame.parentNode.parentNode) != "undefined" && ffObj.refDapFrame.parentNode.parentNode != null && typeof(ffObj.refDapFrame.parentNode.parentNode.id) != "undefined" && ffObj.refDapFrame.parentNode.parentNode.id == "cRadAdsToday")
					{
						var scrollEl = ffObj.refDapFrame.parentNode.parentNode;
						if (scrollEl && scrollEl.scrollTop && scrollEl.scrollTop != 0)
							return true;
					}
				}
				
				return false;
			}
		}
		return false;
	}


	functions["unLoad"] =  function unLoad()	
	{
		ew_MSNDAP.ulCounter = 0;
		if (typeof(ew_MSNDAP.ul) == "undefined" && !ew_MSNDAP.ul) 
		{
			ew_MSNDAP.ul = function()
			{
				ew_MSNDAP.ulCounter++;
				for(var i = 0; i < ew_MSNDAP.regEWFriendlyFrames.length; i++)
				{
					var ffObj = ew_MSNDAP.regEWFriendlyFrames[i]; 
					if(typeof(ffObj)!="undefined" && ffObj)
					{

						
						var isHidden = false;
						try 
						{
							if (typeof(ffObj.refDapFrame.parentNode) == "undefined" || ffObj.refDapFrame.parentNode == null)
								isHidden = true;
							else 
							{
								var isIe = ffObj.refDapFrame.contentWindow.isIe;
								if (isIe && ffObj.refDapFrame.parentNode.currentStyle.display.toLowerCase() == "none")
									isHidden = true;
								else if (isIe && ffObj.refDapFrame.parentNode.parentNode.currentStyle.display.toLowerCase() == "none")
									isHidden = true;
								
							}
							if (isHidden == false && typeof(ew_MSNDAP.sf)!="undefined" && ew_MSNDAP.sf != null)
								isHidden = ew_MSNDAP.sf(ffObj);
							var currentVisiblity = "";
							if (isIe)
								currentVisiblity = ffObj.refExpDiv.currentStyle.visibility
							if (isHidden == true)
							{
								if (currentVisiblity != "hidden")
								{
									ffObj.refExpDiv.style.visibility = "hidden";
									if (isIe)
										ffObj.refShimDiv.style.visibility = "hidden";
								}
							}
							else
							{
								if (currentVisiblity != "visible")
								{
									ffObj.refExpDiv.style.visibility = "visible";
									if (isIe)
										ffObj.refShimDiv.style.visibility = "visible";
								}
							}
						}
						catch(e)
						{
							// element must really be gone -- will catch in next part
						}
						
						
						try {					
							var refSearchDivID = ffObj.refSearchDiv.id; 
						}
						catch(e) 
						{
							try 
							{				
					
								var ajDiv = ffObj.refExpDiv; 
								var ewshim = ffObj.refShimDiv; 
								if (typeof(ajDiv) != "undefined" && ajDiv) 
								{
									ajDiv.visibility = "hidden"; 
									ajDiv.src="about:blank";
									ajDiv.width = "1"; 		
									ajDiv.style.width = "1px";
									ajDiv.height = "1"; 
									ajDiv.style.height = "1px";
									ajDiv.id = "ew_voidAjax"; 
									document.body.appendChild(ajDiv);		
									/*document.body.removeChild(ajDiv)*/; 
									ew_MSNDAP.regEWFriendlyFrames[i].refExpDiv = null;
								}		
				
								if (typeof(ewshim) != "undefined" && ewshim) 
								{
									ewshim.visibility = "hidden"; 
									ewshim.src="about:blank";
									ewshim.width = "1"; 		
									ewshim.style.width = "1px"; 
									ewshim.height = "1"; 
									ewshim.style.height = "1px"; 
									ewshim.id = "ew_voidAjax";
									document.body.appendChild(ewshim);		
									/*document.body.removeChild(ewshim)*/; 
									ew_MSNDAP.regEWFriendlyFrames[i].refShimDiv = null;
								}
								ew_MSNDAP.regEWFriendlyFrames[i].refSearchDiv = null;
								ew_MSNDAP.regEWFriendlyFrames[i].refDapFrame = null;
								ew_MSNDAP.regEWFriendlyFrames[i].flashbannerWidth = 0;
								ew_MSNDAP.regEWFriendlyFrames[i].flashbannerHeight = 0;
								ew_MSNDAP.regEWFriendlyFrames[i] = null;			
							}
							catch(e)
							{
								ew_MSNDAP.catchError = e;
							}
						}
					}
				}
			}
		}

	}
	
	functions["firefoxClose"] = function firefoxClose()
	{
		ew_MSNDAP.fcCounter = 0;
		ew_MSNDAP.fcStopped = 0;
		ew_MSNDAP.fcTimeoutReached = false;
		if (typeof(ew_MSNDAP.fc) == "undefined") 
		{
			ew_MSNDAP.fc = function(timerId)
			{	
				var interval = ew_MSNDAP.interval;	
				var maxTimeout = 7500; 
				ew_MSNDAP.fcCounter += interval; 
				if (ew_MSNDAP.fcCounter > maxTimeout)  
					ew_MSNDAP.fcTimeoutReached = true;		
				for( var i in adCont )	
				{ 		
					if (adCont[i].documentClosed == true ||	ew_MSNDAP.fcTimeoutReached==true)			
					{			
						var adFrame = document.getElementById(adCont[i].ifrmid);			
						if (adFrame && adFrame.contentWindow && adFrame.contentWindow.document && typeof(adFrame.contentWindow.fcClosedAlready) == "undefined" )			
						{		
							var oldClose = adFrame.contentWindow.document.close;				
							delete adFrame.contentWindow.document.close;				
							adFrame.contentWindow.document.close();			
									
							adFrame.contentWindow.fcClosedAlready = true;		
							if (adFrame.contentWindow.document.getElementById("MSNDAPADVANCED_MAIL_searchDiv") ) 
							{ 
								ew_MSNDAP.fcStopped += 1; 
								adFrame.contentWindow.stop()
							}	
						}		
					}    
				}	
				if (ew_MSNDAP.fcTimeoutReached) 
					delete ew_MSNDAP.fc
			}
		}
	}
	
	
	functions["setupFriendlyFrameFunctions"] = function setupFriendlyFrameFunctions()
	{
	
		ew_delegate1388610 = function( functionName )
		{
			var ew_args = new Array();

			for( var i = 1; i < arguments.length; i++ )
				ew_args[i-1] = arguments[i];
			try
			{
				return ew1388610_mainFunctionWindow[functionName].apply( ew1388610_mainFunctionWindow, ew_args );
			}
			catch (e)
			{
				ew1388610_errorThrown = e;
				
			}
		}
		
		ew_delegate = function( functionName )
		{
			var ew_args = new Array();

			for( var i = 1; i < arguments.length; i++ )
				ew_args[i-1] = arguments[i];
			try
			{
				return ew1388610_mainFunctionWindow[functionName].apply( ew1388610_mainFunctionWindow, ew_args );
			}
			catch (e)
			{
				ew1388610_errorThrown = e;
				
			}
		}
		ew_expand1388610 = function()
		{
			try { ew1388610_mainFunctionWindow.ew_expand1388610(); }
			catch (e) { ew1388610_errorThrown = e;  }
		}
		ew_contract1388610 = function()
		{
			try { ew1388610_mainFunctionWindow.ew_contract1388610(); }
			catch (e) { ew1388610_errorThrown = e;  }
			}
		ew_reset1388610 = function()
		{
			try { ew1388610_mainFunctionWindow.ew_reset1388610(); }
			catch (e) { ew1388610_errorThrown = e;  }
		}
		ew_onmouseout1388610 = function()
		{
			try { ew1388610_mainFunctionWindow.ew_onmouseout1388610(); }
			catch (e) { ew1388610_errorThrown = e;  }
		}
		ew_resize1388610 = function(width, height, offsetX, offsetY)
		{
			try { ew1388610_mainFunctionWindow.ew_resize1388610(width, height, offsetX, offsetY); }
			catch (e) { ew1388610_errorThrown = e;  }
		}
		ew1388610_outOfBandTrackRequest = function(url)
		{
			try { ew1388610_mainFunctionWindow.ew_resize1388610(width, height, offsetX, offsetY); }
			catch (e) { ew1388610_errorThrown = e;  }
		}
	}

	
	return ( functions[functionName].valueOf() + ";" + functionName + "()" );
}

function ew1388610_MSNDAPADVANCED_MAIL_CreateMainTimer()
{
		try{
			if (inDapIF && typeof(parent.ew_MSNDAP) == "undefined")
			{
				parent.ew_MSNDAP = new Object();
			}
			parent.eval(ew_getEvalFunction1388610("mainTimer"));	
		}
		catch(e)
		{ 
			if (typeof(parent.ew_MSNDAP.mt) != "undefined")	
				delete parent.ew_MSNDAP.mt;
			parent.ew_MSNDAP.caughtError = e;
			var dummy = setTimeout(ew1388610_MSNDAPADVANCED_MAIL_CreateMainTimer, 250);	
		} 

}

var ew1388610_MSNDAPADVANCED_MAIL_regFriendlyFramesIndex = -1;
function ew1388610_MSNDAPADVANCED_MAIL_CreateUnloadHandler()
{
		try{
			if (inDapIF && typeof(parent.ew_MSNDAP) == "undefined")
			{
				parent.ew_MSNDAP = new Object();
			}
			if (inDapIF && typeof(parent.ew_MSNDAP.regEWFriendlyFrames) == "undefined")	
			{
				parent.ew_MSNDAP.regEWFriendlyFrames = new Array();
			}
			
			var currIndex = 0;
			
			parent.ew_MSNDAP.ulCallCounter = 0;
			
			while (currIndex < parent.ew_MSNDAP.regEWFriendlyFrames.length && typeof(parent.ew_MSNDAP.regEWFriendlyFrames[currIndex]) != "undefined" && parent.ew_MSNDAP.regEWFriendlyFrames[currIndex] != null) 
				currIndex++;
			parent.ew_MSNDAP.regEWFriendlyFrames[currIndex] = new Object();
			var ffCurr = parent.ew_MSNDAP.regEWFriendlyFrames[currIndex];
			ffCurr.refSearchDiv = document.getElementById("MSNDAPADVANCED_MAIL_searchDiv");
			ffCurr.dirty = false;
			ffCurr.refExpDiv = ajDiv1388610;
			ffCurr.refShimDiv = null;
			ffCurr.refDapFrame = ew1388610_MSNDAP_DynIF;
			ffCurr.flashbannerWidth = 160;
			ffCurr.flashbannerHeight = 600;
			if (isIe)
				ffCurr.refShimDiv = ewshim1388610;

			ew1388610_MSNDAPADVANCED_MAIL_regFriendlyFramesIndex = currIndex;
			
			parent.eval(ew_getEvalFunction1388610("unLoad"));
			
			if (ew1388610_MSNDAP_isWLM()) {
			parent.eval(ew_getEvalFunction1388610("scrollFix300x250"));	
			}
	}
	catch(e)
	{
			if (typeof(parent.ew_MSNDAP.ul) != "undefined")	
				delete parent.ew_MSNDAP.ul;
			parent.ew_MSNDAP.caughtError = e;
			var dummy = setTimeout(ew1388610_MSNDAPADVANCED_MAIL_CreateUnloadHandler, 250);	
	}
}


function ew1388610_MSNDAP_BasicBannerDivLoad()
{
	var bannerDiv = ew1388610_flashObjectWindow.document.getElementById('ew_BannerDiv1388610');
	try
	{
		if (typeof(bannerDiv) != "undefined" && bannerDiv != null)
		{
			if (!isIe || (inDapIF && parent.document.readyState == "complete")) 
			{
				bannerDiv.style.position = "relative";
				bannerDiv.style.left = 140 + "px";
				bannerDiv.style.top = 0 + "px";
				bannerDiv.innerHTML=flashHTMLonLoad1388610;
				
				if (isCamino)
					bannerDiv.addEventListener("mouseout",ew_onmouseout1388610,true);
				parent.document.body.appendChild( ew1388610_MSNDAP_DynIF );
				ew1388610_MSNDAP_DynIF.style.visibility = "visible";
				bannerDiv.style.visibility = "visible";
				bannerDiv.style.display = "block";
				ew1388610_MSNDAP_positionCheckTimer = setTimeout(ew1388610_MSNDAP_positionCheck,1500);
				return;	// Exit function if successful
			}
		}
	}
	catch(e)
	{
		// Do nothing
	}

	var dummy = setTimeout(ew1388610_MSNDAP_BasicBannerDivLoad,50);
}


function ew1388610_MSNDAP_GetDynIframe()
{
	if (isGecko && parent.document.getElementById('ew_expDiv1388610'))
	{
		var elem = parent.document.getElementById('ew_expDiv1388610');
		var pnode = elem.parentNode;
		elem.innerHTML = "";
		elem.src="about:blank";
		var newelem = parent.document.createElement("div");
		var newname = "ew_VoidAjax" + Math.floor((10000)*Math.random());
		newelem.setAttribute("id", newname);
		try { pnode.replaceChild(newelem, elem); } catch(e) { }
	}

	var iframes = parent.document.getElementsByTagName("iframe");
	var dapFrame;

	try
	{
		iframes = parent.document.getElementsByTagName("iframe");

	    for(var i = 0; i < iframes.length; i++)
	    {
	      if(!ew_isSafari && window == iframes[i].contentWindow)
	        dapFrame = iframes[i];
	      else if(iframes[i].contentDocument == window.document)
	        dapFrame = iframes[i];
	    }
	}
	catch(e)
	{
		// Do Nothing
	}

	if (typeof(dapFrame) == "undefined" || dapFrame == null)
	{
		var dummy = setTimeout(ew1388610_MSNDAP_GetDynIframe, 250);
		return;
	}

	var parentnode = dapFrame.parentNode;
	var nextchild = dapFrame.nextChild;

	// Store these values for later
	ew1388610_MSNDAP_DynIF = dapFrame;
	ew1388610_MSNDAP_DynIFOrigParent = parentnode;
	ew1388610_MSNDAP_DynIFOrigNextChild = nextchild;

	try {
	dapFrame.contentWindow.document.body.style.backgroundColor = "transparent";
	} catch(e) 
	{ }

	dapFrame.setAttribute("allowTransparency", "true");
	dapFrame.setAttribute("background-color", "transparent");

	var posX = -140;
	var posY = -0;

	posX += parseInt(ew1388610_MSNDAP_findPosX(dapFrame), 10);
	posY += parseInt(ew1388610_MSNDAP_findPosY(dapFrame), 10);

	if (!inDapMgrIf)
	{ 

		dapFrame.style.visibility = "hidden";

	    var filler = parent.document.createElement("DIV");
	    filler.style.width = 160 + "px";
	    filler.style.height = 600 + "px";
		filler.id = "ew_fillerDiv1388610";

	    if (nextchild == null)
	        parentnode.appendChild(filler);
	    else
	        parentnode.insertBefore(nextchild, filler);

	    dapFrame.style.position = "absolute";
	    dapFrame.style.left = posX + "px";
	    dapFrame.style.top = posY + "px";
		dapFrame.style.width = ew1388610_fullWidth + "px";
		dapFrame.style.height = ew1388610_fullHeight  + "px";
		dapFrame.width = ew1388610_fullWidth;
		dapFrame.height = ew1388610_fullHeight;
		dapFrame.style.zIndex = ew1388610_minZIndex;	// We need a zIndex because we're placing it on the body.

		ew1388610_MSNDAP_BasicBannerDivLoad();

		
        var newWidth = 160;
		var newHeight = 600;
		var offsetX = 140;
		var offsetY = 0;
		if (typeof(inDapIF) != "undefined" && inDapIF && (typeof(inDapMgrIf) == "undefined" || !inDapMgrIf))
		{
			if (typeof(ew1388610_MSNDAP_DynIF) != "undefined" && ew1388610_MSNDAP_DynIF != null)
				ew1388610_MSNDAP_DynIF.style.clip = "rect("+offsetY+"px "+(offsetX+newWidth)+"px "+(offsetY+newHeight)+"px "+offsetX+"px)";
		}
		return;
	}
	else 
	{
	
		if(isIe) {
			ewshim1388610 = parent.document.createElement("iframe");
			ewshim1388610.id = 'ew_shim1388610';
			ewshim1388610.style.position="absolute";
			ewshim1388610.style.left=posX+"px";
			ewshim1388610.style.top=posY+"px";
			ewshim1388610.style.visibility="hidden";	
			ewshim1388610.style.width="300px";
			ewshim1388610.style.height="600px";
			ewshim1388610.style.zIndex=ew1388610_minZIndex + 2;
			ewshim1388610.style.filter='progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)';
			ewshim1388610.setAttribute("border", "0");
			ewshim1388610.setAttribute("width", "300");
			ewshim1388610.setAttribute("height", "600");
			ewshim1388610.setAttribute("noresize", "true");
			ewshim1388610.setAttribute("scrolling", "No");
			ewshim1388610.setAttribute("display", "none");
			ewshim1388610.setAttribute("frameBorder", "0");
			ewshim1388610.setAttribute("marginHeight", "0");
			ewshim1388610.setAttribute("marginWidth", "0");
			ewshim1388610.src = "about:blank";
			parent.document.body.insertBefore(ewshim1388610,parent.document.body.firstChild);
			parent.document.getElementById('ew_shim1388610').style.clip = "rect(0px 300px 600px 140px)";
		}

		ajDiv1388610 = parent.document.createElement("iframe");
		ajDiv1388610.id = 'ew_expDiv1388610';
		ajDiv1388610.style.position="absolute";
		ajDiv1388610.style.left=posX + "px";
		ajDiv1388610.style.top=posY + "px";
		ajDiv1388610.style.visibility="hidden";	
		ajDiv1388610.style.width="300";
		ajDiv1388610.style.height="600";
		ajDiv1388610.style.zIndex=ew1388610_minZIndex + 3;
		ajDiv1388610.setAttribute("border", "0");
		ajDiv1388610.setAttribute("width", "300");
		ajDiv1388610.setAttribute("height", "600");
		ajDiv1388610.setAttribute("noresize", "true");
		ajDiv1388610.setAttribute("scrolling", "No");
		ajDiv1388610.setAttribute("frameBorder", "0");
		ajDiv1388610.setAttribute("marginHeight", "0");
		ajDiv1388610.setAttribute("marginWidth", "0");
		ajDiv1388610.setAttribute("allowTransparency", "true");
		ajDiv1388610.src = 'javascript:document.open();document.writeln("<html><head><title>ad</title></head><body></body></html>");document.close();';
		parent.document.body.insertBefore(ajDiv1388610, parent.document.body.firstChild);
		parent.document.getElementById('ew_expDiv1388610').style.clip = "rect(0px 300px 600px 140px)";

		ew1388610_MSNDAP_finishFriendlyIFrameLoading();
	}
}

var adFrameContentDocument;
var adFrameContentWindow;

function ew1388610_MSNDAP_finishFriendlyIFrameLoading()
{
		try{
			ajDiv1388610.contentWindow.document.body.style.backgroundColor = "transparent";
		}
		catch(e)
		{
			
			var dummy = setTimeout(ew1388610_MSNDAP_finishFriendlyIFrameLoading, 100);
			return;
		}

		
		var adFrameContentDocument = ajDiv1388610.contentWindow.document;
		var adFrameContentWindow = ajDiv1388610.contentWindow;

		
		if (ew1388610_MSNDAP_isWLM())
		{
			if (160 == 300) 
			{
				ajDiv1388610.style.zIndex = 2;
				if (isIe) ewshim1388610.style.zIndex = 1;
			}
		}

		var isHidden = false;	

		try{
			if (isIe && ew1388610_MSNDAP_DynIF.parentNode.currentStyle.display.toLowerCase() == "none")
				isHidden = true;
			else if (isIe && ew1388610_MSNDAP_DynIF.parentNode.parentNode.currentStyle.display.toLowerCase() == "none")
				isHidden = true;
			
		}
		catch(e)
		{
			// Do nothing
		}

		if (isHidden == false)
		{
			ajDiv1388610.style.visibility="visible";	
			if (isIe) ewshim1388610.style.visibility="visible";	
		}

		adFrameContentWindow.ew1388610_mainFunctionWindow = window;
		ew1388610_flashObjectWindow = adFrameContentWindow;

	if (isIe)
		adFrameContentWindow.eval(ew_getEvalFunction1388610("setupFriendlyFrameFunctions"));
	else
	{
		adFrameContentWindow.ew_contract1388610 = ew_contract1388610;
		adFrameContentWindow.ew_changeHeight1388610 = ew_changeHeight1388610;
		adFrameContentWindow.ew_onmouseout1388610 = ew_onmouseout1388610;
		adFrameContentWindow.ew_reset1388610 = ew_reset1388610;
		adFrameContentWindow.ew_expand1388610 = ew_expand1388610;
		adFrameContentWindow.ew_delegate1388610 = ew_delegate1388610;
		adFrameContentWindow.ew_resize1388610 = ew_resize1388610;
		adFrameContentWindow.ew1388610_MSNDAP_positionCheck = ew1388610_MSNDAP_positionCheck;
		adFrameContentWindow.ew1388610_MSNDAP_positionCheckTimer = ew1388610_MSNDAP_positionCheckTimer;
	}

		var ewContainerDiv = adFrameContentDocument.createElement("div");
		ewContainerDiv.style.width = "160px";
		ewContainerDiv.style.height = "600px";
		ewContainerDiv.style.position = "absolute";
		ewContainerDiv.style.left = 140 + "px";
		ewContainerDiv.style.top = 0 + "px";
		ewContainerDiv.style.zIndex = ew1388610_minZIndex+1;
		ewContainerDiv.style.display = "block";	
		ewContainerDiv.id = "ew_BannerDiv1388610";
		adFrameContentDocument.body.appendChild(ewContainerDiv);
		ewContainerDiv.innerHTML = flashHTMLonLoad1388610;
        

		if (isCamino)
            ewContainerDiv.addEventListener("mouseout",ew_onmouseout1388610,true);

		ew1388610_MSNDAPADVANCED_MAIL_CreateMainTimer()
		ew1388610_MSNDAPADVANCED_MAIL_CreateUnloadHandler();
		ew1388610_MSNDAPADVANCED_MAIL_Workaround_Firefox_Throbber();
		ew1388610_MSNDAP_DynIF.style.visibility = "hidden";

		ew1388610_MSNDAP_positionCheckTimer = adFrameContentWindow.setTimeout(ew1388610_MSNDAP_positionCheck,2000);
}

function ew1388610_MSNDAP_Expandable_onLoad() {
	if (inDapIF && inDapMgrIf && typeof(parent.ew_MSNDAP) == "undefined")
		parent.ew_MSNDAP = new Object();
	if(inDapIF && ew1388610_weSupport)
		ew1388610_MSNDAP_GetDynIframe();
}


/*** End include/sitespecific/msn:MSN_DAP_EXPANDABLE_JS_MAIN ***/


	


var ew1388610_onLoadWasCalled = false; //Protects against multiple of the same execution being loaded in the same page

//appends flash ad div to the banner div (called on page load)
function ew_onLoad1388610() 
{

	flashHTMLonLoad1388610 += onLoadTracker1388610();
	
	if (ew1388610_onLoadWasCalled == true)
		return;
	
	ew1388610_onLoadWasCalled = true;
	
	if (inDapIF)	
	{

		ew1388610_MSNDAP_Expandable_onLoad();
		return;
	}
	
	
	if (isGecko && geckoRevisionMajor < 1)	// ew_CheckOverflowHidden doesn't work in Mozilla < 1.0
	{
		failReason = "browser";
		ew1388610_weSupport = false;
	}

	if (ew1388610_weSupport)
		ew1388610_isOverflowHidden = ew_checkOverflowHidden1388610();
	// We don't support expandables when overflow:hidden is set on anything but Gecko
	// browsers (Mozilla >= 1.0 and Firefox, etc) and IE >= 6.0
	if (ew1388610_isOverflowHidden && !(isGecko  || (isIe && (ieVersion >= 6.0)) || (isOpera && (operaVersion >= 8))))
	{
		failReason = "browser"
		ew1388610_weSupport = false;
	}
	if (ew1388610_weSupport)	// Do we still support the expandable?
	{
		if (ew1388610_isOverflowHidden == true)	
			ew_modifyOverflow1388610();

		if (inFIF && ew1388610_weSupport)	
		{
			ew1388610_ADCOMinFIF_Expandable_onLoad();
			return;
		}
		
		 
		
		// Note: Don't do two innerHTML statements or IE will give an error when hovering
		ew1388610_flashObjectWindow.document.getElementById('ew_BannerDiv1388610').innerHTML=flashHTMLonLoad1388610;

        
        if (isCamino || ew_isSafari)
            ew1388610_flashObjectWindow.document.getElementById('ew_BannerDiv1388610').addEventListener("mouseout",ew_onmouseout1388610,true);

		if(ew1388610_removeFromFlow)
		{
			function ew_reposition1388610()
			{
				var mybannerDiv = ew1388610_flashObjectWindow.document.getElementById('ew_BannerDiv1388610');
				var positionDiv = ew1388610_flashObjectWindow.document.getElementById('ew1388610_positionDiv');
				mybannerDiv.style.position = "absolute";
				mybannerDiv.style.top = findPosY(positionDiv)+"px";
				mybannerDiv.style.left = findPosX(positionDiv)+"px";
				return mybannerDiv;
			}
			function reposAd()
			{
				if (typeof(ew_reposition1388610) != "undefined")	
					ew_reposition1388610();
			}
			document.body.appendChild( ew_reposition1388610() );

		//Handle window resizes
			if (window.attachEvent) ew1388610_flashObjectWindow.attachEvent("onresize",reposAd);
			else if (window.addEventListener) ew1388610_flashObjectWindow.addEventListener("resize",reposAd,false);
		}

		 
	}
	else
	{
		var failReasonTracker = "";
		// Reason for failover
		if (failReason == "browser")
			failReasonTracker = failoverReasonBrowserTracker1388610();
		else if (failReason == "flash")
			failReasonTracker = failoverReasonFlashTracker1388610();
		// Replace, don't append innerHTML (innerHTML= not innerHTML+=) to write out failovers because they are inline content
		if(!ew1388610_turnOffExecution&&isFlashFailover&&false) 
		{
			document.getElementById('ew_BannerDiv1388610').innerHTML=flashfailoverHTML1388610+flashfailoverTracker1388610()+failReasonTracker;
		}
		else 
		{
			document.getElementById('ew_BannerDiv1388610').innerHTML=failoverHTML1388610+failoverTracker1388610()+failReasonTracker;
		}
	}
	
	
}
	
//SERVE THE APPROPRIATE FILE
if (ew1388610_weSupport) {
	document.writeln(weSupportTracker1388610());
	if(ew_isIFrame) { 
		//serve the IFrame ad
		document.writeln(flashHTML1388610);
		document.writeln(iframeHTML1388610);
	}
	else 
	{
		
		if (ew1388610_removeFromFlow) document.writeln('<div id="ew1388610_positionDiv" name="ew1388610_positionDiv" style="position: relative; width:160px; height:600px; visibility:hidden;"></div>');
		document.writeln(flashHTML1388610);
		document.writeln(flashTracker1388610());
		if(!inDapIF)
		{
			if(isIe && document.readyState == 'complete') // page is already finished loading?
				ew_onLoad1388610();
			else
			{
				if (window.addEventListener) window.addEventListener("load",ew_onLoad1388610,false);
					else if (window.attachEvent) window.attachEvent("onload",ew_onLoad1388610);
				if (inFIF)
					window.setTimeout(ew_onLoad1388610, 2000); 
			}
		}
		else
			ew1388610_MSNDAP_weSupport();
	}
}
else { //serve failover
	
	if(!ew1388610_turnOffExecution&&isFlashFailover&&false) {
		document.writeln(flashfailoverHTML1388610);
		document.writeln(flashfailoverTracker1388610());
	}
	else {
		document.writeln(failoverHTML1388610);
		if(!ew1388610_turnOffExecution)
			document.writeln(failoverTracker1388610());
		else
			document.writeln(failoverTurnOffExecutionTracker1388610());
	}
	// Reason for failover
	if (failReason == "browser")
		document.writeln(failoverReasonBrowserTracker1388610());
	else if (failReason == "flash")
		document.writeln(failoverReasonFlashTracker1388610());
}


if ((inDapIF && inDapMgrIf) || inFIF)
	document.close();


