
  function hideshow(cell) {
    var d = "matrixcontent";
    if (document.getElementById) {
      ob = (d) ? document.getElementById(d) : document;
      if (ob) {
        tA = ob.getElementsByTagName('DIV');

        var re = '';
        if (cell.search(/row/) != -1) {
          re = new RegExp("r" + cell.substr(3) + "c");
        }
        if (cell.search(/col/) != -1) {
          re = new RegExp("c" + cell.substr(3) + "$");
        }

        for(i=0;i<tA.length;i++) {
          pos = tA[i].id.indexOf('c');
          r = tA[i].id.substr(1,pos-1);
          c = tA[i].id.substr(pos+1);
          if (document.getElementById('trow' + r)) {
            document.getElementById('trow' + r).className = document.getElementById('trow' + r).className.replace(/matrixhighlight/,'');
          }
          if (document.getElementById('tcol' + c)) {
            document.getElementById('tcol' + c).className = document.getElementById('tcol' + c).className.replace(/matrixhighlight/,'');
          }
     
          tA[i].style.display = "none";
          if (document.getElementById('t' + tA[i].id)) {
            document.getElementById('t' + tA[i].id).className = document.getElementById('t' + tA[i].id).className.replace(/matrixhighlight/,'');
          }
          if (tA[i].id == cell) {
            tA[i].style.display = "block";
            document.getElementById('t' + cell).className = document.getElementById('t' + cell).className + ' matrixhighlight';
          }
          if (re != '') {
            if (tA[i].id.search(re) != -1) {
              tA[i].style.display = "block";
              if (document.getElementById('t' + tA[i].id)) {
                document.getElementById('t' + tA[i].id).className = document.getElementById('t' + tA[i].id).className + ' matrixhighlight';
              }
            }
          }
        }
        if (cell.search(/row/) != -1) {
          document.getElementById('trow' + cell.substr(3)).className = document.getElementById('trow' + cell.substr(3)).className + ' matrixhighlight';
        }
        if (cell.search(/col/) != -1) {
          document.getElementById('tcol' + cell.substr(3)).className = document.getElementById('tcol' + cell.substr(3)).className + ' matrixhighlight';
        }
      }
    }
  }

  function highlight(rowORcol,onoff) {
    var d = "matrix";
    if (document.getElementById) {
      ob = (d) ? document.getElementById(d) : document;
      if (ob) {
        tA = ob.getElementsByTagName('A');
        if (rowORcol.search(/row/) != -1) {
          re = new RegExp("tr" + rowORcol.substr(3) + "c");
        } else {
          re = new RegExp("c" + rowORcol.substr(3) + "$");
        }
        for(i=0;i<tA.length;i++) {
          if (tA[i].id.search(re) != -1) {
            if (onoff == 1) {
              tA[i].className = tA[i].className + ' mouseover';
            } else {
              tA[i].className = tA[i].className.replace(/mouseover/,'');
            }
          }
        }
      }
    }
  }


