function InserisciImperdibile(){
	window.location.href="imperdibile_form.asp?cod=I";
}

function Menu(){
	window.location.href="imperdibilemenu.asp";
}

function Cerca(){
	window.location.href="imperdibilemenu.asp";
}
function Valida() {
	var messaggio;
	var errorfound;
	
	errorfound = false;
	
	if ( (window.document.frmimperdibile.txtTesiID.value)=="" && !errorfound ) {
		errorfound = true;
		messaggio = "Il numero della tesiè obbligatorio";
	}
	if ((window.document.frmimperdibile.selGiorno.value)=="" && !errorfound ) {
		errorfound = true;
		messaggio = "Il giorno di pubblicazione è obbligatorio";
	}
	if ((window.document.frmimperdibile.selMese.value)=="" && !errorfound ) {
		errorfound = true;
		messaggio = "Il mese di pubblicazione è obbligatorio";
	}
	if ((window.document.frmimperdibile.txtAnno.value)=="" && !errorfound ) {
		errorfound = true;
		messaggio = "L'anno di pubblicazione è obbligatorio";
	}
	if ((window.document.frmimperdibile.txtTitolo.value)=="" && !errorfound ) {
		errorfound = true;
		messaggio = "Il titolo è obbligatorio";
	}
	if ((window.document.frmimperdibile.txtTesto.value)=="" && !errorfound ) {
		errorfound = true;
		messaggio = "Il testo è obbligatorio";
	}
	if (errorfound) {
		alert(messaggio)
	}
	else {
		window.document.frmimperdibile.submit();
	}
}

function CercaImperdibile(){
	window.document.frmCerca.submit();
}

function elimina() {
  if (confirm("Eliminare definitivamente i dati relativi\nalla tesi imperdibile ID: " + window.document.frmimperdibile.ID.value + " ?")) {
    window.document.frmimperdibile.cod.value="E";
    window.document.frmimperdibile.submit();
  }
}