function checkIt(tblRow){
	cell = $(tblRow).firstDescendant();
	checkBox = cell.firstDescendant();
	checkBox.checked = true ;
	//var x = checkBox.getAttribute('onchange');
	//$(checkBox).onchange();
}

function unCheckIt(tblRow){
	cell = $(tblRow).firstDescendant();
	checkBox = cell.firstDescendant();
	checkBox.checked = false ;
	//$(checkBox).onchange();
}

function checkAndHighlight(tblCell){
	checkBox = tblCell.firstDescendant();
	checkBox.checked = true ;
	parents = tblCell.ancestors();
	parents[0].addClassName("selRow");
}

function unCheckAndDeHighlight(tblCell){
	checkBox = tblCell.firstDescendant();
	checkBox.checked = false ;
	parents = tblCell.ancestors();
	parents[0].removeClassName("selRow");
}

function highlightAllCheckedRows(tbl){
	cells = $(tbl).select('td.rich-table-checkbox-column');
	cells.each(function(s) {
			checkBox = s.firstDescendant();
			if(checkBox.checked){
				parents = s.ancestors();
				parents[0].addClassName("selRow")
			}
		});
}


function initTables(){
	$$('table.selectTable').each(function(s) {
		highlightAllCheckedRows(s);
		});
}


