// writeFlash.js

// Insert content into page
if (!sslStatus) {
	// Default to non-ssl if not passed
	sslStatus = "";
}
//alert("sslStatus: " + sslStatus);
//alert('Hello: ' + '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http'  + sslStatus + '://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" WIDTH="' + width + '" HEIGHT="' + height + '" id="' + rootURL + flashPath + flashFile + '" ALIGN="">');

if(isRequiredFlashVersionInstalled) {
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http'  + sslStatus + '://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" WIDTH="' + width + '" HEIGHT="' + height + '" id="' + rootURL + flashPath + flashFile + '" ALIGN="">');
		
	document.write('<PARAM NAME=movie VALUE="' + rootURL + flashPath + flashFile + '"> <PARAM NAME=quality VALUE=best> <PARAM NAME=scale VALUE=exactfit> <PARAM NAME=bgcolor VALUE=#' + bgcolour + '> <PARAM NAME=flashVars VALUE="' + flashVars + '">');
	
	document.write('<EMBED src="' + rootURL + flashPath + flashFile + '" quality=best scale=exactfit bgcolor=#' + bgcolour + '  WIDTH="' + width  + '" HEIGHT="' + height + '" NAME="FlashFile" ALIGN="" flashVars="' + flashVars + '" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http' + sslStatus + '://www.macromedia.com/go/getflashplayer"></EMBED>');
	
	document.write('</OBJECT>');
	
} else {	// flash  version is too old or undetectable
	document.write(nonFlashHTML);
}