    // ToolsList.js
    // Copyright 2003, Spectrum Research, Inc.
    
    var iRecordCount;                                                                                                                     
    iRecordCount = 0;                                                                                                                     
   //------------------------------------------------------------//                                                                       
   // This function will submit the specified form.              //                                                                       
   // It is used when a user clicks on a preselect's hyperlink.  //                                                                       
   //------------------------------------------------------------//                                                                       
   function SubmitForm(formid)                                                                                                            
   { if(is_getElementById)                               // Does the browser support 'getElementById'?                                    
     { objForm = document.getElementById(formid);        // Yes.  Then get the form by its id.                                            
       objForm.submit();                                 // Submit the form.                                                              
     }                                                                                                                                    
     else                                                // Doesn't support 'getElementById'.                                             
     { if(is_ie)  { document[formid].submit(); };        // Is browser IE 4 or less? Yes - Then submit.                                   
       if(is_nav) { document.forms[formid].submit(); };  // Is the browser NS 4.X or less? Yes - Then submit.                             
     };                                                                                                                                   
   };                                                                                                                                     
                                                                                                                                          
   //--------------------------------------------//                                                                                       
   // This function will print the current page. //                                                                                       
   //--------------------------------------------//                                                                                       
   function PrintWindow()                                                                                                                 
   { if(is_nav)                  // If browser is Netscape 4.X or earlier...                                                              
     { window.print(); }         // Print the window.                                                                                     
     else                                                                                                                                 
     { var OLECMDID_PRINT=6;                                                                                                              
       var OLECMDEXECOPT_PROMPTUSER=1;                                                                                                    
       var WebBrowser='<OBJECT ID="WebBrowser1" WIDTH=0 HEIGHT=0 CLASSID="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></OBJECT>';         
       document.body.insertAdjacentHTML('beforeEnd',WebBrowser);                                                                          
       WebBrowser1.ExecWB(OLECMDID_PRINT,OLECMDEXECOPT_PROMPTUSER);                                                                       
       WebBrowser1.outerHTML="";                                                                                                          
     };                                                                                                                                   
   };                                                                                                                                     


   //---------------------------//
   // Called to delete records. //
   //---------------------------//
   function DeleteRecord(strUrl)
   { iResult = confirm('Confirm record deletion');       // Ask user to confirm record deletion.
     if(iResult == true) { location.href = strUrl; };    // Set URL to the delete page.          
   };                                                            

   //--------------------------------------//
   // Function to popup a window centered. //
   //--------------------------------------//
   function PopupCentered(file, targetname, iWidth, iHeight)
   { iUserRan = 1;
     iX = Math.floor((screen.width  - iWidth)  / 2);
     iY = Math.floor((screen.height - iHeight) / 2);
     iX -= 5; iY -= 14;
     if(iX < 0) { iX = 0; };
     if(iY < 0) { iY = 0; };
     style="left=" +iX+ ",top=" +iY+ ",width=" +iWidth+ ",height=" +iHeight+ ",toolbar=0,scrollbars=1,status=0,resizable=1,menubar=0,alwaysRaised=1";
     NewWindow = window.open(file,targetname,style);
   };


