/* TableHilite

TableTypes:
0 - Do All TBODY rows
1 - Don't hilite rows where only one cell (i.e. full colspan a la   RegActionsTable)


Need to add the following in your HTML HEAD section:
<script language="JavaScript" src="/includes/TableHilite.js" type="text/javascript"></script>
<STYLE TYPE="text/css">
	tr.trHilite {
		background-color: #33CCFF;
	}
</STYLE>

*/

function TableHilite(asTableID,aiTableType) {
	if (document.getElementById && document.createTextNode) {
		var tables=document.getElementsByTagName('table'),xTR,bApply=false;
		for (var i=0;i<tables.length;i++) {
			if(tables[i].id==asTableID) {
				var trs=tables[i].getElementsByTagName('tr');
				for(var j=0;j<trs.length;j++) {
					xTR = trs[j];
					bApply = false;
					switch(aiTableType) {
						case 1:
							bApply = ((xTR.parentNode.nodeName=='TBODY') && (xTR.cells.length>1));
							break;
						default:
							bApply = (xTR.parentNode.nodeName=='TBODY');
							break;
					}
					if(bApply) {
						xTR.origClassName = xTR.className;
						xTR.onmouseover=function(){this.className='trHilite';return false}
						xTR.onmouseout=function(){this.className=this.origClassName;return false}
					}
				}
			}
		}
	}
}
