//----------------------------------------
//  <void> openWindow()
//----------------------------------------
// - Description:
//       Opens a new window.
//
// - Returns:
//       None
//
// - Parameters:
//       url: URL of web page the new window will display.
//       windowName: Name of new window.
//       features: Window features.
//
// - Details:
//       Attempts to create an XMLHTTP object.  If your browser does not support
//       this, null will be returned.
//
// - Changelog:
//       Author: Sean Mlinscek <sean.mlinscek@stryker.com>
//       Date:   03/14/07 5:31 p.m.
//       Change: Initial documentation.
//
function openWindow(url, windowName, features) {
   window.open(url, windowName, features);
}

//----------------------------------------
// <void> showHiddenFields()
//----------------------------------------
// - Description:
//   Hides or Unhides form fields based on event 
//
// - Returns: 
//        None
//
// - Parameters:
//
// - Details:
//
// - Changelog:
//       Author: Sean Mlinscek <sean.mlinscek@stryker.com>
//       Date:   10/06/04 9:14 p.m.
//       Change: Fixed the if statement which handles the hiding/unhiding of the content.
//
//       Author: Sean Mlinscek <sean.mlinscek@stryker.com>
//       Date:   05/04/04 9:14 p.m.
//       Change: Initial function documentation
//
function showHiddenFields(formName,formType,formField,divID,divIDAlt,formValue){
   var ifStatement;      

   if(formType == "radio"){
      ifStatement = "document."+formName+"."+formField+".checked == true";
   }else if(formType == "checkbox"){
      ifStatement = "document."+formName+"."+formField+".selected == true";
   }else{
      ifStatement = "document.forms['"+formName+"']."+formField+".options[document.forms['"+formName+"']."+formField+".selectedIndex].value == '"+formValue+"'"; 
   }

   browser = navigator.appName;
   browserNum = parseInt(navigator.appVersion);

   if ((browser == "Netscape") && (browserNum < 5)){
      layerRef = "document.layers['";
      endLayerRef = "']";
      styleRef = "";
      attribute = ".visibility";
      notVisible = "hide";
      visible = "show";
   }else if ((browser == "Netscape") && (browserNum >= 5)){
	  layerRef = "window.document.getElementById('";
      styleRef = ".style";
      attribute = ".display";
      endLayerRef = "')";
      notVisible = "none";
      visible = "inline";
   }else{
      layerRef = "document.all['";
      endLayerRef = "']";
      styleRef = ".style";
      attribute = ".display";
      notVisible = "none";
      visible = "inline";   
   }

   if (eval(ifStatement)){
      eval(layerRef + divID + endLayerRef + styleRef + attribute + " = '" + visible + "'");
      if(divIDAlt){
         eval(layerRef + divIDAlt + endLayerRef + styleRef + attribute + " = '" + notVisible + "'"); 
     }       
   }else{
      eval(layerRef + divID + endLayerRef + styleRef + attribute + " = '" + notVisible + "'");
      if(divIDAlt){
         eval(layerRef + divIDAlt + endLayerRef + styleRef + attribute + " = '" + visible + "'"); 
      }
   }
}