﻿//New embed code below
//Andy
mpswf_filename="/flash/mediaplayer/y2006/mploader.swf";
mpswf_id="mp_swf"
mpswf_width=910;
mpswf_height=640;
mpswf_bgcolor="#000000";
version = 33;
/////////////////////////////////////////////////
var betatest_vp = document.URL.toLowerCase(); 
var checkcache = (betatest_vp.indexOf("mlb.mlb")!=-1) ? true : false;
var checkprod  = (betatest_vp.indexOf("www.mlb")!=-1) ? true : false;
if(checkcache || checkprod) { xml_server="http://gdx.mlb.com" } else { xml_server="" }

query_param =  "&linescore_swf=/flash/mediaplayer/y2006/linescore.swf?v="+version;
query_param += "&mp_xml_root=/components/mediaplayer/xml/y2006/";
query_param += "&media_xml_dir=http://mlb.mlb.com/gen/multimedia/detail";
query_param += "&linescore_xml_server=http://gdx.mlb.com";
query_param += "&today_feature_xml=/gen/mlb/components/multimedia/sightsandsounds.xml";
query_param += "&branding_rules_file=/components/mediaplayer/xml/y2006/config/branding.xml";
query_param += "&mmg_swf_dir=/flash/mediaplayer/y2006/mmg/";
query_param += "&mmg_nav_file=/mlb/mediacenter/xml/nav/2007_nav_season.xml";
query_param += "&myteam_graphics_dir=/flash/mediaplayer/y2006/assets/myteam/";
query_param += "&myteam_xml_dir=/components/team/schedule/xml/2007/";
query_param += "&alerts_swf=/flash/mediaplayer/y2006/alerts.swf";
query_param += "&alertfile=http://gdx.mlb.com/components/game/alerts.xml";
query_param += "&newsfile=http://gdx.mlb.com/components/game/newsalerts.xml";
query_param += "&faq_url=/mlb/help/faq_subscriptions.jsp";
query_param += "&clickable_linescore=yes";
query_param += "&postseason_swf=/flash/mediaplayer/y2006/postseason_context_2007.swf";
query_param += "&postseason_xml=/components/mediaplayer/xml/y2006/config/2007_nav_postseason.xml";
query_param += "&game_view_index=7758";
query_param += "&dds_enabled=no";
query_param += "&default_view_index=1";
query_param += "&adcontroller_timeout=5";
query_param += "&today_ymd="+mp_date_today;
query_param += "&yesterday_ymd="+mp_date_yesterday;
//query_param += "&today_ymd=20061027";
//query_param += "&yesterday_ymd=20061026";
query_param += "&tracking_accounts=mlbglobal,mlbcom";
query_param += "&wrapper=1";

document.write('<div id="flashDiv"><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="'+mpswf_width+'" height="'+mpswf_height+'" id="'+mpswf_id+'" align="top">');
document.write('<param name="allowScriptAccess" value="sameDomain" />');
document.write('<param name="movie" value="'+mpswf_filename+'?v=' + version + query_param +'" />');
document.write('<param name="quality" value="high" />');
document.write('<param name="menu" value="false" />');
document.write('<param name="bgcolor" value="'+mpswf_bgcolor+'" />');
document.write('<param name="wmode" value="transparent"/>');
document.write('<param name="FlashVars" value="'+mpFlashVars+'" />');
document.write('<embed src="'+mpswf_filename+'?v='+version+query_param+'" quality="high" menu="false" wmode="transparent" bgcolor="'+mpswf_bgcolor+'" width="'+mpswf_width+'" height="'+mpswf_height+'" name="'+mpswf_id+'" align="top" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" ');
document.write('FlashVars="'+mpFlashVars+'"');
document.write('></embed>');
document.write('</object></div>');


function launchChat(source, gameID){
	var sourceParam = (source) ? "&source="+source : "";
	var gameIdParam = (gameID) ? "&gameID="+gameID : "";
	popWin("https://secure.mlb.com/enterworkflow.do?flowId=registration.chat&keepWFParams=true&forwardUrl_logreg=/chat/account/login_register.jsp"+sourceParam+gameIdParam, "Chat", 900, 620);
}

