// Copyright Acro Media Inc. 1998-2004, www.acromediainc.com

var hasFlash = 0;

// check with objects first
if (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"] && navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin) {
	if (navigator.plugins && navigator.plugins["Shockwave Flash"]){
		hasFlash = 1;
	}
}
// check with IE objects
else if (navigator.userAgent && (navigator.userAgent.indexOf("MSIE")>=0)){
	if((navigator.userAgent.indexOf("Windows 95") != -1) || (navigator.userAgent.indexOf("Windows 98") != -1) || (navigator.userAgent.indexOf("Windows NT") != -1)) {
		with(document){
			writeln('<SCRIPT LANGUAGE=VBScript\>');
			writeln('on error resume next');
			writeln('hasFlash = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash")))');
			writeln('<\/SCRIPT\>');
		}
	}
	// give Macs one last chance - Mac IE 4.5 cannot detect flash, but is guaranteed to have it.
	else if((navigator.userAgent.indexOf("Mac") != -1) && (parseFloat(navigator.appVersion) >= 4)){
		hasFlash = 1;
	}
}