/*------------- Conferma ------------------------*/
function conferma(){
	return confirm("Sei sicuro ?");
	}

/*------------- Gestione menu a tendina --------------------------------*/
function Menu(links) {
  window.location.href = links[links.selectedIndex].value;
   
}
/*--------------- controlla la tessera uisp ----------*/
function controlla(cognome,nome,codice){
	
	ne=true;
	msg="";
	if (cognome==""){
		ne=false;
		msg=msg+"- manca il cognome \n";
		}
	if (nome==""){
		ne=false;
		msg=msg+"- manca il nome \n";
		}
	if (codice==""){
		ne=false;
		msg=msg+"- manca il codice \n";
		}
		//alert(msg);
	if (ne==true){
		w=1;
		h=1;
		var l = Math.floor((screen.width-w)/2);
  		var t = Math.floor((screen.height-h)/2);
		stile="width="+w+",top="+t+",left="+l+",height="+h+", menubar=no, toolbar=no scrollbar=no,resizable=no";
		pagina='uispcheck.asp?cognome='+cognome+'&nome='+nome+'&codice='+codice;
		//alert(stile);
		window.open(pagina,'pippo',stile);
		
		}
	else{
		alert(msg);
		return false;
		}
	
	}
	

/*------------- Gestione finestre popup --------------------------------*/
  var stile = "top=50, left=10,width=640,height=515, menubar=no, toolbar=no scrollbar=no,resizable=no";
  var nome = "fotografie";
     function Popup(apri) {
        window.open(apri, nome, stile);
     }
function scrollpopup(mypage,myname,w,h){
   var l = Math.floor((screen.width-w)/2);
   var t = Math.floor((screen.height-h)/2);
      window.open(mypage,myname,"width=" + w + ",height=" + h + ",top=" + t + ",left=" + l+",scrollbars=yes,resizable=yes,menubar=no,toolbar=no,status=no,titlebar=no");
}

/* ------------ apertura popup -----------------------------------------*/

function apri(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}
/*------------ gestione menu a scomparsa -------------------------------*/
function HideDiv(ID){
	document.getElementById(ID).style.display='none';
}
		
function ShowDiv(ID){
	document.getElementById(ID).style.display='';
	}