/*
	tableruler()
	written by Chris Heilmann for alistapart.
	enables a rollover of rows for each table with the classname "hlrows"
*/

function tableruler(tab_class) {
	if(!tab_class)
		tab_class = 'tab_view'
	
	if (document.getElementById && document.createTextNode)
	{
		var tables=document.getElementsByTagName('table');
		for (var i=0;i<tables.length;i++)
		{
			if(tables[i].className==tab_class)
			{
				var trs=tables[i].getElementsByTagName('tr');
				for(var j=0;j<trs.length;j++)
				{
					if(trs[j].parentNode.nodeName=='TBODY')
					{
						if (j % 2 == 0)  {
							trs[j].className='trbodyodd'
							trs[j].onmouseover=function(){this.className='trbodyodd sel'; return false}
							trs[j].onmouseout=function(){this.className='trbodyodd'; return false}
						} else {
							trs[j].className='trbody'
							trs[j].onmouseover=function(){this.className='trbody sel'; return false}
							trs[j].onmouseout=function(){this.className='trbody'; return false}

						}
					}
				}
			}
		}
	}
}