/* Describer.js  
   Describer ver. 1.0 
   External JavaScript file.
   Copyright 2003, 2008 by Robert Gaines. 
   http://members.cox.net/electricvolcano/MAUP/CareBearsDirectory/ */

    //Global Variables
    var isDisp=0, mouseTimer, description="", position="", mouseX=10, mouseY=10;

    function mouseMonitor(x, y)
    { //records the last valid mouse position
      if (x!=NaN)
        mouseX=x;
      if (y!=NaN)
        mouseY=y;  
    } //function mouseMonitor     

    function pointOver(currentObj, info, pos)
    { //When mouse pointer moves over a link, it makes that link bold and displays the web
      //site's description after the mouse pointer stays over the link for two seconds.
      currentObj.style.background="#29ADE7";
      description=info;
      position=pos;
      mouseTimer=setTimeout("displayInfo()", 2000);
    } //function pointOver

    function displayInfo()
    { //Updates info in the layer; if browser is IE, layer is moved relative to the mouse
      //pointer; and makes the layer visible
      var offset;
      window.layer1.document.open();
      window.layer1.document.clear();
      window.layer1.document.write("<html><head><title>Web Site Description</title><LINK REL=stylesheet TYPE=\'text/css\' HREF=\'CBWSD-Styles.css\'></head><body class=\'iframeBody\'>" + description + "</body></html>");
      window.layer1.document.close(); 
      if(navigator.appName == "Microsoft Internet Explorer")
      { switch(position)
        { case "L": offset=0;
                    break;
          case "R": offset=-376;
                    break;
          default:  offset=-188;
                    break;
        } //switch structure
        document.all['infoiframe'].style.left=mouseX+offset;
        document.all['infoiframe'].style.top=mouseY-83;               
        document.all['infoiframe'].style.visibility="visible";
      } //if structure
      else if(navigator.appName == "Netscape")
        document.all['infoiframe'].style.visibility="visible";
        else
          document.layers['layer1'].visibility="visible";
      isDisp=1;
    } //function displayInfo

    function pointOut(currentObj)
    { //makes link normal and if info is displaying, the info is hidden, else the display
      //info timer is canceled.
      currentObj.style.background="none";
      if(isDisp)
      { if(navigator.appName == "Microsoft Internet Explorer")
          document.all['infoiframe'].style.visibility="hidden";
        else if(navigator.appName == "Netscape")
          document.all['infoiframe'].style.visibility="hidden";
          else
            document.layers['layer1'].visibility="hidden";
        isDisp=0;
      } //if structure
      else
        clearTimeout(mouseTimer);
    } //function pointOut
