function readfile(file,replace_code,startxt,endtxt){
    var rawFile = new XMLHttpRequest();
    rawFile.open("GET", file+"?"+Math.random(), true);
    rawFile.onload = function ()
    {
        if(rawFile.readyState === 4)
        {
            if(rawFile.status === 200 || rawFile.status == 0)
            {
                var allText = rawFile.responseText
                document.body.innerHTML = document.body.innerHTML.replace(replace_code,startxt+allText+endtxt);
            }
        }
    }
    rawFile.send(null);
}

function mercuryloader(){
    readfile("/Mercury/README.md","<mercury>","","");
    readfile("/updates.txt","<dtag></dtag>","","");
    readfile("/version.txt","<version_info></version_info>","<p><h3>The latest version is ","</h3>");
}
