
      window.onload = function(){
        ConvertRowsToLinks("table1");
		ConvertRowsToLinks("table2");
		ConvertRowsToLinks("table3");	//Allows up to 3 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'"); //change the highlighted colour here
            rows[i].onmouseout = new Function("this.style.background='';this.style.cursor=''");
          }
        }

      }
