<!--
function newWindows(bookgif,Larghezza,Altezza,Mytop,Myleft,MyTitle) {
		if (screen) {
			if (Larghezza==-1) {
				Larghezza=screen.width - 12
				}
			if (Altezza==-1) {
				Altezza=screen.height - 50
				}
		}
		else {
			Larghezza=500
			Altezza=400
		}
		
		 bookWindow=window.open("",'bookwin','resizable,width=' + Larghezza + ',height=' + Altezza + ',top=' + Mytop + ',left=' + Myleft + '')
		 bookWindow.document.close();
 		 bookWindow.document.open();
		 bookWindow.document.write();
		 bookWindow.resizeTo(Larghezza+12,Altezza+30);
		 bookWindow.document.write("<HEAD><TITLE>" + MyTitle + "</TITLE></HEAD>");
		 bookWindow.document.write("<body leftmargin='0' topmargin='0' marginwidth='0' marginheight='0'> <img src=" + bookgif + "> </body>");
		 bookWindow.focus()
		 
}
function newWindows2(bookgif,Larghezza,Altezza,Mytop,Myleft,MyTitle) {
		if (screen) {
			if (Larghezza==-1) {
				Larghezza=screen.width - 12
				}
			if (Altezza==-1) {
				Altezza=screen.height - 50
				}
		}
		else {
			Larghezza=500
			Altezza=400
		}
		
		 bookWindow=window.open(bookgif,'bookwin','resizable,width=' + Larghezza + ',height=' + Altezza + ',top=' + Mytop + ',left=' + Myleft + '')
		 bookWindow.focus()
}	

function formCheck(formobj,ArrayCampi){
	// Enter name of mandatory fields
	//var fieldRequired = Array("nome", "cognome");
	var fieldRequired = ArrayCampi;
	// Enter field description to appear in the dialog box
	// var fieldDescription = Array("nome", "cognome");
	var fieldDescription = ArrayCampi;
		
	// dialog message
	var alertMsg = "Compila i seguenti campi:\n";
	
	var l_Msg = alertMsg.length;
	
	for (var i = 0; i < fieldRequired.length; i++){
		var obj = formobj.elements[fieldRequired[i]];
		if (obj){
			switch(obj.type){
			case "select-one":
				if (obj.selectedIndex == -1 || obj.options[obj.selectedIndex].text == ""){
					alertMsg += " - " + fieldDescription[i] + "\n";
				}
				break;
			case "select-multiple":
				if (obj.selectedIndex == -1){
					alertMsg += " - " + fieldDescription[i] + "\n";
				}
				break;
			case "text":
			case "textarea","password":
				if (obj.value == "" || obj.value == null){
					alertMsg += " - " + fieldDescription[i] + "\n";
				}
				break;
			default:
			}
			if (obj.type == undefined){
				var blnchecked = false;
				for (var j = 0; j < obj.length; j++){
					if (obj[j].checked){
						blnchecked = true;
					}
				}
				if (!blnchecked){
					alertMsg += " - " + fieldDescription[i] + "\n";
				}
			}
		}
	}

	if (alertMsg.length == l_Msg){
		return true;
	}else{
		alert(alertMsg);
		return false;
	}
}

function procedo(messaggio,newlink) {
	var risposta;
	risposta=confirm(messaggio);
	if (risposta)
		document.location.href=newlink;
	else
		return false;
}
//-->

