<!--
function bCheck(){ //Browser platform check
	this.ver=navigator.appVersion
	this.agent=navigator.userAgent
	this.dom=document.getElementById?1:0
	this.opera5=(navigator.userAgent.indexOf("Opera")>-1 && document.getElementById)? true : false;
	this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom && !this.opera5)? true : false;
	this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom && !this.opera5)? true : false;
	this.ie4=(document.all && !this.dom && !this.opera5)? true : false;
	this.ie=(this.ie5||this.ie6)? true : false;
	this.mac=this.agent.indexOf("Mac")>-1
	this.win = (this.ver.indexOf("Windows") != -1) ? true : false;
	this.ns6=(this.dom && parseInt(this.ver) >= 5.0) ? true : false; 
	this.ns4=(document.layers && !this.dom)? true : false;
	this.bw=(this.ie6 || this.ie5 || this.ie4 || this.ns6)//test for approved browser
	this.flash = null;
	this.qt = null;
	if(this.ie){
	this.en = navigator.browserLanguage.substr(0,2) == "en" //english
	this.fr = navigator.browserLanguage.substr(0,2) == "fr"//francais
	this.ch = navigator.browserLanguage.substr(0,2) == "zh"//chinese													
	}else{
	this.en = navigator.language.substr(0,2) == "en" 
	this.fr = navigator.language.substr(0,2) == "fr"
	this.ch = navigator.language.substr(0,2) == "zh"
	}
	return this
}

																//Flash Detection																// Netscape PlugIn Detection
function detectFlash(){														 //VBScript Detection on IE/Windows	
if(user.ie && user.win){ 
	document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n');
	document.write('on error resume next \n');
	document.write('isFlash4 = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.4"))) \n');
	document.write('isFlash5 = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.5"))) \n');	
	document.write('</SCR' + 'IPT\> \n');
}
	if (navigator.plugins){
		if (navigator.plugins["Shockwave Flash 2.0"]
		|| navigator.plugins["Shockwave Flash"]){

			var isVersion2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : "";
			var flashDescription = navigator.plugins["Shockwave Flash" + isVersion2].description;
			var flashVersion = parseInt(flashDescription.charAt(flashDescription.indexOf(".") - 1));
			isFlash4 = flashVersion == 4;
			isFlash5 = flashVersion >= 5;
		}
	}	
	
}

function detectQuicktime(){															//***Quicktime test
if(user.ie && user.win){ 
	document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n');
	document.write('on error resume next \n');
	document.write('Set theObject = CreateObject("QuickTimeCheckObject.QuickTimeCheck.1") \n');
	document.write('On Error  goto 0 \n');	
	document.write('If IsObject(theObject) Then \n');	
	document.write('If theObject.IsQuickTimeAvailable(0) Then \n');	
	document.write('user.qt = true \n');
	document.write('End If \n');	
	document.write('End If \n');	
	document.write('</SCR' + 'IPT\> \n');
} else{
	if (navigator.plugins) {
    	for (i=0; i < navigator.plugins.length; i++ ) {
      		if (navigator.plugins[i].name.indexOf("QuickTime") >= 0)
        	{ user.qt = true; }
      		               }
    						 }
		}
}

//cookies stuff


/*function setCookie(version, flash, QT)
{
	var the_cookie = "space:" + version + "/flash:" + flash + "/QT:" + QT;
	var the_date = new Date("June 30, 01");
    var the_cookie_date = the_date.toGMTString();
	the_cookie = "name=gardens;" + the_cookie + ";expires=" + the_cookie_date;
	document.cookie = the_cookie;
}*/

function setCookie(NameOfCookie, value, expiredays) {
var ExpireDate = new Date ();
ExpireDate.setTime(ExpireDate.getTime() + (expiredays * 24 * 3600 * 1000));

  document.cookie = NameOfCookie + "=" + escape(value) + 
  ((expiredays == null) ? "" : "; expires=" + ExpireDate.toGMTString());
}

function getCookie(NameOfCookie){
    if (document.cookie.length > 0) {              
    begin = document.cookie.indexOf(NameOfCookie+"=");       
    if (begin != -1) {           
      begin += NameOfCookie.length+1;       
      end = document.cookie.indexOf(";", begin);
      if (end == -1) end = document.cookie.length;
        return unescape(document.cookie.substring(begin, end));
    } 
  }
  return null;
}


function splitCookie(cookie_info)
{

	// load the cookie into a variable and unescape it
	//var the_cookie = document.cookie;
	//var the_cookie = unescape(the_cookie);
	// separate the values from the cookie name
	//var broken_cookie = cookie_info.split("=");
	//var the_values = broken_cookie[1];
	// break each name:value pair into an array
	var separated_values = cookie_info.split("/");
	// loop through the list of name:values and load
	// up the associate array
	var property_value = "";
	for (var loop = 0; loop < separated_values.length; loop++)
	{
		property_value = separated_values[loop];
		var broken_info = property_value.split(":");
		var the_property = broken_info[0];
		var the_value = broken_info[1];
		the_info[the_property] = the_value;
	}

}





