// First we tell the Swap function that the mouseover images aren't loaded yet
areWeLoaded = false;

// Then we initialize subnavFlag
subnavFlag = false;

// We have to initialize the mouseover variables, otherwise we get javascript errors

prg_off = new Image;
prg_on = new Image;

cmp_off = new Image;
cmp_on = new Image;

abt_off = new Image;
abt_on = new Image;

pln_off = new Image;
pln_on = new Image;

inq_off = new Image;
inq_on = new Image;



// Swap function checks to see if images are loaded, then swaps image sources

function Swap(img1,img2) {
  if (areWeLoaded) {
    img1.src = img2.src;
  }
}

// Now we load the mouseover images, after everything else

function loadNavs() {
  baseaddr = "images/";
  
  prg_off.src = baseaddr + "nav_program.gif";
  prg_on.src  = baseaddr + "nav_program_over.gif";
  
  cmp_off.src = baseaddr + "nav_campus.gif";
  cmp_on.src  = baseaddr + "nav_campus_over.gif";
  
  abt_off.src = baseaddr + "nav_about.gif";
  abt_on.src  = baseaddr + "nav_about_over.gif";

  pln_off.src = baseaddr + "nav_planning.gif";
  pln_on.src  = baseaddr + "nav_planning_over.gif";  
  
  inq_off.src = baseaddr + "nav_inquire.gif";
  inq_on.src  = baseaddr + "nav_inquire_over.gif";  
  
  // If there are subnavs, load them too

  if (subnavFlag) {
    loadSubnavs();
  }

  // Tell the Swap function that all mouseover images are loaded

  areWeLoaded = true;

}
