/*
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 = 6;
var flashVersion = getFlashVersion();

function sniffer(flash, width, height){
	if (flashVersion >= requiredVersion) {
		//alert('You have Flash ' + requiredVersion + ' (or a higher version) installed on the current browser.');
		document.write('<object classid=\"clsid\:D27CDB6E\-AE6D\-11cf\-96B8\-444553540000\" width=\"'+width+'\" height=\"'+height+'\" codebase=\"http:\/\/download.macromedia.com\/pub\/shockwave\/cabs\/flash\/swflash.cab\#version\=6\,0\,0\,0\"><param name=\"movie\" value=\"'+flash+'.swf\"><param name=\"play\" value=\"true\"><param name=\"loop\" value=\"true\"><embed src=\"'+flash+'.swf\" width=\"'+width+'\" height=\"'+height+'\" play=\"true\" loop=\"true\" type=\"application\/x-shockwave-flash\" pluginspage=\"http:\/\/www.macromedia.com\/go\/getflashplayer\"><\/embed><\/object>')
	}
	else if (flashVersion > 0) {
		//alert('The version of Flash installed on the current browser is below version ' + requiredVersion + '.');
		document.location.href='no_flash.html'
	}
	else if (flashVersion == 0) {
		//alert('You don\'t have Flash installed on the current browser.');
		document.location.href='no_flash.html'
	}
	else if (flashVersion == flashVersion_DONTKNOW || flashVersion == null) {
		//alert('This browser does not support Javascript-based Flash detection.');
		document.location.href='no_flash.html'
	}
}

