function comprovacio(camps,noms,eltexte,frase){
	camps=camps.split(',');
	noms=noms.split(',');
	correcte=1;

	for(i=0;i<(camps.length-1);i++){
		if(!document.getElementById(camps[i]).value || document.getElementById(camps[i]).value==noms[i]){
			alert(eltexte+noms[i]);
			document.getElementById(camps[i]).focus();
			correcte=0;
			return false;
		}
	}

	if(correcte){
		if(confirm(frase)) correcte=1;
		else correcte=0;
	}

	if(correcte){
		return true
	}else return false;
}

function load() {
      if (GBrowserIsCompatible()) {
      	var icon = new GIcon();
		icon.image = 'templates/web/img/logomaps.png';
		icon.iconSize = new GSize(89, 95);
		icon.iconAnchor = new GPoint(25, 105);
		icon.infoWindowAnchor = new GPoint(5, 1);


		//GEvent.addListener(marcador, 'click', function(){marcador.openInfoWindowHtml(direccion);});

    var map = new GMap2(document.getElementById("map"));
      map.setCenter(new GLatLng(41.647246,2.271252), 15);
     // map.setMapType(G_NORMAL_MAP);
			map.addControl(new GSmallMapControl());
			map.addControl(new GMapTypeControl());
			var marcador = new GMarker(map.getCenter(),icon);

			map.addOverlay(marcador);
    }
}