// Copyright Acro Media Inc. 1998-2004, www.acromediainc.com

var expires = new Date();
var hasFlash = 0;

expires.setTime(expires.getTime() + 3E11);

// 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;
	}
}

function setCookie(name, value, expires, path, domain, secure) {
	var curCookie = name + "=" + escape(value) +
			((expires) ? "; expires=" + expires.toGMTString() : "") +
			((path) ? "; path=" + path : "") +
			((domain) ? "; domain=" + domain : "") +
			((secure) ? "; secure" : "");
        document.cookie = curCookie;
}

function getCookie(name) {
	var dc = document.cookie;
	var prefix = name + "=";
	var begin = 0 + dc.indexOf(prefix);
	if (begin == -1){
		return 0;
	}
	begin += prefix.length;
	var end = 0 + document.cookie.indexOf(";", begin);
	if (end == -1){
		end = dc.length;
	}
	return unescape(dc.substring(begin, end));
}

function playAgain() {
	setCookie("hidetheflash", 'yes', expires);
	window.location=window.location;
}

