// ------------------------------------------------------------------------
// Shows a window with highlights centered on the screen
// ------------------------------------------------------------------------
function showHighlights() {
    // Show a popup window 540 high, 415 wide, with no scrollbars,
    // not resizable, displaying trn_calendar.php, named Config ...
    popupWindow(340, 415, "no", false, "popup_highlights.php", "HighlightWindow");
}

// --------------------------------------------
// Shows a pop-up window centered on the screen
// --------------------------------------------
function popupWindow(intHeight, intWidth, strScrollbars, blnResizable, strUrl, strWindowName) {
    var intTop          = (screen.height - intHeight) / 2;
    var intLeft         = (screen.width - intWidth) / 2;

    strWindowProperties = "height="      + intHeight +
                          ",width="      + intWidth  +
                          ",top="        + intTop    +
                          ",left="       + intLeft   +
                          ",scrollbars=" + scroll    +
                          (blnResizable ? ",resizable" : "");

    popup = window.open(strUrl, strWindowName, strWindowProperties);
}

// ---------------------------------------------------------------
// Preloads images.
// ----------------------------------------------------------------
function preload() {
    if (!document.images) return;

    var arrImages    = new Array();
    var arrArguments = preload.arguments;

    for (var i = 0; i < arguments.length; i++) {
        arrImages[i] = new Image();
        arrImages[i].src = arrArguments[i];
    }
}
