fix javascript for IE8