function BrowserSniffer() {
   var agent = navigator.userAgent;
   var browserName = navigator.appName;
   var version = parseInt(navigator.appVersion)
   if (browserName == "Microsoft Internet Explorer") this.brows = "IE"
   else if (browserName == "Netscape") this.brows = "NN"
   else if (browserName == "Opera") this.brows = "OP"
   else this.brows = browserName
   if (agent.indexOf('MSIE 5') != -1) this.ver = 5
   else this.ver = version
   this.IE = (this.brows == "IE" && this.ver >= 4)
   this.IE4 = (agent.indexOf('MSIE 4') != -1)
   this.IE5 = (agent.indexOf('MSIE 5') != -1)
   this.IE6 = (agent.indexOf('MSIE 6') != -1)
   this.NN = (this.brows == "NN" && this.ver == 4)
   this.NN4 = (this.brows == "NN" && this.ver == 4)
   this.NN5 = (this.brows == "NN" && this.ver == 5)
}

// creating instance of the browser sniffer object
var is = new BrowserSniffer()


	var mo_lastMenu;
	var lastMenu = "null";
	var lastSubMenu = "null";
	var visible = "null";
	var Menu = "null";
	var SubMenu = "null";
	var hidden = "null";
	if (is.NN) {  
		visible = 'show';  hidden = 'hide';
						} 
	else if (is.IE) {  
		visible = 'visible';  hidden = 'hidden';
	}

// Functions for cookies
//    
var bites = document.cookie.split("; "); // break cookie into array of bites

  function getCookie(name) { // use: getCookie("name");
    for (var i=0; i < bites.length; i++) {
      nextbite = bites[i].split("="); // break into name and value
      if (nextbite[0] == name) // if name matches
        return unescape(nextbite[1]); // return value
    }
    return null;
  }

  var today = new Date();
  var expiry = new Date(today.getTime() + 365 * 24 * 60 * 60 * 1000); // plus 365 days

  function setCookie(name, value) { // use: setCookie("name", value);
    if (value != null && value != "")
      document.cookie=name + "=" + escape(value) + "; expires=" + expiry.toGMTString();
    bites = document.cookie.split("; "); // update cookie bites
  }
//