EB-7133 Fix java script issue to work in IE and chrome