function ValidateInserts(vForm) {

	var TmpStr;
	var NumLabel;
	
	for (NumLabel in vForm) {
		TmpStr = NumLabel.value;
		TmpStr = TmpStr.slice(1, 1);
		if (TmpStr == "A") {
			TmpStr = NumLabel.value;
			TmpStr = TmpStr.slice(2);
			if (vForm.elements["A" . TmpStr].value != vForm.elements["B" . TmpStr].value) {
				return false;
			}
		}
	}
	
	return false;
	
}

//Richiede la conferma prima di un'operazione
function AskConfirm(vText) {

	action = confirm(vText);
	
	if (action) {
		return true;
	}
	
	return false;
	
}

//Esegue il post del modulo ForStrangers 
function FS_Post()
{

	action = confirm("Confermare l'inserimento?");
	if (!action) {
		return false;
	}
	
	document.getElementById('btn_confirm').value = "Invio in corso...";
    document.btn_confirm.disabled = true;
    
    document.modulo.method = "post";
    document.modulo.action = "-ht_candidate_insertforstrangers.php";
    document.modulo.submit();

}

//Esegue il post del modulo ForStrangers senza controllare i dati
function FS_Post_NoControl()
{

	action = confirm("Confermare l'inserimento?");
	if (!action) {
		return false;
	}
	
	//document.getElementById('btn_confirm').value = "Invio in corso...";
    //document.btn_confirm.disabled = true;
    
    document.modulo.method = "post";
    document.modulo.action = "ht_candidate_insertforstrangers.php";
    document.modulo.submit();
    return true;

}
