      window.onload = function(){
        ConvertRowsToLinks("table1");
		ConvertRowsToLinks("table2");
		ConvertRowsToLinks("table3");
		ConvertRowsToLinks("table4");
		ConvertRowsToLinks("table5");
		ConvertRowsToLinks("table6");// Allows up to 6 tables to have highlighted rows.
      }
      
      function ConvertRowsToLinks(xTableId){
		  
		  if(!document.getElementById(xTableId)) {		// This will make sure that the function stops if there's no more tables (avoids throwing errors)
			  return;
		  }

        var rows = document.getElementById(xTableId).getElementsByTagName("tr");
   
        for(i=0;i<rows.length;i++){
          var link = rows[i].getElementsByTagName("a")
          if(link.length >= 1){
            rows[i].onclick = new Function("document.location.href='" + link[0].href + "'");
            rows[i].onmouseover = new Function("this.style.background='#dbe6f1';this.style.cursor='pointer'; this.style.border='2px solid #fff';"); //change the highlighted colour here
            rows[i].onmouseout = new Function("this.style.background='';this.style.cursor=''; this.style.border=''");
          }
        }

      }