<!--
/*	*****************************************
	getFlash version 2.0 for oce.com web sites
	by Tim van den Hombergh
	
	Functions:
	- Advanced flash detection script for all browers and OSs
	Settings by default:
	- FlashVersion = 7
	- Max flash version = 9
	- NetscapeActive = disabled
	Required fields:
	- flashFilePath
	- width
	- height
	Optional fields
	- altImagePath
	- altHyperLink
	- altImageText
	- optionalImageTag
	*****************************************
*/ 


var actualVersion = 0
var maxVersion = 9
var MM_FlashCanPlay = false;
var flash4Installed = false;		// boolean. true if flash 4 is installed
var flash5Installed = false;		// boolean. true if flash 5 is installed
var flash6Installed = false;		// boolean. true if flash 6 is installed
var flash7Installed = false;		// boolean. true if flash 7 is installed
var flash8Installed = false;		// boolean. true if flash 8 is installed
var flash9Installed = false;		// boolean. true if flash 8 is installed

// Write VBscript detection if we're not on mac.
if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0 
   && (navigator.appVersion.indexOf("Win") != -1)) {
	document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n'); //FS hide this from IE4.5 Mac by splitting the tag
	document.write('on error resume next \n');
	document.write('flash4Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.4"))) \n');
	document.write('flash5Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.5"))) \n');	
	document.write('flash6Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.6"))) \n');	
	document.write('flash7Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.7"))) \n');
	document.write('flash8Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.8"))) \n');	
	document.write('flash9Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.9"))) \n');	
	document.write('<\/SCR' + 'IPT\> \n');
	MM_FlashCanPlay = true
}

function getFlash(flashVersion,flashFilePath,width,height,transparant,netscapeActive,altImagePath,altHyperLink,altImageText,optionalImageTag){
	if (!flashVersion) flashVersion = 7
	if (!altImageText) altImageText = ""
	if (!optionalImageTag) optionalImageTag = ""
	
	var MM_contentVersion = flashVersion
	
	var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
	if ( plugin ) {
		var words = navigator.plugins["Shockwave Flash"].description.split(" ");
    	for (var i = 0; i < words.length; ++i)
    	{
		if (isNaN(parseInt(words[i])))
		continue;
		var MM_PluginVersion = words[i]; 
    	}
		
		MM_FlashCanPlay = MM_PluginVersion >= MM_contentVersion;
	} else {
		// Loop through all versions we're checking, and set actualVersion to highest detected version
		for (var i = 4; i <= maxVersion; i++) {	
			if (eval("flash" + i + "Installed") == true) actualVersion = i;
		}
		// Check if the contentVersion >= actualVersion; if so return MM_FlashCanPlay=true
		if (actualVersion >= MM_contentVersion) MM_FlashCanPlay = true
	}
	
	//return flash object if we are on IE for windows
	if ( MM_FlashCanPlay ) {
	
		object = '<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"';
		object += '  codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version='+flashVersion+',0,0,0" ';
		object += ' ID="script" WIDTH="'+width+'" HEIGHT="'+height+'" ALIGN="">';
		object += ' <PARAM NAME=movie VALUE="'+flashFilePath+'" \/> <PARAM NAME="quality" VALUE="high" \/><param value="opaque" name="wmode" \/><param name="allowScriptAccess" value="always" \/>'; 
		if (transparant) object += '<param name="WMode" value="Transparent" \/>'
		object += ' <EMBED src="'+flashFilePath+'" quality="high"';
		object += ' swLiveConnect="FALSE" wmode="opaque" WIDTH="'+width+'" HEIGHT="'+height+'" NAME="script" ALIGN=""';
		object += ' allowScriptAccess="always" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer">';
		object += ' <\/EMBED>';
		object += ' <\/OBJECT>';
	
	// return alt image object if flash = false and flashBanner = true
	} else if(altImagePath){ 
		if (altHyperLink) object = '<a href="'+altHyperLink+'"><img src="'+altImagePath+'" width="'+width+'" height="'+height+'" border="0" alt="'+altImageText+'" '+ optionalImageTag +' \/><\/a>';
		else object += '<img src="'+altImagePath+'" width="'+width+'" height="'+height+'" border="0" alt="'+altImageText+'" \/>';
	
	// return no flash detected if flash = false and flashBanner = false
	} else{
		object  = '<SCR' + 'IPT>if (confirm("You need Flash '+flashVersion+' or higher to view this page correctly.\\nClick OK to go to the Macromedia Flash download page.")){if (window.opener){x=(640-800)/2,y=(480-600)/2;if(screen) {y=(screen.availHeight-600)/2;	x=(screen.availWidth-800)/2;} if (screen.availWidth>1800) {x=((screen.availWidth/2)-800)/2;}window.resizeTo(800,600);window.moveTo(x,y);document.write(\'<IFRAME STYLE=\"border: none;\" SRC=\"http://www.macromedia.com/go/getflashplayer\" WIDTH=\"100%\" HEIGHT=\"100%\"><\/IFRAME>\')} else { top.location.href=\"http://www.macromedia.com/go/getflashplayer\"}}<\/SCR' + 'IPT>'
	}
	
	document.write(object);return "";
}
//-->
