function isEmail(text){
   var 	arroba = "@",
       	ponto = ".",
	   	posponto = 0,
	   	posarroba = 0;
	
	 if (text =="") return true;
	
	 for (var indice = 0; indice < text.length; indice++){
	 	if (text.charAt(indice) == arroba) {
	 		posarroba = indice;
	      	break;
		 }
	 }
	
	for (var indice = posarroba; indice < text.length; indice++){
		if (text.charAt(indice) == ponto) {
			posponto = indice;
	     	break;
		}
	}
	if (posponto == 0 || posarroba == 0) return true;
	if (posponto == (posarroba + 1)) return true;
	if ((posponto + 1) == text.length) return true;
	return false;
}