function getSwf(movieID) { if (navigator.appName.indexOf("Microsoft") != -1) { return window[movieID]; } else { return document[movieID]; } } function doc_onkeydown () { getSwf('main').focus(); } function focus_swf() { getSwf('main').focus(); } function startpage(){ //var evt=document.createEvent("MouseEvents"); //evt.initEvent("click",true,true); //document.getElementById("pagestart").dispatchEvent(evt); var appName = navigator.appName; if(appName.substring(0,8) == "Netscape"){ var evt = document.createEvent("MouseEvents"); evt.initEvent("click", false, false); document.getElementById("pagestart").dispatchEvent(evt); }else{ //document.getElementById("pagestart").fireEvent("onclick"); $(document).ready(function(){ pagestart.click(); }); } }