sub initElement()
with element.currentStyle
hiBackgroundColor = .highlightBackgroundColor
hiBorderColor = .highlightBorderColor
sortNoneImageUrl = .sortNoneImageUrl
sortUpImageUrl = .sortUpImageUrl
sortDownImageUrl = .sortDownImageUrl
posUpImageUrl = .posUpImageUrl
posDownImageUrl = .posDownImageUrl
end with
Dim MytHead
Set MytHead = element.createTHead()
MytHead.appendChild element.rows(0)
set cSelectedRows = new clsSelectedRows
Set tHead = element.tHead
if tHead is nothing then exit sub
set tHeadRow = tHead.children(0)
if tHeadRow.tagName <> "TR" then exit sub
set tBody = element.tBodies(0)
if tBody is nothing then exit sub
setTableBorder
setRowColors true
arrHitTest = initColumns
initAdditionalElements
with element
.attachEvent "onmouseover", GetRef("elementOnMouseOver")
.attachEvent "onmouseout", GetRef("elementOnMouseOut")
.attachEvent "onmousedown", GetRef("elementOnMouseDown")
.attachEvent "onmousemove",GetRef("elementOnMouseMove")
.attachEvent "onclick", GetRef("elementOnClick")
.attachEvent "ondblclick", GetRef("elementOnDblClick")
.attachEvent "onselectstart", GetRef("elementOnSelect")
end with
window.document.attachEvent "onmouseup", GetRef("elementOnMouseUp")
end sub