function showCitaForm(){
	document.getElementById('tab_cita').style.display='block';
	document.getElementById('a_cita').className='on';
	
	document.getElementById('tab_info').style.display='none';
	document.getElementById('a_info').className='';
}
function showInfoForm(){
	document.getElementById('tab_info').style.display='block';
	document.getElementById('a_info').className='on';
	
	document.getElementById('tab_cita').style.display='none';
	document.getElementById('a_cita').className='';
}
function validateCita(){
	citaNome = document.getElementById('citaNome').value;
	if (!citaNome) {
		document.getElementById('citaNome').focus();
		alert('Il campi Nome é obbligatori');
		return false;
	}
	citaCognome = document.getElementById('citaCognome').value;
	if (!citaCognome) {
		document.getElementById('citaCognome').focus();
		alert('Il campi Cognome é obbligatori');
		return false;
	}
	citaTelefono = document.getElementById('citaTelefono').value;
	if (isNaN(citaTelefono)) {
		document.getElementById('citaTelefono').focus();
		alert('Il campi Telefono é obbligatori');
		return false;
	}
	citaEmail = document.getElementById('citaEmail').value;
	if (!(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,4})+$/.test(citaEmail))) {
		document.getElementById('citaEmail').focus();
		alert('Il campi E-mail é obbligatori');
		return false;
	}
	citaCheckbox = document.getElementById('citaCheckbox').checked;
	if (!citaCheckbox) {
		document.getElementById('citaCheckbox').focus();
		alert('Deve accettare le condizioni');
		return false;
	}
	document.getElementById('cita').submit();
}
function validateInfo(){
	infoNome = document.getElementById('infoNome').value;
	if (!infoNome) {
		document.getElementById('infoNome').focus();
		alert('Il campi Nome é obbligatori');
		return false;
	}
	infoCognome = document.getElementById('infoCognome').value;
	if (!infoCognome) {
		document.getElementById('infoCognome').focus();
		alert('Il campi Cognome é obbligatori');
		return false;
	}
	infoTelefono = document.getElementById('infoTelefono').value;
	if (isNaN(infoTelefono)) {
		document.getElementById('infoTelefono').focus();
		alert('Il campi Telefono é obbligatori');
		return false;
	}
	infoEmail = document.getElementById('infoEmail').value;
	if (!(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,4})+$/.test(infoEmail))) {
		document.getElementById('infoEmail').focus();
		alert('Il campi E-mail é obbligatori');
		return false;
	}
	infoCheckbox = document.getElementById('infoCheckbox').checked;
	if (!infoCheckbox) {
		document.getElementById('infoCheckbox').focus();
		alert('Deve accettare le condizioni');
		return false;
	}
	document.getElementById('info').submit();
}
