\n'); } function openWindow(params){ window.open(params.url,'xerte_window',"status=0,toolbar=0,location=0,menubar=0,directories=0,resizable=0,scrollbars=0,left=" + String((screen.width / 2) - (params.width / 2)) + ",top=" + String((screen.height / 2) - (params.height / 2)) + ",height=" + params.height + ",width=" + params.width); } function enableTTS(){ if (navigator.appName.indexOf("Microsoft") != -1){ VoiceObj = new ActiveXObject("Sapi.SpVoice"); } } function MainPreloader_DoFSCommand(command, args){ if (command == "messageBox"){ alert(args); return true; } if (command == "speak"){ VoiceObj.Speak(args, 3); //params = 3: 1 for asynch and 2 for purge existing (see below) } if (command == "resize"){ document.getElementById("sco").style.width = args.substr(0, args.indexOf(","))+"px"; document.getElementById("sco").style.height = args.substr(args.indexOf(",") + 1, args.length)+"px"; } if (command == "fullscreen"){ document.getElementById("sco").style.width = "100%"; document.getElementById("sco").style.height = "100%"; } if (command == "stopTTS"){ VoiceObj.Speak('', 2); //params 2 to purge existing voices } }