browserName = navigator.appName; 
browserVer  = parseInt(navigator.appVersion); 
browser     = "NotOk"; 

//Detect if Netscape or MSIE version is ok 
if (browserName == "Netscape" && browserVer >= 3) { browser = "ok"} 
if (browserName == "Microsoft Internet Explorer" && browserVer >= 4) { browser = "ok"} 

//Initialize your images
if (browser == "ok") {
  //document.writeln('<EMBED SRC="../sound/over.wav" autostart=false HIDDEN=TRUE NAME="over" MASTERSOUND>');
  //document.writeln('<EMBED SRC="../sound/down.wav" autostart=false HIDDEN=TRUE NAME="down" MASTERSOUND>');

  //Main Menu Buttons
  alliance     = new Image(); alliance.src     = "/img/buttons/menu/alliance.gif";
  allianceup   = new Image(); allianceup.src   = "/img/buttons/menu/alliance_up.gif";
  alliancedown = new Image(); alliancedown.src = "/img/buttons/menu/alliance_down.gif";

  contact     = new Image(); contact.src     = "/img/buttons/menu/contact.gif";
  contactup   = new Image(); contactup.src   = "/img/buttons/menu/contact_up.gif";
  contactdown = new Image(); contactdown.src = "/img/buttons/menu/contact_down.gif";

  download     = new Image(); download.src     = "/img/buttons/menu/download.gif";
  downloadup   = new Image(); downloadup.src   = "/img/buttons/menu/download_up.gif";
  downloaddown = new Image(); downloaddown.src = "/img/buttons/menu/download_down.gif";

  forum     = new Image(); forum.src     = "/img/buttons/menu/forum.gif";
  forumup   = new Image(); forumup.src   = "/img/buttons/menu/forum_up.gif";
  forumdown = new Image(); forumdown.src = "/img/buttons/menu/forum_down.gif";

  gallery     = new Image(); gallery.src     = "/img/buttons/menu/gallery.gif";
  galleryup   = new Image(); galleryup.src   = "/img/buttons/menu/gallery_up.gif";
  gallerydown = new Image(); gallerydown.src = "/img/buttons/menu/gallery_down.gif";

  guestbook     = new Image(); guestbook.src     = "/img/buttons/menu/guestbook.gif";
  guestbookup   = new Image(); guestbookup.src   = "/img/buttons/menu/guestbook_up.gif";
  guestbookdown = new Image(); guestbookdown.src = "/img/buttons/menu/guestbook_down.gif";

  links     = new Image(); links.src     = "/img/buttons/menu/links.gif";
  linksup   = new Image(); linksup.src   = "/img/buttons/menu/links_up.gif";
  linksdown = new Image(); linksdown.src = "/img/buttons/menu/links_down.gif";

  members     = new Image(); members.src     = "/img/buttons/menu/members.gif";
  membersup   = new Image(); membersup.src   = "/img/buttons/menu/members_up.gif";
  membersdown = new Image(); membersdown.src = "/img/buttons/menu/members_down.gif";

  news     = new Image(); news.src     = "/img/buttons/menu/news.gif";
  newsup   = new Image(); newsup.src   = "/img/buttons/menu/news_up.gif";
  newsdown = new Image(); newsdown.src = "/img/buttons/menu/news_down.gif";

  server     = new Image(); server.src     = "/img/buttons/menu/server.gif";
  serverup   = new Image(); serverup.src   = "/img/buttons/menu/server_up.gif";
  serverdown = new Image(); serverdown.src = "/img/buttons/menu/server_down.gif";

  story     = new Image(); story.src     = "/img/buttons/menu/story.gif";
  storyup   = new Image(); storyup.src   = "/img/buttons/menu/story_up.gif";
  storydown = new Image(); storydown.src = "/img/buttons/menu/story_down.gif";

  war     = new Image(); war.src     = "../img/buttons/menu/war.gif";
  warup   = new Image(); warup.src   = "../img/buttons/menu/war_up.gif";
  wardown = new Image(); wardown.src = "../img/buttons/menu/war_down.gif";

  //petition     = new Image(); petition.src     = "/img/buttons/menu/petition.gif";
  //petitionup   = new Image(); petitionup.src   = "/img/buttons/menu/petition_up.gif";
  //petitiondown = new Image(); petitiondown.src = "/img/buttons/menu/petition_down.gif";
}

//Play sound
//function sound(status) {
//  if (status == "up") { document.over.play(); }
//  if (status == "down") { document.down.play(); }
//}

//Swap Images
function swap(imgName, status) {
  if (browser == "ok") {
    imgOn = eval(imgName+status+".src");
    document.images[imgName].src = imgOn;
    //sound(status);
  }
}
