function CheckBIOBeneDismesso(form_name, idScheda){

	theForm = document.forms[form_name];
	
	/* DATI DI BASE DEL BENE */
	if (!theForm.idModello)  {
		alert ("Selezionare la classe o il produttore per visualizzare e selezionare il modello")
		return false;
	}
	
	if (theForm.idModello.value == "")  {
		alert ("Selezionare il modello del bene")
		theForm.idModello.focus()
		return false;
	}
	
	if (theForm.idUtenteEspositore)  {
		if (theForm.idUtenteEspositore.value == "")  {
			alert ("Selezionare il donatore")
			theForm.idUtenteEspositore.focus()
			return false;
		}
	}
	
	if (theForm.Quantita.value == "")  {
		alert ("Specificare le quantita' del bene disponibile")
		theForm.Quantita.focus()
		theForm.Quantita.select()
		return false;
	}
	
	if (theForm.Quantita.value *1 < theForm.QuantitaOccupate.value*1)  {
		alert ("La quantita' disponibile non puo' essere inferiore alla somma dei pezzi assegnati e dei pezzi in fase di assegnazione")
		theForm.Quantita.focus()
		theForm.Quantita.select()
		return false;
	}
	
	if (theForm.AnnoAcquisto.value == "")  {
		alert ("Specificare l'anno di acquisto del bene")
		theForm.AnnoAcquisto.focus()
		theForm.AnnoAcquisto.select()
		return false;
	}	
	
	if (theForm.AnnoDismissione.value == "")  {
		alert ("Specificare l'anno e il mese presunto di dismissione del bene!")
		theForm.AnnoDismissione.focus()
		return false;
	}	
	if (theForm.MeseDismissione.value == "")  {
		alert ("Specificare l'anno e il mese presunto di dismissione del bene!")
		theForm.MeseDismissione.focus()
		return false;
	}					
	
	if (theForm.MotivoDismissione.value == "")  {
		alert ("Specificare il motivo di dismissione del bene")
		theForm.MotivoDismissione.focus()
		theForm.MotivoDismissione.select()
		return false;
	}	
	
	if (theForm.NoteUtilizzo.value == "")  {
		alert ("Inserire annotazioni sull'utilizzo del bene")
		theForm.NoteUtilizzo.focus()
		theForm.NoteUtilizzo.select()
		return false;
	}	
	
	if (theForm.Reparto.value == "")  {
		alert ("Indicare il reparto in cui e' stato usato il bene")
		theForm.Reparto.focus()
		theForm.Reparto.select()
		return false;
	}	
	
	if (theForm.Ubicazione.value == "")  {
		alert ("Indicare l'ubicazione del bene una volta dismesso")
		theForm.Ubicazione.focus()
		theForm.Ubicazione.select()
		return false;
	}
		
	/* SCHEDA MACCHINARIO */
	if ( getCheckedValue(theForm.Riparazioni)=='' ) {
		alert("Indicare se il bene richiede riparazioni");
		theForm.Riparazioni[0].focus()
		return false;				
	}	
	
	if ( getCheckedValue(theForm.Accessori)=='' ) {
		alert("Indicare se il bene necessita di accessori/componenti che ne supportano l'utilizzo");
		theForm.Accessori[0].focus()
		return false;				
	}	
	
	if ( getCheckedValue(theForm.ManualeUtente)=='' ) {
		alert("Indicare l'esistenza del manuale utente");
		theForm.ManualeUtente[0].focus()
		return false;				
	}	
	
	if ( getCheckedValue(theForm.ManualeService)=='' ) {
		alert("Indicare l'esistenza del manuale di service");
		theForm.ManualeService[0].focus()
		return false;				
	}	
	
	if ( getCheckedValue(theForm.ManualeSchedaTecnica)=='' ) {
		alert("Indicare l'esistenza del manuale scheda tecnica");
		theForm.ManualeSchedaTecnica[0].focus()
		return false;				
	}
	
	if ( getCheckedValue(theForm.ManualeSchemiElettrici)=='' ) {
		alert("Indicare l'esistenza del manuale schemi elettrici");
		theForm.ManualeSchemiElettrici[0].focus()
		return false;				
	}	
		
	if ( getCheckedValue(theForm.Smontaggio)=='' ) {
		alert("Indicare l'esistenza del manuale schemi elettrici");
		theForm.Smontaggio[0].focus()
		return false;				
	}	
	
	if ( getCheckedValue(theForm.LocaliAdeguati)=='' ) {
		alert("Indicare l'esistenza del manuale schemi elettrici");
		theForm.LocaliAdeguati[0].focus()
		return false;				
	}	
		
	if (theForm.DimensioniH.value == "" || theForm.DimensioniL.value == "" || theForm.DimensioniP.value == "")  {
		alert ("Indicare approssimativamente le dimesioni del bene")
		theForm.DimensioniH.focus()
		theForm.DimensioniH.select()
		return false;
	}
	
	if (theForm.Peso.value == "")  {
		alert ("Indicare approssimativamente il peso del bene in Kg")
		theForm.Peso.focus()
		theForm.Peso.select()
		return false;
	}
	
	if (idScheda=='') {
		return true;
	} else {	
		InviaDati(form_name,'update/BIO_bene_dismesso.asp',idScheda,'BIO_bene_dismesso',null,null);
		show(idScheda); //nasconde la scheda
	}
															

}
