var swfplayer=null;function playerReady(a){swfplayer=document.getElementById(a.id);swfplayer.addModelListener("STATE","playerCompleted");swfplayer.addViewListener("STOP","playerStopping");swfplayer.addViewListener("PLAY","playerPlaying");swfplayer.addViewListener("SEEK","playerPlaying")}function playerCompleted(a){if(a.newstate!="COMPLETED"){return}playerStopping()}function playerStopping(a){if(!heroDisplay){return}setTimeout(heroDisplay.next,5000)}function playerPlaying(a){if(!heroDisplay){return}heroDisplay.stop()};