Javascript code not working fine in IE8.

Printable View