// JavaScript Document
function MyPlayerDetector () {
	this.plugin = 0;
	this.activeX = 0;
	this.unknown = 0;
	this.plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
	if ( this.plugin ) {
		this.plugin = parseInt(this.plugin.description.substring(this.plugin.description.indexOf(".")-1)) >= 7;
	}
	else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0 && (navigator.userAgent.indexOf("Windows 95")>=0 || navigator.userAgent.indexOf("Windows 98")>=0 || navigator.userAgent.indexOf("Windows NT")>=0)) {
		document.write('<script language="VBScript"\> \n');
		document.write('on error resume next \n');
		document.write('vactiveX = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.7")))\n');
		document.write('<' + '/script>');
		this.activeX = vactiveX;
	}
	else if (this.plugin == 0 && this.activeX == 0 && navigator.platform.indexOf("Mac")>=0 && navigator.userAgent.indexOf("MSIE")>=0){
		this.unknown = 1;
	}
}
function MyCookieHandler (name) {
//	alert ("MyCookieHandler")
	this.sCookieName = name;

	function readCookie() {
//	alert ("readCookie")
		var theCookie=""+document.cookie;
		var ind=theCookie.indexOf(this.sCookieName);
		if (ind==-1 || this.sCookieName=="") return ""; 
		var ind1=theCookie.indexOf(';',ind);
		if (ind1==-1) ind1=theCookie.length; 
		return unescape(theCookie.substring(ind+this.sCookieName.length+1,ind1));
	}
	this.readCookie = readCookie;
	function setCookie(cookieValue,nDays) {
	
		var today = new Date();
		var expire = new Date();
		if (nDays==null || nDays==0) nDays=1;
		expire.setTime(today.getTime() + 3600000*24*nDays);
		document.cookie = this.sCookieName+"="+escape(cookieValue)
					 + ";expires="+expire.toGMTString()
					 + ";path=/";				 
		//				 + ";domain=www.otatr.org" ;
	}
	this.setCookie = setCookie;
}