Object.extend = function(destination, source)/* From  Prototype JavaScript framework, version 1.4.0 (c) 2005 Sam Stephenson <sam@conio.net>*/
{
	for (property in source)
	{
		destination[property] = source[property];
	}
	return destination;
}

var Class = { /* From  Prototype JavaScript framework, version 1.4.0 (c) 2005 Sam Stephenson <sam@conio.net>*/
	create: function()
	{
		return function()
		{
			this.initialize.apply(this, arguments);
		}
	}
}

Function.prototype.inherit = function(parentClass)
{
	for(var prop in parentClass.prototype)
	{
		if(!this.prototype[prop])
		{
			this.prototype[prop] = parentClass.prototype[prop];
		}
	}
	this.prototype.uber = parentClass.prototype;
}


/*Begin ESPN.com core*/
if(typeof com == 'undefined' || !com.espn)
{
	com = {
		espn:{
			env:{},
			listeners:{},
			Logger: {
				log: function(message,escapeHTML,element)
				{
					if(!com.espn.debug){ return; }
					if(!document.body)
					{
						setTimeout(function()
						{
							com.espn.Logger.log(message,escapeHTML,element);
						},1000);
						return;
					}
					if(escapeHTML)
					{
						if(String.prototype.escapeHTML)
						{
							com.espn.Logger.escapeHTML = function(m)
							{
								return m.escapeHTML();
							}
						}
					}
					if(!element)
					{
						com.espn.Logger.setDefaultElement();
						com.espn.Logger.element.innerHTML = com.espn.Logger.escapeHTML(message) + '<br />' + com.espn.Logger.element.innerHTML;
					}
					else if(element.parentNode)
					{
						element.innerHTML = com.espn.Logger.escapeHTML(message) + '<br />' + element.innerHTML;
						com.espn.Logger.element = element;
					}
					else
					{
						var el = document.getElementById(element);
						el.innerHTML = '<div>' + com.espn.Logger.escapeHTML(message) + '</div>' + el.innerHTML;
						com.espn.Logger.element = el;
					}
				},
				setDefaultElement: function()
				{
					if(!com.espn.Logger.element)
					{
						var div = document.createElement('div');
						div.style.width = '80%';
						div.style.height = '200px';
						div.style.overflow = 'scroll';
						div.style.backgroundColor = '#FFF';
						div.style.border = '1px solid #000';
						com.espn.Logger.element = div;
						document.body.appendChild(com.espn.Logger.element);
					}
				},
				escapeHTML: function(message)
				{
					return message;
				}
			}
		}
	};
}

com.espn.doesImplement = function(obj,funcName)
{
	return obj && obj[funcName] && obj[funcName] instanceof Function;
}
com.espn.env.av = navigator.appVersion;
com.espn.env.ua = navigator.userAgent;


com.espn.resolve = function(packageString)
{
	var packages = packageString.split(',');
	for(var i=0; i<packages.length; i++)
	{
		com.espn.resolvePackage(packages[i]);
	}
}

com.espn.resolvePackage = function(objectName)
{
	if(objectName == '' || !objectName || objectName.indexOf('*') != -1 )
	{
		return;
	}

	var parts = objectName.split('.');
	var startIndex = null;
	var growingString = '';
	var evalableString = '';

	for(var i=0; i<parts.length-1; i++)
	{
		growingString += parts[i];
		if(!eval(growingString))
		{
			break;
		}
		evalableString = growingString;
		startIndex = i + 1;
		growingString += '.';
	}

	if(!startIndex){ return; }

	if(startIndex == 1)
	{
		parts[0] = {};
	}

	for(var i=startIndex; i<parts.length-1; i++)
	{
		eval(evalableString)[parts[i]] = {};
		evalableString += ('.' + [parts[i]]);
	}
}


com.espn.require = function(){return null;}



com.espn.resolve('com.espn.util.empty,com.espn.caster.Base,com.espn.util.Cookies,');
/*HELPS FORECE A COMPILE*/
com.espn.require('com.espn.util.empty');

function handleCasterMessage(message,updateObj)
{
	for (var i in updateObj)
	{
		for(var j in updateObj[i])
		{
			if(j != 'objId')
			{
				GameUpdate.invalidate(updateObj[i]['objId'],j,updateObj[i][j]);
			}
		}
	}
}

function getDebug()
{
	var el = document.getElementById('casterDebug');
	if(!el)
	{
		el = document.createElement('div');
		el.id = 'casterDebug';
		el.style.position = 'absolute';
		el.style.left = '772px';
		el.style.backgroundColor = '#FFF';
		el.style.top = '0';
		el.style.width = '252px';
		el.zIndex = 1000;
		document.body.appendChild(el);
	}
	return el;
}

function casterDebug(message)
{
	return;
	var debugScreen = getDebug();
	if(debugScreen.innerHTML.length > 2000)
	{
		debugScreen.innerHTML = '';
	}
	debugScreen.innerHTML = message + '<br /><br />' + debugScreen.innerHTML;
}

function g_error(message){casterDebug(message);}

var GameFactory = {
	'games':new Object(),
	'properties':new Object(),
	'makeGame':function(gameId,gameUpdate,staticProperties)
	{
		if(!GameFactory.games[gameId])
		{
			GameFactory.games[gameId] = new Game(gameId,gameUpdate,staticProperties,GameFactory.properties);
		}
		return GameFactory.games[gameId];
	},
	'addProperty':function(key,nodeNameStub,func)
	{
		GameFactory.properties[key] = new Property(nodeNameStub,func);
	}
};

var GameUpdate = {
	'games':new Object(),
	'attach':function(game)
	{
		GameUpdate.games[game.gameId] = game;
	},
	'invalidate':function(gameId,property,value)
	{
		if(gameId && GameUpdate.games[gameId])
		{
			GameUpdate.games[gameId].update(property,value);
		}
	}
};

function Property(nodeName,func)
{
	this.node = null;
	this.func = func;
	this.value = null;
	this.nodeName = nodeName;
	this.update = function(value,game)
	{
		var node = document.getElementById(this.nodeName + game.gameId);
		this.value = value;
		if(this.func)
		{
			this.func(node,value,game);
		}
	}
	this.init = function(gameId)
	{
		this.node = getElem(this.nodeName + gameId);
	}
}

function Game(gameId,gameUpdate,staticProperties,properties)
{
	this.gameId = gameId;
	this.staticProperties = staticProperties;
	this.properties = properties;
	this.gameUpdate = gameUpdate;
	this.update = function(property,value)
	{
		if(!this.properties[property]){casterDebug('ERROR: Property not found: ' + property);}
		if(this.properties[property] && properties[property].update)
		{
			this.properties[property].update(value,this);
		}
	}

	for (var i in this.properties)
	{
		if(this.properties[i].init)
		{
			this.properties[i].init(this.gameId);
		}
	}

	this.gameUpdate.attach(this);

}

 var isInternetExplorer = navigator.appName.indexOf("Microsoft") != -1;
// Handle all the FSCommand messages in a Flash movie.
function listener_DoFSCommand(command, args) {
                var listenerObj = isInternetExplorer ? document.all.listener : document.listener;

               if (command == "handleCasterMessage")
               {
                    i = args.indexOf("|");
                    ss = args.substring(0, i);
                    gg = args.substring(i+1);
                    if (gg != null)
                    {
                        gg = eval(gg);
                    }
                    handleCasterMessage(ss, gg);
               } else if (command == "handleConnectionMessage") {
                    i = args.indexOf("|");
                    ss = args.substring(0, i);
                    gg = args.substring(i+1);
                    handleConnectionMessage(ss, gg);
               }

            }
            // Hook for Internet Explorer.
            if (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 && navigator.userAgent.indexOf("Windows") != -1 && navigator.userAgent.indexOf("Windows 3.1") == -1)
            {
                document.write('<script language=\"VBScript\"\>\n');
                document.write('On Error Resume Next\n');
                document.write('Sub listener_FSCommand(ByVal command, ByVal args)\n');
                document.write('	Call listener_DoFSCommand(command, args)\n');
                document.write('End Sub\n');
                document.write('</script\>\n');
            }



// 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 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 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;
	}


}
*/


/*BROWSER CHECK*/

var browser = navigator.appName;
var appVer = parseInt(navigator.appVersion);
var ie = "Microsoft Internet Explorer";
var ns = "Netscape";
if (navigator.appVersion.indexOf("Macintosh") != -1) {
	isMac = true;
} else {
	isMac = false;
}
/*****
 * Javascript Array methods for 5.0 browser
 */

function Array_splice(index, delTotal) {
	var temp = new Array();
	var response = new Array();
	var A_s = 0;
	for (A_s = 0; A_s < index; A_s++) {
		temp[temp.length] = this[A_s];
	}
	for (A_s = 2; A_s < arguments.length; A_s++) {
		temp[temp.length] = arguments[A_s];
	}
	for (A_s = index + delTotal; A_s < this.length; A_s++) {
		temp[temp.length] = this[A_s];
	}
	for (A_s = 0; A_s < delTotal; A_s++) {
		response[A_s] = this[index + A_s];
	}
	this.length = 0;
	for (A_s = 0; A_s < temp.length; A_s++) {
		this[this.length] = temp[A_s];
	}
	return response;
}

if (typeof Array.prototype.splice == "undefined") {
	Array.prototype.splice = Array_splice
}

function Array_push() {
	var A_p = 0;
	for (A_p = 0; A_p < arguments.length; A_p++) {
		this[this.length] = arguments[A_p];
	}
	return this.length;
}

if (typeof Array.prototype.push == "undefined") {
	Array.prototype.push = Array_push;
}

function correctPng() {
	for(var i=0; i<document.images.length; i++) {
		var img = document.images[i];
		var imgName = img.src.toUpperCase();
		if (imgName.substring(imgName.length-3, imgName.length) == "PNG") {
			var imgID = (img.id) ? "id='" + img.id + "' " : "";
			var imgClass = (img.className) ? "class='" + img.className + "' " : "";
			var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' ";
			var imgStyle = "display:inline-block;" + img.style.cssText;
			var imgAttribs = img.attributes;
			for (var j=0; j<imgAttribs.length; j++) {
				var imgAttrib = imgAttribs[j];
				if (imgAttrib.nodeName == "align") {
					if (imgAttrib.nodeValue == "left") imgStyle = "float:left;" + imgStyle;
					if (imgAttrib.nodeValue == "right") imgStyle = "float:right;" + imgStyle;
					break;
				}
			}
			var strNewHTML = "<span " + imgID + imgClass + imgTitle;
			strNewHTML += " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";";
			strNewHTML += "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader";
			strNewHTML += "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>" ;
			img.outerHTML = strNewHTML;
			i = i-1;
		}
	}
}


/********
Helper Function. Returns array of elements or an empty array.
*********/
function getElementsByTagName(elName)
{
	return document.getElementsByTagName?document.getElementsByTagName(elName):new Array();
}

function removeWhiteSpace(parent,node)
{
	if(node.nodeType == 3)
	{
		parent.removeChild(node);
	}
}

function setHandleClass(className)
{
	g_className = className;
}

function getNodeByClassName(node,className)
{
	if(node.className == className)
	{
		return node;
	}
	else if(node.hasChildNodes())
	{
		for(var i=0; i<node.childNodes.length; i++)
		{
			if(node.childNodes[i].nodeType == 1)
			{
				return getNodeByClassName(node.childNodes[i],className);
			}
		}
	}
	else
	{
		return null;
	}
}


function debug_dd(text)
{
	var el = getElem('debug_dd');
	el.innerHTML = text + '<br><br>' + el.innerHTML;
}

com.espn.require('com.espn.util.empty');

// set up month rollover scripts
function setDateNav() {
	if (document.getElementById && document.getElementById("dateSelector")) {
		navRoot = document.getElementById("dateSelector");
		for (i=0; i<navRoot.childNodes.length; i++) {
			node = navRoot.childNodes[i];
			if (node.className == "monthBoxOff") {
				node.onmouseover = function() {
					this.className = 'monthBoxOn';
				}
				node.onmouseout = function() {
					this.className = 'monthBoxOff';
				}
			}
		}
	}
}

// INITIALIZE CALENDAR
if(getElem('dateSelector')) {
	setDateNav()
}
else {
	setTimeout('setDateNav();',1000);
}

com.espn.require('com.espn.caster.Base');

function changeTabColor(node,value,game)
{
	value = value.toString();
	value = value.replace('1','#FFF');
	value = value.replace('0','#000');
	node.style.color = value;
}

function changeDisplay(node,value,game)
{
	value = value.toString();
	value = value.replace('0','none');
	value = value.replace('1','block');
	value = value.replace('2','inline');
	node.style.display = value;
}

function changeValue(node,value,game)
{
	node.innerHTML = value;
}

function changeMultipleDisplays(node,value,game)
{
	value = value.toString();
	value = value.replace('0','none');
	value = value.replace('1','block');
	value = value.replace('2','inline');
	if(node.id.indexOf('li-') > -1)
	{
		node.style.display = value;
		getElem('rhe-' + game.staticProperties['gameId']).style.display = value;
		getElem('dr-' + game.staticProperties['gameId']).style.display = value;
		getElem('homeRuns-' + game.staticProperties['gameId']).style.display = value;
	}
	else if(node.id.indexOf('pd-') > -1)
	{
		node.style.display = value;
	}
	else if(node.id.indexOf('alt') == 0)
	{
		getElem('altAwayDisplay-' + game.staticProperties['gameId']).style.display = value;
		getElem('altHomeDisplay-' + game.staticProperties['gameId']).style.display = value;
	}
}

function changeLink(node,value,game)
{
	var href = node.getAttribute('href');
	href = href.substring(0,href.indexOf('?'));
	node.setAttribute('href',href + '?playerId=' + value);
}

function changeImage(node,value,game)
{
	var src = node.src;
	value = value.toString();
	if(node.id.indexOf('balls') == -1 && node.id.indexOf('strikes') == -1 && node.id.indexOf('outs') == -1 && node.id.indexOf('fieldImage') == -1)
	{
		value = value.replace('0','away');
		value = value.replace('1','home');
		value = value.replace('2','pre');
		value = value.replace('3','in');
		value = value.replace('4','post');
	}
	src = src.substring(0,src.indexOf('_'));
	node.src = src + '_' + value + '.gif';
}

function changeWithReplacedValue(node,value,game)
{
	value = value.toString();
	value = value.replace(/^3$/,'Final');
	value = value.replace(/^5$/,'Cancelled');
	value = value.replace(/^6$/,'Postponed');
	value = value.replace(/^7$/,'Delayed');
	value = value.replace(/^8$/,'Suspended');
	node.innerHTML = value;
}

function changeRecapArea(node,value,game)
{
	node.innerHTML = '<a href="/mlb/recap?gameId=' + game.staticProperties['gameId'] + '">' + value + '</a>';
}

function changeGameLinks(node,value,game)
{
	var values = value.split('|');
	casterDebug(values.length);
	var result = '';

	if(values)
	{
		for(var i = 0; i < values.length; i++)
		{
			casterDebug(values[i]);
			switch(values[i])
			{
				case 't':
					result += '<a href="http://search.espn.go.com/keyword/search?searchString=' + game.staticProperties['homeTeamLocation'].replace(' ', '+') + game.staticProperties['homeTeamName'].replace(' ', '+') + '&amp;partner=ot">Tickets</a> | ';
					break;
				case 'a':
					result += '<a href="#" onclick="openWin=window.open(\'http://proxy.espn.go.com/wireless/insider/popUpAlert?sport=mlb&amp;gameId=' + game.staticProperties['gameId'] + '&amp;campaign=insider&amp;source=MLBA_content\', \'Pick_Game_Alert\',\'noresizable,noscrollbars,height=340,width=400\');return false;">Alert</a> <img alt="" src="' + game.staticProperties['imgRef'] + '/i/in.gif" style="width:11px;height:12px" /> | ';
					break;
				case 'r':
					result += '<a href="#" onclick="MM_openBrWindow(\'http://insider.espn.go.com/mlb/caster/flashBoard\',\'\',\'width=662,height=205\')">RealTime</a>  <img src="' + game.staticProperties['imgRef'] + '/i/in.gif" alt="" /> | ';
					break;
				case 'p':
					result += '<a href="/mlb/playbyplay?gameId=' + game.staticProperties['gameId'] + '">Play By Play</a> | ';
					break;
				case 'b':
					result += '<a href="/mlb/boxscore?gameId=' + game.staticProperties['gameId'] + '">Box Score</a> | ';
					break;
				case 'f':
					result += '<a href="/mlb/photos?gameId=' + game.staticProperties['gameId'] + '">Photos</a> | ';
					break;
				case 'g':
					result += '<a href="#" onclick="window.open(\'/mlb/gamecast?gameId=' + game.staticProperties['gameId'] + '\',\'gamecast' + game.staticProperties['gameId'] + '\',\'width=960,height=603,scrollbars=no,resizable=no\'); return false;">GameCast</a> | ';
					break;
				case 'ml1':
					result += '<a href="http://x.go.com/cgi/x.pl?goto=http://mlb.mlb.com/NASApp/mlb/mlb/subscriptions/espn.jsp?partnerId=ESPN&amp;affiliateID=ESPN_ADTYPE&amp;name=mlbtv&amp;srvc=pro&amp;SOURCE=mlbtv">Watch</a> <img alt="" src="' + game.staticProperties['imgRef'] + '/i/mlbtv_small.gif" /> | ';
					break;
				case 'ml2':
					result += '<a href="http://x.go.com/cgi/x.pl?goto=http://mlb.mlb.com/NASApp/mlb/mlb/subscriptions/espn.jsp?partnerId=ESPN&amp;affiliateID=ESPN_ADTYPE&amp;name=mlbtv&amp;srvc=pro&amp;SOURCE=mlbtv">Watch</a> <img alt="" src="' + game.staticProperties['imgRef'] + '/i/mlbtv_small.gif" /> | ';
					break;
				default:
					break;
			}
		}
	}
	result = result.replace(/\| $/,'');
	node.innerHTML = result;
}

function changeHomeRuns(node,value,game)
{
	var teams = value.split('$');
	var teamName, teamParts, players, playerParts, playerId, playerName, gameHomeRuns, totalHomeRuns;
	var result = '';
	var length = 2;
	if(teams.length < length)
	{
		length = teams.length;
	}
	casterDebug(value);
	if(value == ''){return result;}
	for(var i = 0; i < length; i++)
	{
		if(i > 1){ break; }
		if(teams[i].indexOf(':') == -1){ break; }
		if(i == 1 && teams.length == 3)
		{
			result += ' - ';
		}
		teamParts = teams[i].split(':');
		teamName = teamParts[0];
		casterDebug('Team Name: ' + teamName);
		players = teamParts[1].split('|');
		result += '<span class="bi">' + teamName + ': </span>';
		for(var j = 0; j < players.length; j++)
		{
			playerParts = players[j].split('^');
			playerId = playerParts[0];
			playerName = playerParts[1];
			gameHomeRuns = playerParts[2];
			totalHomeRuns = playerParts[3];
			result += '<a href="/mlb/players/profile?playerId=' + playerId + '">' + playerName + '</a>';
			result += ' ' + gameHomeRuns;
			result += ' (' + totalHomeRuns + ')';
			if(j == players.length - 1)
			{
				result += ' ';
			}
			else
			{
				result += ', ';
			}
		}
	}

	if(result != '')
	{
		result = '<span>HR &#187; </span>' + result;
	}
	casterDebug(result);
	node.innerHTML = result;
}

GameFactory.addProperty(0,null,null);
GameFactory.addProperty(1,'st-',changeTabColor);
GameFactory.addProperty(2,'st-',changeWithReplacedValue);
GameFactory.addProperty(3,'gra-',changeDisplay);
GameFactory.addProperty(4,'atw-',changeValue);
GameFactory.addProperty(5,'atl-',changeValue);
GameFactory.addProperty(6,'altAwayDisplay-',changeMultipleDisplays);
GameFactory.addProperty(7,'altAwayWins-',changeValue);
GameFactory.addProperty(8,'altAwayLosses-',changeValue);
GameFactory.addProperty(9,'htw-',changeValue);
GameFactory.addProperty(10,'htl-',changeValue);
GameFactory.addProperty(11,'altHomeWins-',changeValue);
GameFactory.addProperty(12,'altHomeLosses-',changeValue);
GameFactory.addProperty(13,'tv_pre-',changeDisplay);
GameFactory.addProperty(14,'winnerArrowDiv-',changeDisplay);
GameFactory.addProperty(15,'winnerArrow-',changeImage);
GameFactory.addProperty(16,'li-',changeMultipleDisplays);
GameFactory.addProperty(17,'li1-',changeValue);
GameFactory.addProperty(18,'li2-',changeValue);
GameFactory.addProperty(19,'li3-',changeValue);
GameFactory.addProperty(20,'li4-',changeValue);
GameFactory.addProperty(21,'li5-',changeValue);
GameFactory.addProperty(22,'li6-',changeValue);
GameFactory.addProperty(23,'li7-',changeValue);
GameFactory.addProperty(24,'li8-',changeValue);
GameFactory.addProperty(25,'li9-',changeValue);
GameFactory.addProperty(26,'as1-',changeValue);
GameFactory.addProperty(27,'as2-',changeValue);
GameFactory.addProperty(28,'as3-',changeValue);
GameFactory.addProperty(29,'as4-',changeValue);
GameFactory.addProperty(30,'as5-',changeValue);
GameFactory.addProperty(31,'as6-',changeValue);
GameFactory.addProperty(32,'as7-',changeValue);
GameFactory.addProperty(33,'as8-',changeValue);
GameFactory.addProperty(34,'as9-',changeValue);
GameFactory.addProperty(35,'hs1-',changeValue);
GameFactory.addProperty(36,'hs2-',changeValue);
GameFactory.addProperty(37,'hs3-',changeValue);
GameFactory.addProperty(38,'hs4-',changeValue);
GameFactory.addProperty(39,'hs5-',changeValue);
GameFactory.addProperty(40,'hs6-',changeValue);
GameFactory.addProperty(41,'hs7-',changeValue);
GameFactory.addProperty(42,'hs8-',changeValue);
GameFactory.addProperty(43,'hs9-',changeValue);
GameFactory.addProperty(44,'runsHeader-',changeValue);
GameFactory.addProperty(45,'hitsHeader-',changeValue);
GameFactory.addProperty(46,'errorsHeader-',changeValue);
GameFactory.addProperty(47,'awayRunsTotal-',changeValue);
GameFactory.addProperty(48,'awayTeamHitsTotal-',changeValue);
GameFactory.addProperty(49,'awayTeamErrorsTotal-',changeValue);
GameFactory.addProperty(50,'homeRunsTotal-',changeValue);
GameFactory.addProperty(51,'homeTeamHitsTotal-',changeValue);
GameFactory.addProperty(52,'homeTeamErrorsTotal-',changeValue);
GameFactory.addProperty(53,'gameStatusImg-',changeImage);
GameFactory.addProperty(54,'recapHeadline-',changeRecapArea);
GameFactory.addProperty(55,'gameLinks-',changeGameLinks);
GameFactory.addProperty(56,'basemap-',changeDisplay);
GameFactory.addProperty(57,'fieldImage-',changeImage);
GameFactory.addProperty(58,'balls-',changeImage);
GameFactory.addProperty(59,'strikes-',changeImage);
GameFactory.addProperty(60,'outs-',changeImage);
GameFactory.addProperty(61,'pd-',changeDisplay);
GameFactory.addProperty(62,'cp-',changeLink);
GameFactory.addProperty(63,'cp-',changeValue);
GameFactory.addProperty(64,'cpta-',changeValue);
GameFactory.addProperty(65,'cpip-',changeValue);
GameFactory.addProperty(66,'cper-',changeValue);
GameFactory.addProperty(67,'cpk-',changeValue);
GameFactory.addProperty(68,'cb-',changeLink);
GameFactory.addProperty(69,'cb-',changeValue);
GameFactory.addProperty(70,'cbta-',changeValue);
GameFactory.addProperty(71,'cbh-',changeValue);
GameFactory.addProperty(72,'cbab-',changeValue);
GameFactory.addProperty(73,'cbrbbhr-',changeValue);
GameFactory.addProperty(74,'lastPlay-',changeValue);
GameFactory.addProperty(75,'pitchers-',changeDisplay);
GameFactory.addProperty(76,'pitchersPre-',changeDisplay);
GameFactory.addProperty(77,'atpcon-',changeDisplay);
GameFactory.addProperty(78,'htpcon-',changeDisplay);
GameFactory.addProperty(79,'pitchersPost-',changeDisplay);
GameFactory.addProperty(80,'winp-',changeLink);
GameFactory.addProperty(81,'winp-',changeValue);
GameFactory.addProperty(82,'wpw-',changeValue);
GameFactory.addProperty(83,'wpl-',changeValue);
GameFactory.addProperty(84,'losep-',changeLink);
GameFactory.addProperty(85,'losep-',changeValue);
GameFactory.addProperty(86,'lpw-',changeValue);
GameFactory.addProperty(87,'lpl-',changeValue);
GameFactory.addProperty(88,'sd-',changeDisplay);
GameFactory.addProperty(89,'savep-',changeLink);
GameFactory.addProperty(90,'savep-',changeValue);
GameFactory.addProperty(91,'sps-',changeValue);
GameFactory.addProperty(92,'homeRuns-',changeDisplay);
GameFactory.addProperty(93,'homeRuns-',changeHomeRuns);
GameFactory.addProperty(94,'gameNote-',changeValue);
GameFactory.addProperty(95,'bd-',changeDisplay);
GameFactory.addProperty(96,'recapHeadline-',changeDisplay);
GameFactory.addProperty(97,'inGameTV-',changeDisplay);


com.espn.require('com.espn.util.empty');

/*BROWSER CHECK*/

var browser = navigator.appName;
var appVer = parseInt(navigator.appVersion);
var ie = "Microsoft Internet Explorer";
var ns = "Netscape";
if (navigator.appVersion.indexOf("Macintosh") != -1) {
	isMac = true;
} else {
	isMac = false;
}
com.espn.require('com.espn.util.empty');

function getObj(name) {
  if (document.getElementById) {
    return document.getElementById(name).style;
  } else if (document.all) {
    return document.all[name].style;
  } else if (document.layers) {
    return document.layers[name];
  } else {
  	return false;
  }
}
com.espn.require('com.espn.util.empty');

function changeClass(id, newClass) {
 	identity=document.getElementById(id);
	identity.className=newClass;
}


com.espn.require('com.espn.util.empty');

function getElem(name)
{
	if (document.getElementById)
	{
		return document.getElementById(name);
	}
	else if (document.all)
	{
		return document.all[name];
	}
	else if (document.layers)
	{
		return document.layers[name];
	}
	else
	{
		return null;
	}
}
com.espn.require('com.espn.util.empty');

var g_ajax_debug = false;
var RequestFactory = {
	'requests':new Object(),
	'createRequest':function(url,id,func,argObj,abortable,abortOthers,query,type)
	{
		if(abortOthers)
		{
			RequestFactory.abortAll();
		}

		if(!RequestFactory.requests[id])
		{
			RequestFactory.requests[id] = new CustomRequest(url,id,func,argObj,abortable,query,type);
		}

		RequestFactory.requests[id].init(id);
		return RequestFactory.requests[id];
	},
	'abortAll':function()
	{
		for(var i in RequestFactory.requests)
		{
			RequestFactory.requests[i].abort();
		}
	},
	'getRequest':function(id)
	{
		return RequestFactory.requests[id];
	}
};

function CustomRequest(url,id,func,argObj,abortable,query,type)
{
	this.id = id;
	this.req = null;
	this.type = type;
	this.url = url;
	this.query = query;
	this.argObj = argObj;
	this.func = func;
	this.abortable = null;

	if(typeof abortable == 'undefined' || abortable == null)
	{
		this.abortable = true;
	}
	else
	{
		this.abortable = abortable;
	}

	this.abort = function()
	{
		if(this.req && this.abortable)
		{
			this.req.abort();
		}
	}

	this.init = function(id)
	{
		if(!this.type)
		{
			this.type = 'GET';
		}

		if(!this.argObj)
		{
			this.argObj = new Object();
		}

		if(!this.query)
		{
			this.query = '';
		}

		if(this.req == null)
		{
			if(window.XMLHttpRequest)
			{
				try
				{
					this.req = new XMLHttpRequest();
				}
				catch(e)
				{
					this.req = null;
				}
			}
			else if(window.ActiveXObject)
			{
				try
				{
					this.req = new ActiveXObject("Msxml2.XMLHTTP");
				}
				catch(e)
				{
					try
					{
						this.req = new ActiveXObject("Microsoft.XMLHTTP");
					}
					catch(e)
					{
						this.req = null;
					}
				}
			}
		}

		if(this.req)
		{
			this.req.onreadystatechange = function()
			{
				var localReq = RequestFactory.getRequest(id);
				if (localReq.req.readyState == 4)
				{
					if (localReq.req.status == 200 || g_ajax_debug)
					{
						localReq.argObj['responseXML'] = localReq.req.responseXML;
						localReq.func(localReq.argObj);
					}
				}
			}

			this.req.open(this.type,this.url, true);
			if(this.type == 'POST')
			{
				this.req.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8');
			}
			this.req.send(this.query);
		}
	}
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
