// JavaScript Document

function enviarform()
{
//alert ("Hello World");
	if (document.form.direccion.value==''){
		alert("Ompli la direcció");return false;
	}else if (document.form.mensaje.value==''){
		alert("Ompli el MIssatge");return false;
	}else if (document.form.mail.value==''){
		alert("Ompli el Email");return false;
	}else if (document.form.apellidos.value==''){
		alert("Ompli els cognoms");return false;
	}else if (document.form.nombre.value==''){
		alert("Omli en nom");return false;
	}else if (document.form.telefono.value==''){
		alert("Omli en telèfon");return false;
	}else {

	//document.formulario.action = "form/"+archivo+".php";
	//alert ("submit");
	//document.form.action = "/php/enviar.php";
	//document.form.submit();
		return true;
	}
}


jQuery(document).ready(function(){
	if (GBrowserIsCompatible()) { 
		var lloc = new GClientGeocoder(); 
		lloc.getLatLng('41.142015, 1.128652',function (punt){ 
			var map = new GMap2(document.getElementById("mapGoogle")); 
			map.addControl(new GLargeMapControl());
			map.addControl(new GMapTypeControl()); 
			map.setCenter(punt,15); 
			var marker = new GMarker(punt); 
			map.addOverlay(marker); 
			marker.openInfoWindowHtml('<strong>FIRA DE REUS</strong><br>Avinguda Bellisens, 40<br>43204 Reus<br>'); 
			jQuery("a.gmnoprint").attr("target","_blank"); }); 
		}
	
	});
