//====================================
// DDL Popup
// From Dawson's DHTML Library
//
// Version: 2.00
//
// Author:   Dawson Cowals
// Created:  04-14-2003
// Modified: 02-25-2005
//
//====================================

// GLOBALS
var popup;

/*
 * openPopup is a popup window function for use by help and faq pages.
 * Contributed by Dawson 03-05-2002.
 *
 * URL         -- URL of document to load in the window
 * name        -- name for the window (for html reference)
 * width       -- window width in pixels
 * height      -- window height in pixels
 * popupX      -- X coordinate for window (if both X,Y are -1 it will center)
 * popupY      -- Y coordinate for window
 * resize      -- allow window to be resized
 * scroll      -- show scroll bars in window
 * status      -- show status bar in window
 * tools       -- show tool bar in window
 * mlocation   -- show URL location bar
 * menubar     -- show window menubar
 */
function openPopup(URL,name,mwidth,mheight,popupX,popupY,resize,scroll,mstatus,tools,mlocation,menubar) {
  if (popup != null && !popup.closed) {
     popup.close();
  }

  var settings;

  //center window if x/y are "-1"
  if ((popupX == -1) && (popupY == -1)) {
    popupX           = (screen.availWidth - mwidth)/2;
    popupY           = (screen.availHeight - mheight)/2;
  }

  settings  = "width="+mwidth+",height="+mheight+",resizable="+resize+",";
  settings += "scrollbars="+scroll+",status="+mstatus+",toolbar="+tools+",";
  settings += "location="+mlocation+",menubar="+menubar+",";
  settings += "screenX="+popupX+",screenY="+popupY+",left="+popupX+",top="+popupY;

  popup=window.open(URL, name, settings);
  popup.focus();
}

//function download(filePath){
//    myTempWindow = window.open(filePath,’’,’left=10000,screenX=10000’);
//    myTempWindow.document.execCommand(’SaveAs’,null,filePath);
//    myTempWindow.close();
//}