function checkEmail (email)  {
    if (email == "") {
        return false
    }
    pos_a = email.indexOf("@");
    pos_last_dot = email.lastIndexOf(".");
    
    if ( (pos_a == -1) ||
         (pos_last_dot == -1) ||
         (pos_last_dot < pos_a) ||
         (pos_last_dot == email.length-1) ||
         (pos_last_dot == pos_a+1) ||
         (pos_a == 0)) {
            return false
    }     
    else {
        return true
    }   
}
