var g_defaultPlayerWidth = "507px";
function resizePlayer(large)
{
	if(large)
	{
		document.getElementById("fplayerpane").style.width = "640px";
		document.getElementById("fplayerpane").style.height = "480px";
	}
	else
	{
		document.getElementById("fplayerpane").style.width = g_defaultPlayerWidth;
		document.getElementById("fplayerpane").style.height = "360px";
	}
	
	var mode = large?Console.MODE_LARGE:Console.MODE_REGULAR;
	if(mode!=_console.m_consoleMode)
	{
		switch(mode)
		{
		case Console.MODE_REGULAR:
			document.getElementById("console_tdMenu").style.display = "";
			document.getElementById("wmppane").style.width = "480px";
			document.getElementById("wmppane").style.height = "360px";
			document.getElementById("fppane").style.width = g_defaultPlayerWidth;
			document.getElementById("fppane").style.height = "360px";
			if(isIE==true)
			{
				document.getElementById("fplayer").style.width = "507px";
				document.getElementById("fplayer").style.height = "360px";
			}
			document.getElementById("detailsContainer").style.display = "";
			document.getElementById("detailsContainer_lg").style.display = "none";
			document.getElementById("tabsTable").rows[0].style.display = "";
			document.getElementById("tabsTable").rows[1].style.display = "none";

			document.getElementById("rightpane").style.width = "492px";
			_console.m_consoleMode = mode;
			break;
		case Console.MODE_LARGE:
			document.getElementById("console_tdMenu").style.display = "none";
			document.getElementById("wmppane").style.width = "640px";
			document.getElementById("wmppane").style.height = "480px";
			document.getElementById("fppane").style.width = "640px";
			document.getElementById("fppane").style.height = "480px";
			if(isIE==true)
			{
				document.getElementById("fplayer").style.width = "640px";
				document.getElementById("fplayer").style.height = "480px";
			}
			document.getElementById("detailsContainer").style.display = "none";
			document.getElementById("detailsContainer_lg").style.display = "";
			document.getElementById("tabsTable").rows[0].style.display = "none";
			document.getElementById("tabsTable").rows[1].style.display = "";

			document.getElementById("rightpane").style.width = "359px";
			_console.m_consoleMode = mode;
			break;
		}
		_console.reload();
	}
}
function areAdsPlaying()
{
	return false;
}
function playerBlur()
{
	if(_util.isie)
		window.focus();
}
// -----------------------------------------------------------------------------
// Globals
// Major version of Flash required
var requiredMajorVersion = 9;
// Minor version of Flash required
var requiredMinorVersion = 0;
// Minor version of Flash required
var requiredRevision = 0;
// -----------------------------------------------------------------------------
// Version check for the Flash Player that has the ability to start Player Product Install (6.0r65)
var hasProductInstall = DetectFlashVer(6, 0, 65);
// Version check based upon the values defined in globals
var hasRequestedVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);

var g_connName = String((new Date()).getTime());

function writeFlashPlayer(imgpath,locale,embed)
{
var fid = "fplayer";
var w = "100%";
if(isIE==true)
{
	if(embed)
		w = "480";
	else
		w = "507";
}
var h = (isIE==true)?"360":"100%";
// Check to see if a player with Flash Product Install is available and the version does not meet the requirements for playback
if ( hasProductInstall && !hasRequestedVersion ) {
	// MMdoctitle is the stored document.title value used by the installation process to close the window that started the process
	// This is necessary in order to close browser windows that are still utilizing the older version of the player after installation has completed
	// DO NOT MODIFY THE FOLLOWING FOUR LINES
	// Location visited after installation is complete if installation is required
	var MMPlayerType = (isIE == true) ? "ActiveX" : "PlugIn";
	var MMredirectURL = window.location;
    document.title = document.title.slice(0, 47) + " - Flash Player Installation";
    var MMdoctitle = document.title;

	AC_FL_RunContent(
		"src", "scripts/playerProductInstall",
		"FlashVars", "MMredirectURL="+MMredirectURL+'&MMplayerType='+MMPlayerType+'&MMdoctitle='+MMdoctitle+"",
		"width", w,
		"height", h,
		"align", "middle",
		"id", fid,
		"quality", "high",
		"bgcolor", "#000000",
		"name", fid,
		"allowScriptAccess","sameDomain",
		"type", "application/x-shockwave-flash",
		"pluginspage", "http://www.adobe.com/go/getflashplayer"
	);
} else if (hasRequestedVersion) {
	// if we've detected an acceptable version
	// embed the Flash Content SWF when all tests are passed
	var str = "";
	if(embed)
	{
		str += "&embed=true";
		if(window.location.search.indexOf("autostart=")>0)
			str += "&autostart=true";
	}
	if(imgpath!=null)
		str += "&imgpath=" + location.href.substring(0,location.href.lastIndexOf("/")+1) + imgpath;
	var menu = document.getElementById("console_tblMenu");
	if(menu!=null)
	{
		str += "&menubg="+_util.getCurrentStyle(menu.rows[0].cells[0],"backgroundColor");
		str += "&menucolor="+_util.getCurrentStyle(menu.getElementsByTagName("A")[0],"color");
		str += "&menuhcolor="+_util.getCurrentStyle(document.getElementById("menuitemhover"),"color");
	}
	var l = "scripts/fplayer";
	if(locale!=null && locale!="en_US")
		l += "_"+locale;
	AC_FL_RunContent(
			"flashVars",str,
			"src", l,
			"width", w,
			"height", h,
			"align", "middle",
			"id", fid,
			"quality", "high",
			"bgcolor", "#000000",
			"name", fid,
			"allowFullScreen", "true",
			"allowScriptAccess","sameDomain",
			"type", "application/x-shockwave-flash",
			"pluginspage", "http://www.adobe.com/go/getflashplayer"
	);
  } else {  // flash is too old or we can't detect the plugin
    var alternateContent = 'This content requires the Adobe Flash Player. '
   	+ '<a href=http://www.adobe.com/go/getflash/>Get Flash</a>';
    document.write(alternateContent);  // insert non-flash content
  }
}