function rolloverer() { if (!document.getElementById) {return}
  var tables=document.getElementsByTagName('table');
  for (var i=0;i<tables.length;i++) {
    var trs=tables[i].getElementsByTagName('tr');
      // table hcolor section
    if (tables[i].getAttribute("hcolor")) {
      var rowcolor=tables[i].getAttribute("hcolor");
      for(var j=0;j<trs.length;j++) { 
        if (!trs[j].getAttribute('hcolor')) { 
          trs[j].setAttribute('hcolor', rowcolor);
        }
      }
    }
    for(var j=0;j<trs.length;j++) {
      // tr mouseovers here
      if (trs[j].getAttribute('hcolor')) {
        if (!trs[j].getAttribute('bcolor')) trs[j].setAttribute('bcolor', trs[j].getAttribute('bgcolor'));
        trs[j].onmouseover=function(){this.setAttribute('bgColor',this.getAttribute("hcolor"))}
        trs[j].onmouseout= function(){this.setAttribute('bgColor',this.getAttribute("bcolor"))}
      }
      // tr mouseclick here
      if (trs[j].getAttribute('href')) {
        var url=trs[j].getAttribute('href');
        if (trs[j].getAttribute('target')) {
          if (trs[j].getAttribute('target') == "_blank" ) {
            trs[j].onclick=function(){window.open(this.getAttribute('href'))}
          }
          else {trs[j].onclick=function(){location.href=this.getAttribute('href')}
          }
        }
        else {trs[j].onclick=function(){location.href=this.getAttribute('href')}}
        }
    }
    var tds=tables[i].getElementsByTagName('td');
    for(var j=0;j<tds.length;j++) { 
      // td image rollovers here
      if (tds[j].getAttribute('hsrc')) {
        tds[j].onmouseover=function(){imgOriginSrc=this.getAttribute('background');this.setAttribute('background',this.getAttribute('hsrc'))}
        tds[j].onmouseout= function(){this.setAttribute('background',imgOriginSrc)}
      }
      // td mouseovers here
      else if (tds[j].getAttribute('hcolor')) {
        if (!tds[j].getAttribute('bcolor')) {tds[j].setAttribute('bcolor', tds[j].getAttribute('bgcolor'));}
        tds[j].onmouseover=function(){this.setAttribute('bgColor',this.getAttribute("hcolor"))}
        tds[j].onmouseout= function(){this.setAttribute('bgColor',this.getAttribute("bcolor"))}
      }
      // td mouseclick here
      if (tds[j].getAttribute('href')) {
        if (tds[j].getAttribute('target')) {
                if (tds[j].getAttribute('target') == "_blank" ) {
                        tds[j].onclick=function(){window.open(this.getAttribute('href'))}
                }
                else {tds[j].onclick=function(){location.href=this.getAttribute('href')}
                }
        }
      else { tds[j].onclick=function(){this.getAttribute('href')}}
      }
    }
  }// image rollover code here
  var imgOriginSrc; var imgTemp = new Array(); var imgTempOn = new Array(); var imgarr = document.getElementsByTagName('img');
  for (var i = 0; i < imgarr.length; i++) {
    if (imgarr[i].getAttribute('hsrc')) {
      imgTemp[i] = new Image(); imgTemp[i].src = imgarr[i].getAttribute('hsrc');
      imgarr[i].onmouseover = function() {imgOriginSrc=this.getAttribute('src');this.setAttribute('src',this.getAttribute('hsrc'))}
      imgarr[i].onmouseout = function() {this.setAttribute('src',imgOriginSrc)}
    }
    // img mouseclick here
    if (imgarr[i].getAttribute('href')) {
      if (imgarr[i].getAttribute('target')) {
        if (imgarr[i].getAttribute('target') == "_blank" ) {imgarr[i].onclick=function(){window.open(this.getAttribute('href'))}}
        else {imgarr[i].onclick=function(){location.href=this.getAttribute('href')}}
      }
      else { imgarr[i].onclick=function(){location.href=this.getAttribute('href')
}}}}}

onload=rolloverer;


