function Security() {}

/**
* Displays a dialog with the given title and body before logging a user out.
* @param title the text that goes into the title bar of the dialog
* @param body the message to display
*/
Security.logout = function(title, body) {
    var buttons = [
        { text:"Cancel", isDefault:true },
        { text:"Logout", handler: Security.doLogout }
   ];

   MessageBox.displayDialog(title, body, buttons);
};

/**
* Redirect to the Acegi logout.
*/
Security.doLogout = function() {
    window.location = 'j_acegi_logout';
};