browserName = navigator.appName;
browserVer = parseInt (navigator.appVersion);

version = "n2";
if (browserName == "Netscape" && browserVer >= 3) {
  version = "n3";
}
if (browserName == "Microsoft Internet Explorer" && browserVer >=4) {
  version = "e4";
}

// Initialize every dynamic image on the site
if ((version == "n3") || (version == "e4")) {

  nav_about_on = new Image (170, 23);
  nav_about_on.src = "images/nav/nav_about_on.gif";

  nav_events_on = new Image (170, 23);
  nav_events_on.src = "images/nav/nav_events_on.gif";

  nav_training_on = new Image (170, 23);
  nav_training_on.src = "images/nav/nav_training_on.gif";

  nav_tutoring_on = new Image (170, 23);
  nav_tutoring_on.src = "images/nav/nav_tutoring_on.gif";

  nav_scholars_on = new Image (170, 23);
  nav_scholars_on.src = "images/nav/nav_scholars_on.gif";

  nav_tryout_on = new Image (170, 23);
  nav_tryout_on.src = "images/nav/nav_tryout_on.gif";

  nav_sponsors_on = new Image (170, 23);
  nav_sponsors_on.src = "images/nav/nav_sponsors_on.gif";

  nav_donations_on = new Image (170, 23);
  nav_donations_on.src = "images/nav/nav_donations_on.gif";

  nav_contact_on = new Image (170, 23);
  nav_contact_on.src = "images/nav/nav_contact_on.gif";

  nav_faq_on = new Image (170, 23);
  nav_faq_on.src = "images/nav/nav_faq_on.gif";

  nav_about_off = new Image (170, 23);
  nav_about_off.src = "images/nav/nav_about_off.gif";

  nav_events_off = new Image (170, 23);
  nav_events_off.src = "images/nav/nav_events_off.gif";

  nav_training_off = new Image (170, 23);
  nav_training_off.src = "images/nav/nav_training_off.gif";

  nav_tutoring_off = new Image (170, 23);
  nav_tutoring_off.src = "images/nav/nav_tutoring_off.gif";

  nav_scholars_off = new Image (170, 23);
  nav_scholars_off.src = "images/nav/nav_scholars_off.gif";

  nav_tryout_off = new Image (170, 23);
  nav_tryout_off.src = "images/nav/nav_tryout_off.gif";

  nav_sponsors_off = new Image (170, 23);
  nav_sponsors_off.src = "images/nav/nav_sponsors_off.gif";

  nav_donations_off = new Image (170, 23);
  nav_donations_off.src = "images/nav/nav_donations_off.gif";

  nav_contact_off = new Image (170, 23);
  nav_contact_off.src = "images/nav/nav_contact_off.gif";

  nav_faq_off = new Image (170, 23);
  nav_faq_off.src = "images/nav/nav_faq_off.gif";
}

// Turns a nav button on.
function nav_on (imgName) {
  button_on(imgName, imgName);
}

// Turns a nav button off
function nav_off (imgName) {
  button_off(imgName, imgName);
}

// Turns a button on.
function button_on (spanName, imgName) {
  if ((version == "n3") || (version == "e4")) {
    butOn = eval(imgName + "_on.src");
    document[spanName].src = butOn;
  }
}

// Turns a button off
function button_off (spanName, imgName) {
  if ((version == "n3") || (version == "e4")) {
    butOff = eval(imgName + "_off.src");
    document[spanName].src = butOff;
  }
}