function showMessageBox(o) {
var opt = Ext.apply({
id: 'currentMessageBox',
width: 400,
height: 150,
hideAction: 'close',
icon: "",
buttons: [{text: Ext.MessageBox.buttonText.ok, handler: function() {Ext.getCmp('currentMessageBox').close();}}]
}, o);
if(opt.icon != "") {
opt.html = '
 | '+ opt.html +' |
';
} else {
opt.html = '';
}
var win = new Ext.Window(opt);
win.show();
return win;
}
function toggleOptions(callback) {
if(currentOptionState) {
document.getElementById('rightMenu').style['display'] = 'none';
document.getElementById('toggleButton').innerHTML = 'Show options';
} else {
document.getElementById('rightMenu').style['display'] = '';
document.getElementById('toggleButton').innerHTML = 'Hide options';
}
currentOptionState = !currentOptionState;
document.cookie = 'currentOptionState='+(currentOptionState?1:0)+'';
callback(currentOptionState);
}
var helpWindow = null;
function showHelp(helpid) {
// create the window on the first click and reuse on subsequent clicks
if(!helpWindow){
helpWindow = new Ext.Window({
layout:'fit',
width:500,
height:300,
closeAction:'hide',
plain: true,
bodyStyle:'background-color:#ffffff;',
buttons: [{
text: 'Close',
handler: function(){
helpWindow.hide();
}
}]
});
}
helpWindow.show();
helpWindow.center();
helpWindow.load('/modules/help/get.help.php?id=' + helpid);
}