// Author: Danny Mavromatis
// Version: 3.00.2
// Created: 10/29/2001
// Updated: 7/5/2006
// FLASH detection system
	var cId = 0;
	var aV = 0;
	var swVersion;
	var isIE = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;
	var isWin = (navigator.appVersion.indexOf("Windows") != -1) ? true : false;
	if(isIE && isWin){
		document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n');
		document.write('Function VBGetSwfVer(i) \n');
		document.write('on error resume next \n');
		document.write('Dim swControl, swVersion \n');
		document.write('swVersion = 0 \n');
		document.write('set swControl = CreateObject("ShockwaveFlash.ShockwaveFlash." + CStr(i)) \n');
		document.write('if (IsObject(swControl)) then \n');
		document.write('swVersion = 0 \n');
		document.write('swVersion = swControl.GetVariable("$version") \n');
		document.write('end if \n');
		document.write('VBGetSwfVer = swVersion \n');
		document.write('End Function \n');
		document.write('</SCR' + 'IPT\> \n');
	} else {
		var isOpera = (navigator.userAgent.indexOf("Opera") != -1) ? true : false;
		function JSGetSwfVer(i){
		      if (navigator.plugins != null && navigator.plugins.length > 0) {
		            if (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]) {
		                  var swVer2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : "";
		                        var flashDescription = navigator.plugins["Shockwave Flash" + swVer2].description;
		                        descArray = flashDescription.split(" ");
		                        tempArrayMajor = descArray[2].split(".");
		                        versionMajor = tempArrayMajor[0];
		                  if ( descArray[3] != "" ) {
		                        tempArrayMinor = descArray[3].split("r");
		                  } else {
		                        tempArrayMinor = descArray[4].split("r");
		                  }
		                        versionMinor = tempArrayMinor[1] > 0 ? tempArrayMinor[1] : 0;
		                        flashVer = parseFloat(versionMajor + "." + versionMinor);
		            } else {
		                  flashVer = -1;
		            }
		      }
		      else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.6") != -1) flashVer = 4;
		      else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.5") != -1) flashVer = 3;
		      else if (navigator.userAgent.toLowerCase().indexOf("webtv") != -1) flashVer = 2;
		      else {
		            flashVer = -1;
		      }
		      return flashVer;
		}
	}
function checkFlash(rV){	
	var ua=navigator.userAgent.toLowerCase();
	this.webtv = (ua.indexOf("webtv")>-1);
	this.ie = (parseFloat(ua.slice(ua.indexOf("msie")+5)));
	this.nn = (parseFloat(ua.slice(ua.indexOf("mozilla/")+8)));
	var browser = navigator.appName.toLowerCase();
	if (browser=="netscape"){
	this.netscape = true;
	}else{
	this.netscape = false;
	}
	this.mac = (ua.indexOf("mac")>-1);
	this.flash = false;

	if (isIE && isWin){
		
		aV = VBGetSwfVer(rV);
		
		if (aV != 0){
			var cVArray = VBGetSwfVer(rV).split(" ");
			cVArray = cVArray[1].split(",");
			aV = cVArray[0];
		}
		
	} else {
		aV = JSGetSwfVer(rV);
	}
	
	if (aV >= rV) {
		if (this.netscape && this.IEonly == 'TRUE' || this.mac && this.IEonly == 'TRUE'){
			this.flash = false;
		} else {
			this.flash = true;
		}
	}
}

function flashObj() {
	cId += 1;
	this.flashFile = "/flash/blank.swf";
	this.LiveConnect = "FALSE";
	this.IEonly = null;
	this.wmode = "opaque";
	this.redirect = null;
	this.DenyIEdl = "FALSE";
	this.altImg = "/blank.gif";
	this.bgcolor = null;
	this.altTxt = null;
	this.height = "400";
	this.width = "520";
	this.salign="lt";
	this.align="left";
	this.flashVars = null;
	this.ID = "flash"+ cId;
	this.name = "flash"+ cId;
	this.webTV = "true";
	this.quality = "best";
	this.scale = "exactfit";
	this.menu = "false";
	this.deviceFont = "false";
	this.FlashVer = 5;
	this.cabVersion = "5,0,0,0";
	this.render = writeFlashComponent;
}
function writeFlashComponent(val) {
	var Ticket=new checkFlash(this.FlashVer);
	var sCR = "";
	
	if (Ticket.flash) {
		if (Ticket.mac || Ticket.netscape) {
			sCR='<EMBED SRC="'+this.flashFile+'" swLiveConnect="'+this.LiveConnect+'" WIDTH="'+this.width+'" HEIGHT="'+this.height+'" QUALITY="'+this.quality+'" SCALE="'+this.scale+'" FlashVars="'+ this.flashVars +'" wmode="'+this.wmode+'" ID="'+this.ID+'" NAME="'+this.name+'" MENU="'+this.menu+'" DEVICEFONT="'+this.deviceFont + '"';
			if (this.bgcolor) {
				sCR += ' BGCOLOR="'+this.bgcolor + '"';
			}
			if (this.salign) {
				sCR += ' SALIGN="'+this.salign + '"';
			}
			sCR += ' TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED>';
		} else if (this.DenyIEdl=='TRUE') {
			sCR="<OBJECT classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://active.macromedia.com/flash2/cabs/swflash.cab#version="+this.FlashVer+",0,0,0\" ID=\""+this.ID+"\" WIDTH=\""+this.width+"\" HEIGHT=\""+this.height+"\">\n";
			sCR+="<PARAM NAME=movie VALUE=\""+this.flashFile+"\">\n";						
			sCR+="<PARAM NAME=quality VALUE=\""+this.quality+"\">\n";
			sCR+="<PARAM NAME=scale VALUE=\""+this.scale+"\">\n";
			sCR+="<PARAM NAME=menu VALUE=\""+this.menu+"\">\n";
			sCR+="<PARAM NAME=wmode VALUE=\""+this.wmode+"\">\n";
			if (this.bgcolor){
				sCR+="<PARAM NAME=bgcolor VALUE=\""+this.bgcolor+"\">\n";
			}
			if (this.flashVars){
				sCR+="<PARAM NAME=FlashVars VALUE=\""+this.flashVars+"\">\n";
			}
			if (this.salign) {
				sCR+="<PARAM NAME=salign VALUE=\""+this.salign+"\">\n";
			}
			sCR+="<PARAM NAME=devicefont VALUE=\""+this.deviceFont+"\">\n";
			if (this.bgcolor){
			sCR+="<EMBED SRC="+this.flashFile+" swLiveConnect="+this.LiveConnect+" WIDTH="+this.width+" HEIGHT="+this.height+" QUALITY="+this.quality+" SCALE="+this.scale+" wmode="+this.wmode+" ID="+this.ID+" NAME="+this.name+" MENU="+this.menu+" DEVICEFONT="+this.deviceFont+" FlashVars="+ this.flashVars +" BGCOLOR="+this.bgcolor+" TYPE=application/x-shockwave-flash PLUGINSPAGE=http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash></EMBED></OBJECT>";
			} else {
			sCR+="<EMBED SRC="+this.flashFile+" swLiveConnect="+this.LiveConnect+" WIDTH="+this.width+" HEIGHT="+this.height+" QUALITY="+this.quality+" SCALE="+this.scale+" wmode="+this.wmode+" ID="+this.ID+" NAME="+this.name+" MENU="+this.menu+" DEVICEFONT="+this.deviceFont+" FlashVars="+ this.flashVars +" TYPE=application/x-shockwave-flash PLUGINSPAGE=http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash></EMBED></OBJECT>";
			}
		} else if (Ticket.ie>=4 && this.DenyIEdl=='FALSE') {
			sCR="<OBJECT classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://active.macromedia.com/flash2/cabs/swflash.cab#version="+this.cabVersion+"\" ID=\""+this.ID+"\" WIDTH=\""+this.width+"\" HEIGHT=\""+this.height+"\">\n";
			sCR+="<PARAM NAME=movie VALUE=\""+this.flashFile+"\">\n";						
			sCR+="<PARAM NAME=quality VALUE=\""+this.quality+"\">\n";
			sCR+="<PARAM NAME=scale VALUE=\""+this.scale+"\">\n";
			sCR+="<PARAM NAME=menu VALUE=\""+this.menu+"\">\n";
			sCR+="<PARAM NAME=wmode VALUE=\""+this.wmode+"\">\n";
			if (this.flashVars){
				sCR+="<PARAM NAME=FlashVars VALUE=\""+this.flashVars+"\">\n";
			}
			if (this.bgcolor){
				sCR+="<PARAM NAME=bgcolor VALUE=\""+this.bgcolor+"\">\n";
			}
			if (this.salign) {
				sCR+="<PARAM NAME=salign VALUE=\""+this.salign+"\">\n";
			}
			sCR+="<PARAM NAME=devicefont VALUE=\""+this.deviceFont+"\">\n";
			sCR+="</OBJECT>\n";
		} else if (Ticket.webtv) {
			sCR="<EMBED SRC="+this.flashFile+" swLiveConnect=TRUE WIDTH="+this.width+" HEIGHT="+this.height+" QUALITY="+this.quality+" SCALE="+this.scale+" wmode="+this.wmode+" ID="+this.ID+" NAME="+this.name+" MENU="+this.menu+" DEVICEFONT="+this.deviceFont+" FlashVars="+ this.flashVars +" TYPE=application/x-shockwave-flash PLUGINSPAGE=http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash></EMBED>";
		}
	} else {
	if (this.redirect){
	 top.location.href = this.redirect;
	} else {
			if (this.altTxt){
			sCR = this.altTxt;
			} else {
			sCR="<IMG SRC="+this.altImg+" WIDTH="+this.width+" HEIGHT="+this.height+" BORDER=0>";
			}
		}
		}
		
		
	if (val == true) {
		document.write(sCR);
	} else{
		return sCR;
	}
}



// COOKIES.JS (PARTIAL)

var today = new Date();
var oneYear = new Date(today.getTime() + 365 * 24 * 60 * 60 * 1000);
var oneMonth = new Date(today.getTime() + 30 * 24 * 60 *60 * 1000);
var oneWeek = new Date(today.getTime() + 7 * 24 * 60 *60 * 1000);
var oneDay = new Date(today.getTime() + 24 * 60 *60 * 1000);

function GetCookieUtil (name) {
	var result = null;
	var myCookie = " " + document.cookie + ";";
	var searchName = " " + name + "=";
	var startOfCookie = myCookie.indexOf(searchName);
	var endOfCookie;
	if (startOfCookie != -1) {
		startOfCookie += searchName.length;
		endOfCookie = myCookie.indexOf(";", startOfCookie);
		result = unescape(myCookie.substring(startOfCookie, endOfCookie));
	}
	return result;
}

// MOTION.JS

function changeMotionImage (imageName) {
  document.getElementById('motionImage').src = imageName;
}

function playMotionLegacy(id,cat,subcat) {
	var catstr = "";
	if(cat!=null) 
		catstr = "&category="+cat;
	if(subcat!=null) 
		catstr = catstr+"&subcategory="+subcat;
	if(id!=null) {
		if(cat!=null && cat.toLowerCase()=="torino")
			window.open("http://sports.espn.go.com/broadband/motion/echo/oly?id="+id, "mWin", "width=737,height=410");
		else
			window.open("http://sports.espn.go.com/broadband/motion/echo/index?id="+id+catstr, "mWin", "width=737,height=410");
		var host = document.location.hostname;
		if(host=="espn.go.com" || host=="sports.espn.go.com") {
			if(frames['fsp']) 
				frames['fsp'].stop();
		}
	}	
}

function playMotion(id,cat,subcat) {
	playVideo(id);
}

function playVideo(id,cat) {
	var catstr = "";
	if(id==null)
		id = "";	
	if(cat!=null)
		catstr = "&catname="+cat;	
	window.open("http://sports.espn.go.com/broadband/ivp/index?id="+id+catstr, "mWin", "status=0,top=0,left=0,width=1014,height=620");
	var host = document.location.hostname;
	if(host=="espn.go.com" || host=="sports.espn.go.com" || host=="sports-att.espn.go.com") {
		if(frames['fsp']) 
			frames['fsp'].stop();
	}	
}

function playVideoDeportes(id) {
	var idpart = "";
	if(id!=null)
		idpart = "&id="+id;
	window.open("http://sports.espn.go.com/broadband/ivp/index?lang=es"+idpart, "mWin", "status=0,top=0,left=0,width=1014,height=620");
}	

// UNIVERSAL LOGIN JS
var swid = "";
var green = "";
var cookies = document.cookie.split("; ");
var regReq = null;
var regURL = 'http://r.espn.go.com/espn/preferences/passiveLogin?appRedirect=http%3A%2F%2Fespn-att.starwave.com%2Fi%2Fblank.gif';
var returnURL = document.location.href;
var xmlURL = 'http://sports-att.espn.go.com/espn/unilogin/loggedIn';
var debug;
var finalOutput;
var appRedirect = 'null';
if (appRedirect != '' && appRedirect != 'null')	{
	returnURL = appRedirect;
}
if (returnURL.indexOf("univLogin02", 0) == -1) {
	if (returnURL.indexOf("?",0) == -1)	{
		returnURL = returnURL + "?univLogin02=stateChanged";
	} else {
		returnURL = returnURL + "&univLogin02=stateChanged";	
	}
}
function getCookie(name) {
	for (var i=0; i < cookies.length; i++) {
	  cookie = cookies[i].split("=");
	  if (cookie[0] == name)
		return cookie[1];
	  }
	  return null;
}
swid = getCookie("SWID");
green = getCookie("GREEN");
if (green == "" || green == null) {
	green = null;  
}
if (swid == "" || swid == null) {
	swid = null;  
}

// HORIZ NAV JS
/*
ESPN.com Horizontal dropdown nav
Last Updated 08.01.2005
*/

hideElements = new Array();

// hides selectors when user rolls over horizontal dropdown
function findForm() {
	//alert('this is ie');
	//hideElements = new Array();
	for (var f=0; f<window.document.forms.length; f++) {
		var theForm = window.document.forms[f];
		for (var e=0; e<theForm.elements.length; e++) {
			var theElem = theForm.elements[e];
			if (theElem.type.substr(0,6) == "select") {
				hideElements.push(theElem);
			}
		}
	}
}

// set up month rollover scripts
function setNav() {
	// decide if dropdown should hide any flash objects on the page
	var av = navigator.appVersion.toLowerCase();
	var ua = navigator.userAgent.toLowerCase();
	var platform;
	var browser;
	var hideFlash = false;
	var hideAd = false;
	if (av.indexOf("mac") != -1) {
		platform = "mac";
	} else if (av.indexOf("windows") != -1) {
		platform = "win";
	}
	if (ua.indexOf("firefox") != -1) {
		browser = "firefox";
	}

	// if firefox...
	if (browser == "firefox") {
		//alert('user has firefox');
		hideFlash = true;
	}
	
	if (browser == "firefox" || ua.indexOf("safari") != -1) {
		hideAd = true;
	}



	// swfPresent will be defined if hiding swfs
	if (window.swfList) {
		swfPresent = true;
		//alert('hiding: '+swfsToHide);
		//alert(swfList.length);
	} else {
		swfPresent = false;
		//alert('nothing to hide');
	}
	


	// drop down
	if (document.getElementById && document.getElementById("topNav")) {
		navRoot = document.getElementById("topNav");
		for (i=0; i<navRoot.childNodes.length; i++) {
			node = navRoot.childNodes[i];
			if (node.className == "collapsed") {
			
				node.onmouseover = function() {
					this.className = 'expanded';
					
					// testing form thing
					if (isIE) {
						for (e=0; e<hideElements.length; e++) {
							var formElem = document.getElementById(hideElements[e].id);
							if (formElem != null) {
								formElem.style.visibility = 'hidden';
							}
						}
						
					}
					
					// This hides the flash object(s)
					if (hideFlash && swfPresent) {
						for (var s=0; s<swfList.length; s++) {
							var flashobject = document.getElementById(swfList[s]);
							flashobject.style.visibility = 'hidden';
						}
					}
					
					/*
					// hides wide ad
					if (hideAd) {
						if (document.getElementById('adWrap') != null) {
							var adDiv = document.getElementById('hideThisDiv');
							var adWrap = document.getElementById('adWrap');
							adWrap.style.height = '46px';
							//adWrap.style.backgroundColor = '#48AF38';
							adDiv.style.display = 'none';
						}
					}
					*/
					
					// hides ad
					if (hideAd && this.childNodes[1].innerHTML == "More [+]") {
						if (document.getElementById('ad_InContent') != null) {
							document.getElementById('ad_InContent').style.height = '262px';
						} else if (document.getElementById('ad_Poster') != null) {
							document.getElementById('ad_Poster').style.height = '612px';
						}
						var adObj1 = document.getElementById('ad');
						var adObj2 = document.getElementById('adslug');
						if (adObj1 != null) {
							adObj1.style.display = 'none';
						}
						if (adObj2 != null) {
							adObj2.style.display = 'none';
						}
					}
				}
				
				node.onmouseout = function() {
				this.className = 'collapsed';
					
					// testing form thing
					if (isIE) {
						for (e=0; e<hideElements.length; e++) {
							var formElem = document.getElementById(hideElements[e].id);
							if (formElem != null) {
								formElem.style.visibility = 'visible';
							}
						}
						
					}
					
					// This unhides the flash object(s)
					if (hideFlash && swfPresent) {
						for (var s=0; s<swfList.length; s++) {
							var flashobject = document.getElementById(swfList[s]);
							flashobject.style.visibility = 'visible';
						}
					}
					
					/*
					// unhides wide ad
					if (hideAd) {
						if (document.getElementById('adWrap') != null) {
							var adDiv = document.getElementById('hideThisDiv');
							var adWrap = document.getElementById('adWrap');
							adWrap.style.height = '46px';
							adDiv.style.display = 'block';
						}
					}
					*/
					
					// unhides ad
					if (hideAd && this.childNodes[1].innerHTML == "More [+]") {
						var adObj1 = document.getElementById('ad');
						var adObj2 = document.getElementById('adslug');
						if (adObj1 != null) {
							adObj1.style.display = 'block';
						}
						if (adObj2 != null) {
							adObj2.style.display = 'block';
						}
					}
					
				}
				
				for (j=0; j<node.childNodes.length; j++) {
					if (node.childNodes[j].className == "dropContainer") {
						elem = node.childNodes[j];
						for (k=0; k<elem.childNodes.length; k++) {
						
							// find 1st tier dropdowns
							if (elem.childNodes[k].className == "dropMenu" || elem.childNodes[k].className == "anchorDropMenu") {
								menuElem = elem.childNodes[k];
						
								for (q=0; q<menuElem.childNodes.length; q++) {

						
									if (menuElem.childNodes[q].className == "dropItem") {
										dropElem = menuElem.childNodes[q];
										dropElem.onmouseover = function() {
											//
											this.className = 'dropItemHi';
										}
										dropElem.onmouseout = function() {
											//
											this.className = 'dropItem';
										}
									
										// find 1st tier drop items that are also 2nd tier dropdowns
										for (d=0; d<dropElem.childNodes.length; d++) {
											if (dropElem.childNodes[d].className == "dropMenu2") {
												// found one
												tier2Item = dropElem.childNodes[d];
												// assign rollovers
												for (r=0; r<tier2Item.childNodes.length; r++) {
													if (tier2Item.childNodes[r].className != "rule") {
														tier2Item.childNodes[r].onmouseover = function() {
															this.className = 'dropItemHi';
														
														}
														tier2Item.childNodes[r].onmouseout = function() {
															this.className = 'dropItem';
														}
													}
												}
											}
										}
									} else if (menuElem.childNodes[q].className == "dropItem_s") { // special drop item, i.e. partner sites
										dropElem = menuElem.childNodes[q];
										dropElem.onmouseover = function() {
											//
											this.className = 'dropItemHi_s';
										}
										dropElem.onmouseout = function() {
											//
											this.className = 'dropItem_s';
										}
									}
								}
							}
						}
					}
				}
			}
		}
	}
	
	if (navigator.appName == "Microsoft Internet Explorer" && platform != "mac") {
		isIE = true;
		window.attachEvent("onload", findForm);
		//window.onload = findForm;
	}	
}
function goTo(where) {
	window.location = where;
}
function goToNew(where,winName,features) {
	window.open(where,winName,features);
}
// do it
window.onload = setNav;

// unrelated for html dropdowns
function gotosite(site) {
    if (site != "") {
        window.location=site;
    }
}

// FLASH PROXY
/*
Part of the Flash / JavaScript Integration Kit
http://www.macromedia.com/go/flashjavascript/

Created by:

Christian Cantrell
http://weblogs.macromedia.com/cantrell/
mailto:cantrell@macromedia.com

Mike Chambers
http://weblogs.macromedia.com/mesh/
mailto:mesh@macromedia.com

Macromedia
*/

/**
 * Create a new Exception object.
 * name: The name of the exception.
 * message: The exception message.
 */
function Exception(name, message)
{
    if (name)
        this.name = name;
    if (message)
        this.message = message;
}

/**
 * Set the name of the exception. 
 */
Exception.prototype.setName = function(name)
{
    this.name = name;
}

/**
 * Get the exception's name. 
 */
Exception.prototype.getName = function()
{
    return this.name;
}

/**
 * Set a message on the exception. 
 */
Exception.prototype.setMessage = function(msg)
{
    this.message = msg;
}

/**
 * Get the exception message. 
 */
Exception.prototype.getMessage = function()
{
    return this.message;
}

/**
 * Generates a browser-specific Flash tag. Create a new instance, set whatever
 * properties you need, then call either toString() to get the tag as a string, or
 * call write() to write the tag out.
 */

/**
 * Creates a new instance of the FlashTag.
 * src: The path to the SWF file.
 * width: The width of your Flash content.
 * height: the height of your Flash content.
 */
function FlashTag(src, width, height)
{
    this.src       = src;
    this.width     = width;
    this.height    = height;
    this.version   = '7,0,14,0';
    this.id        = null;
    this.bgcolor   = 'ffffff';
    this.flashVars = null;
}

/**
 * Sets the Flash version used in the Flash tag.
 */
FlashTag.prototype.setVersion = function(v)
{
    this.version = v;
}

/**
 * Sets the ID used in the Flash tag.
 */
FlashTag.prototype.setId = function(id)
{
    this.id = id;
}

/**
 * Sets the background color used in the Flash tag.
 */
FlashTag.prototype.setBgcolor = function(bgc)
{
    this.bgcolor = bgc;
}

/**
 * Sets any variables to be passed into the Flash content. 
 */
FlashTag.prototype.setFlashvars = function(fv)
{
    this.flashVars = fv;
}

/**
 * Get the Flash tag as a string. 
 */
FlashTag.prototype.toString = function()
{
    var ie = (navigator.appName.indexOf ("Microsoft") != -1) ? 1 : 0;
    var flashTag = new String();
    if (ie)
    {
        flashTag += '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ';
        if (this.id != null)
        {
            flashTag += 'id="'+this.id+'" ';
        }
        flashTag += 'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version='+this.version+'" ';
        flashTag += 'width="'+this.width+'" ';
        flashTag += 'height="'+this.height+'">';
        flashTag += '<param name="movie" value="'+this.src+'"/>';
        flashTag += '<param name="quality" value="high"/>';
        flashTag += '<param name="bgcolor" value="#'+this.bgcolor+'"/>';
        if (this.flashVars != null)
        {
            flashTag += '<param name="flashvars" value="'+this.flashVars+'"/>';
        }
        flashTag += '</object>';
    }
    else
    {
        flashTag += '<embed src="'+this.src+'" ';
        flashTag += 'quality="high" '; 
        flashTag += 'bgcolor="#'+this.bgcolor+'" ';
        flashTag += 'width="'+this.width+'" ';
        flashTag += 'height="'+this.height+'" ';
        flashTag += 'type="application/x-shockwave-flash" ';
        if (this.flashVars != null)
        {
            flashTag += 'flashvars="'+this.flashVars+'" ';
        }
        if (this.id != null)
        {
            flashTag += 'name="'+this.id+'" ';
        }
        flashTag += 'pluginspage="http://www.macromedia.com/go/getflashplayer">';
        flashTag += '</embed>';
    }
    return flashTag;
}

/**
 * Write the Flash tag out. Pass in a reference to the document to write to. 
 */
FlashTag.prototype.write = function(doc)
{
    doc.write(this.toString());
}

/**
 * The FlashSerializer serializes JavaScript variables of types object, array, string,
 * number, date, boolean, null or undefined into XML. 
 */

/**
 * Create a new instance of the FlashSerializer.
 * useCdata: Whether strings should be treated as character data. If false, strings are simply XML encoded.
 */
function FlashSerializer(useCdata)
{
    this.useCdata = useCdata;
}

/**
 * Serialize an array into a format that can be deserialized in Flash. Supported data types are object,
 * array, string, number, date, boolean, null, and undefined. Returns a string of serialized data.
 */
FlashSerializer.prototype.serialize = function(args)
{
    var qs = new String();

    for (var i = 0; i < args.length; ++i)
    {
        switch(typeof(args[i]))
        {
            case 'undefined':
                qs += 't'+(i)+'=undf';
                break;
            case 'string':
                qs += 't'+(i)+'=str&d'+(i)+'='+escape(args[i]);
                break;
            case 'number':
                qs += 't'+(i)+'=num&d'+(i)+'='+escape(args[i]);
                break;
            case 'boolean':
                qs += 't'+(i)+'=bool&d'+(i)+'='+escape(args[i]);
                break;
            case 'object':
                if (args[i] == null)
                {
                    qs += 't'+(i)+'=null';
                }
                else if (args[i] instanceof Date)
                {
                    qs += 't'+(i)+'=date&d'+(i)+'='+escape(args[i].getTime());
                }
                else // array or object
                {
                    try
                    {
                        qs += 't'+(i)+'=xser&d'+(i)+'='+escape(this._serializeXML(args[i]));
                    }
                    catch (exception)
                    {
                        throw new Exception("FlashSerializationException",
                                            "The following error occurred during complex object serialization: " + exception.getMessage());
                    }
                }
                break;
            default:
                throw new Exception("FlashSerializationException",
                                    "You can only serialize strings, numbers, booleans, dates, objects, arrays, nulls, and undefined.");
        }

        if (i != (args.length - 1))
        {
            qs += '&';
        }
    }

    return qs;
}

/**
 * Private
 */
FlashSerializer.prototype._serializeXML = function(obj)
{
    var doc = new Object();
    doc.xml = '<fp>'; 
    this._serializeNode(obj, doc, null);
    doc.xml += '</fp>'; 
    return doc.xml;
}

/**
 * Private
 */
FlashSerializer.prototype._serializeNode = function(obj, doc, name)
{
    switch(typeof(obj))
    {
        case 'undefined':
            doc.xml += '<undf'+this._addName(name)+'/>';
            break;
        case 'string':
            doc.xml += '<str'+this._addName(name)+'>'+this._escapeXml(obj)+'</str>';
            break;
        case 'number':
            doc.xml += '<num'+this._addName(name)+'>'+obj+'</num>';
            break;
        case 'boolean':
            doc.xml += '<bool'+this._addName(name)+' val="'+obj+'"/>';
            break;
        case 'object':
            if (obj == null)
            {
                doc.xml += '<null'+this._addName(name)+'/>';
            }
            else if (obj instanceof Date)
            {
                doc.xml += '<date'+this._addName(name)+'>'+obj.getTime()+'</date>';
            }
            else if (obj instanceof Array)
            {
                doc.xml += '<array'+this._addName(name)+'>';
                for (var i = 0; i < obj.length; ++i)
                {
                    this._serializeNode(obj[i], doc, null);
                }
                doc.xml += '</array>';
            }
            else
            {
                doc.xml += '<obj'+this._addName(name)+'>';
                for (var n in obj)
                {
                    if (typeof(obj[n]) == 'function')
                        continue;
                    this._serializeNode(obj[n], doc, n);
                }
                doc.xml += '</obj>';
            }
            break;
        default:
            throw new Exception("FlashSerializationException",
                                "You can only serialize strings, numbers, booleans, objects, dates, arrays, nulls and undefined");
            break;
    }
}

/**
 * Private
 */
FlashSerializer.prototype._addName= function(name)
{
    if (name != null)
    {
        return ' name="'+name+'"';
    }
    return '';
}

/**
 * Private
 */
FlashSerializer.prototype._escapeXml = function(str)
{
    if (this.useCdata)
        return '<![CDATA['+str+']]>';
    else
        return str.replace(/&/g,'&amp;').replace(/</g,'&lt;');
}

/**
 * The FlashProxy object is what proxies function calls between JavaScript and Flash.
 * It handles all argument serialization issues.
 */

/**
 * Instantiates a new FlashProxy object. Pass in a uniqueID and the name (including the path)
 * of the Flash proxy SWF. The ID is the same ID that needs to be passed into your Flash content as lcId.
 */
function FlashProxy(uid, proxySwfName)
{
    this.uid = uid;
    this.proxySwfName = proxySwfName;
    this.flashSerializer = new FlashSerializer(false);
}

/**
 * Call a function in your Flash content.  Arguments should be:
 * 1. ActionScript function name to call,
 * 2. any number of additional arguments of type object,
 *    array, string, number, boolean, date, null, or undefined. 
 */
FlashProxy.prototype.call = function()
{

    if (arguments.length == 0)
    {
        throw new Exception("Flash Proxy Exception",
                            "The first argument should be the function name followed by any number of additional arguments.");
    }

    var qs = 'lcId=' + escape(this.uid) + '&functionName=' + escape(arguments[0]);

    if (arguments.length > 1)
    {
        var justArgs = new Array();
        for (var i = 1; i < arguments.length; ++i)
        {
            justArgs.push(arguments[i]);
        }
        qs += ('&' + this.flashSerializer.serialize(justArgs));
    }

    var divName = '_flash_proxy_' + this.uid;
    if(!document.getElementById(divName))
    {
        var newTarget = document.createElement("div");
        newTarget.id = divName;
        document.body.appendChild(newTarget);
    }
    var target = document.getElementById(divName);
    var ft = new FlashTag(this.proxySwfName, 1, 1);
    ft.setVersion('6,0,65,0');
    ft.setFlashvars(qs);
    target.innerHTML = ft.toString();
}

/**
 * This is the function that proxies function calls from Flash to JavaScript.
 * It is called implicitly.
 */
FlashProxy.callJS = function()
{
    var functionToCall = eval(arguments[0]);
    var argArray = new Array();
    for (var i = 1; i < arguments.length; ++i)
    {
        argArray.push(arguments[i]);
    }
    functionToCall.apply(functionToCall, argArray);
}


// ESPNCMD.JS (SEARCH)
  var ES_submit_loc = '';
  var ES_top = '19px';
  var ES_left = '0px';
  var ES_width = '222px';
  var ES_rowID = 0;
  var ES_lastSearch='';
  var ES_rowCount;
  var ES_xmlHttpRequest;
  var ES_lastSearchKeyPress = 0;
  var ES_timerId = 0;
  var ES_hidden = true;
  var ES_isIE = false;
  var ES_appName = navigator.appName;
  var ES_userAgent = navigator.userAgent;
  var sf = ES_userAgent.indexOf('Safari');
  var sp = ES_userAgent.indexOf('Opera');  
  var showFull = true;
  if (((sf != null) && (sf > -1)) || ((sp != null) && (sp > -1)))
  {
  	showFull = false;  
  }  
  var ES_espnNavDiv = null;
  var ES_espnNavDivChild = null;
  var ES_searchStr = null;
  if(ES_appName && ES_appName.indexOf('Explorer') != -1) { ES_isIE = true; } else { ES_isIE = false; }
  var ES_hasGetElementById = 0;
  if(document.getElementById) { ES_hasGetElementById = 1;}
  var ES_hasDocumentAll = document.all;
  
  function ES_getElementById(id) {
    if(ES_hasGetElementById) return document.getElementById(id);
    if(ES_hasDocumentAll) return document.all[id];
  }
  function ES_showBox(elem) {
    if (showFull)
    {
	    if(!ES_searchStr) { ES_searchStr = ES_getElementById('searchStr'); }
	    if(!elem) {
	      if(!ES_espnNavDiv) { ES_espnNavDiv = ES_getElementById('espnNavDiv'); }
	      if(!ES_espnNavDivChild) { ES_espnNavDivChild = ES_getElementById('espnNavDivChild'); }
	      ES_espnNavDivChild.style.top = '50px';
	      elem = ES_espnNavDiv;
	    }
	    if(elem.scrollTop) { elem.scrollTop = 0; }
	    elem.style.display = 'block';
	    elem.style.visibility = 'visible';
    ES_hidden = false;
    }
  }
  function ES_hideBox(elem) {
    if(!elem) {
      if(!ES_espnNavDiv) { ES_espnNavDiv = ES_getElementById('espnNavDiv'); }
      elem = ES_espnNavDiv;
    }
    elem.style.display = 'none';
    elem.style.visibility = 'hidden';
    ES_hidden = true;
  }
  function ES_resultHiEvent(event) {
    var target = null;
    var parentTarget = null;
    var nameTarget = null;
    var typeTarget = null;

    if(!event) { target = window.event.srcElement; } else { target = event.target; }
    if(target != null) {
      var id = target.id;

      var parentId = id;
      var nameId = id + 'name';
      var typeId = id + 'type';

      var indexOfName = id.indexOf('name');
      if(indexOfName != -1) {
        nameId = id;
        parentId = id.substring(0, indexOfName);
        typeId = parentId + 'type';

        nameTarget = target;
        parentTarget = ES_getElementById(parentId);
        typeTarget = ES_getElementById(typeId);

      } else {
        var indexOfType = id.indexOf('type');
        if(indexOfType != -1) {
          typeId = id;
          parentId = id.substring(0, indexOfType);
          nameId = parentId + 'name';

          typeTarget = target;
          parentTarget = ES_getElementById(parentId);
          nameTarget = ES_getElementById(nameId);
        } else {
          parentTarget = target;
          typeTarget = ES_getElementById(typeId);
          nameTarget = ES_getElementById(nameId);
        }
      }
      if(parentTarget != null) {
        ES_resultHi(parentTarget);
        ES_resultHi(nameTarget);
      }
    }
  }
  function ES_resultLoEvent(event) {
    var target = null;
    var parentTarget = null;
    var nameTarget = null;
    var typeTarget = null;

    if(!event) { target = window.event.srcElement; } else { target = event.target; }
    if(target != null) {
      var id = target.id;

      var parentId = id;
      var nameId = id + 'name';
      var typeId = id + 'type';

      var indexOfName = id.indexOf('name');
      if(indexOfName != -1) {
        nameId = id;
        parentId = id.substring(0, indexOfName);
        typeId = parentId + 'type';

        nameTarget = target;
        parentTarget = ES_getElementById(parentId);
        typeTarget = ES_getElementById(typeId);

      } else {
        var indexOfType = id.indexOf('type');
        if(indexOfType != -1) {
          typeId = id;
          parentId = id.substring(0, indexOfType);
          nameId = parentId + 'name';

          typeTarget = target;
          parentTarget = ES_getElementById(parentId);
          nameTarget = ES_getElementById(nameId);

        } else {
          parentTarget = target;
          typeTarget = ES_getElementById(typeId);
          nameTarget = ES_getElementById(nameId);
        }
      }

      if(parentTarget != null) {
        ES_resultLo(parentTarget);
        ES_resultLo(nameTarget);
      }
    }
  }
  function ES_resultHi(elem) {
    if(elem) {
      elem.style.zIndex = '8000';
      id = elem.id;
      elem.style.cursor = 'pointer';
      elem.style.backgroundColor = '#FFFFFF';
    if(elem.className == 'ES_result') { elem.style.color = '#000'; } else {
      elem.style.color = '#F00';
      elem.style.textDecoration = 'underline';
    }
    var newRowID = id.substr(9).replace(/[^\d]/g,'');
    ES_rowID = newRowID;
    }
  }
  function ES_resultLo(elem) {
    if(elem) {
      elem.style.zIndex = '8000';
      id = elem.id;
      elem.style.cursor = 'default';
      elem.style.backgroundColor = '#F5F5F5';
      elem.style.color = '#555';
      elem.style.textDecoration = 'none';
      var newRowID = id.substr(9).replace(/[^\d]/g,'');

      ES_rowID = newRowID;
    }
  }
  function ES_suggestEvent(event) {
    if(!event) { event = window.event; }
    elem = event.target;
    if(!elem) { elem = event.srcElement; }
      var anchorIndex = elem.id.indexOf('anchor');
    if(anchorIndex != -1) {
      elem = ES_getElementById(elem.id.substring(0, anchorIndex));
    } else {
      var nameIndex = elem.id.indexOf('name');
      if(nameIndex != -1) {
        elem = ES_getElementById(elem.id.substring(0, nameIndex));
      } else {
        var typeIndex = elem.id.indexOf('type');
        if(typeIndex != -1) { elem = ES_getElementById(elem.id.substring(0, typeIndex)); }
      }
    }
    ES_suggest(elem);
  }
  function ES_suggest(elem) {
    id = elem.id;
    if(elem.childNodes[0].innerHTML) {
      term = elem.childNodes[0].childNodes[0].href;
    } else if(elem.childNodes[1]) {
      term = elem.childNodes[1].childNodes[0].href;
    }
    document.location = term;
  }
  function ES_setRowCount(r) { window.ES_rowCount = r; }
  function ES_checkKeycode(e) {
    var keycode;
    var eventObj = e;
    if(window.event) {
      eventObj = window.event;
      keycode = window.event.keyCode;
    } else if(e) {
      keycode = e.which;
    }
    if(!ES_espnNavDiv) { ES_espnNavDiv = ES_getElementById('espnNavDiv'); }
    elem = ES_espnNavDiv;

    if(ES_hidden == false) {
      if(keycode == 8) {
        if(!ES_searchStr) { ES_searchStr = ES_getElementById('searchStr'); }
        var searchStrLen = ES_searchStr.value.length;
        if(searchStrLen > 3) { ES_searchKeyPress(searchStrLen); } else { ES_searchClear(); }
      } else if(keycode == 40) {
        advance();
        return false;
      } else if(keycode == 38) {
        reverse();
        return false;
      } else if(keycode == 13) {
        return ES_submitSearchForm(ES_searchStr.form);
      } else if(keycode == 27) {
        var searchStr = ES_searchStr.value;
        if(searchStr.length < 2) { ES_searchClear(); }
      }
    }
    return true;
  }
  function ES_submitSearchForm(form) {
    if(ES_rowID) {
          var hiDiv = ES_getElementById('es_result'+ES_rowID);
          if(hiDiv) {
            var divAnchors = hiDiv.getElementsByTagName('A');
            if(divAnchors && divAnchors.length > 0) {
              var newSearchStr = divAnchors[0].innerHTML;
              if(divAnchors[0].name != null && divAnchors[0].name != '') {
                newSearchStr = divAnchors[0].name + ' ' + divAnchors[0].innerHTML;
              }
              ES_submit_loc = divAnchors[0].href;
            }
          }
    }
    if(ES_submit_loc && ES_submit_loc != '') {
      document.location = ES_submit_loc;
      return false;
    } 
    return true;
  }
  function advance() {
    var id;
    if(ES_rowID < window.ES_rowCount) {
      id = 'es_result'+ES_rowID;
      ES_resultLo(ES_getElementById(id));

      ES_rowID ++;
      id = 'es_result'+ES_rowID;
      ES_resultHi(ES_getElementById(id));
      if(ES_rowID > 10) { ES_espnNavDiv.scrollTop = ES_espnNavDiv.scrollTop + 21; }
    }

  }
  function reverse() {
    var id;
    if(ES_rowID > 1) {
      id = 'es_result'+ES_rowID;
      ES_resultLo(ES_getElementById(id));
      ES_rowID --;
      id = 'es_result'+ES_rowID;
      ES_resultHi(ES_getElementById(id));
      if(ES_rowID <= 11) { ES_espnNavDiv.scrollTop = 0; }
    }
  }
  function buildNewSearchRow(index, ind, link, linkText, extra, desc) { 
    var div = document.createElement('div');
    var rowId = 'es_result' + (index + 1);

    div.id = rowId;

    div.onclick=ES_suggestEvent;
    div.onmouseover=ES_resultHiEvent;
    div.onmouseout=ES_resultLoEvent;

    div.style.position = 'relative';
    div.style.borderBottom = '1px solid #E4E4E4';
    div.style.height = '15px';


    if(ind != null) { div.style.marginLeft = '20px'; }
    var nameDiv = document.createElement('div');
    nameDiv.id = rowId + 'name';
    nameDiv.onmousedown=ES_suggestEvent;
    nameDiv.onclick=ES_suggestEvent;
    nameDiv.onmouseover=ES_resultHiEvent;
    nameDiv.onmouseout=ES_resultLoEvent;

    nameDiv.style.position = 'absolute';
    nameDiv.style.fontFamily = 'Verdana, sans serif';
    nameDiv.style.fontSize = '9pt';

    var anchor = document.createElement('a');
    anchor.id = rowId + 'anchor';
    anchor.onmousedown=ES_suggestEvent;
    anchor.style.textDecoration = 'none';
    anchor.style.color = '#555';
    anchor.href = link;
    if(extra != null) { anchor.name = extra; }
    anchor.appendChild(document.createTextNode(linkText));
    nameDiv.appendChild(anchor);
    var typeDiv = document.createElement('div');
    typeDiv.id = rowId + 'type';
    typeDiv.onclick=ES_suggestEvent;
    typeDiv.onmousedown=ES_suggestEvent;
    typeDiv.onmouseover=ES_resultHiEvent;
    typeDiv.onmouseout=ES_resultLoEvent;

    typeDiv.style.position = 'relative';
    typeDiv.style.verticalAlign = 'bottom';
    typeDiv.style.textAlign = 'right';
    typeDiv.style.fontFamily = 'Verdana, sans serif';
    typeDiv.style.fontSize = '8pt';
    typeDiv.style.color = '#888'


    if(desc) { typeDiv.appendChild(document.createTextNode(desc)); }
    div.appendChild(nameDiv);
    div.appendChild(typeDiv);
    return div;
  }
  function suggestSearchXML(url) {
    //if( ES_isIE == true ) { url = 'http://espn.go.com' + url; }
    if(window.XMLHttpRequest) {
      ES_xmlHttpRequest = new XMLHttpRequest();
      ES_xmlHttpRequest.onreadystatechange = processReqChange;
      ES_xmlHttpRequest.open('GET', url, true);
      ES_xmlHttpRequest.send(null);
    } else if(window.ActiveXObject) {
      ES_xmlHttpRequest = new ActiveXObject('Microsoft.XMLHTTP');
      if(ES_xmlHttpRequest) {
        ES_xmlHttpRequest.onreadystatechange = processReqChange;
        ES_xmlHttpRequest.open('GET', url, true);
        ES_xmlHttpRequest.send();
      }
    }
  }
  function processReqChange() {
    if (ES_xmlHttpRequest != null) {
      if(ES_xmlHttpRequest.readyState == 4) {
         if(ES_xmlHttpRequest.status == 200) {
           ES_rowCount = 0;
           ES_rowID = 0;
           var numParsed = parseSuggestXML(ES_xmlHttpRequest.responseXML.documentElement,
           ES_xmlHttpRequest.responseText);
          if(numParsed && numParsed > 0) { ES_showBox(ES_espnNavDiv); }
        } else {
        }
      }
    }
  }
  function parseSuggestXML(xmlDoc, xml) {
    var numberSuggested = 0;
    if(!ES_searchStr) { ES_searchStr = ES_getElementById('searchStr'); }
    var currentSearchStr = ES_searchStr.value;

    var temp = xmlDoc.getElementsByTagName('searchStr');
    if(temp.length > 0 && temp[0].firstChild != null) {

      var searchStr = temp[0].firstChild.data;

      if(currentSearchStr.indexOf(searchStr) != -1) {
        var time = xmlDoc.getElementsByTagName('time')[0].firstChild.data;
        numberSuggested = xmlDoc.getElementsByTagName('count')[0].firstChild.data;
        var results = xmlDoc.getElementsByTagName('result');
        ES_setRowCount(results.length);

        var resultsStr = '';

        if(!ES_espnNavDivChild) { ES_espnNavDivChild = ES_getElementById('espnNavDivChild'); }
        if(!ES_espnNavDiv) { ES_espnNavDiv = ES_getElementById('espnNavDiv'); }
        var currentSearchObj = ES_espnNavDiv;
            
        currentSearchObj.style.position = 'absolute';
        currentSearchObj.style.top = ES_top; //'105px';
        currentSearchObj.style.left = ES_left; //'8px';
        currentSearchObj.style.width = ES_width; //'404px';
        currentSearchObj.style.border = '1px solid #CCC';
        currentSearchObj.style.backgroundColor = '#F5F5F5';
        currentSearchObj.style.overflow = 'auto';
        if(currentSearchObj.style.overflowx){ currentSearchObj.style.overflowx = 'hidden'; }
        currentSearchObj.style.zIndex = '8000';
        ES_hideBox(ES_espnNavDiv);
  
        var clipHeight = 0;
        if(results.length < 10) {
          clipHeight = ((results.length*19) + 3);
        } else {
          clipHeight = ((10*19) + 3);
        }
        
        if (!showFull)
        {
          if (clipHeight > ((4*19) + 3))
          {
            clipHeight = (4*19) + 3;
          }
        }
        
        currentSearchObj.style.height = clipHeight + 'px';
        currentSearchObj = ES_espnNavDivChild;
        currentSearchObj.innerHTML = '';
        if(results != null) {
          var displayedCount = 0;
          var actualCount = 0;
          for (i = 0; i < results.length; i++) {
            var ind = results[i].getAttribute('indent');
            var linkTextNode = results[i].getElementsByTagName('linkText')[0];
            var linkTextExtra = linkTextNode.getAttribute('extra');
            var navLinkText = linkTextNode.firstChild.data;
            var navUrl = results[i].getElementsByTagName('url')[0].firstChild.data;
            var navDesc = '';
            var node = results[i].getElementsByTagName('desc');
            if(node != null && node.length > 0) { navDesc = node[0].firstChild.data; }
            
            currentSearchObj.appendChild(buildNewSearchRow(i, ind, navUrl, navLinkText, linkTextExtra, navDesc));

            actualCount = i + 1;
            if(!ind) { displayedCount = displayedCount + 1; }
            if(displayedCount >= 15) { break; }
          }

          if(displayedCount >= 15) {
            currentSearchObj.appendChild(buildNewSearchRow(actualCount, null, 'http://search.espn.go.com/keyword/search?page=abbreviated&searchString=' + currentSearchStr, 'More >>', null, null));
            ES_setRowCount(actualCount+1);
          }
          if(results.length > 0) { ES_showBox(ES_espnNavDiv); }
        }

      }
    } else {
      if(!ES_espnNavDivChild) { ES_espnNavDivChild = ES_getElementById('espnNavDivChild'); }
      ES_espnNavDivChild.innerHTML = '';
      ES_hideBox(ES_espnNavDiv);
    }

    return numberSuggested;
  }
  function ES_checkMousedown(event) {
    if(!event) {
      event = window.event;
      target = event.srcElement;
      relatedTarget = event.toElement;
         var targetId = null;
      if(target){ targetId = target.id; }
      if(!target || (targetId != 'espnNavDiv' && targetId != 'searchStr')) {
         if(targetId.indexOf('es_result') == -1) {
           ES_searchClear();
         }
      }
    }
    return event;
  }
  function ES_searchBlur(event) {
    if (showFull)
    {
      if(ES_isIE == false) { ES_searchClear(); }
    }
  }
  function ES_searchClear() {
    ES_hideBox(ES_espnNavDiv);
  }
  function ES_searchKeyPress(numChars) {
    if (showFull)
    {
    var now = new Date();
    var time = (now.getHours()*60*60*1000) +
           (now.getMinutes()*60*1000) +
           (now.getSeconds()*1000) +
           now.getMilliseconds();
    if(ES_lastSearchKeyPress > 0 && numChars > 1) {
      if(ES_timerId == 0) { ES_timerId = setTimeout('performSearch()', 350); } else {
        if((time - ES_lastSearchKeyPress) < 350) {
          clearTimeout(ES_timerId);
          ES_timerId = setTimeout('performSearch()', 350);
        }
      }
    }
    ES_lastSearchKeyPress = time;
    }
  }
  function trim(s) { return s.replace (/^\s+|\s+$/g,''); }
  function performSearch() {
    ES_timerId = 0;
    var searchStr = escape(trim(ES_getElementById('searchStr').value));
    if(ES_lastSearch != searchStr) {
      ES_lastSearch = searchStr;
      if(searchStr.length > 2) { suggestSearchXML('/keyword/espncmdXML?searchStr=' + searchStr); } else {
        if(searchStr.length == 0) { ES_searchClear(); }
      }
    }
  }

  document.onkeydown = ES_checkKeycode;
  document.onmousedown = ES_checkMousedown;

  ES_setRowCount(6);
  
function passiveLoginComplete() {
  var myif = document.getElementById("myespn");
  if(myif!=null)
  	myif.src = "http://my.espn.go.com/profile/myfp";
}

// flash pop-up code
function daughter(pstr1,pstr2,pstr3)  {
	var windowFeatures = 'toolbar=no,status=no,scrollbars=no,location=no,menubar=no,directories=no,resizable=no,width=' + pstr2 + ',height=' + pstr3;
	window.open(pstr1,'thisPopup', windowFeatures);
}

// because daughter conflicts with a function in ad-production flash js version
function daughter2(pstr1,pstr2,pstr3)  {
	var windowFeatures = 'toolbar=no,status=no,scrollbars=no,location=no,menubar=no,directories=no,resizable=no,width=' + pstr2 + ',height=' + pstr3;
	window.open(pstr1,'thisPopup', windowFeatures);
}

// hide motion player on nav rollover
function hideSWF() {
	swfList = new Array('fspMovie');
}
hideSWF();