// PrefBar Print menu
// Copyright (C) Manuel Reimer (Manuel _dot_ Reimer _at_ gmx _dot_ de)
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// version 2 as published by the Free Software Foundation
function delayedHandler(value) {
switch(value){
case "setup":
if ("PrintUtils" in window)
PrintUtils.showPageSetup();
else
NSPrintSetup();
break;
case "preview":
if ("PrintUtils" in window)
PrintUtils.printPreview(onEnterPrintPreview, onExitPrintPreview);
else
BrowserPrintPreview();
break;
case "print":
if ("PrintUtils" in window)
PrintUtils.print();
else
NSPrint();
break;
}
}
// The "menu code" has to be called asynchronously, to prevent bugs!
setTimeout(delayedHandler, 0, value);