﻿function SetPageTitle(title) {
    document.title = title;
}

function WLError(msg) {
    $.ajax({
        url: 'JSError.aspx?rnd=' + Math.random(),
        type: 'POST',
        data: msg,
        error: function (obj, txt) {
            document.URL = '/Error.aspx';
         },
        success: function (ret) {
            document.URL = '/Error.aspx';
        }
    });
}

function WLAjaxError(jqXHR, textStatus, errorThrown) {
    WLError("txt=" + textStatus + "     errorThrown=" + errorThrown);
}

function imposeMaxLength(Object, MaxLen) {
    return (Object.value.length <= MaxLen);
}

function DisableButton(btn) {
    setTimeout(function () { btn.disabled = true; }, 0);
}


