////////////////////////////////////////////////////////////////////////////////
// <file
//   repository_path  = "$Source: /pub/cvsprojects/nucleo/web/home/meta/js/openToolWin.js,v $"
//   revision         = "$Revision: 1.1 $"
//   date             = "$Date: 2005/09/01 13:35:01 $"
//   tag              = "$Name:  $"
//   template_version = "cp_template.0.12"
// >
//   <license>
//     We have not chosen a copyright/license at the time of this release.
//   </license>
// </file>
////////////////////////////////////////////////////////////////////////////////

//##############################################################################
// <routine name="openToolWin">
//
//   <description>
//     <abstract>
//       Function opens a pop-up window with set size.  This window is intended
//       to be a general pop-up window function for any type of page.  The
//       id of the window is specified by the caller.
//     </abstract>
//     <keywords>
//      pop-up, javascript, window, information 
//     </keywords>
//   </description>
// 
//   <authors>
//     <current>
//       <author userid="jdenny" start_date="2005/06/11" />
//       <author userid="jsbrown" start_date="2005/06/11" />
//     </current>
//     <previous>
//     </previous>
//   </authors>
// 
//   <compatibility>
//     Browser: IE version 6.0.2900.2180.xpsp_sp2_rtm.040803-2158;
//     Browser: Mozilla 1.7.3;
//     Browser: Firefox version 1.0;
//     Browser: Opera 7.54, build 3869;
//   </compatibility>
//
//   <usage>
// 
//     <calling_sequence>
//       openToolWin(page,page_name,width,height)
//     </calling_sequence>
// 
//     <param name="page" kind="in,positional"     doc="page" />
//     <param name="page_name" kind="in,positional"     doc="page_name" />
//     <param name="width" kind="in,positional"    doc="width" />
//     <param name="height" kind="in,positional"  doc="height" />
//     <param name="return" kind="return"     doc="return,example" />
// 
//     <doc kind="pre" id="page">
//       page is a javascript string that is the path (absolute or relative)
//       of the infromation xhtml file that is displayed in the window.
//     </doc>
//
//     <doc kind="pre" id="page_name">
//       page_name is a javascript string that is the id of the window that is
//       popped-up.
//     </doc>
// 
//     <doc kind="pre" id="width">
//       width is a javascript integer (?) which sets the width of the window
//       in px.
//     </doc>
//
//     <doc kind="pre" id="height">
//       height is a javascript integer (?) which sets the width of the window
//       in px.
//     </doc>
// 
//     <doc kind="post" id="return">
//       return is the resulting javascript which opens the pop-up window
//     </doc>
// 
//     <doc kind="example" id="example">
//       Given an XHTML anchor tag, pop-up a window upon clicking it:
//
//       <a href="www.cnn.com" 
//         onclick="return openHelpWin('www.cnn.com','cnn',500,300)"
//       >
//         www.cnn.com  
//       </a>  
//
//     </doc>
// 
//   </usage>
//
// </routine>
//##############################################################################

function openToolWin(page,page_name,width,height) {
  var win_handle = window.open(page,page_name,
    'width='+width+',height='+height+',screenX=20,screenY=20,left=20,top=20,'+
    'scrollbars,resizable');
  win_handle.focus();
}
