function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {
    if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
      document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage;
    }
  } else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH){
    location.reload();
  }
}
MM_reloadPage(true);

var totalItems = 16;

mainlayer_titles = new Array();
for(var i=1;i<=totalItems;i++){
	mainlayer_titles.push("line" + i + "menu");
}

function showMenu(whichmenu, whichimage, rolloverimage){
  //document.all[whichimage].src = rolloverimage;
  for (i=0; i<mainlayer_titles.length; i++) {
    var layername = mainlayer_titles[i];
    document.all[layername].style.visibility = 'hidden';
  }
  for ( m=1; m<=totalItems; m++){
    var imagename = "line" + m;
    var imagePath = "images/item" + m + ".jpg";
    if(document.all[imagename].src != whichimage){
      document.all[imagename].src = imagePath;
    }
  }
  document.all[whichimage].src = rolloverimage;
  document.all[whichmenu].style.visibility = 'visible';

}

function rollOvers(whichimage, rolloverimage){
  document.all[whichimage].src = rolloverimage;
}

function triggerout(whichimage,rolloverimage,whichmenu){
  if (document.all[whichmenu].style.visibility != 'visible'){
    document.all[whichimage].src = rolloverimage;
  }
}

function closeme(whichpop, whichimage, pathtoimage){
	document.all[whichpop].style.visibility = 'hidden';
	document.all[whichimage].src = pathtoimage;
}