dim objCoolWindowset objCoolWindow = nothingfunction rightClickHandle()
window.event.returnValue = false
window.event.cancelBubble = true
end functionfunction onMouseDownHandle()
if not objCoolWindow is nothing then
if objCoolWindow.menuState = true then objCoolWindow.hideMenu
window.event.returnValue = false
window.event.cancelBubble = true
end if
end functionwindow.document.oncontextmenu = GetRef("rightClickHandle")
window.document.onmousedown = GetRef("onMouseDownHandle")