// JavaScript Document//----------------------------------------------------------------------------  // Code to determine the browser and version.  //----------------------------------------------------------------------------  function Browser() {      var ua, s, i, an;      this.isKonq  = false;  // Linux Konqueror    this.isOmni  = false;  // OmniWeb    this.isOpera = false;  // Opera    this.isGecko = false;  // Gecko    this.isWebTV = false;  // WebTV    this.isIcab  = false;  // iCab    this.isIE    = false;  // Internet Explorer    this.isNS    = false;  // Netscape    this.isMoz   = false;  // Other browsers    this.version = null;    this.an      = navigator.appName;    this.isJaveEn= navigator.javaEnabled();   if(document.getElementById) {	  this.isDOM = true;  }else{	  this.isDOM = false;  }    ua = navigator.userAgent.toLowerCase();      s = "konqueror";    if ((i = ua.indexOf(s)) >= 0) {      this.isKonq = true;      this.version = parseFloat(ua.substr(i + s.length));      return;    }      s = "omniweb";    if ((i = ua.indexOf(s)) >= 0) {      this.isOmni = true;      this.version = parseFloat(ua.substr(i + s.length));      return;    }      s = "opera";    if ((i = ua.indexOf(s)) >= 0) {      this.isOpera = true;      this.version = parseFloat(ua.substr(i + s.length));      return;    }      s = "webtv";    if ((i = ua.indexOf(s)) >= 0) {      this.isWebTV = true;      this.version = parseFloat(ua.substr(i + s.length));      return;    }      s = "icab";    if ((i = ua.indexOf(s)) >= 0) {      this.isIcab = true;      this.version = parseFloat(ua.substr(i + s.length));      return;    }      s = "msie";    if ((i = ua.indexOf(s)) >= 0) {      this.isIE = true;      this.version = parseFloat(ua.substr(i + s.length));      return;    }    //  s = "Netscape6/";    s = "netscape/";    if ((i = ua.indexOf(s)) >= 0) {      this.isNS = true;      this.version = parseFloat(ua.substr(i + s.length));      return;    }      // Treat any other "Gecko" browser as NS 6.1.    s = "gecko";    if ((i = ua.indexOf(s)) >= 0) {      this.isGecko = true;      this.version = parseFloat(ua.substr(ua.indexOf('; r') + s.length)) + " (Compatible with Netscape 6.1 or higher)";      return;    }      s = "mozilla/";    if ((i = ua.indexOf(s)) >= 0) {      this.isMozilla = true;      this.version = parseFloat(ua.substr(i + s.length));      return;    }  }    //detects OS namefunction OS() {    var ua;      ua = navigator.userAgent.toLowerCase();      this.OS      = null;      if (checkIt('linux', ua)) {      this.OS = "Linux";      return;    }    else if (checkIt('x11', ua)) {      this.OS = "Unix";      return;    }    else if (checkIt('mac', ua)) {      this.OS = "Mac";      return;    }    else if (checkIt('win', ua)) {      this.OS = "Windows";      return;    }    else {      this.OS = "an unknown operating system";      return;    }      function checkIt(string, u) {        place = u.indexOf(string) + 1;        return place;    }  }//set browser and os global variablesvar os = new OS();  var browser = new Browser();//returns current users yearfunction getThisYear(){	var today = new Date();	var year = today.getYear();	var day = today.getDay();	var month = today.getMonth();	if(year < 2000) 		year += 1900;	return year;}function writeBrowserLink() {	var sniff = "";		if(browser == null)		browser = new Browser();		if (browser.isIE) {		sniff = ("&nbsp;<a style=\"cursor:hand\" onMouseOver=\"status='Make bergfeldstudio.com my start page!';return true;\" onMouseOut=\"status='';return false;\"onclick=\"this.style.behavior='url(#default#homepage)';this.setHomePage('http://www.doorsinfo.com');\"><img src=\"images/common/sethome.gif\" border=\"0\" width=\"14\" height=\"14\" alt=\"Make bergfeldstudio.com my start page!\"/></a>&nbsp;<a style=\"cursor:hand\" onMouseOver=\"status='Make bergfeldstudio.com my start page!';return true;\" onMouseOut=\"status='';return false;\" onclick=\"this.style.behavior='url(#default#homepage)';this.setHomePage('http://www.doorsinfo.com');\" title=\"Make bergfeldstudio.com my start page!\">Make bergfeldstudio.com your start page!</a><br />");		sniff += ("&nbsp;<a style=\"cursor:hand\" onMouseOver=\"status='Bookmark bergfeldstudio.com now!';return true;\" onMouseOut=\"status='';return false;\" onclick=\"window.external.AddFavorite(location.href, document.title);\"><img src=\"images/common/favorites.gif\" width=\"15\" height=\"13\" alt=\"Bookmark bergfeldstudio.com now!\" /></a>&nbsp;<a style=\"cursor:hand\" onMouseOver=\"status='Bookmark bergfeldstudio.com now!';return true;\" onMouseOut=\"status='';return false;\" onclick=\"window.external.AddFavorite(location.href, document.title);\" title=\"Bookmark bergfeldstudio.com now!\">Bookmark FCC-ELGIN.ORG NOW!</a><br />");	}else if (browser.isOpera) {		sniff = ("<img src=\"images/common/opera_bookmark.gif\" width=\"12\" height=\"15\" alt=\"Bookmark FCC-ELGIN.ORG NOW!\" />&nbsp;Bookmark FCC-ELGIN.ORG NOW! Press Crtl & Alt & B<br />");	}else if (browser.isNS || browser.isGecko) {		sniff = ("<img src=\"images/common/ns_bookmark.gif\" width=\"16\" height=\"16\" alt=\"Bookmark FCC-ELGIN.ORG NOW!\" />&nbsp;Bookmark FCC-ELGIN.ORG NOW! Press Crtl & D<br />");	}else {		sniff = ("&nbsp;Don\'t Forget to Bookmark bergfeldstudio.com now!<br />");	}document.write(sniff);}
