﻿// JScript File

//precache all off button images
var offImgArray = new Array()
offImgArray["Home"] = new Image
offImgArray["Home"].src = "images/Buttons/Home_Off.gif"
offImgArray["AboutUs"] = new Image
offImgArray["AboutUs"].src = "images/Buttons/AboutUs_Off.gif"
offImgArray["Events"] = new Image
offImgArray["Events"].src = "images/Buttons/Events_Off.gif"
offImgArray["Groups"] = new Image
offImgArray["Groups"].src = "images/Buttons/Groups_Off.gif"
offImgArray["ContactUs"] = new Image
offImgArray["ContactUs"].src = "images/Buttons/ContactUs_Off.gif"
offImgArray["Careers"] = new Image
offImgArray["Careers"].src = "images/Buttons/Careers_Off.gif"
offImgArray["Links"] = new Image
offImgArray["Links"].src = "images/Buttons/Links_Off.gif"
offImgArray["News"] = new Image
offImgArray["News"].src = "images/Buttons/News_Off.gif"

//precache all the on button images
var onImgArray = new Array()
onImgArray["Home"] = new Image
onImgArray["Home"].src = "images/Buttons/Home_On.gif"
onImgArray["AboutUs"] = new Image
onImgArray["AboutUs"].src = "images/Buttons/AboutUs_On.gif"
onImgArray["Events"] = new Image
onImgArray["Events"].src = "images/Buttons/Events_On.gif"
onImgArray["Groups"] = new Image
onImgArray["Groups"].src = "images/Buttons/Groups_On.gif"
onImgArray["ContactUs"] = new Image
onImgArray["ContactUs"].src = "images/Buttons/ContactUs_On.gif"
onImgArray["Careers"] = new Image
onImgArray["Careers"].src = "images/Buttons/Careers_On.gif"
onImgArray["Links"] = new Image
onImgArray["Links"].src = "images/Buttons/Links_On.gif"
onImgArray["News"] = new Image
onImgArray["News"].src = "images/Buttons/News_On.gif"

//functions that swap images
function imageON(imgName) {
	if (document.images) {
		document.images[imgName].src = onImgArray[imgName].src
	}
}

function imageOFF(imgName) {
	if (document.images) {
		document.images[imgName].src = offImgArray[imgName].src
	}
}
