Added G5 support for popup show/hide and page flips