Svetlana - fixed javascript for Chrome