<!--

function resetList(id) {
	var l = document.getElementById(id);
	var val = l.value;
	l.selectedIndex=0;
	window.location = "valorizzazioni.aspx?zone_id=22&nav="+val;
}

function resetList2(id) {
	var l = document.getElementById(id);
	var val = l.value;
	l.selectedIndex=0;
	window.location = "valorizzazioniPrevidenza.aspx?zone_id=44&nav="+val;
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function openNews(id) {
	MM_openBrWindow('newsDettaglio.aspx?item_id='+id,'news','toolbar=no,location=bo,status=no,menubar=no,scrollbars=yes,resizable=no,width=550,height=330');	
}

function consiglioAmministrazione() {
   var w = 550;
   var h = 350;
   var l = Math.floor((screen.width-w)/2);
   var t = Math.floor((screen.height-h)/2);
   window.open("consiglioAmministrazione.aspx","","scrollbars=yes,width=" + w + ",height=" + h + ",top=" + t + ",left=" + l);
}

function grafico() {
   var w = 730;
   var h = 360;
   var l = Math.floor((screen.width-w)/2);
   var t = Math.floor((screen.height-h)/2);
   window.open("grafico.aspx","","scrollbars=yes,width=" + w + ",height=" + h + ",top=" + t + ",left=" + l);
}

function noteLegali() {
   var w = 550;
   var h = 400;
   var l = Math.floor((screen.width-w)/2);
   var t = Math.floor((screen.height-h)/2);
   window.open("noteLegali.aspx","","scrollbars=yes,width=" + w + ",height=" + h + ",top=" + t + ",left=" + l);
}

function privacy() {
   var w = 650;
   var h = 600;
   var l = Math.floor((screen.width-w)/2);
   var t = Math.floor((screen.height-h)/2);
   window.open("privacy.aspx","","scrollbars=yes,width=" + w + ",height=" + h + ",top=" + t + ",left=" + l);
}

function storicoFascicoliInformativi() {
   var w = 550;
   var h = 750;
   var l = Math.floor((screen.width-w)/2);
   var t = Math.floor((screen.height-h)/2);
   window.open("storico-fascicoli-informativi.aspx","","scrollbars=yes,width=" + w + ",height=" + h + ",top=" + t + ",left=" + l);
}
// Questo è lo script che genera e gestisce il tooltip sui link html
//
//
//
//
// 

tooltip = {
	name : "tooltipDiv",
	offsetX : 10,
	offsetY : -35,
	tip : null
};

tooltip.init = function () {
	if (!document.getElementById) return;
	
	// It would be nice to be able to generate the tooltip div, 
	// but when using document.createElement Explorer5/MacOS9, 
	// the tooltip div becomes 100% of the window height.
	// Therefore, we have to use document.getElementById to access
	// a div that is already in the body.
	
	// this.tip = document.createElement ("div");
	// this.tip.setAttribute ("id", this.name);
	// document.body.appendChild (this.tip);
	
	this.tip = document.getElementById (this.name);
	if (this.tip) document.onmousemove = function (evt) {tooltip.move (evt)};
	
	var a;
	var anchors = document.getElementsByTagName ("a");
	for (var i = 0; i < anchors.length; i ++) {
		a = anchors[i];
		if (a.className == "tooltip") {
			a.onmouseover = function () {tooltip.show (this.title)};
			a.onmouseout = function () {tooltip.hide ()};
		}
	}
};
tooltip.move = function (evt) {
	var x=0, y=0;
	if (document.all) {// Explorer
	
		// Explorer5 contains the documentElement object but it's empty, 
		// so we must check if the scrollLeft property is available.
		
		// If Explorer6 is in Quirks mode, the documentElement properties 
		// will still be defined, but they will contain the number 0.
		
		// If Explorer6 is in Standards compliant mode, the document.body 
		// properties will still be defined, but they will contain the number 0.
		
		x = (document.documentElement && document.documentElement.scrollLeft) ? document.documentElement.scrollLeft : document.body.scrollLeft;
		y = (document.documentElement && document.documentElement.scrollTop) ? document.documentElement.scrollTop : document.body.scrollTop;
		x += window.event.clientX;
		y += window.event.clientY;
		
	} else {// Mozilla
		x = evt.pageX;
		y = evt.pageY;
	}
	// If the style property value is not a string containing the unit measurement,
	// browsers in standard compliant mode will not set the property.
	this.tip.style.left = (x + this.offsetX) + "px";
	this.tip.style.top = (y + this.offsetY) + "px";
};
tooltip.show = function (text) {
	if (!this.tip) return;
	this.tip.innerHTML = text;
	// Without the next line, Explorer5/Mac has a redraw problem.
	this.tip.style.visibility = "visible";
	this.tip.style.display = "block";
};
tooltip.hide = function () {
	if (!this.tip) return;
	// Without the next line, Explorer5/Mac has a redraw problem.
	this.tip.style.visibility = "hidden";
	this.tip.style.display = "none";
	this.tip.innerHTML = "";
};

window.onload = function () {
	tooltip.init ();
}

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}
