function trataTexto(flag, id){
   if(flag){
        document.getElementById(id).value="";
        document.getElementById(id).style.borderColor="#8d9444";
        document.getElementById(id).style.backgroundColor="#ebeecb";
   }
   else {
        flag = verificaSeContemCaracter(document.getElementById(id).value);
        document.getElementById(id).style.borderColor = "#d2d2d2";
        document.getElementById(id).style.backgroundColor="#ffffff";
        if(flag) {
            document.getElementById(id).value="Informe seu RA";
            document.getElementById(id).style.borderColor = "#d07c62";
            document.getElementById(id).style.backgroundColor="#f1c1b2";
        }
    }
}

function verificaSeContemCaracter(texto){

    for(i=0;i<texto.length;i++){
        if(texto.charAt(i)!=" "){
            return false;
        }
    }
    return true;

}
