<!--

function popup(url,width,height)
	{
	var Win = window.open(url,"openScript",'width=' + width + ',height=' + height + ',resizable=0,scrollbars=no,menubar=no,navigation toolbar=no,status=no, top=0, left=0');
	Win.focus() ;
	}


function PrendiElementoDaId(id_elemento)
	{
	var elemento;
	if(document.getElementById)
		elemento = document.getElementById(id_elemento);
	else
		elemento = document.all[id_elemento];
	return elemento;
	}

	
	
function visualizza_img(immagine,width,height) {
	if(immagine!='')
		PrendiElementoDaId('immagine_top').innerHTML = '<a href="javascript:popup(\'popimage.php?image=layout/upload/' + immagine + '\', ' + width + ', ' + height + ')"><img src="imagemagic.php?dim=2&immagine=' + immagine + '" alt="" title="" /></a>';

		//PrendiElementoDaId('immagine_top').innerHTML = '<img src="imagemagic.php?dim=2&immagine=' + immagine + '" alt="" title="" />';
		//PrendiElementoDaId('immagine_top').innerHTML = '<img src="layout/upload/' + immagine + '" width="' + width + '" height="' + height + '" alt="" title="" />';
	}


function Apri(str,nome,width,height) {
    window.open(str, nome, 'width='+width+',height='+height+',scrollbars=no,status=no,location=no,toolbar=no');
}






//script per menu
var menuids=["suckertree1"] //Enter id(s) of SuckerTree UL menus, separated by commas

function buildsubmenus(){
for (var i=0; i<menuids.length; i++){
  var ultags=document.getElementById(menuids[i]).getElementsByTagName("ul")
    for (var t=0; t<ultags.length; t++){
    ultags[t].parentNode.getElementsByTagName("a")[0].className="subfolderstyle"
		if (ultags[t].parentNode.parentNode.id==menuids[i]) //if this is a first level submenu
			ultags[t].style.left=ultags[t].parentNode.offsetWidth+"px" //dynamically position first level submenus to be width of main menu item
		else //else if this is a sub level submenu (ul)
		  ultags[t].style.left=ultags[t-1].getElementsByTagName("a")[0].offsetWidth+"px" //position menu to the right of menu item that activated it
    ultags[t].parentNode.onmouseover=function(){
    this.getElementsByTagName("ul")[0].style.display="block"
    }
    ultags[t].parentNode.onmouseout=function(){
    this.getElementsByTagName("ul")[0].style.display="none"
    }
    }
		for (var t=ultags.length-1; t>-1; t--){ //loop through all sub menus again, and use "display:none" to hide menus (to prevent possible page scrollbars
		ultags[t].style.visibility="visible"
		ultags[t].style.display="none"
		}
  }
}

if (window.addEventListener)
window.addEventListener("load", buildsubmenus, false)
else if (window.attachEvent)
window.attachEvent("onload", buildsubmenus)


//===============================
// apertura pop-up pagine con scrollbars
//===============================

function ApriScroll(str,nome,width,height) {
    window.open(str, nome, 'width='+width+',height='+height+',scrollbars=yes,status=no,location=no,toolbar=no');
}
-->



