function ok() {

	var sema;
	var i;
	sema='';
	for (i=0;i<=8;i++)
	{
		if (document.forms[0].OptAbb[i].checked==true) {
			sema = 'x';
		}
	}

	if (sema == '') {
		alert('Selezionare un tipo di abbonamento');
		return false	
	}
	if ((document.forms[0].Com_ragionesociale.value == '') && (document.forms[0].Com_nominativo.value == '')) {
		alert('Inserisca la Ragione Sociale o il Suo Nome e Cognome');
		return false
	}
	
	if (document.forms[0].Com_ragionesociale.value != '') {
		if (document.forms[0].Com_iva.value == '') {
			alert('Inserisca la Sua Partita IVA');
			return false	
		}	
	}	
	if (document.forms[0].Com_ragionesociale.value == '') {
		if (document.forms[0].Com_iva.value != '') {
			alert('La Partita IVA deve essere inserito soltato dalle società');
			document.forms[0].Com_iva.value = '';
			return false	
		}	
	}	
	if (document.forms[0].Com_cf.value == '') {
		alert('Inserire il Codice Fiscale');
		return false	
	}			
	
	if (document.forms[0].Com_iva.value != '') {
		if (document.forms[0].Com_iva.value.length != 11) {
			alert('Il campo partita Iva deve essere di 11 caratteri');
			return false
		}
	}
	if (document.forms[0].Com_cf.value != '') {
		if ((document.forms[0].Com_cf.value.length != 16) && (document.forms[0].Com_cf.value.length != 11))  {
			alert('Il campo Codice Fiscale deve essere di 11 o 16 caratteri');
			return false
		}
	}	
	if (document.forms[0].Com_email.value == '') {
		alert('Inserisca il suo indirizzo email');
		return false	
	}	
	if (document.forms[0].Com_email2.value == '') {
		alert('Confermi il suo indirizzo email');
		return false	
	}	
	if (document.forms[0].Com_email2.value != document.forms[0].Com_email.value) {
		alert('Indirizzi email non uguali');
		return false	
	}		
	if (document.forms[0].Com_via.value == '') {
		alert('Inserisca la via o il Suo Indirizzo');
		return false	
	}
	if (document.forms[0].Com_cap.value == '') {
		alert('Inserisca il Suo C.A.P.');
		return false	
	}
	
	if (document.forms[0].Com_loc.value == '') {
		alert('Inserisca la Sua Località');
		return false	
	}	
	if (document.forms[0].Com_pr.value == '') {
		alert('Inserisca la Sua Provincia');
		return false	
	}		
	if (document.forms[0].Com_tipodoc[0].selected == true) {
		alert('Selezioni il Suo Documento');
		return false	
	}		
	if (document.forms[0].Com_ndoc.value == '') {
		alert('Inserisca il Numero Documento');
		return false	
	}	
	if ((document.forms[0].Com_gg.value == '') || (document.forms[0].Com_mm.value == '') || (document.forms[0].Com_aaaa.value == '')){
		alert('Inserire la Data di Rilascio del Documento');
		return false	
	}	
	if (document.forms[0].Com_enterilascio.value == '') {
		alert("Inserisca l'Ente che ha rilasciato il Documento");
		return false	
	}	
	if (document.forms[0].Com_tel.value == '') {
		alert('Inserisca il Suo Numero di Telefono');
		return false	
	}					
		
		
	if (document.forms[0].ChkCondizioni.checked == false) {
		alert('Non sono state accettate le Condizioni Contrattuali');
		return false	
	}		
	if (document.forms[0].ChkPrv.checked == false) {
		alert('Non sono state accettate le Condizioni per il Trattamento dei Dati Personali');
		return false	
	}			
return true;
}       

