
<!--
    
  var searchFlag
  var firstLoad
  
  if (navigator.appName == "Netscape") {
    layerRef="document.layers";
    styleSwitch="";
  } else {
    layerRef="document.all";
    styleSwitch=".style";
  }

  var subCurrent="specialties";
  var searchCurrent="keyword";
  
  
  //HIDE SHOW LAYER FUNCTIONS
  function showLayer(layerName)
  {
    MM_showHideLayers(layerName,'','show');    
  }
  
  function hideLayer(layerName)
  {
    MM_showHideLayers('layerName','','hide');    
  }


  function MM_openBrWindow(theURL,winName,features) { //v2.0
    window.open(theURL,winName,features);
  }


  function wait(){
//    alert (document.images.length);
  }
  
  //SUBMENU CHANGE CODE
  function doMenu(subNew){
    //          alert("subNew "+subNew+"\n"+"subCurrent "+subCurrent);
    hideLayer(subCurrent);
    showLayer(subNew);
    subCurrent=subNew;
  }

  //SEARCH MODULE CHANGE CODE
  function doSearch(searchNew){
    //          alert("searchNew "+searchNew+"\n"+"searchCurrent "+searchCurrent);
    hideLayer(searchCurrent);
    showLayer(searchNew);
    searchCurrent=searchNew;
  }
  
  // Is this function better than the other?
    function resizeFix() {
          
                  self.location.reload();
                  //self.location.href = self.location.href.toString();
                  } 
  // This was the original function.  
  //    if (widthCheck != window.innerWidth || heightCheck != window.innerHeight || firstLoad == "True")
  //      document.location.href = document.location.href;
  //  }
    
      function changeto(highlightcolor){
       source=event.srcElement
       if (source.tagName=="TR"||source.tagName=="TABLE")
       return
       while(source.tagName!="TD")
       source=source.parentElement
       if (source.style.backgroundColor!=highlightcolor&&source.id!="ignore")
       source.style.backgroundColor=highlightcolor
      }
  
      function changeback(originalcolor){
       if (event.fromElement.contains(event.toElement)||source.contains(event.toElement)||source.id=="ignore")
       return
       if (event.toElement!=source)
       source.style.backgroundColor=originalcolor
      }
      
    //NETSCAPE MENU FUNCTIONS
  
    function setMenus() {
    // Specialties Menu Functions
      document.layers["specialties"].onMouseOver = menuOver;
      document.layers["specialties"].onMouseOut = menuOut;
    }
  
    function menuOver() {
      this.visibility = "show"
      }
  
    function menuOut() {
      this.visibility = "hide"
      }
  
    // Pre-Load Rollover Images for Specialties Menu
            subOn = new Image(8,11)
            subOn.src = "../images/m_uparrow_on.gif"
            subOff = new Image(8,11)
            subOff.src = "../images/m_uparrow_off.gif"
  
    // Rollover Functions
      function doRO1(which,what) {
              theLayer = which.split("_")
              eval(layerRef+'["' + theLayer[0] + '"].document.images["' + which + '"].src =  ' + what + '.src') ;
            }
      function doRO(which,what) {
            theLayer = which.split("_")
            eval(layerRef+'["' + theLayer[0] + '"].document.images["' + which + '"].src =  ' + what + '.src') ;
           }
  
      
      
    //Popup window javascript
    function fetch(url) {
          opener.location = url;
      }
  
      function done() {
          window.close()
      }
  
      function message(txt){
          opener.status = txt;
          setTimeout("remove()",2500);
      }
  
      function remove(){
          opener.status="";
      }
  
      function NewPopup(url, windowName, width, height) {
          var popup;
          popup = window.open('', windowName, 'width=' + width + ',height=' + height + ',scrollbars=yes,menubar=no,toolbar=no');
  
          if (popup != null) {
              if (popup.opener == null) {
              popup.opener = self;
              }
              popup.location.href = url;
          }
    
      }
  // -->
  
  function rs(n,u,w,h,x) {
    args="width="+w+",height="+h+",resizable=yes,scrollbars=yes,status=0";
    remote=window.open(u,n,args);
    if (remote != null) {
      if (remote.opener == null)
        remote.opener = self;
    }
    if (x == 1) { return remote; }
}
  
// ****************************************************************************************************************    

   function init() 
   {
      // these are our layers.
      sTabs = new Array("none", "keyword",  "medsubjects", "alphabet", "dictionary");

      var xPos; // the position we will place the layers' x position

      // set up the stuff specific to one browser
      if ( isNetscape() ) // have to make sure that this works on mac.
      {
        // set up the x Position
        xPos = (window.innerWidth - 197);

        if (xPos < 610) 
          xPos = 600; 

        // capture the resize events
        this.captureEvents(Event.RESIZE);
        this.onResize = init;        
      }// if Netscape
      else if ( isIE() )
      {
        // set up the x Position
        xPos = (document.body.clientWidth - 175);
        if( isMac() )
        {
          if (xPos < 610) 
            xPos = 595      
        }
        else
        {
          if (xPos < 610) 
            xPos = 605          
        }// if isMac else

        // capture the resize events
        window.onresize = init;
      }// if IE    


      // now move the layers to the correct position
      var styleSheet;

      for ( i = 0; i < sTabs.length; i++ ) 
      {
        // find the correct DOM and get the style object
        if ( document.getElementById )
        {
          styleSheet = document.getElementById( sTabs[i] ).style;
        }
        else if ( document.all )
        {
          if ( isIE() )
          {
            styleSheet = eval( "document.all." + sTabs[i] + ".style" );          
          }
          else
          {
             styleSheet = document.all.sTabs[i].style;
          }
  //          styleSheet = document.all.sTabs[i].style;
  //          styleSheet = eval( "document.all." + sTabs[i] + ".style" );          
        }
        else if ( document.layers )
        {
          styleSheet = document.layers[sTabs[i]];
        }

        // now, move them for the specific browser
        if ( isNetscape() )
        {
          styleSheet.left = xPos;
        }
        else if ( isIE() )
        {
          styleSheet.left = xPos;
        }//else if
      }//for
    showLayer(searchCurrent);
    
    }//init
    
// end init


// ****************************************************************************************************************

function showImageWindow(e, queryString) {
    var x=y=0;
    if (e != '') { x = e.screenX; y = e.screenY; }
    calWindow=window.open('content_im_body.asp?' + queryString,'ImageDB',
        'width=600,height=600,resizable=yes,scrollbars=yes,toolbar=NO,screenX=' + x + ',screenY=' + y + ',left=' + x + ',top=' + 0 );
  if (calWindow.opener == null) calWindow.opener = self;
}


function replaceChars(entry, out, add) {
// out = "a"; // replace this
// add = "z"; // with this
temp = "" + entry; // temporary holder

while (temp.indexOf(out)>-1) {
pos= temp.indexOf(out);
temp = "" + (temp.substring(0, pos) + add + 
temp.substring((pos + out.length), temp.length));
}
return temp;
}

//-->