
var plugin = 0;

if ( navigator.mimeTypes &&
     navigator.mimeTypes["application/x-shockwave-flash"] &&
     navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin )
{
	if ( navigator.plugins &&
	     navigator.plugins["Shockwave Flash"] )
		plugin = 1;
}
else if ( navigator.userAgent &&
	  navigator.userAgent.indexOf("MSIE") >= 0 &&
	  ( navigator.userAgent.indexOf("Windows 95") >= 0 ||
	    navigator.userAgent.indexOf("Windows 98") >= 0 ||
	    navigator.userAgent.indexOf("Windows NT") >= 0 ) )
{
	document.write('<SCR' + 'IPT LANGUAGE=\"VBScript\"\>\n');
	document.write('ON ERROR RESUME NEXT\n');
	document.write('plugin = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.3")))\n');
	document.write('if ( plugin <= 0 ) then plugin = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.4")))\n');
	document.write('if ( plugin <= 0 ) then plugin = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.5")))\n');
	document.write('if ( plugin <= 0 ) then plugin = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.6")))\n');
	document.write('if ( plugin <= 0 ) then plugin = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.7")))\n');
	document.write('if ( plugin <= 0 ) then plugin = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.8")))\n');
	document.write('if ( plugin <= 0 ) then plugin = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.9")))\n');
	document.write('</SCR' + 'IPT\> \n');
}

function displayFlash(strUrl,strAltUrl,strWidth,strHeight,strAlt,blnLoop)
{
	var strThisLoop = ( blnLoop ? blnLoop : "false" );

	if ( plugin )
	{
		document.write('<OBJECT classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\"');
		document.write(' codebase=\"' + window.location.protocol + '//fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0\" ');
		document.write(' WIDTH=\"' + strWidth + '\" HEIGHT=\"' + strHeight + '\">');
		document.write(' <PARAM NAME=\"movie\" VALUE=\"' + strUrl + '\"> ');
		document.write(' <PARAM NAME=\"quality\" VALUE=\"best\"> ');
		document.write(' <PARAM NAME=\"bgcolor\" value=\"#ffffff\" /> ');
		document.write(' <PARAM NAME=\"allowScriptAccess\" VALUE=\"sameDomain\"> ');
		document.write(' <PARAM NAME=\"wmode\" VALUE=\"transparent\"> ');
		document.write(' <PARAM name=\"LOOP\" value=\"' + strThisLoop + '\"> ');
		document.write(' <PARAM name=\"salign\" value=\"TL\"> ');
		document.write(' <PARAM name=\"menu\" value=\"0\"> ');
		document.write(' <EMBED src=\"' + strUrl + '\" quality=\"high\" swLiveConnect=\"FALSE\" ');
		document.write(' WIDTH=\"' + strWidth + '\" HEIGHT=\"' + strHeight + '\" LOOP=\"' + strThisLoop + '\" ');
		document.write(' TYPE=\"application/x-shockwave-flash\" allowScriptAccess=\"sameDomain\" PLUGINSPAGE=\"' + window.location.protocol + '//www.macromedia.com/go/getflashplayer\" wmode=\"transparent\">');
		document.write(' </EMBED>');
		document.write('</OBJECT>');
	}
	else
	{
		document.write('<IMG SRC=\"' + strAltUrl + '\" BORDER=\"0\" ALT=\"' + strAlt + '\" WIDTH=\"' + strWidth + '\" HEIGHT=\"' + strHeight + '\"/>');
	}
}

function getFlv(strId,strFlashVars,strUrl,strAltUrl,strWidth,strHeight,strScale)
{
	var strRet = '';

	if ( plugin )
	{
		strRet += '<OBJECT type=\"application/x-shockwave-flash\" data=\"' + strUrl + '\" ';
		strRet += ' ID=\"' + strId + '\" WIDTH=\"' + strWidth + '\" HEIGHT=\"' + strHeight + '\">';
		strRet += ' <PARAM NAME=\"movie\" VALUE=\"' + strUrl + '\"> ';
		strRet += ' <PARAM NAME=\"quality\" VALUE=\"best\"> ';
		strRet += ' <PARAM NAME=\"bgcolor\" value=\"#ffffff\" /> ';
		strRet += ' <PARAM NAME=\"allowScriptAccess\" VALUE=\"sameDomain\"> ';
		strRet += ' <PARAM NAME=\"wmode\" VALUE=\"transparent\"> ';
		strRet += ' <PARAM name=\"salign\" value=\"TL\"> ';
		strRet += ' <PARAM name=\"flashvars\" value=\"' + strFlashVars + '\"> ';
		if ( strScale != '' ) strRet += ' <PARAM name=\"scale\" value=\"' + strScale + '\"> ';
		strRet += '</OBJECT>';
	}
	else
	{
		if ( strAltUrl == "" ) strAltUrl = "/images/common/spacer.gif";
		
		strRet += '<IMG SRC=\"' + strAltUrl + '\" BORDER=\"0\" ALT=\"\" WIDTH=\"' + strWidth + '\" HEIGHT=\"' + strHeight + '\"/>';
	}
	
	return strRet;
}