bulletoff=new Image();
bulletoff.src='templates/pluspack/skin1/img/bulletoff.gif';

bulleton=new Image();
bulleton.src='templates/pluspack/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);
}
