$(document).ready(function() {
    HideMsg();
});

function HideMsg() {
    var tag = $("span[class$='Msg']");
    if (tag.html() != "") {
        $(document).click(function() {
            tag.fadeOut('slow');
        });
    }
}

var myWindow;
function openWin(url, w, h) {
    var ranNum = parseInt(Math.random() * 255);
    /*
    w = 650;
    h = 600;
    */
    l = screen.width / 2 - w / 2;
    t = screen.height / 2 - h / 2;

    if (typeof myWindow == "object") {
        myWindow.close();
    }
    myWindow = window.open(url, 'admintronwin' + ranNum, 'top=' + t + ',left=' + l + ',height=' + h + ',width=' + w + ',noresize,scrollbars=yes,status=yes');
}

function CheckTerms() {
    var termsOfUse = document.getElementById("ctl00_ContentPage_cbxAgree");
    if (termsOfUse) 
    {
        if (!termsOfUse.checked) 
        {
            alert('Please agree to the Terms of Use before proceeding.');
        }
        return termsOfUse.checked;
    }
    return true;
}
