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){
			alert(eltexte+noms[i]);
			document.getElementById(camps[i]).focus();
			correcte=0;
		}
	}
	
	if(correcte){
		if(confirm(frase)) correcte=1;
		else correcte=0;
	}
	
	if(correcte){
		cargar(1,'Cargando ');
		return true
	}else return false;
}

//<![CDATA[
function load() {
	if (GBrowserIsCompatible()) {
		var icon = new GIcon();
		icon.image = 'http://www.granemmt.com/img/logomapa.png';
		icon.iconSize = new GSize(100, 20);
		icon.iconAnchor = new GPoint(0, 0);
		icon.infoWindowAnchor = new GPoint(0,0);
		var direccion = "<span class='colortar12'>\
		<b>GRANE MMT MAQUINARIA MOVIMIENTO DE TIERRA</b><br />\
		Pol. Ind. Can Prat / C. Palautordera, Nau 25<br />\
		08450 - Llinars del Valles, Barcelona<br />\
		<br />\
		</span>";
		var marcador = new GMarker(new GLatLng(41.659864,2.433085),icon); 
		GEvent.addListener(marcador, 'click', function(){marcador.openInfoWindowHtml(direccion);});
		var map = new GMap2(document.getElementById("map"));
		map.setCenter(new GLatLng(41.659864,2.433085), 15); 
		map.setMapType(G_NORMAL_MAP);
		map.addControl(new GSmallMapControl());
		map.addOverlay(marcador);
		marcador.openInfoWindowHtml(direccion);
	}
}
//]]>
function obrirSubmenu(capa){
	document.getElementById(capa).style.position='relative';
	document.getElementById(capa).style.visibility='visible';
	document.getElementById('link_'+capa).className='submenuON';
	document.getElementById('mes_'+capa).src=mesoff.src;
}
