
function alerta() {
 alert("La llista d'adherits estarà disponible ben aviat");
}

function validar_adhesio() {

	var uword = hex_md5(document.getElementById('uword').value);

	if (uword==cword[anum-1]) {

	with (document.registrar) {
	            
		result1 = esta_ple(nom);
    		result2 = mira_email(email);
    		result3 = esta_ple(numerodidentitat);
		
		if (result1 == 0) {
		alerta_ct('Nom');
		nom.focus();
	        return false;
		}
            
		else if (result2 != 1) {
		alert('Cal que introduïu una adreça vàlida de correu electrònic');
		email.focus();
	        return false;
        	}

		else if (result3 == 0) {
		alerta_ct('Número d´identitat / afiliat');
		email.focus();
	        return false;
        	}

       else return true;
		}
	}	

	else {
	 alert('El codi de seguretat introduït no és correcte');
	 document.getElementById('uword').focus(); 
	 return false;
	}

}


bVer =parseInt(navigator.appVersion);
bName=navigator.appName;
if (bVer >=3 && bName=="Netscape") gSupport=1;
else if (bVer >=4) gSupport=1;
else gSupport=0;

if (gSupport==1) {  
	  img1 = new Image();
	  img1.src = "img/adherirseI.gif";
	  img1a = new Image();
	  img1a.src = "img/adherirseA.gif";
	  img2 = new Image();
	  img2.src = "img/llistatI.gif";
	  img2a = new Image();
	  img2a.src = "img/llistatA.gif";
	  img3 = new Image();
	  img3.src = "img/manifestI.gif";
	  img3a = new Image();
	  img3a.src = "img/manifestA.gif";
	  img4 = new Image();
	  img4.src = "img/comunicatsI.gif";
	  img4a = new Image();
	  img4a.src = "img/comunicatsA.gif";
}

function rollover(iName)
		{
		if (gSupport==1)
		         {
				 thename = eval(iName + "a.src");
				 document[iName].src = thename;
                }
        }
function rolloff(iName)
		{
        if (gSupport==1)
                {
                thename = eval(iName + ".src");
                document[iName].src = thename;
                }
        }
