if (document.images) {
  custom = new Image();
  custom.src = "../images/nav/custom.gif";
  custom_on = new Image();
  custom_on.src = "../images/nav/custom_on.gif";
  
  green = new Image();
  green.src = "../images/nav/green.gif";
  green_on = new Image();
  green_on.src = "../images/nav/green_on.gif";
  
  work = new Image();
  work.src = "../images/nav/work.gif";
  work_on = new Image();
  work_on.src = "../images/nav/work_on.gif";
  
  about = new Image();
  about.src = "../images/nav/about.gif";
  about_on = new Image();
  about_on.src = "../images/nav/about_on.gif";
  
  contact = new Image();
  contact.src = "../images/nav/contact.gif";
  contact_on = new Image();
  contact_on.src = "../images/nav/contact_on.gif";
 
  home2 = new Image();
  home2.src = "../images/nav/home.gif";
  home2_on = new Image();
  home2_on.src = "../images/nav/home_on.gif";

  portfolio = new Image();
  portfolio.src = "../images/navbar/portfolio.gif";
  portfolio_on = new Image();
  portfolio_on.src = "../images/navbar/portfolio_on.gif";

  completed = new Image();
  completed.src = "../images/navbar/completed.gif";
  completed_on = new Image();
  completed_on.src = "../images/navbar/completed_on.gif";
    
  working = new Image();
  working.src = "../images/navbar/working.gif";
  working_on = new Image();
  working_on.src = "../images/navbar/working_on.gif";
  
  about_us = new Image();
  about_us.src = "../images/navbar/about.gif";
  about_us_on = new Image();
  about_us_on.src = "../images/navbar/about_on.gif";
    
  contact_us = new Image();
  contact_us.src = "../images/navbar/contact.gif";
  contact_us_on = new Image();
  contact_us_on.src = "../images/navbar/contact_on.gif";
  
  home = new Image();
  home.src = "../images/navbar/home.gif";
  home_on = new Image();
  home_on.src = "../images/navbar/home_on.gif";
}

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