var offImgList = new Array(6);
var onImgList = new Array(6);
var mainOffImgList = new Array(6);
var mainOnImgList = new Array(6);

mainOffImgList[0] = new Image();
mainOffImgList[0].src = "/img/main_new_menu_about_off.gif";
mainOffImgList[1] = new Image();
mainOffImgList[1].src = "/img/main_new_menu_programs_off.gif";
mainOffImgList[2] = new Image();
mainOffImgList[2].src = "/img/main_new_menu_students_off.gif";
mainOffImgList[3] = new Image();
mainOffImgList[3].src = "/img/main_new_menu_tips_off.gif";
mainOffImgList[4] = new Image();
mainOffImgList[4].src = "/img/main_new_menu_gallery_off.gif";
mainOffImgList[5] = new Image();
mainOffImgList[5].src = "/img/main_new_menu_forums_off.gif";
mainOffImgList[6] = new Image();
mainOffImgList[6].src = "/img/main_new_menu_contact_off.gif";

mainOnImgList[0] = new Image();
mainOnImgList[0].src = "/img/main_new_menu_about_on.gif";
mainOnImgList[1] = new Image();
mainOnImgList[1].src = "/img/main_new_menu_programs_on.gif";
mainOnImgList[2] = new Image();
mainOnImgList[2].src = "/img/main_new_menu_students_on.gif";
mainOnImgList[3] = new Image();
mainOnImgList[3].src = "/img/main_new_menu_tips_on.gif";
mainOnImgList[4] = new Image();
mainOnImgList[4].src = "/img/main_new_menu_gallery_on.gif";
mainOnImgList[5] = new Image();
mainOnImgList[5].src = "/img/main_new_menu_forums_on.gif";
mainOnImgList[6] = new Image();
mainOnImgList[6].src = "/img/main_new_menu_contact_on.gif";

offImgList[0] = new Image();
offImgList[0].src = "/img/menu_about_off.gif";
offImgList[1] = new Image();
offImgList[1].src = "/img/menu_programs_off.gif";
offImgList[2] = new Image();
offImgList[2].src = "/img/menu_students_off.gif";
offImgList[3] = new Image();
offImgList[3].src = "/img/menu_tips_off.gif";
offImgList[4] = new Image();
offImgList[4].src = "/img/menu_gallery_off.gif";
offImgList[5] = new Image();
offImgList[5].src = "/img/menu_forums_off.gif";
offImgList[6] = new Image();
offImgList[6].src = "/img/menu_contact_off.gif";

onImgList[0] = new Image();
onImgList[0].src = "/img/menu_about_on.gif";
onImgList[1] = new Image();
onImgList[1].src = "/img/menu_programs_on.gif";
onImgList[2] = new Image();
onImgList[2].src = "/img/menu_students_on.gif";
onImgList[3] = new Image();
onImgList[3].src = "/img/menu_tips_on.gif";
onImgList[4] = new Image();
onImgList[4].src = "/img/menu_gallery_on.gif";
onImgList[5] = new Image();
onImgList[5].src = "/img/menu_forums_on.gif";
onImgList[6] = new Image();
onImgList[6].src = "/img/menu_contact_on.gif";

function mainImgSwap(imgName, targetID, type) {
  if(type == 0) {
    imgName.src = mainOffImgList[targetID].src;
  }
  else {
    imgName.src = mainOnImgList[targetID].src;
  }
}

function imgSwap(imgName, targetID, type) {
  if(type == 0) {
    imgName.src = offImgList[targetID].src;
  }
  else {
    imgName.src = onImgList[targetID].src;
  }
}

function showFlash(fileName, width, height) {
  if (navigator.appName == "Netscape") {
    document.write("<object type=\"application/x-shockwave-flash\" data=\"flash/" + fileName + "\" width=\"" + width + "\" height=\"" + height + "\"></object>");
  }
  else if (navigator.appName == "Opera") {
    document.write("<embed src=\"flash/" + fileName + "\" quality=\"high\" width=\"" + width + "\" height=\"" + height + "\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" />");
  }
  else {
    document.write("<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0\" width=\"" + width + "\" height=\"" + height + "\"><param name=\"movie\" value=\"flash/" + fileName + "\" /><param name=\"quality\" value=\"high\" /></object>");
  }
}