

function openMessage(error,div,marginTop,closable){
	
		 var errore = error;
     	 
		 if(errore!="" && errore != null){
         
		 var larghezzaMonitor=window.screen.width;
		 var altezzaMonitor=window.screen.height;
     	 var erroreMessaggio = "<div id='erroreMessaggio'>" +  errore  + "</div>";
		 var chiudiButton ="";
		 
		 if (closable == true) {
		 	chiudiButton = "<button  onclick='closeWindow(\"" + div + "\")' class='button'> Chiudi </button>";
		 }
		 
		 var popUp = "<div id='popUp'> <div id='bgError'>"+ erroreMessaggio + chiudiButton + " </div> </div>";
		 document.getElementById(div).innerHTML=popUp;
		 
		 
		 if(errore!=""||esito!=""){
   			changePositionMessage('popUp',marginTop);
     	 }
    
     
		 
		 }
		
		
		 
	}
	
	
	
function changePositionMessage(div,marginTop){
       document.getElementById(div).style.marginTop=marginTop+"px";
   } 
		 
	



function closeWindow(div){
	document.getElementById(div).innerHTML="";
}



//questo non è usato 
function confPopUp(){
//configurazione della finestra che si apre
var larghezzaMonitor=window.screen.width;
var altezzaMonitor=window.screen.height;
window.moveTo(larghezzaMonitor/2-385/2,altezzaMonitor/2-275/2);
}


function disableSubmit(idSubmitInput){
	try{
		document.getElementById(idSubmitInput).style.visibility='hidden';
	}
	catch(e){
		
	}
}
function enableSubmit(idSubmitInput){
	try{
		document.getElementById(idSubmitInput).style.visibility='visible';
		//alert(document.getElementById(idSubmitInput).disabled);
	}
	catch(e){
		
	}
}

