// JavaScript MouseEvents Library
// ##############################

// GLOBALS
root = "./"; // POSITION TO ROOT
base = root + "immagini/";
//base = root;

// 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,path) {
// ********************
	this.name = imgName

	this.off        = new Image (width, height);
	this.off.src    = path + "immagini/" + imgName + "_off.gif";
	this.sel        = new Image (width, height);
	this.sel.src    = path  + "immagini/" +  imgName + "_sel.gif";
	this.on         = new Image (width, height);
	this.on.src     = path  + "immagini/" +  imgName + "_on.gif";
}

// ********************
function createTocItem (imgName, width, height,path) {
// ********************
	tocItem [imgName] = new tocItem (imgName, width, height,path);
}

// ********************
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].on.src;
	}
}
    


