mainStyle01 = "menuMain01";
mainStyleHover01 = "menuMainHover01";
mainStyle06 = "menuMain06";
mainStyleHover06 = "menuMainHover06";
subStyle01 = "menuSub01";
subStyleHover01 = "menuSubHover01";
mainStyle02 = "menuMain02";
mainStyleHover02 = "menuMainHover02";
subStyle02 = "menuSub02";
subStyleHover02 = "menuSubHover02";



function clk(obj){
	if (document.all && obj.children.tags("A").length > 0 && obj.children.tags("a")[0].href)
		obj.children.tags("A")[0].click();
	else if (!document.all) {
		if (obj.document && obj.document.links[0]) location.href = obj.document.links[0].href;
		else if (obj.getElementsByTagName("a")){ 
			var links = obj.getElementsByTagName("a");
			if (links[0])
				location.href = links[0].href;
			}
		}
}

function s01Over(obj){
	if (obj.className){
		obj.className = subStyleHover01;
		if (obj.children){
			if (obj.children.tags("A").length > 0 && obj.children.tags("A")[0].href != ""){
				obj.style.cursor = "hand";
				var link = obj.children.tags("A")[0];
				status = link.href;
								}
			else status = obj.innerText;
			}
		else if (obj.getElementsByTagName("a"))	status = obj.getElementsByTagName("a")[0].href;
	}
	else {
		obj.bgColor = subBgColorHover;
		if (obj.document.links[0]) status = obj.document.links[0].href;
	}
}

function s01Out(obj){
	status = "";
	if (obj.className){
		obj.style.cursor = "";
		obj.className = subStyle01;
		}
	else obj.bgColor = subBgColor;
}

function m01Over(obj){
	if (obj.className){
		obj.className = mainStyleHover01;
		if (obj.children){
			if (obj.children.tags("A").length > 0 && obj.children.tags("A")[0].href != ""){
				obj.style.cursor = "hand";
				var link = obj.children.tags("A")[0];
				status = link.href;
								}
			else status = obj.innerText;
			}
		else if (obj.getElementsByTagName("a"))	status = obj.getElementsByTagName("a")[0].href;
		}
	else {
		obj.bgColor = mainBgColorHover;
		if (obj.document.links[0]) status = obj.document.links[0].href;
		}
}

function m01Out(obj){
	status = "";
	if (obj.className){
		obj.style.cursor = "";
		obj.className = mainStyle01;
		}
	else obj.bgColor = mainBgColor;
	}



function s02Over(obj){
	if (obj.className){
		obj.className = subStyleHover02;
		if (obj.children){
			if (obj.children.tags("A").length > 0 && obj.children.tags("A")[0].href != ""){
				obj.style.cursor = "hand";
				var link = obj.children.tags("A")[0];
				status = link.href;
								}
			else status = obj.innerText;
			}
		else if (obj.getElementsByTagName("a"))	status = obj.getElementsByTagName("a")[0].href;
	}
	else {
		obj.bgColor = subBgColorHover;
		if (obj.document.links[0]) status = obj.document.links[0].href;
	}
}

function s02Out(obj){
	status = "";
	if (obj.className){
		obj.style.cursor = "";
		obj.className = subStyle02;
		}
	else obj.bgColor = subBgColor;
}

function m02Over(obj){
	if (obj.className){
		obj.className = mainStyleHover02;
		if (obj.children){
			if (obj.children.tags("A").length > 0 && obj.children.tags("A")[0].href != ""){
				obj.style.cursor = "hand";
				var link = obj.children.tags("A")[0];
				status = link.href;
								}
			else status = obj.innerText;
			}
		else if (obj.getElementsByTagName("a"))	status = obj.getElementsByTagName("a")[0].href;
		}
	else {
		obj.bgColor = mainBgColorHover;
		if (obj.document.links[0]) status = obj.document.links[0].href;
		}
}

function m02Out(obj){
	status = "";
	if (obj.className){
		obj.style.cursor = "";
		obj.className = mainStyle02;
		}
	else obj.bgColor = mainBgColor;
	}


function s06Over(obj){
	if (obj.className){
		obj.className = subStyleHover06;
		if (obj.children){
			if (obj.children.tags("A").length > 0 && obj.children.tags("A")[0].href != ""){
				obj.style.cursor = "hand";
				var link = obj.children.tags("A")[0];
				status = link.href;
								}
			else status = obj.innerText;
			}
		else if (obj.getElementsByTagName("a"))	status = obj.getElementsByTagName("a")[0].href;
	}
	else {
		obj.bgColor = subBgColorHover;
		if (obj.document.links[0]) status = obj.document.links[0].href;
	}
}

function s06Out(obj){
	status = "";
	if (obj.className){
		obj.style.cursor = "";
		obj.className = subStyle06;
		}
	else obj.bgColor = subBgColor;
}

function m06Over(obj){
	if (obj.className){
		obj.className = mainStyleHover06;
		if (obj.children){
			if (obj.children.tags("A").length > 0 && obj.children.tags("A")[0].href != ""){
				obj.style.cursor = "hand";
				var link = obj.children.tags("A")[0];
				status = link.href;
								}
			else status = obj.innerText;
			}
		else if (obj.getElementsByTagName("a"))	status = obj.getElementsByTagName("a")[0].href;
		}
	else {
		obj.bgColor = mainBgColorHover;
		if (obj.document.links[0]) status = obj.document.links[0].href;
		}
}

function m06Out(obj){
	status = "";
	if (obj.className){
		obj.style.cursor = "";
		obj.className = mainStyle06;
		}
	else obj.bgColor = mainBgColor;
	}


// ________________________________ FINE STILE 9 __________________________________-
function cap(obj){
if (document.layers){
	obj.captureEvents(Event.MOUSEUP);
	obj.captureEvents(Event.MOUSEOVER);
	obj.captureEvents(Event.MOUSEOUT);
	obj.onmouseup = function (e) { clk(obj); }
	obj.onmouseover = function (e) { eval(obj.name.substring(0,1).toLowerCase() + "Over(obj);"); } 
	obj.onmouseout = function (e) {eval(obj.name.substring(0,1).toLowerCase() + "Out(obj);"); }
	}
}

