/*  
Matt Freer
2004/07/02

Customised Mook's code into functions 
*/


/*
@ does the client have the correct flash version (required version set in fpi-init.js)
@ returns boolean
*/
function getHasRightVersion(){
	return hasRightVersion;
};

/*
	Problem:
	Client accessing the site via a proxy server that has high
 	security settings that don't allow .swf files to be downloaded. 
 	This only caused a problem if the client machine had the flash player installed. 
	This scenario resulted in the <object> tag being written to the page - but a missing flash file.
	(i.e. the proxy server prevented the .swf being downloaded).
	
	Solution:
	use following parameters to ensure that background images shows througth below flash when flash 
	doesn't load
	
	<param name="wmode" value="transparent">
	' wmode="transparent"'
*/
function addFlashContent(p_flash_url, p_width, p_height){
	var flash_url = p_flash_url;
	var dimentionsString = ' WIDTH="' + p_width + '"' + ' HEIGHT="' + p_height + '"'
	var oeTags = '<OBJECT CLASSID="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"' + " "
	+ dimentionsString
	+ ' CODEBASE="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab">'
	+ ' <PARAM NAME="MOVIE" VALUE= "' + flash_url + '"' + '>'
	+ ' <PARAM NAME="PLAY" VALUE="true">'
	+ ' <PARAM NAME="LOOP" VALUE="false">'
	+ ' <PARAM NAME="QUALITY" VALUE="high">'
	+ ' <PARAM NAME="MENU" VALUE="false">'
	+ ' <param name="wmode" value="transparent">'
	+ ' <EMBED SRC="' + flash_url + '" '  
	+ dimentionsString 
	+ ' wmode="transparent"'
	+ ' PLAY="true"'
	+ ' LOOP="false"'
	+ ' QUALITY="high"'
	+ ' MENU="false"'
	+ ' TYPE="application/x-shockwave-flash"'
	+ ' PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">'
	+ '<\/EMBED>'
	+ '<\/OBJECT>';
	
	// embed the flash movie
	document.write(oeTags);  
}

// redirect to new page (used when you wish to redirect to non-flash content)
function redirect(p_redirect){
	window.location = p_redirect;
}












