<!--
function checkform(){

  var theForm = document.getElementById('miniform');
  
  // Seleziono l'action del Form in base al tipo di prestito richiesto
  if (document.getElementById('prtype_pr').checked == true) { 
  	  document.getElementById('miniform').action="http://www.prestitinlinea.it/prestitonline/preventivo/prestiti-personali/prestiti-personali-prestito-preventivo-online.php";
	  //alert ("Prestito");
  }
  else if (document.getElementById('prtype_mu').checked == true) { 
	  document.getElementById('miniform').action="http://www.prestitinlinea.it/prestitonline/preventivo/mutui-online/mutui-online-prestito-preventivo-online.php";  	
	  //alert ("Mutuo");
  }
  else if (document.getElementById('prtype_cq').checked == true) { 
	  document.getElementById('miniform').action="http://www.prestitinlinea.it/prestitonline/preventivo/cessione-del-quinto/cessione-del-quinto-prestito-preventivo-online.php";
	  //alert ("Cessione");
  }
  
  // Importo Richiesto non è obbligatorio, ma se è stato inserito deve essere un numero intero
  if (theForm.ImpRich.value.length > 0)
  {
    var re = /^[0-9]+$/;
	if (!re.test( theForm.ImpRich.value )) {
    	alert("Campo \"importo richiesto\": utilizzare solo le cifre 0-9, non inserire decimali, separatori di migliaia o spaziature");
		theForm.ImpRich.focus();
    	return (false);
	}
  }

  // La professione deve essere specificata
  if (theForm.IDProf.selectedIndex == 0)
  {
    alert("Selezionare una delle opzioni di \"professione\".");
    theForm.IDProf.focus();
    return (false);
  }

  // Se è tutto ok, il form può essere inviato
  // alert ('x: ' + document.getElementById('miniform').action);
  theForm.submit();

}


//-->
