﻿$(document).ready(init);

function init() {
    $.extend($.blockUI.defaults, {
        css: {
            padding: 0,
            margin: 0,
            width: '280px',
            top: '40%',
            left: '40%',
            textAlign: 'center',
            color: '#333',
            border: '1px solid black',
            backgroundColor: '#ccc',
            cursor: 'wait'
        }
                , overlayCSS: {
                    backgroundColor: '#666666',
                    opacity: 0.6
                }, fadeIn: 0, fadeOut: 0
    });

    //Loading 
    $().ajaxStart(function() {
        $.blockUI({ message: '<h1><img src="/images/wait_anim.gif" /> Please wait...</h1>' });
    });

    $().ajaxStop($.unblockUI);

}

function openInfoKitPopup(url) {
        newwin = window.open(url, 'InfoKit', 'scrollbars=auto,menubar=1,resizable=1,width=' + screen.availWidth + ',height=' + screen.availHeight);
}

function openPopup(name, url, width, height) {
    leftVal = (screen.width) / 4;
    topVal = (screen.height) / 4;
    window.open(url, name, "left=" + leftVal + ",top=" + topVal + ",menubar=no,resizable=no,scrollbars=1,width=" + width + ",height=" + height + ""); 
}

