js code for IE bugs