	var loaded = false;


	function namImage(inName) {
		this.name = "";
		this.number = -1;
		this.on = new Image();
		this.off = new Image();
		this.ext_main = new Image();
	
		return this;
	}

	function namImageFinalize() {
		n = this.length;
		imgDir = "images/";
		
		for (var i = 0; i<n; i++) {
			this[(this[i])] = new namImage();
			
			this[(this[i])].name = this[i];
			this[(this[i])].number = i;
			this[(this[i])].on.src = imgDir + this[i] + "_g.gif";
			this[(this[i])].off.src = imgDir + this[i] + ".gif";
			this[(this[i])].ext_main.src = imgDir + "main_" + this[i] + ".gif";
			
			this[i] = this[(this[i])];		// always double-down on 11

		}
	}

	function namImageArray(n) {
		this.length = n;
		for (var i = 0; i<n; i++) {
			this[i] = "";
		}
		this.finalize = namImageFinalize;

		return this;
	}

	w3img = null;

	if (document.images) {
		w3img = new namImageArray(10);
		
		w3img[0] = "home";
		w3img[1] = "fp";
		w3img[2] = "bi";
		w3img[3] = "tt";
		w3img[4] = "er";
		w3img[5] = "fares";
		w3img[6] = "hi";
		w3img[7] = "ci";
		
		w3img.finalize();
		
		loaded = true;
	}

	function rollOver(imgName) {
		if (w3img) {
			if (loaded) {
				document [imgName].src = w3img[imgName].on.src;
				
				// add external images as needed
				document.ext_main.src = w3img[imgName].ext_main.src;
			
			}
		}
	}

	function rollOut(imgName) {
		if (w3img) {
			if (loaded) {
				document [imgName].src = w3img[imgName].off.src;
				
			}
			
		}
	}
	
	
