var baseImgDir = "/";
var imageSuffix = ".gif";
var path = baseImgDir + "i/";
var currentImg = "";
var list = new Array();

function preload(name, statusText, ifHi, ifOn, path, imageSuffix) {
	if (document.images) {
		list[name] = new Object();
		list[name].message = statusText;
		list[name].off = new Image();
		list[name].off.src = path + name + "-off" + imageSuffix;
		if (ifHi == 1) {
			list[name].hi = new Image();
			list[name].hi.src = path + name + "-on" + imageSuffix;
		}
		if (ifOn == 1) {
			list[name].on = new Image();
			list[name].on.src = path + name + "-on" + imageSuffix;
		}
	}
}

function initIMG() {
	preload('nav_04_product_development','Product Development',1,0,path + "nav/",".gif");
	preload('nav_06_featured_work','Featured Work',1,0,path + "nav/",".gif");
	preload('nav_08_studio','Studio',1,0,path + "nav/",".gif");
	preload('nav_10_client_login','Client Login',1,0,path + "nav/",".gif");
	preload('nav_12_contact','Contact',1,0,path + "nav/",".gif");
}

initIMG();

function imgHi(whichImg) {
	if (document.images && list[whichImg].hi) {
		document.images[whichImg].src = list[whichImg].hi.src;
	}
	window.status = list[whichImg].message;
}

function imgOff(whichImg) {
	if (document.images && list[whichImg].off) {
		document.images[whichImg].src = list[whichImg].off.src;
	}
	currentImg = "";
	window.status = "";
}
