
function highlightRow(elem)
{
	 var hiLiteClass = 'iC_DataListRowFocus';
	 if ( elem.parentNode.parentNode.className != hiLiteClass )
			dlRowClass=elem.parentNode.parentNode.className;
	 elem.parentNode.parentNode.className = hiLiteClass;
}

function unHighlightRow(elem)
{
	elem.parentNode.parentNode.className = dlRowClass; 
}


function highlightMultiViewRow(elem)
{
	 var hiLiteClass = 'iC_DataListRowFocus';
	 if ( elem.parentNode.parentNode.className != hiLiteClass )
			dlRowClass=elem.parentNode.parentNode.className;
	 elem.parentNode.parentNode.className = hiLiteClass;

//  with the XHTML doctype, we do not need to set the CSS class on each row
//	var allTRs = elem.getElementsByTagName("tr");
//	for ( var inxTR = 0 ; inxTR < allTRs.length ; inxTR++ )
//	{
//		var a = allTRs[inxTR];
//	 if ( a.className != hiLiteClass )
//		a.className = hiLiteClass;	
//	}	 
}

function unHighlightMultiViewRow(elem)
{
	elem.parentNode.parentNode.className = dlRowClass; 
	
//  with the XHTML doctype, we do not need to set the CSS class on each row
//	var allTRs = elem.getElementsByTagName("tr");
//	for ( var inxTR = 0 ; inxTR < allTRs.length ; inxTR++ )
//	{
//		var a = allTRs[inxTR];
//		a.className = dlRowClass;	
//	}
}

function doRowClick(elem)
{
    var td = getFirstChildByName(elem,"TD");
    var a = getFirstChildByName(td,"A");
    a.focus();
    handleClick(a); 
}

/////////////////////
// Helper Routines //
/////////////////////

function getFirstChildByName( e, name )
{
	var child = e.firstChild;

	while ( child && child.nodeName != name )
		child = child.nextSibling;

	return child;
}
