/********************************
* x3tech CMS - Additional Javascript Functions
* Author        : $Author$
* Rev            : $Rev$
* Last Modified    : $Date$
********************************/

function locationCheck()
{
    var path = location.href.replace(ROOT_URL, "").replace(location.hash.replace(" ", "%20"), "");
    if(!ajax)
    {
        return true;
    }
    else if(path != "ajax/")
    {
        document.location = ROOT_URL + "ajax/#" + path;
        return true;
    }

    return false;
}

var messageTimeout;

function message(header, content)
{
    $("#message").removeClass("hidden");
    $("#message .header").html(header);
    $("#message .content").html(content);

    clearTimeout(messageTimeout);
    messageTimeout = setTimeout(function()
    {
        $("#message").addClass("hidden");
    }, 3000);
}
