var bDebug = false;
function getXUrl(url, noUpdate, noEval) {
    if(noUpdate == true) {
        if(noEval) {
            $.ajax({ type: "POST", url: url, dataType: "html", success: function(msg){ } });
        } else {
            $.ajax({ type: "POST", url: url, dataType: "html", success: function(msg){ eval(msg); } });
        }
    } else {
        if(!bDebug) {
            $('#mContent').empty();
            startLoading();
        }
        $.ajax({
            type: "POST",
            url: url,
            dataType: "html",
            success: function(msg){
                $('#mContent').html(msg);
            }
        });
    }
    return false;
}

function bindForm(form, url, noUpdate, noEval)
{
    if(noUpdate == true) {
        if(noEval) {
            $.ajax({ type: "POST", data: $(form).serialize(), url: url, dataType: "html", success: function(msg){ } });
        } else {
            $.ajax({ type: "POST", data: $(form).serialize(), url: url, dataType: "html", success: function(msg){ eval(msg); } });
        }
    } else {
        if(!bDebug) {
            $('#mContent').empty();
            startLoading();
        }
        $.post(url, $(form).serialize(), function(msg) { $('#mContent').html(msg);});
    }
    return false;
}

function startLoading()
{
    $('#mContent').html('<br />&nbsp;<br />&nbsp;<br />&nbsp;<br />&nbsp;<br />&nbsp;<img src="/images/logo_loading2.jpg" style="border:0px;" /><br />&nbsp;<img src="/images/ajax-loader.gif" style="border:0px;" /><br />');
}