<PUBLIC:COMPONENT lightWeight=false>
<PUBLIC:DEFAULTS contentEditable=false tabStop=true/>
<PUBLIC:attach	 event="oncontentready" onevent="initElement()" />
<PUBLIC:attach   event="ondetach" onevent="cleanupElement()" />

<script language="VBScript">

	option explicit
	
	Dim CurrentRow

	sub initElement()
		Set CurrentRow = nothing
		
		with element
			.attachEvent "onmouseover", GetRef("MouseOver")
			.attachEvent "onmouseout", GetRef("MouseOut")
		end with
	end sub
	
	sub cleanupElement()
	end sub

	sub MouseOver()
		'find the tr
		Dim el
		Set el = window.event.srcElement
		do while (el.tagName <> "TR" and el.tagName <> "TABLE")
			set el = el.parentElement
		loop
		if (el.tagName <> "TR") then exit sub
		
		HighlightRow el
	end sub

	sub MouseOut()
		HighlightRow nothing
	end sub
	
	sub HighlightRow(el)
		if not (CurrentRow is nothing) then
			CurrentRow.className = "mouseOut"
		end if
		if not (el is nothing) then 
			'don't overwrite if class name assigned specifically for something else
			if (el.className = "") or (el.className = "mouseOut") or (el.className = "mouseOver") then
				el.className = "mouseOver"
				Set CurrentRow = el
			end if
		end if
	end sub

</script>
