// JavaScript MouseEvents Library
// ##############################

// GLOBALS
root = "../"; // POSITION TO ROOT
base = root + "shared/img/";

// VERSION DETECT
version = ""
browserName = navigator.appName;
browserVer  = parseInt(navigator.appVersion);

if (browserName == "Netscape" && browserVer >= 3) {
	version = "n3+";
} else if (browserName == "Microsoft Internet Explorer" && browserVer >= 4) {
	version = "ie4+";
}

// ********************
function tocItem (imgName, width, height) {
// ********************
	this.name = imgName

	this.off        = new Image (width, height);
	this.off.src    = base + imgName + "_off.jpg";
	this.sel        = new Image (width, height);
	this.sel.src    = base + imgName + "_sel.jpg";
	this.on         = new Image (width, height);
	this.on.src     = base + imgName + "_on.jpg";
	//alert(this.sel.src);
}

// ********************
function createTocItem (imgName, width, height) {
// ********************
	tocItem [imgName] = new tocItem (imgName, width, height);
}

// ********************
function tocMouseOver(imgName) {
// ********************
	if (version == "n3+" || version == "ie4+") {
		document [imgName].src =  tocItem[imgName].sel.src;
	}
}

// ********************
function tocMouseOut(imgName) {
// ********************
	if (version == "n3+" || version == "ie4+") {
		document [imgName].src = tocItem[imgName].off.src;
	}
}

// ********************
function tocMouseClick(imgName) {
// ********************
	if (version == "n3+" || version == "ie4+") {
		document [imgName].src = tocItem[imgName].off.src;
	}
}
    


