/*
 *	basecode.js - JavaScript variables and functions for www.eslinuxgroup.com
 *
 *	Author: Kevin Campbell
 *	Created: 07/03/00
 *	Modified: 07/09/01
 */

var ES = false ;
var IE4 = ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4 ));
var capable = ((navigator.appCodeName == "Mozilla") && (parseInt(navigator.appVersion) >= 3 ));

var flags = new Array(5);
resetFlags();
flags[0] = false;

var hints = new Array(5);
hints[0] = "Home";
hints[1] = "About ES Linux Group";
hints[2] = "Offered Services";
hints[3] = "Contact ES Linux Group";
hints[4] = "Search Our Site";

function setStatus(msg) {
	if(!msg)
		msg  = "ES Linux Group";
	window.status = msg;
	return true;
}

function imgOn(img, index) {
	with(top.toc) {
		if(capable && flags[index])
			document.images[img].src = eval(img + "_on").src;
		setTimeout('document.applets["FadeText"].mouseOver(hints[' + index + '])', 450);
		return setStatus(hints[index]);
	}
}

function imgOff(img, index) {
	with(top.toc) {
		if(capable && flags[index])
			document.images[img].src = eval(img + "_off").src;
		document.applets["FadeText"].mouseOut();
		return setStatus();
	}
}

function imgSel(img, index) {
	with(top.toc) {
		if(capable) {
			resetFlags();
			resetImages();
			document.images[img].src = eval(img + "_sel").src;
			flags[index] = false;
		}
	}
	return true;
}

function resetFlags() {
	with(top.toc) {
		for(var i = 0; i < 5; i++)
			flags[i] = true;
	}
}

function resetImages() {
	with(top.toc) {
		for(var i = 0; i < document.images.length; i++) {
			with(document.images[i]) {
				if(name != "")
					src = eval(name + "_off").src;
			}
		}
	}
}