// JavaScript Document

// This makes the listings table entire row clickable.
function clickRow() {
	ConvertRowsToLinks("listings_tbl");
}

function ConvertRowsToLinks(xTableId) {
	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.className='highlight'");
            //rows[i].onmouseout = new Function("this.className=''");
		}
	}
}
if (window.addEventListener) //DOM method for binding an event
window.addEventListener("load", clickRow, false)
else if (window.attachEvent) //IE exclusive method for binding an event
window.attachEvent("onload", clickRow)
