function CheckForm(form){

var booReturn = true;
//array campi non compilati
arr_no_sel = new Array();

//controllo inserimento dati utente
/*
nome_cognome
cod_fisc
rif_tel
titolo_studio
professione
*/

el = document.agora1;

//setta in bianco i dati utente
el.nome_cognome.className='noalertTd';
el.cod_fisc.className='noalertTd';
el.rif_tel.className='noalertTd';
el.titolo_studio.className='noalertTd';
el.professione.className='noalertTd';

if(el.nome_cognome.value==''){
	alert('Per favore inserire un Nome e Cognome o Ragione sociale nell\'apposito campo');
	document.agora1.nome_cognome.focus();
	document.agora1.nome_cognome.className='alertTd';
	booReturn = false;
}else if(el.cod_fisc.value==''){
	alert('Per favore inserire il Codice Fiscale o Partita IVA nell\'apposito campo');
	document.agora1.cod_fisc.focus();
	document.agora1.cod_fisc.className='alertTd';
	booReturn = false;
}else if(el.rif_tel.value==''){
	alert('Per favore inserire un riferimento telefonico nell\'apposito campo');
	document.agora1.rif_tel.focus();
	document.agora1.rif_tel.className='alertTd';
	booReturn = false;
}else if(el.titolo_studio.value==''){
	alert('Per favore inserire il proprio titolo di studio nell\'apposito campo');
	document.agora1.titolo_studio.focus();
	document.agora1.titolo_studio.className='alertTd';
	booReturn = false;
}else if(el.professione.value==''){
	alert('Per favore inserire la professione nell\'apposito campo');
	document.agora1.professione.focus();
	document.agora1.professione.className='alertTd';
	booReturn = false;
}else{

//controllo campi MODULO1

for(i=6; i<document.agora1.elements.length-1; i=i+3){
	//document.write("The field name is: " + document.agora1.elements[i].name + " and it’s value is: " + document.agora1.elements[i].value + ".<br />");
	
	//nome elemento
	elem_n = document.agora1.elements[i].name;
	elem = document.agora1.elements[elem_n];
	//valore elemento
	//val = document.agora1.elements[i].value;
	
	//controlla tutti gli elementi del singolo gruppo
	control=false;
	for(j=0; j<3; j++) {
		if(elem[j].checked) control=true;
	}
		
	if(control == false){
		//alert(elem_n + ' non è selezionato');
		arr_no_sel.push(elem_n);
	}
}

//tot elementi non selezionati
//alert(arr_no_sel.length);
if(arr_no_sel.length>0){
	alert('Tutti gli elementi del modulo "Conoscenza ed Esperienza di Prodotti e Strumenti Finanziari" sono obbligatori.\n\nPer favore compilare tutti i campi');
		
	//setta tutti gli sfondi a bianco
	for(noi=6; noi<document.agora1.elements.length-1; noi=noi+3){
		elem_noo = document.agora1.elements[noi].name;
		
		for(noj=1; noj<4; noj++) {
			elem_no = elem_noo+''+noj;
			//alert(elem_no);
			elem_no=document.getElementById(elem_no);
			elem_no.className='noalertTd';
		}
	}
	
	
	//crea sfondo giallo alle 3 celle corrispondenti
	for(e=0;e<arr_no_sel.length;e++){
		for(z=1; z<4; z++){
			el_mod=arr_no_sel[e]+''+z;			
			el_mod=document.getElementById(el_mod);
			el_mod.className='alertTd';
		}
	}
	booReturn = false;
}else booReturn = true;

}

return booReturn;
}

function change_vis(blc) 
{
	//alert(scelta);
	//document.getElementById('print_p').style.dislpay = scelta;
	if(document.getElementById(blc).style.display == "none") document.getElementById(blc).style.display = "block";
	else document.getElementById(blc).style.display = "none";
}
