Added fix for RTE not closing after changes in PageEditor mode

Added check for IE and updated function to close jQuery modal dialog if
used