/**
* dwmain.js 29Oct2001, wph
* (C) Copyright Advantos Systems, Inc.  All Rights Reserved.
*
* Last Modified: 21 Jan 2005, wph
*
* this is the main javascript to include since all other pages
* can use these functions
*/

<!--
// Determine Netscape or Internet Explorer browser
   var ns = (document.layers) ? 1:0
   var ie = (document.all) ? 1:0
   var winPopUp = null;
   var TextLine = "";

// Do nothing (used for emply links)
   function Null() {
      //do nothing  :-)
   }

// This is FAQs expandable function
   function _dSectionExpand(sec) {
      document.all["cSec"+sec].style.display = "none";
      document.all["xSec"+sec].style.display = "";
   }

// This is FAQs collapsable function
   function _dSectionCollapse(sec) {
      document.all["xSec"+sec].style.display = "none";
      document.all["cSec"+sec].style.display = "";
   }
                                                            
// The following is determines which frame we're using
   function getFrameUsed() {
      return window.name;
   }
                                                            
// The following is a simple redirect
   function getMainRedirect(d3Script) {
      var myHREF = '/cgi-bin/fccgi.exe?w3exec=' + d3Script ;
      parent.main.location = myHREF;
   }

// The following is used as a conduit to the dbms
   function getHrefRedirect(d3Script) {
      var myHREF = '/cgi-bin/fccgi.exe?w3exec=' + d3Script ;
      parent.mwinfoframe.location = myHREF;
   }
                                                            
// The following is a simple redirect for to distinquish
// the difference between an expandable IE Faq and a
// non-expandable NS Faq.
   function mainRedirect(webPage,nsCheck) {
      if (ie == 1) {
         var myHREF = webPage;
      } else {
         if (nsCheck == 1) {
            var myHREF = 'ns_' + webPage;
         } else {
            var myHREF = webPage;
         }
      }
      location.href = myHREF;
   }

// Display status messages
   function MM_displayStatusMsg(msgStr) { //v1.0
      status=msgStr;
      document.MM_returnValue = true;
   }

// Find document object
   function MM_findObj(n, d) { //v4.0
      var p,i,x;
      if (!d) d = document;
      if ((p = n.indexOf("?")) > 0&&parent.frames.length) {
         d = parent.frames[n.substring(p+1)].document;
         n = n.substring(0,p);
      }
      if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
      for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
      if(!x && document.getElementById) x=document.getElementById(n); return x;
   }

// Preload page images
   function MM_preloadImages() { //v3.0
      var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
         var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
         if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
   }

// Swap images for rollover effect
   function MM_swapImage() { //v3.0
      var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
        if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
   }

// Restore the swapped images on rollover effect
   function MM_swapImgRestore() { //v3.0
      var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
   }
   
// Open pop-up window
   function openPopUp() {
      if (!window.winPopUp || window.winPopUp.closed) {
         winPopUp = window.open('','mwQuery','width=575,height=400,toolbar=0,status=0');
      }
   }

// Close popup window
   function closePopUp() {
      if (window.winPopUp && !window.winPopUp.closed) {
         winPopUp.close();
      }
   }

// Write to PopUp window
   function writePopUp(TextLine) {
      winPopUp.document.write(TextLine);
   }

// Close document in PopUp window
   function closePopUpDocument() {
      winPopUp.document.close();
   }
                                                            
// The following will replace the current frameset with a new page
   function replaceFrameset(newpage) {
      var myHREF = newpage
      top.location.href = myHREF;
   }
                                                         
 // The following is used as a dynamic 'href' redirection
    function submitForm(ScriptKey) {
       var myHREF = 'fccgi.exe?w3exec=' + ScriptKey ;
       document.forms[0].action = myHREF
       document.forms[0].submit() ;
    }
// -->