function mostrarIdiomes(idioma){
	document.getElementById('flexa_esp').style.visibility='hidden';
	document.getElementById('bandera_esp').style.visibility='hidden';
	document.getElementById('flexa_fra').style.visibility='hidden';
	document.getElementById('bandera_fra').style.visibility='hidden';
	document.getElementById('flexa_eng').style.visibility='hidden';
	document.getElementById('bandera_eng').style.visibility='hidden';
	document.getElementById('flexa_deu').style.visibility='hidden';
	document.getElementById('bandera_deu').style.visibility='hidden';
	document.getElementById('flexa_'+idioma).style.visibility='visible';
	document.getElementById('bandera_'+idioma).style.visibility='visible';
}

function mostrarMiniIdiomes(path_absolut){
	capa = document.getElementById('capa_idiomes');
	if(capa.style.visibility=='hidden'){
		document.getElementById('flexa').src=path_absolut+'/img/flexa_arriba.jpg';
		capa.style.visibility='visible';
	}
	else{
		document.getElementById('flexa').src=path_absolut+'/img/flexa_derecha.jpg';
		capa.style.visibility='hidden';
	}
}

function comprobaFormulari(texteAlert) {
	var form = document.forms.contactoForm;
	if(form.email.value==""){
		alert(texteAlert);
		return false;
	}
	else{
		if(form.nom.value==""){
			alert(texteAlert);
			return false
		}
		else{
			if(form.comentaris.value==""){
				alert(texteAlert);
				return false;
			}
			else{
				if(form.telefon.value==""){
					alert(texteAlert);
					return false;
				}
				else{
					return true;
				}
			}
		}
	}
}
function load(ruta_img) {
  if (GBrowserIsCompatible()) {
    var icon = new GIcon();
    //icon.image = 'http://'+domini+'/templates/web/img/logo.jpg';
    icon.image = '';
    icon.iconSize = new GSize(61, 65);
    icon.iconAnchor = new GPoint(-25, 140);
    icon.infoWindowAnchor = new GPoint(-20,-10);
    var direccion = "<span style='color:#000000;font-family:Tahoma;font-size:11px'>\
    <b>MUELLES CROM S.A.</b><img border=0 src="+ruta_img+"><br />\
    Poligono Camp<br />\
	Avda Jordi Camp 42-44<br />\
	08403 Granollers, Barcelona<br />\
    </span>";
    var marcador = new GMarker(new GLatLng(41.601500,2.277066),icon);
    GEvent.addListener(marcador, 'click', function(){marcador.openInfoWindowHtml(direccion);});
    var map = new GMap2(document.getElementById("map"));
    map.setCenter(new GLatLng(41.601500,2.277066), 15);
	//spn=0.007589,0.013304&sspn=15.815951,27.246094&sll=40.396764,-3.713379
    map.setMapType(G_NORMAL_MAP);
    map.addControl(new GSmallMapControl());
    map.addOverlay(marcador);
    marcador.openInfoWindowHtml(direccion);
  }
}
