var w = 0
var x = 0
var y = 0
var z = 0

function isOS() {
  var myAgent = navigator.userAgent.toLowerCase();

  if (myAgent.indexOf("win")!=-1){
    if (myAgent.indexOf("windows nt 5.1")!=-1){
      document.write("Windows XP")
    }
    else if (myAgent.indexOf("windows nt 5.0")!=-1){
      document.write("Windows 2000")
    }
    else if ((myAgent.indexOf("winnt")!=-1) || (myAgent.indexOf("windows nt")!=-1)){
      document.write("Windows NT")
    }
    else if (myAgent.indexOf("win 9x 4.90")!=-1){
      document.write("Windows ME")
    }
    else if ((myAgent.indexOf("win98")!=-1) || (myAgent.indexOf("windows 98")!=-1)){
      document.write("Windows 98")
    }
    else if ((myAgent.indexOf("win95")!=-1) || (myAgent.indexOf("windows 95")!=-1)){
      document.write("Windows 95")
    }
    else{
      document.write("Windows")
    }
  }
  else if (myAgent.indexOf("mac")!=-1){
    document.write("Mac")
  }
  else{
    document.write("??");
  }
}

function isBrowser() {
  var myBrowser = navigator.appName

  if (myBrowser == "Microsoft Internet Explorer"){
    document.write("IE");
  }
  else if (myBrowser == "Netscape"){
    document.write("NS");
  }
  else{
    document.location = "warning.asp"
  }
}

function isVersion() {
  var myBrowser = navigator.appName;
  var myVersion = navigator.appVersion;
  var myAgent = navigator.userAgent.toLowerCase();

  var is_major = parseInt(navigator.appVersion);
  var is_minor = parseFloat(navigator.appVersion);

  if (myBrowser == "Microsoft Internet Explorer"){
    if (myAgent.indexOf("msie 6.")!=-1){
      document.write("6.0+")
    }
    else if (myAgent.indexOf("msie 5.5")!=-1){
      document.write("5.5+")
    }
    else if (myAgent.indexOf("msie 5.0")!=-1){
      document.write("5.0+")
    }
    else if (myAgent.indexOf("msie 4")!=-1){
      document.write("4+")
    }
    else{
      document.location = "warning.asp"
    }
  }
  else if (myBrowser == "Netscape"){
    if (is_major >= 5){
      document.write("6+")
    }
    else if (is_major >= 4){
      document.write("4+")
    }
    else if (is_major >= 3){
      document.write("3+")
    }
    else{
      document.location = "warning.asp"
    }
  }
  else{
    document.location = "warning.asp"
  }
}

function isCookie() {
  var myCookie = navigator.cookieEnabled

  if (myCookie == true){
    document.write("<font color=00AA00>Enabled</font>");
  }
  else{
    document.write("<font color=DD0000>Disabled</font>");
    document.location = "warning.asp"
  }
}
