
var alertsBar = {
    alertsDoNothing: function() {

    },

    showAlertsbar: function(message) {
        return;
        GetByAjax( {element: 'alertsDummyAjaxCalls',
                    PageName: 'alerts',
                    file: 'ajax_view.php',
                    evalScripts: true,
                    Action: 'show_alert',
                    message: message} );

        if ($("alertsbar_container")) {
            if ($('alertsbar_container').visible()) {
                new Effect.Opacity('alertsbar_container', { from: 0, to: 1, duration: 1.0 });
                $('alertsbar_inner').update(message);
            } else {
                alertsBar.addSpaceToPage(40);
                $("alertsbar_inner").update(message);
                new (Effect.toggle)("alertsbar_container", "blind", {scaleX: false, scaleY: true, scaleContent: false, duration: 0.8 });
            }   
        }
        
    },

    updateTimeStamp: function(column, userid) {
        return;
        // wait 5s before updating so that everybody using the same login (even on different computers) will get this message
        setTimeout(function() {
                        GetByAjax( {element: 'alertsDummyAjaxCalls',
                                    PageName: 'alerts',
                                    file: 'ajax_view.php',
                                    evalScripts: true,
                                    Action: 'update_last_alert_timestamp',
                                    column: column,
                                    userid: userid} );
                   }
        , 3000);
    },

    addSpaceToPage: function(height) {

    // either right side search tree or content area is bigger, so let's add 40 px to each one
        if ($('rightColumn')) {
            $('rightColumn').style.height = $('rightColumn').getHeight() + height + "px";
        }
        if ($('content')) {
            $('content').style.height = $('content').getHeight() + height + "px";
        }

    },

    closeAlertsbar: function() {
        return;
        GetByAjax( {element: 'alertsDummyAjaxCalls',
                    PageName: 'alerts',
                    file: 'ajax_view.php',
                    evalScripts: true,
                    Action: 'close_alert'} );

        if ($('alertsbar_container')) {
            alertsBar.addSpaceToPage(-40);
            
            if ($('alertsbar_container').visible()) {
                new (Effect.toggle)("alertsbar_container", "blind", {
                                     scaleX: false, scaleY: true, scaleContent: false, duration: 0.8, afterFinish: function() { $('alertsbar_inner').update(""); } });
            }
        }
    },

    changeShoppingCartIcon: function() {
        return;
        if ($('shopping_basket_hover_icon')) {
            $('shopping_basket_hover_icon').src = "pictures/shopping_cart_infobox_carticon_green.gif";
        }
    },

    toggleAlertsHistory: function() {
        return;
        if ($('alertsbar_history')) {
                new (Effect.toggle)("alertsbar_history", "blind", {scaleX: false, scaleY: true, scaleContent: false, duration: 0.8 });
        }
    }


};
