function LimpiarTexto(Texto) {
Texto=Texto.toLowerCase();
Texto=Texto.replace (/ /g, '');
Texto=Texto.replace (/"/g, '');
return Texto;
}

function esVacio(Texto){   
return ((Texto==null)||(Texto.length==0));
}

function esBlanco(Texto){ 
Texto=LimpiarTexto(Texto);  
var Blanco = ' \t\n\r';
var MidT = '';
if (esVacio(Texto)) return true;
for (var i = 0; i < Texto.length; i++) {   
	MidT = Texto.charAt(i);
    if (Blanco.indexOf(MidT)==-1) return false;
	}
return true;
}

function esEmail (Texto){
if (esBlanco(Texto)) return false;
var i = 1;
var Longitud = Texto.length;
while ((i<Longitud)&&(Texto.charAt(i)!="@")) { 
	i++
	}
if ((i>=Longitud)||(Texto.charAt(i) != "@")) return false;
else i += 2;
while ((i<Longitud)&&(Texto.charAt(i)!=".")) { 
	i++
	}
if ((i>=Longitud - 1)||(Texto.charAt(i)!=".")) return false;
else return true;
}

