
//=====================================================================================
//                  COPYRIGHT (c)    2003 by YOUR VOICE S.p.A.
//                                   ALL RIGHTS RESERVED
//=====================================================================================
//  Software Item    : menu.jsp
//  Author (s)       : 
//  Date Created     : 
//  HTML standard    : 
//  Overview         : 
//  Revision History :
//            Date     Reason for Changes
//         ========== =================================================================
//         01/05/2005  Creazione
//=====================================================================================

mainBgColor = "#5A7EA5";
mainBgColorHover = "#7A9EC5";

subBgColor = "#ffffff";
subBgColorHover = "#ffcc00";

mainStyle = "navbarMain";
mainStyleHover = "navbarMainHover";
subStyle = "navbarSub";
subStyleHover = "navbarSubHover";

function clk(obj)
{
	return;
	
// no execute for browser compatibility
	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 sOver(obj)
{
	if (obj.className){
		obj.className = subStyleHover;
		if (obj.children){
			if (obj.children.tags("A").length > 0 && obj.children.tags("A")[0].href != ""){
// no execute for browser compatibility
//				obj.style.cursor = "hand";
				var link = obj.children.tags("A")[0];
				status = link.href;
				if (!obj.title) obj.title = link.href.split("/")[link.href.split("/").length - 1];
				}
			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 sOut(obj)
{
	status = "";
	if (obj.className){
// no execute for browser compatibility
//		obj.style.cursor = "";
		obj.className = subStyle;
				}
	else obj.bgColor = subBgColor;
}

function mOver(obj)
{
	if (obj.className){
		obj.className = mainStyleHover;
		if (obj.children){
			if (obj.children.tags("A").length > 0 && obj.children.tags("A")[0].href != ""){
// no execute for browser compatibility
//				obj.style.cursor = "hand";
				var link = obj.children.tags("A")[0];
				status = link.href;
				if (!obj.title) obj.title = link.href.split("/")[link.href.split("/").length - 1];
				}
			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 mOut(obj)
{
	status = "";
	if (obj.className){
// no execute for browser compatibility
//		obj.style.cursor = "";
		obj.className = mainStyle;
		}
	else obj.bgColor = mainBgColor;
}

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);"); }
	}
}

function clockon() 
{
	thistime= new Date()

	var hours=thistime.getHours()
	var minutes=thistime.getMinutes()
	var seconds=thistime.getSeconds()
 	var curDay=thistime.getDate()
	var curMonth=thistime.getMonth() + 1
	var curYear=thistime.getFullYear()

	if (eval(curDay) <10) {curDay="0"+curDay}
	if (eval(curMonth) < 10) {curMonth="0"+curMonth} 
	if (eval(hours) <10) {hours="0"+hours}
	if (eval(minutes) < 10) {minutes="0"+minutes}
	if (seconds < 10) {seconds="0"+seconds}

	thistime = curDay + "/" + curMonth + "/" + curYear + "   " + hours+":"+minutes
  
	if(document.all) 
	{
		bgclocknoshade.innerHTML=thistime
		bgclockshade.innerHTML=thistime
	}
 
	var timer=setTimeout("clockon()",200)
}
