function conferma_elimina(url){
	if(confirm("Conferma")){
		window.document.location.href=url;
  }
}

var myPopup;
function popup(url,h,w){
 if (popup.arguments[1]){
 	myWidth=popup.arguments[1];
 }
 else
  myWidth=w;
 if (popup.arguments[2]){
  myHeight=popup.arguments[2];
 }
 else
  myHeight=h;
	if(screen.width > myWidth){
    myLeft=(screen.width-myWidth)/2;
 }
 if(screen.height > myHeight){
    myTop=(screen.height-myHeight)/2;
 }
 if(myPopup){
    myPopup.close();
 }
 myPopup=window.open(url,'myWin','toolbar=no,status=no,resizable=yes,menubar=no,scrollbars=yes,width='+myWidth+',height='+myHeight+',top='+myTop+',left='+myLeft+'');
 myPopup.focus();
 return myPopup;
}

function startList() {

	// code for IE
	if(!document.body.currentStyle) return;
	var subs = document.getElementsByName('submenu');
	for(var i=0; i<subs.length; i++) {
		var li = subs[i].parentNode;
		if(li && li.lastChild.style) {
			li.onmouseover = function() {
				this.lastChild.style.visibility = 'visible';
			}
			li.onmouseout = function() {
				this.lastChild.style.visibility = 'hidden';
			}
		}
	}
}

window.onload=startList;

//Function gallery
var win = null; 
function NewWindow(mypage,myname,w,h,scroll,tool){ 
	//LeftPosition = (screen.width) ? (screen.width-w)/2 : 0; 
	//TopPosition = (screen.height) ? (screen.height-h)/10 : 0; 
	LeftPosition = 50;
	TopPosition = 7;
	settings = 'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',status='+tool+''; 
	win = window.open(mypage,myname,settings) 
} 
