﻿var Globals = {
    WindowOpener : function(height, width, top, left, url) {
        window.open(url, null, "width=" + width + ",height=" + height + ",top=" + top + ",left=" + left + ",location=yes,resizable=yes,titlebar=yes,toolbar=yes,scrollbars=1");
        return false;             
    }
}

jQuery.fn.center = function() {
    this.css("position", "absolute");
    this.css("top", ($(window).height() - this.height()) / 2 + $(window).scrollTop() + "px");
    this.css("left", ($(window).width() - this.width()) / 2 + $(window).scrollLeft() + "px");
    return this;
}

function ShowHideDiv(container, show) {
    if (show) $("#" + container).show();
    else $("#" + container).hide();
    $("#" + container + " .container").center();
}


