\n'); document.write(' \n'); document.write(' \n'); document.write(' \n'); document.write(' \n'); document.write(''); }else{ document.write('\n'); } }else{ installerURL = "http://download.quest3d.com/webplugin/webviewerQ3D430.exe"; document.write(' \n'); document.write(''); document.write('\n'); document.write(' \n'); AutomaticReload(); } } function AutomaticReload () { navigator.plugins.refresh(); if (DetectQuest3DPlayer()) window.location.reload(); setTimeout('AutomaticReload()', 500) } function QSetValue(group, channelname, value) { GetQuest3DPlayer().SetChannelValue(group, channelname, value); } function QSetText(group, channelname, text) { GetQuest3DPlayer().SetChannelText(group, channelname, text); } function QGetValue(group, channelname, value) { return GetQuest3DPlayer().ChannelValue(group, channelname); } function QGetText(group, channelname) { return GetQuest3DPlayer().ChannelText(group, channelname); } function sendfunction(funcname, param1, param2, param3) { var currentTime = new Date(); var lastsenttime=currentTime.getTime(); var funcID=Math.floor(2000000000*Math.random()); // sendstack.push([funcname,param1,param2,param3,funcID,false,lastsenttime]); // executestack(); QSetText('modus', 'function' ,funcname); QSetText('modus', 'param1' ,param1); QSetText('modus', 'param2' ,param2); QSetText('modus', 'param3' ,param3); QSetText('modus', 'functionID',funcID); // document.getElementById('sendstack').innerHTML='funcname: ' +funcname+'\n'+ // 'param1: ' +param1+'\n'+ // 'param2: ' +param2+'\n'+ // 'param3: ' +param3+'\n'; } function executestack() { if (QGetText('modus', 'function')=="") { } var currentTime = new Date(); if (sendstack.length>0) { if ((!sendstack[0][5]) || (currentTime.getTime() > sendstack[0][6]+1000) && (QGetText('modus', 'function')==""))//not sent yet or last time sent too long ago { QSetText('modus', 'function' , sendstack[0][0]); QSetText('modus', 'param1' , sendstack[0][1]); QSetText('modus', 'param2' , sendstack[0][2]); QSetText('modus', 'param3' , sendstack[0][3]); QSetText('modus', 'functionID', sendstack[0][4]); sendstack[0][5]==true; lastsenttime=currentTime.getTime(); } setTimeout('executestack()', 500); } if (sendstack.length>0) { document.getElementById('sendstack').innerHTML='stack length: ' +sendstack.length+'\n'+ 'funcname: ' +sendstack[sendstack.length-1][0]+'\n'+ 'param1: ' +sendstack[sendstack.length-1][1]+'\n'+ 'param2: ' +sendstack[sendstack.length-1][2]+'\n'+ 'param3: ' +sendstack[sendstack.length-1][3]+'\n'+ 'functionID: ' +sendstack[sendstack.length-1][4]+'\n'+ 'funcname: ' +sendstack[sendstack.length-2][0]+'\n'+ 'param1: ' +sendstack[sendstack.length-2][1]+'\n'+ 'param2: ' +sendstack[sendstack.length-2][2]+'\n'+ 'param3: ' +sendstack[sendstack.length-2][3]+'\n'+ 'functionID: ' +sendstack[sendstack.length-2][4]+'\n'; } else { document.getElementById('sendstack').innerHTML='stack length: ' +sendstack.length+'\n'; } } function myMovie_DoFSCommand(command, args) { sendfunction(command, args, "", "") } function onEvent() { //fixme: remove before live // alert("event: "+QGetText('modus', 'control')+" received"); var funcname =QGetText('modus', 'control'); if (funcname=='ACK') { var functionID=QGetText('modus', 'functionID'); if (sendstack.length>0) { if (sendstack[0][4]==functionID)//ID matches { sendstack.splice(0,1); } } QSetText('modus', 'control', ''); // executestack(); setrenderdone(); } if (funcname=='renderdone') { // renderdone doen we niet meer. Zie "ACK" } } function setrenderdone() { //fixme: remove before live // alert("render done"); var flashMovie=getFlashMovieObject(); flashMovie.SetVariable("/:renderdone",1); } function getFlashMovieObject() { movieName='modus'; if (window.document[movieName]) { return window.document[movieName]; } if (navigator.appName.indexOf("Microsoft Internet")==-1) { if (document.embeds && document.embeds[movieName]) return document.embeds[movieName]; } else // if (navigator.appName.indexOf("Microsoft Internet")!=-1) { return document.getElementById(movieName); } } //-->