fixed javascript for webplayer