// IE needs the following to allow the CSS dropdowns to function.

startList = function() {
if (document.all&&document.getElementById) {
navRoot = document.getElementById("nav");
for (i=0; i<navRoot.childNodes.length; i++) {
node = navRoot.childNodes[i];
if (node.nodeName=="LI") {
node.onmouseover=function() {
this.className+=" over";
  }
  node.onmouseout=function() {
  this.className=this.className.replace	(" over", "");
   }
   }
  }
 }
}
window.onload=startList;

// Preloading Images

if (document.images)
{
  home_on = new Image ();
  home_off = new Image ();

  home_on.src = "images/nav_home_on.gif";
  home_off.src = "images/nav_home.gif";
  
  about_on = new Image ();
  about_off = new Image ();

  about_on.src = "images/nav_about_on.gif";
  about_off.src = "images/nav_about.gif";
  
  gallery_on = new Image ();
  gallery_off = new Image ();

  gallery_on.src = "images/nav_gallery_on.gif";
  gallery_off.src = "images/nav_gallery.gif";
  
  services_on = new Image ();
  services_off = new Image ();

  services_on.src = "images/nav_services_on.gif";
  services_off.src = "images/nav_services.gif";
  
  contact_on = new Image ();
  contact_off = new Image ();

  contact_on.src = "images/nav_contact_on.gif";
  contact_off.src = "images/nav_contact.gif";
  
  links_on = new Image ();
  links_off = new Image ();

  links_on.src = "images/nav_links_on.gif";
  links_off.src = "images/nav_links.gif";
}

// Light up Nav bar

function nav_on (imgName)
{
  if (document.images)
  {
    on = eval (imgName + "_on.src");
    document.images[imgName].src = on;
  }
}

// Unlight Nav bar

function nav_off (imgName)
{
  if (document.images)
  {
    off = eval (imgName + "_off.src");
    document.images[imgName].src = off;
  }
}
