

	function getAppVersion() {
		appname = navigator.appName;
	    appversion = navigator.appVersion;
	    majorver = appversion.substring(0, 1); 
	    if ((appname == "Netscape") && ( majorver >= 3 )) return 1;              			
	    if ((appname == "Microsoft Internet Explorer") && (majorver >= 4)) return 1;    	
	    return 0;
	}


	// Create a cookie with the specified name and value.
	// The cookie expires at the end of the 20th century.
	function SetCookie(sName, sValue)
	{
		var d, day, s, m, mm, dd, y;				//Declare variables.
		d  = new Date();							//Create Date object.
		m  = (d.getMonth());						//Get month
		dd = d.getDate();							//Get day
		y  = d.getYear();							//Get year
		hh = d.getHours();							//Get Hours
		nn = d.getMinutes();						//Get Minutes
		ss = d.getSeconds();						//Get Seconds
		
		if (hh < 10) {								// Pad with zeros if needed
			hh = '0' + hh
		}
		
		if (nn < 10) {
			nn = '0' + nn
		}
		
		if (ss <10) {
			ss = '0' + ss
		}
		
	//	Convert numeric day of week and month to string
		var x = new Array("Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat");
		var z = new Array("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec")
		
	// Increment day by 1
		dd++
	// Get string Day of week and month	
		var dw = x[dd]
		var mm = z[m]
		
	// Build Expire date UTC string
		var expDate = dw + ', ' + dd + ' ' + mm + ' ' + y + ' ' + hh + ":" + nn + ":" + ss + ' UTC';
		
	// write out the cookie	
		document.cookie = sName + '=' + escape(sValue) + ';expires=' + expDate + ';';
	}

	// Retrieve the value of the cookie with the specified name.
	function GetCookie(sName)
	{
	  // cookies are separated by semicolons
	  var aCookie = document.cookie.split('; ');
	  for (var i=0; i < aCookie.length; i++)
	  {
	    // a name/value pair (a crumb) is separated by an equal sign
	    var aCrumb = aCookie[i].split('=');
	    if (sName == aCrumb[0]) 
	      return unescape(aCrumb[1]);
	  }
	  // a cookie with the requested name does not exist
	  return null;
	}

