/*
 * File: "script.js"
 *
 * Alex Eng
 * 2003-11-07
 */



if (isLegacyBrowser()) {
  var baseURL = "http://syncbkmk.sourceforge.net/legacy/";
  window.location.href = baseURL + "index-old.html";
}



function isLegacyBrowser() {
  var version;

  if (navigator.appName == "Microsoft Internet Explorer") {
    var ua   = window.navigator.userAgent;
    var msie = ua.indexOf("MSIE");  
    version = ua.substring(msie+5,(ua.indexOf(".",msie)+2));

    if (version < 5) {
      return true;
    }
  }
  else if (navigator.appName == "Netscape") {
    version = parseFloat(navigator.appVersion);

    if (version < 5) {
      return true;
    }
  }

  return false;
}


function body_loadEvent() {
  // Fill in email address and document's last modified date in footer
  var user = "ateng";
  var host = "users.sourceforge.net";
  var email = user + "@" + host;
 
  var contactEl = document.getElementById("contact");
  var mailtoEl = document.createElement("A");

  contactEl.appendChild(document.createTextNode("<"));
  mailtoEl.setAttribute("href", "mailto:" + email);
  mailtoEl.appendChild(document.createTextNode(email));
  contactEl.appendChild(mailtoEl);
  contactEl.appendChild(document.createTextNode(">"));

  // document.lastModified returns current time instead of the last-modified 
  // time of a local Web page (file:// protocol).  
  // Bug is present in Mozilla 1.5
  var dateEl = document.getElementById("lastModified");
  dateEl.appendChild(document.createTextNode(document.lastModified));
}
