
/* ============= John's not quite so hairy flash detect [v1.0] ============= */
var iRequiredVersion = 7;
var bShowFlash = false;

// standard IE & windows detection...
var bIE = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;
var bOpera = (navigator.userAgent.indexOf("Opera") != -1) ? true : false;
var bWin = (navigator.appVersion.indexOf("Windows") != -1) ? true : false; 

if (bIE && bWin && !bOpera) {
	// Internet Explorer on Windows platform...
	document.write('<scr' + 'ipt language="vbscript"> \n');	
	document.write('On Error Resume Next \n');	
	document.write('	bShowFlash = IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & iRequiredVersion)) \n');	
	document.write('On Error Goto 0 \n');	
	document.write('</scr' + 'ipt> \n');	
}
else if (navigator.plugins) {
	// looking at mozilla/netscape browser...
	var sFlashVersion = navigator.plugins["Shockwave Flash"].description;
	var iMajorVersion = parseInt(sFlashVersion.charAt(sFlashVersion.indexOf(".") - 1));
	if (iMajorVersion >= iRequiredVersion) {
		bShowFlash = true;
	}
}
else if (bOpera) {
	// wing it and hope that it has flash!
	bShowFlash = true;
}


// writes out the movie to the browser...
function writeMovieHtml(sMovieUrl, iWidth, iHeight, sClass) {
	if (sClass.length) {
		document.write('<div class="' + sClass + '">');
	}
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="' + iWidth + '" height="' + iHeight + '"');
	document.write('>');
	document.write('<param name="movie" value="' + sMovieUrl + '" />');
	document.write('<param name="quality" value="high" />');
	document.write('<param name="menu" value="false" />');
	document.write('<embed src="' + sMovieUrl + '" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="' + iWidth + '" height="' + iHeight + '"></embed>');
	document.write('</object>');
	if (sClass.length) {
		document.write('</div>');
	}
}


