/*
aphrodite@amxnetwork.com
22.04.2002

ver. 1
pc & mac compatible
ie 4+ ns 4+ (incl. 6)

NOTE: In order for this script to function flash_detect.js is needed
*/

var requiredVersion = 5;
var flashVersion = getFlashVersion();

function sniffer(){
	for (x=0;x<arguments.length;x+=4){
	
		var flashembed = '<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\"'
			+ ' width=\"'
			+ arguments[x+2] //width parameter
			+ '\"' 
			+ ' height=\"'
			+ arguments[x+3] //height parameter
			+ '\"' 
			+ ' codebase=\"http:\/\/download.macromedia.com\/pub\/shockwave\/cabs\/flash\/swflash.cab\">'
			+ '<param name=\"movie\" value=\"' 
			+ arguments[x] //flash movie parameter
			+ '.swf\">'
			+ '<param name=\"bgcolor\" value=\"#ffffff\">'
			+ '<param name=\"play\" value=\"true\">'
			+ '<param name=\"loop\" value=\"true\">'
			+ '<param name=\"quality\" value=\"high\">'
			+ '<param name=\"menu\" value=\"false\">'
			+ '<embed src=\"' 
			+ arguments[x] //flash movie parameter
			+ '.swf\"'
			+ ' width=\"'
			+ arguments[x+2] //width parameter
			+ '\"' 
			+ ' height=\"'
			+ arguments[x+3] //height parameter
			+ '\"' 
			+ ' play=\"true\" loop=\"true\" quality=\"high\" menu=\"false\" bgcolor=\"#ffffff\" '
			+ ' type=\"application\/x-shockwave-flash\"'
			+ ' pluginspace=\"http:\/\/www.macromedia.com\/shockwave\/download\/index.cgi\?P1_Prod_Version=ShockwaveFlash\">'
			+ '<\/embed>'
			+ '<\/object>'
		
		var gifembed= '<img src=\"' 
			+ arguments[x+1] //gif parameter
			+ '\"'
			+ ' width=\"'
			+ arguments[x+2] //width parameter
			+ '\"' 
			+ ' height=\"'
			+ arguments[x+3] //height parameter
			+ '\"' 
			+ ' border=\"0\" alt=\"\">'
			
		var bplatform = navigator.platform; //Stores platform, (eg. "MacPPC","Win32")
		if (browserIE5 && bplatform =="MacPPC"){
			//restring = gifembed;
			restring = flashembed;
		}
		else if (flashVersion >= requiredVersion) {
			//alert('You have Flash ' + requiredVersion + ' (or a higher version) installed on the current browser.');
			restring = flashembed;
		}
		else if (flashVersion > 0) {
			//alert('The version of Flash installed on the current browser is below version ' + requiredVersion + '.');
			restring = gifembed;
		}
		else if (flashVersion == 0) {
			//alert('You don\'t have Flash installed on the current browser.');
			restring = gifembed;
		}
		else if (flashVersion == flashVersion_DONTKNOW || flashVersion == null) {
			//alert('This browser does not support Javascript-based Flash detection.');
			//restring = gifembed;
			//give them flash and hope for the best
			restring = flashembed;
		}
	}
	return restring;
}

/*
<script language="javascript" type="text/javascript">document.write(sniffer('swf','img',width,height));</script>
sniffer(arg1, arg2, arg3, arg4)

arg1 = flash movie
arg2 = gif
arg3 = width
arg4 = height



function myfunction(strin){
	strin=strin + " and onion";
	return strin;
}*/

