Made isPM function compatible with IE8 Quirks Mode and IE7 Standards Mode