//---------------------------------------------------------------------------
// Trigger a print preview window.
//---------------------------------------------------------------------------
function PrintPreview() {
    // Try an IE preview
    /*
    try {
        var OLECMDID = 7;
        // OLECMDID values:
        // 6 - print
        // 7 - print preview
        // 1 - open window
        // 4 - Save As
        var PROMPT = 1; // 2 DONTPROMPTUSER
        var WebBrowser = '<OBJECT ID="WebBrowser1" WIDTH=0 HEIGHT=0 CLASSID="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></OBJECT>';
        document.body.insertAdjacentHTML('beforeEnd', WebBrowser);
        WebBrowser1.ExecWB(OLECMDID, PROMPT);
        WebBrowser1.outerHTML = "";
        return;
    }
    catch (e) {}
    */

    // Try doing a Mozilla preview.
    // [1/9/2005] This isn't currently working, so we'll just disable it for now and the default
    // print dialog will come up.
    /*
    try {
		window.open('chrome://global/content/printPreviewProgress.xul');
        return;
    }
    catch (e) {}
    */

    // Both of the above must have failed, so just do a window.print()
    try {
        window.print();
        return;
    }
    catch (e) {
          alert('Please print this page using the print menu option on your browser');
    }
}

