// Copyright © 2003-2008 Edgar Soberón.  All rights reserved.


var printWindowName = "printWindow";  // the print window's name (for programming)
var printWindow;  // the print window


// Determines if it's an older version of the browser, i.e., Navigator
// 2 or Internet Explorer 3.
var oldBrowser = parseInt(navigator.appversion) < 3;


// Creates the new window if it doesn't already exist, loading the
// given page into the new window.
function makePrintWindow(itsURL) {
    printWindow =
        window.open(itsURL, printWindowName, "menubar,resizable,scrollbars");

    // Handle Navigator 2, which doesn't have an opener property.
    if (!printWindow.opener) {
        printWindow.opener = window;
    }

    if (!oldBrowser) {
        // Window is already open, so bring it to the front.
        printWindow.focus();
    }
}
