// DHTML sucks, so we have to pick which browsers to do this in
// our run checker
function check_run_status_for_browser() {
  var app = navigator.appName;
  // the below works for Netscape derivatives, but not for MSIE
  // MSIE has its version somewhere at the end, and right now this does
  // not work to accurately get that info.
  var vers = parseFloat(navigator.appVersion);

  if(app == "Microsoft Internet Explorer") {
    return 1; // we think it runs in all IE 
  }
  // but how does this work for Mozilla?  Thats the real question
  else if(app == "Netscape") { 
    
    if (vers > 4.9) {
      return 0;
    } else {
      return 1;
    }
  }
  // ok, lets be exclusive to what we know works
  return 0;
}


// now we have to figure out the referrer thing to allow people to select
// the 'simple' list even if they have an 'acceptable' browser.
function parse_relative_ref_page(referrer) {
  // OK, we are to be passed the required 'document.referrer', which is
  // the absolute name of the page this one was accessed from.

  // I used the below method instead of regex to *hopefully* allow JS to
  // work correctly in most browsers.  (Regexs aren't supported until
  // JS1.2 -- and I have never tested them: can of worms expected)

  // split it by directories
  rel_list = referrer.split('/');

  // find the last index
  var i;
  i = rel_list.length;
  i--;
  
  // here we go, lets return it
  ref_page = rel_list[i];
  return ref_page;
}
