/* <!----------------------------------------------------------------------------

Name:        openForm.js

Description: JavaScript function to open a form in a new 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)
             t  (Opt) Tool Bar (yes or no)

Notes:       Include this standard function using the following code in a .htm or .cfm file:
               <script src="/common/JavaScript/openForm.js"> </script>
             To use the standard width and height, call this form using the following syntax:
               <a href="javascript:openForm('/wepcoforms/Sample/SampleForm.htm')">Sample Form</a>
             Advanced example:
               <a href="javascript:openForm('/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.

  01/25/2000 - SPB: Added t (toolbar) parameter.
                    Cleaned up Revision Record.

  11/23/1999 - GJT: Removed x parameter.

  11/18/1999 - 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='no';    // Default to enabling status bar
var defToolBar='no';      // Toolbar Default
function openForm(u,w,h,n,s,t) {
  if ((w == null) || (w == '')){
  w=defWidth;
  }
  if ((h == null) || (h == '')){
  h=defHeight;
  }
  if ((n == null) || (n == '')){
  n=defWinName;
  }
   if ((s == null) || (s == '')){
    s=defStatusBar;
  }
   if ((t == null) || (t == '')){
    t=defToolBar;
  }

  args="width="+w+",height="+h+",resizable=yes,scrollbars=yes,status="+s+",toolbar="+t;
  remote=window.open(u,n,args);
}