/******************************************************************

This module can be used to highlight menu options in a table as the cursor is moved along them. The highlighting takes the form of a box where the colour changes. It is intended to be used in conjunction with the style1.css stylesheet. If used with other stylesheets the colour coordination may not be so good. The two class definitions that it uses in this style sheet are:

.menulines {
  border: 1px solid rgb(218,218,218);
}
    
.menulines a {
  text-decoration:none;
  font-size: 80%; 
  font-family: Arial, Helvetica, sans-serif;
  color: rgb(0,0,102);
}
	
If the colours in the menulines classes are changes then so also should the colours passed ot the borderizefunction below.

To use it make a table definition as follows:

<table onMouseover=borderize_on(event) onMouseout=borderize_off(event)>

Then for each cell in the table where you want highlighting to occur do <td class=menulines>

******************************************************************/


function borderize(what,bordercolor,bgcolor) {
  what.style.borderColor = bordercolor;
  what.style.backgroundColor = bgcolor;
}


function borderize_on(e) {
  if (document.all)
    source3 = event.srcElement;
  else if (document.getElementById)
    source3 = e.target;

  if (source3.className == "menulines" ||
      source3.className == "menuselect") 
  {
    borderize(source3,"rgb(0,0,0)","rgb(150,150,150)");
  }
  else {
    while (source3.tagName != "TABLE") {
      source3 = document.getElementById ? source3.parentNode : source3.parentElement;
      if (source3.className == "menulines" || 
          source3.className == "menuselect")
        borderize(source3,"rgb(0,0,0)","rgb(150,150,150)");
    }
  }
}

    
function borderize_off(e) {
  if (document.all)
    source4 = event.srcElement;
  else if (document.getElementById)
    source4 = e.target;

  if (source4.className == "menulines")
    borderize(source4,"rgb(0,0,0)","rgb(190,190,190)");
  else if (source4.className == "menuselect")
    borderize(source4,"rgb(0,0,0)","rgb(230,230,230)");
  else {
    while(source4.tagName != "TABLE") {
      source4=document.getElementById? source4.parentNode : source4.parentElement;
      if (source4.className == "menulines")
        borderize(source4,"rgb(0,0,0)","rgb(190,190,190)");
      else if (source4.className == "menuselect")
        borderize(source4,"rgb(0,0,0)","rgb(230,230,230)");
    }
  }
}
    
