function isIE() {
	return (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0);
}

function isNS() {
	return (navigator.userAgent && (navigator.userAgent.indexOf("Netscape")>=0 || navigator.userAgent.indexOf("Gecko")>=0));
}

function agentVer() {
	return parseInt(navigator.appVersion);
}

function isIE4Compatible() {
	return (isIE() && agentVer()>=4);
}

function isIE5Compatible() {
	return (isIE() && agentVer()>=5);
}

function isIE55Compatible() {
	return (isIE() && agentVer()>=5.5);
}

function isIE6Compatible() {
	return (isIE() && agentVer()>=6);
}

function isNS4() {
	return (isNS() && agentVer()==4);
}

function isNS6Compatible() {
	return (isNS() && agentVer()>=5);
}

function isNS7Compatible() {
	return (isNS() && agentVer()>=5);
}

function isWindows() {
	return (navigator.userAgent.indexOf("Windows")>=0);
}

function isWindows9x() {
	return (navigator.userAgent.indexOf("Windows 9")>=0);
}

function isWindowsNT() {
	return navigator.userAgent.indexOf("Windows NT");
}

function isMac() {
	return (navigator.userAgent && navigator.userAgent.indexOf("Mac")>=0);
}

function isLinux() {
	return (navigator.userAgent && navigator.userAgent.indexOf("Linux")>=0);
}

function flashEnabled() {
	if (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"] && navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin)
		return (navigator.plugins && navigator.plugins["Shockwave Flash"]);
	return false;
}

function getObj(id) {
	var o;
	if (document.getElementById) o=document.getElementById(id);
	else o=eval(id);
	return o;
}

function isProperBrowser() {
	return isIE4Compatible() || isNS6Compatible();
}

function SetCookie(sName, sValue) {
  date = new Date();
  document.cookie = sName + "=" + escape(sValue) + "; expires=" + date.toGMTString();
}

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;
}

function DelCookie(sName) {
  document.cookie = sName + "=" + escape(sValue) + "; expires=Fri, 31 Dec 1999 23:59:59 GMT;";
}
 