// Funzione che espande un div //

function THISonTHAToff(code) {

	var x = code.split("_");
    x = x[0];
    ff = document.getElementsByTagName(x);
    for (i = 0; i < ff.length; i++) {
		if (ff[i].id.substr(0,3)=="div") {
			ff[i].style.display = "none";
		}
    }	
    for (i = 0; i < ff.length; i++) {
        if (ff[i].id == code) {
            if (ff[i].style.display == "none") {
                ff[i].style.display = "";
            }
        }
    }
}

function THISonTHISoff(code) {
    var x = code.split("_");
    x = x[0];
    ff = document.getElementsByTagName(x);
    for (i = 0; i < ff.length; i++) {
        if (ff[i].id == code) {
            if (ff[i].style.display == "") {
                ff[i].style.display = "none";
            } else
            if (ff[i].style.display == "none") {
                ff[i].style.display = "";
            }
        }
    }
}

// Funzione che apre la popup //

function Popup(url, stile) {
	window.open(url, "", stile);
	}
	
function openNewPopup(url) 
{
	var d = new Date();
	window.open(url, "myPop_"+d.getTime(), "width=1010, height=600, toolbar=yes,status=yes,scrollbars=yes,location=yes,menubar=yes,directories=yes, resizable=yes");
}
	
// showHideLayers //
<!--
function MM_showHideLayers() { //v9.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) 
  with (document) if (getElementById && ((obj=getElementById(args[i]))!=null)) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}
//-->
