﻿function fullscreenPopup(url, title) {
    params = 'resizable=yes,scrollbars=yes,status=no,toolbar=no, width=' + screen.width;
    params += ', height=' + screen.height;
    params += ', top=0, left=0';

    newwin = window.open(url, title, params);
    if (window.focus) {newwin.focus(); }
}

function RefreshMyModules() {
    window.location = window.location;
}


function initCollapsableMessage(elementSelector) {

    if ($.cookie) {
        //initial state 
        hideElement = $.cookie('hideElement ' + elementSelector) == 'true';
        if (!hideElement) {
            $(elementSelector).css("display", "block");
            $(elementSelector).next().css("margin-top", "20px");
        }

        //onclick
        $(elementSelector + 'checkbox').click(function () {
            $.cookie('hideElement ' + elementSelector, 'true');
            $(elementSelector).slideUp("slow");
            $(elementSelector).next().css("margin-top", "0px");
            return false;
        });
    }
}

$(document).ready(function () {
    //licenses welcome message
    initCollapsableMessage('.licenseManagementFirstTime');
});
