/* <!----------------------------------------------------------------------------

Name:        openWindow.js

Description: JavaScript function to open a web page in new browser window

Inputs:      u  (Req) URL of the web page that should be displayed in the window
             w  (Opt) Width of Window
             h  (Opt) Height of Window
             n  (Opt) Window Name
             s  (Opt) Status Bar (yes or no)

Notes:       Include this standard function using the following code in a .htm or .cfm file:
               <script src="/common/JavaScript/openWindow.js"> </script>
             To use the standard width and height, call this form using the following syntax:
               <a href="javascript:openWindow('/wepcoforms/Sample/SampleForm.htm')">Sample Form</a>
             Advanced example:
               <a href="javascript:openWindow('/wepcoforms/Sample/SampleForm.htm',200,300,'windowName','no')">Sample Form</a>
             If a window with the name of "n" already exists, a new window will not be created.
               Instead, the "u" (URL) will be displayed in the window named "n".

Revision Record:

  08/16/2000 - MLS: Corrected documentation for External Site.

  19991123 - GJT: Initial Version
----------------------------------------------------------------------------->
*/
var remote=null;
var defWidth=800;  // Default Width
var defHeight=600;
var defWinName='_blank';  // A default window name of '_blank' will open a new window everytime
var defStatusBar='yes';  // Default to enabling status bar
function openWindow(u,w,h,n,s) {
  if ((w == null) || (w == '')){
    w=defWidth;
  }
  if ((h == null) || (h == '')){
    h=defHeight;
  }
  if ((n == null) || (n == '')){
    n=defWinName;
  }
  if ((s == null) || (s == '')){
    s=defStatusBar;
  }

  args="width="+w+",height="+h+",resizable=yes,scrollbars=yes,status="+s;
  remote=window.open(u,n,args);
}
