achieve compatibility with IE7 and IE8