/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

function corrigeAcentuacao(texto) {
    texto = texto.replace("Ã¡", "á").replace("Ã¢", "â").replace("Ã£", "ã").replace("Ã©", "é").replace("Ãª", "ê").replace("Ã­", "í").replace("Ã®", "î").replace("Ã³", "ó").replace("Ã´", "ô").replace("Ãµ ", "õ").replace("Ãº", "ú").replace("Ã»", "û");
    texto = texto.replace("Ã?", "Á").replace("Ã‚", "Â").replace("Ãƒ", "Ã").replace("Ã‰", "É").replace("ÃŠ", "Ê").replace("Ã?", "Í").replace("Ã“", "Ó").replace("Ã”", "Ô").replace("Ã•", "Õ").replace("Ãš", "Ú");
    texto = texto.replace("Ã§", "ç").replace("Ã‡", "Ç").replace("Âº", "º");
    return texto;
}
function corrigeAspas(texto) {
    texto = texto.replace("\"", "");
    texto = texto.replace("\'", "");
    return texto;
}
function replaceAll(string, token, newtoken) {
    while (string.indexOf(token) != -1) {
        string = string.replace(token, newtoken);
    }
    return string;
}

