function checkFlashForIE()
{
	document.write('<scr'+'ipt language="vbscript"\>\n');
	document.write('on error resume next\n');
	document.write('FlashInstalled = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.'+FlashVersion+'")))\n');
	document.write('</scr'+'ipt\>\n');
}

var isIE = (document.all) ? true : false;
var isNS = (document.layers) ? true : 0;
var isDOM = (document.getElementById) ? true : 0;
var isMac = (navigator.userAgent.indexOf("Mac") != -1) ? true : false;
var isWin = (navigator.userAgent.indexOf("Win") != -1) ? true : false;

var FlashInstalled = false;
var FlashVersion = 8;
var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"] ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0);

if (plugin && plugin.description.indexOf("10")>-1){
	FlashInstalled = true;
}
else if (plugin && parseInt(plugin.description.substring(plugin.description.indexOf(".")-1)) >= FlashVersion) 
{
	FlashInstalled = true;
} 
else if (isWin && isIE) 
{
	checkFlashForIE();
}


//write to screen
if (FlashInstalled) 
{	
	espnFlash.write("flashLayer");
}
else
{
	document.location.href="upgrade";
}
