<!--

if(self!=top){top.location=self.location;}

function nifCorrecto(nif){
	if(typeof nif=='string'&&nif.length<=10){
  	    cr = 0;
  	    while (cr < nif.length) {
  	  	  if ((nif.charAt(cr)=='-')) {return false;}
		  cr++;
            }
          return true;

	}
	return false; 
}

function cifCorrecto(cif){
	if(typeof cif=='string'&&cif.length<=10){
  	    cr = 0;
  	    while (cr < cif.length) {
  	  	  if ((cif.charAt(cr)=='-')) {return false;}
		  cr++;
            }

		return true;
	}
	return false;
}



function codPostalCorrecto(i){
	esNumero=false;
	if(typeof i=='string'&&i.length==5){
		num=new Array('0','1','2','3','4','5','6','7','8','9');
		esNumero=true;
		for(j=0;j<i.length;j++){
			for(k in num){
				esNumero2=true;
				if(i.charAt(j)==num[k]){
					esNumero2=false;
					break;
				}
			}
			if(esNumero2){
				esNumero=false;
				break;
			}
		}
	}
	return esNumero;
}



function emailCorrecto(email){ 
	if(typeof email=='string'&&email.length>0){
		if((email.indexOf('@')==-1)||(email.indexOf('.')==-1)||(email.indexOf('@')==0)||(email.indexOf('.')==0)||(email.lastIndexOf('@')!=email.indexOf('@'))||(email.lastIndexOf('.')<email.length-5)||(email.lastIndexOf('.')>email.length-3)||(email.lastIndexOf('.')<email.indexOf('@'))||(email.indexOf('..')!=-1)||(email.indexOf('.@')!=-1)||(email.indexOf('@.')!=-1)){return false;}
		return true;
	}
	return false;
}
  

function parseString(texto){
  if(texto.length>0){
    return true;
  }
  return false;
}


function ComprobarEmailSpam(pEmail){
	var capaSpam = document.getElementById('capaTextoCorreoNoDeseado');
	var stEmail = pEmail;
	stEmail = stEmail.toUpperCase();
	if (stEmail.indexOf("HOTMAIL")>0 || stEmail.indexOf("GMAIL")>0) {
		capaSpam.style.display = '';
	} else {
		capaSpam.style.display = 'none';
	}
}



//-->

