function changetheme(newtheme)
{
    var css = null;

    if (window.XMLHttpRequest)
    {
        css = new XMLHttpRequest();
    }
    else if (window.ActiveXObject)
    {
        css = new ActiveXObject("Microsoft.XMLHTTP");
    }
    else
    {
        alert("Problem creating the XMLHttpRequest object!");
    }

    css.onreadystatechange = function()
    {
        if (css.readyState == 4)
        {
            if (css.status == 200)
            {   
                document.write("Redirecting...");
                window.location = location.href;
            }
        }
    };

    css.open("GET", "./ajax_updatetheme.php?newtheme=" + newtheme, true);
    css.send(null);
}

function changeservers(newservers)
{
    var game = null;

    if (window.XMLHttpRequest)
    {
        game = new XMLHttpRequest();
    }
    else if (window.ActiveXObject)
    {
        game = new ActiveXObject("Microsoft.XMLHTTP");
    }
    else
    {
        alert("Problem creating the XMLHttpRequest object!");
    }

    game.onreadystatechange = function()
    {
        if (game.readyState == 4)
        {
            if (game.status == 200)
            {
                document.write("Redirecting...");
                window.location = location.href;
            }
        }
    };

    game.open("GET", "./ajax_updateserverpref.php?newservers=" + newservers, true);
    game.send(null);
}

