function amagar_tot(){

	document.getElementById('particulars').style.display = 'none';

	document.getElementById('empreses').style.display = 'none';

}

function particulars(){

	document.getElementById('particulars').style.display = 'block';

	document.getElementById('empreses').style.display = 'none';

}

function empreses(){

	document.getElementById('particulars').style.display = 'none';

	document.getElementById('empreses').style.display = 'block';

}



function comprovar_particulars(idioma){

	//alert(formulari.area.value);

	formulari=document.forms["formulari"];

	if((formulari.nom.value!="")&&(formulari.tel_fix.value!="")&&(formulari.email.value!="")){

		formulari.submit();

	}else{

		if(idioma=="cat"){

			alert("Si us plau ompli tots els camps obligatoris");	

		}else{

			alert("Por favor rellene todos los campos obligatorios");

		}

	}

}

function comprovar_empresa(idioma){

	//alert(formulari.area.value);

	formulari=document.forms["formulari"];

	if((formulari.nom.value!="")&&(formulari.telefon.value!="")&&(formulari.email2.value!="")){

		formulari.submit();

	}else{

		if(idioma=="cat"){

			alert("Si us plau ompli tots els camps obligatoris");	

		}else{

			alert("Por favor rellene todos los campos obligatorios");

		}

	}

}



function comprovar_contacte(idioma){

	//alert(formulari.area.value);
	//try{
		formu=document.forms["formulari"];
	//}catch(e){
	//	alert("NO");	
	//}
//
	if(formu.politica.checked){
		if((formu.nom.value!="")&&(formu.telefon.value!="")&&(formu.email.value!="")&&(formu.comentari.value!="")){	
			formu.submit();	
		}else{	
			if(idioma=="cat"){	
				alert("Si us plau ompli tots els camps obligatoris");		
			}else{	
				alert("Por favor rellene todos los campos obligatorios");	
			}	
		}
	}else{
		if(idioma=="cat"){	
			alert("La pol\u00edtica de privacitat ha de ser acceptada.");		
		}else{	
			alert("La pol\u00edtica de privacidad debe ser aceptada.");	
		}	
	}

}
