Option Explicit Sub clickHandler() Dim I Dim strParentId Dim objChild Dim objParentImage Dim sDisplay Dim sImage '== Identify the item clicked strParentId = Window.Event.SrcElement.ID If Left(strParentId, 1) = "M" Then '== Identify child DIV and parent IMG objects Set objChild = Document.All("C" & Mid(strParentId, 3)) Set objParentImage = Document.All("MI" & Mid(strParentId, 3)) '== manipulate their attributes If objChild.Style.Display = "none" Then objChild.Style.Display = "" objParentImage.Src = "./images/bullet-minus.jpg" Else objChild.Style.Display = "none" objParentImage.Src = "./images/bullet-plus.jpg" End If Set objChild = Nothing Set objParentImage = Nothing ElseIf Left(strParentId, 3) = "ALL" Then If Mid(strParentId, 4) = "Expand" Then sDisplay = "" sImage = "./images/bullet-minus.jpg" Else sDisplay = "none" sImage = "./images/bullet-plus.jpg" End If For i = 0 To Document.All.Length - 1 If Left(Document.All(i).ID, 1) = "C" Then Document.All(i).Style.Display = sDisplay End If If Left(Document.All(i).ID, 2) = "MI" Then Document.All(i).Src = sImage End If Next End If End Sub Sub mouseOverHandler() ' If Window.Event.SrcElement.TagName = "A" Or _ ' Left(Window.Event.SrcElement.ID, 2) = "MT" Or _ ' Left(Window.Event.SrcElement.ID, 3) = "ALL" _ ' Then ' If Window.Event.SrcElement.ID = "EXTERNAL" Then ' Window.Event.SrcElement.Style.Color = "LIGHTGREEN" ' Else ' Window.Event.SrcElement.Style.Color = "YELLOW" ' End If ' ElseIf Left(Window.Event.SrcElement.ID, 2) = "MI" Then ' If Document.All("MT" & Mid(Window.Event.SrcElement.ID, _ ' 3)).ID = "EXTERNAL" Then ' Document.All("MT" & Mid(Window.Event.SrcElement.ID, _ ' 3)).Style.Color = "LIGHTGREEN" ' Else ' Document.All("MT" & Mid(Window.Event.SrcElement.ID, _ ' 3)).Style.Color = "YELLOW" ' End If ' End If End Sub Sub mouseoverHandler() ' Dim I ' Dim strParentId ' Dim objChild ' Dim objParentImage ' Dim sDisplay ' Dim sImage ' ' '== Identify the item clicked ' strParentId = Window.Event.SrcElement.ID ' If Left(strParentId, 1) = "M" Then ' '== Identify child DIV and parent IMG objects ' Set objChild = Document.All("C" & Mid(strParentId, 3)) ' Set objParentImage = Document.All("MI" & Mid(strParentId, 3)) ' '== manipulate their attributes ' If objChild.Style.Display = "none" Then ' objChild.Style.Display = "" ' objParentImage.Src = "./images/bullet-minus.jpg" ' Else ' objChild.Style.Display = "none" ' objParentImage.Src = "./images/bullet-plus.jpg" ' End If ' Set objChild = Nothing ' Set objParentImage = Nothing ' ElseIf Left(strParentId, 3) = "ALL" Then ' If Mid(strParentId, 4) = "Expand" Then ' sDisplay = "" ' sImage = "./images/bullet-minus.jpg" ' Else ' sDisplay = "none" ' sImage = "./images/bullet-plus.jpg" ' End If ' For i = 0 To Document.All.Length - 1 ' If Left(Document.All(i).ID, 1) = "C" Then ' Document.All(i).Style.Display = sDisplay ' End If ' If Left(Document.All(i).ID, 2) = "MI" Then ' Document.All(i).Src = sImage ' End If ' Next ' End If End Sub Sub mouseOutHandler() ' ' If Window.Event.SrcElement.TagName = "A" Or _ ' Left(Window.Event.SrcElement.ID, 2) = "MT" _ ' Then ' Window.Event.SrcElement.Style.Color = "WHITE" ' ElseIf Left(Window.Event.SrcElement.ID, 3) = "ALL" Then ' Window.Event.SrcElement.Style.Color = "BLACK" ' ElseIf Left(Window.Event.SrcElement.ID, 2) = "MI" Then ' Document.All("MT" ' & Mid(Window.Event.SrcElement.ID, 3)).Style.Color = "WHITE" ' End If End Sub