function canviImg(idimg,img){
	document.getElementById(idimg).src=eval(img+'.src');
}

function comprovarForm(dades,noms){
	camps=dades.split(",");
	nomcamps=noms.split(",");

	for(i=0;i<camps.length;i++){
		if(camps[i]=='email'){
			if ((document.getElementById('email').value =="") || !(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(document.getElementById('email').value))){
      			alert("Email incorrecte.");
      			return (false);
    		}
		}else{
			text=document.getElementById(camps[i]).value;
			if (document.getElementById(camps[i]).value =="" || text.indexOf("(*)")>0){
      			alert(nomcamps[i]+" incorrecte.");
      			return (false);
    		}
		}
	}

	return (true);
}

//<![CDATA[
function load() {
	if (GBrowserIsCompatible()) {
		var icon = new GIcon();
		icon.image = '';
		icon.iconSize = new GSize(153, 50);
		icon.iconAnchor = new GPoint(0, -60);
		icon.infoWindowAnchor = new GPoint(0,0);
		var direccion = "<span style='color:#000000'>\
		La Mancomunitat<br />\
		Camí de la Rovira, S/N<br />\
		Tel.93.844.82.25<br />\
		08187 Santa Eulàlia de Ronçana (Barcelona)</span>";
		var marcador = new GMarker(new GLatLng(41.64796763191941, 2.226254940032959),icon);
		GEvent.addListener(marcador, 'click', function(){marcador.openInfoWindowHtml(direccion);});
		var map = new GMap2(document.getElementById("map"));
		map.setCenter(new GLatLng(41.64796763191941, 2.226254940032959), 15);
		map.setMapType(G_NORMAL_MAP);
		map.addControl(new GSmallMapControl());
		map.addOverlay(marcador);
		marcador.openInfoWindowHtml(direccion);
		//sll=40.396764,-3.713379&amp;sspn=7.912371,14.941406&amp;
		//ll=41.621153,2.2855&amp;spn=0.007588,0.014591&amp;
	}
}

function mostrarserveis()
{
	document.getElementById("menuserveis").style.visibility="visible";

}
function ocultarmenu()
{

	document.getElementById("menuserveis").style.visibility="hidden";

}
function taulahoverin(num)
{
	var col1="col1_"+num;
	var col2="col2_"+num;
	var col3="col3_"+num;
	var color;
	document.getElementById(col1).style.backgroundColor="#feebeb";
	document.getElementById(col2).style.backgroundColor="#feebeb";
	document.getElementById(col3).style.backgroundColor="#feebeb";
}

function taulahoverout(num)
{
	var col1="col1_"+num;
	var col2="col2_"+num;
	var col3="col3_"+num;
	var color;
	document.getElementById(col1).style.backgroundColor="#ffffff";
	document.getElementById(col2).style.backgroundColor="#ffffff";
	document.getElementById(col3).style.backgroundColor="#ffffff";
}

function taulaturhoverin(num)
{
	var col1="col1_"+num;
	var col2="col2_"+num;
	var link1="link1_"+num;
	var link2="link2_"+num;

	document.getElementById(col1).style.backgroundColor="#a9bb26";
	document.getElementById(col2).style.backgroundColor="#a9bb26";
	document.getElementById(link1).style.color="#ffffff";
	document.getElementById(link2).style.color="#ffffff";

}

function taulaturhoverout(num)
{
	var col1="col1_"+num;
	var col2="col2_"+num;
	var link1="link1_"+num;
	var link2="link2_"+num;

	document.getElementById(col1).style.backgroundColor="#ffffff";
	document.getElementById(col2).style.backgroundColor="#ffffff";
	document.getElementById(link1).style.color="#a9bb26";
	document.getElementById(link2).style.color="#a9bb26";

}




//]]>