add onshow and onhide for dod