/* $Header: /local/cvs_repository/caf/modules/web_dashboard/web_static/js/dashboard.js,v 1.1 2010/08/25 11:56:06 sacha Exp $ */

/* ContentIndex+ Splash popup */

Dashboard = function immediate () {
    var splashWindow = null;
    
    return {
        splash: function (el) {
            if (splashWindow === null) {
                var year = new Date().getFullYear();
                splashWindow = new Ext.Window({
                    width: 314,
                    height: 400,
                    closable: false,
                    modal: true,
                    resizable: false,
                    animateTarget: el,
                    html: '<div id="dashboard-splash"><a href="http://www.ssl.co.uk/contentindex" target="_blank"><img src="static/img/web_dashboard/ci-splash.png" alt="ContentIndex+" /></a><div class="product-info"><a href="http://www.ssl.co.uk/contentindex" target="_blank">ContentIndex+</a> Content Management System<br />&#169; 2009-'+year+' System Simulation Ltd</div></div>',
                    buttonAlign: 'center',
                    buttons: [{
                        text: 'Close',
                        handler: function () {
                            splashWindow.hide();
                        }
                    }]
                });
            }
            splashWindow.show();
        }
    };
}();

