bulletoff=new Image();
bulletoff.src='templates/modelsencill/skin1/img/bulletoff.gif';

bulleton=new Image();
bulleton.src='templates/modelsencill/skin1/img/bulleton.gif';

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'>\
		C/ Del Mas de Bigues, 2<br />\
		08500 Vic</span>";
		var marcador = new GMarker(new GLatLng(41.939605,2.242434),icon);
		GEvent.addListener(marcador, 'click', function(){marcador.openInfoWindowHtml(direccion);});
		var map = new GMap2(document.getElementById("map"));
		map.setCenter(new GLatLng(41.939605,2.242434), 16);
		map.setMapType(G_NORMAL_MAP);
		map.addControl(new GSmallMapControl());
		map.addOverlay(marcador);
		marcador.openInfoWindowHtml(direccion);
	}
}
//]]>