var lc_name; var showURL; var objWidth; var objHeight; var curSpot=0; function goToShow(showId, firstslide, forcePlayback){ var newRegExp = new RegExp("ss%3D[0-9]{1,}%","g"); showURL = showURL.replace(newRegExp,"ss%3D"+showId+"%"); var newRegExp = new RegExp("sl%3D[0-9]{1,}%","g"); showURL = showURL.replace(newRegExp,"sl%3D0%"); if(forcePlayback>0){ var newRegExp = new RegExp("3Facc%3D","g"); showURL = showURL.replace(newRegExp,"3FforcePlayback=1%26acc%3D"); } if(firstslide>0){ var newRegExp = new RegExp("\&firstslide=[0-9]{1,}\&","g"); showURL = showURL.replace(newRegExp,"&firstslide="+firstslide+"&"); } if(2==1){ mc.LoadMovie(0,showURL); }else{ useFlashLC("loadMovie", showURL+"~_level0"); } mc = null; } function goToWorkshop(spot){ document.onmousemove = null; if(curSpot==spot){ return; } var newRegExp = new RegExp("ss%3D","g"); tempShowURL = showURL.replace(newRegExp,"sp%3D"+spot+"%26ss%3D"); var newRegExp = new RegExp("&acc=","g"); tempShowURL = tempShowURL.replace(newRegExp,"&stretch=1&acc="); var newRegExp = new RegExp("getshow","g"); tempShowURL = tempShowURL.replace(newRegExp,"getworkshop"); if(2==1){ if(!mc) return; mc.LoadMovie(0,tempShowURL); }else{ useFlashLC("loadMovie", tempShowURL+"~_level0"); } mc = null; curSpot = spot; } function domainOfPage() { domainName = document.location.hostname; if(domainName.length<=0) domainName = 'not_found'; return domainName; } function AC_VHost_Embed_15695 (height, width, bgcolor, firstslide, loading, ss, sl, transparent, minimal, embedId, flashVersion) { flashVersion = flashVersion ? flashVersion : 6; objWidth = width; objHeight = height; lc_name = '1156693077553885'; embedId = embedId==''?'nothing':embedId; domString = '&pageDomain='+domainOfPage(); tokenString = '&token=6151e65f3ff676c81869dfda843d88e4'; getShow = 'http%3A%2F%2Fvhost.oddcast.com%2Fgetshow.php%3Facc%3D15695'+escape('&ss='+ss+'&sl='+sl+'&embedid='+embedId+'&fs='+firstslide); url = 'http://vhost.oddcast.com/vhsssecure.php?doc='+getShow+'&edit=0&acc=15695&firstslide='+firstslide+'&loading='+loading+'&minimal='+minimal+'&bgcolor=0x'+bgcolor+domString+tokenString+'&lc_name='+lc_name+'&fv='+flashVersion+'&is_ie=0'; showURL = url; loading = 1; // done after request not to allow admin not to have a loader if (transparent != 1){ AC_RunFlContentX( 'height',height,'swliveconnect','true','src',url,'scale','noborder','id','VHSS','width',width,'bgcolor','#'+bgcolor,'quality','high','movie',url,'name','VHSS','codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version='+flashVersion+',0,0,0'); }else{ AC_RunFlContentX( 'height',height,'swliveconnect','true','src',url,'scale','noborder','id','VHSS','width',width,'bgcolor','#'+bgcolor,'quality','high','movie',url,'name','VHSS','codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version='+flashVersion+',0,0,0', 'wmode','transparent' ); } } function AC_VHost_Embed_15695_dbg (height, width, bgcolor, firstslide, loading, ss, sl, transparent, minimal, embedId, flashVersion) { flashVersion = flashVersion ? flashVersion : 6; objWidth = width; objHeight = height; lc_name = '1156693077553931'; embedId = embedId==''?'nothing':embedId; domString = '&pageDomain='+domainOfPage(); tokenString = '&token=6151e65f3ff676c81869dfda843d88e4'; getShow = 'http%3A%2F%2Fvhost.oddcast.com%2Fgetshow_dbg.php%3Fdbg%3D1%26acc%3D15695'+escape('&ss='+ss+'&sl='+sl+'&embedid='+embedId+'&fs='+firstslide+domString+tokenString); url = 'http://vhost.oddcast.com/vhsssecure_dbg.php?dbg=1&doc='+getShow+'&edit=0&acc=15695&firstslide='+firstslide+'&loading='+loading+'&minimal='+minimal+'&bgcolor=0x'+bgcolor+domString+tokenString+'&lc_name='+lc_name+'&fv='+flashVersion+'&is_ie=0'; showURL = url; loading = 1; // done after request not to allow admin not to have a loader if (transparent != 1){ AC_RunFlContentX( 'height',height,'swliveconnect','true','src',url,'scale','noborder','id','VHSS','width',width,'bgcolor','#'+bgcolor,'quality','high','movie',url,'name','VHSS','codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version='+flashVersion+',0,0,0'); }else{ AC_RunFlContentX( 'height',height,'swliveconnect','true','src',url,'scale','noborder','id','VHSS','width',width,'bgcolor','#'+bgcolor,'quality','high','movie',url,'name','VHSS','codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version='+flashVersion+',0,0,0', 'wmode','transparent' ); } } function AC_RunFlContentX(){ var codebase = AC_GetCodebase ( "http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=" , "7,0,0,0", arguments ); AC_GenerateObj ( "AC_RunFlContentX()", true, "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" , codebase , "http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" , "application/x-shockwave-flash", arguments ); } var MSG_EvenArgs = 'The %s function requires an even number of arguments.' + '\nArguments should be in the form "atttributeName","attributeValue",...'; var MSG_SrcRequired = "The %s function requires that a movie src be passed in as one of the arguments."; function AC_GetCodebase(baseURL, defaultVersion, args){ var codebase = baseURL + defaultVersion; for (var i=0; i < args.length; i=i+2) { currArg = args[i].toLowerCase(); if (currArg == "codebase" && args.length > i+1) { if (args[i+1].indexOf("http://") == 0) { codebase = args[i+1]; }else{ codebase = baseURL + args[i+1]; } } } return codebase; } function AC_sprintf(str){ for (var i=1; i < arguments.length; i++){ str = str.replace(/%s/,arguments[i]); } return str; } function AC_checkArgs(args,callingFn){ var retVal = true; if (parseFloat(args.length/2) != parseInt(args.length/2)){ alert(sprintf(MSG_EvenArgs,callingFn)); retVal = false; } return retVal; } function AC_GenerateObj(callingFn, useXHTML, classid, codebase, pluginsPage, mimeType, args){ if (!AC_checkArgs(args,callingFn)){ return; } var tagStr = ''; var currArg = ''; var closer = (useXHTML) ? '/>' : '>'; var srcFound = false; var embedStr = '\n"; document.write(tagStr); } function VHSS_DoFSCommand(eventName, args) { if (eventName == "onSlideBegin" || eventName == "sceneLoaded" || eventName == "vh_sceneLoaded") { if (window.vh_sceneLoaded != null){ vh_sceneLoaded(args); } } else if (eventName=="hostLoaded" || eventName=="vh_hostLoaded") { if (window.vh_hostLoaded != null) vh_hostLoaded(); } else if (eventName=="talkStarted" || eventName=="vh_talkStarted") { if (window.vh_talkStarted != null) vh_talkStarted(); } else if (eventName=="talkEnded" || eventName=="vh_talkEnded") { if (window.vh_talkEnded != null) vh_talkEnded(); } else if (eventName=="audioLoaded" || eventName=="vh_audioLoaded"){ if (window.vh_audioLoaded != null) vh_audioLoaded(args); } else if (eventName == "ttsLoaded" || eventName == "vh_ttsLoaded"){ if (window.vh_ttsLoaded != null) vh_ttsLoaded(args); } else if (eventName=="aiResponse" || eventName=="vh_aiResponse"){ if (window.vh_aiResponse != null) vh_aiResponse(unescape(args)); } else if (eventName == "audioProgress" || eventName == "vh_audioProgress"){ if (window.vh_audioProgress !=null) vh_audioProgress(args); } } // --- End VHSS player events --- function setStatus(interruptMode, audioProgress){ useFlashLC("setStatus", interruptMode+"~"+audioProgress); } // --- Speech Functions --- function sayText(ttsText,voice,lang,engine){ useFlashLC("sayText", escape(ttsText)+"~"+voice+"~"+lang+"~"+engine+"~js"); } function sayAIResponse(ttsText,voice,lang,engine,botid){ useFlashLC("sayAIResponse", escape(ttsText)+"~"+voice+"~"+lang+"~"+engine+"~"+botid); } function sayAudio(audioName, stTime){ useFlashLC("sayAudio", audioName+"~"+stTime); } function loadText(ttsText,voice,lang,engine){ useFlashLC("loadText", escape(ttsText)+"~"+voice+"~"+lang+"~"+engine); } function loadAudio(audioName){ useFlashLC("loadAudio", audioName); } function loadShow(showIndex){ useFlashLC("loadShow", showIndex); } function loadScene(sceneIndex){ loadShow(sceneIndex); } function setInterruptMode(_mode){ useFlashLC("setInterruptMode", _mode); } function replay(_val){ useFlashLC("replay", _val); } function stopSpeech(){ useFlashLC("stopSpeech"); } function saySilent(init_time){ useFlashLC("saySilent", init_time); } function setPlayerVolume(in_vol){ useFlashLC("setPlayerVolume", in_vol); } // --- End Speech Functions --- // --- Look Functions --- function followCursor(newMouseMode){ if (newMouseMode == 1) mousemoveCapture(); else mousemoveRelease(); useFlashLC("followCursor", newMouseMode+"~"); } function recenter(){ useFlashLC("recenter"); } function setGaze(deg, dur, rad, pageReq){ useFlashLC("setGaze", deg+"~"+dur+"~"+rad+"~"+pageReq); } function freezeToggle(){ useFlashLC("freezeToggle"); } // --- End Look Functions --- // --- Host Appearance Functions --- function setColor(part, clr){ useFlashLC("setColor", part+"~"+clr); } // --- End Host Appearance Functions --- // --- Slide Functions --- /* *deprecated */ function SetLink(href, targetName){ setLink(href, targetName); } function SetTarget(targetName){ useFlashLC("SetTarget", targetName); } /* *deprecated */ function setLink(href, targetName){ useFlashLC("setLink", href+"~"+targetName); } function showTranscript(acc_id,ss_id,audioID,slidenum){ transWindow = window.open( "http://vhss.oddcast.com/transcript_frame.php?acc="+acc_id+"&ss="+ss_id+"&au="+audioID+"&sn="+slidenum,"transWindow","width=500,height=500,toolbar=no,resizable=no"); transWindow.focus(); } // --- End Slide Functions --- // --- Local connection queue and functions --- var lc_busy = 0; var lcQueue = new Array(); function vhss_lc_DoFSCommand(command, args) { lcLoaded(); } function lcLoaded(){ lc_busy =0; checkQueue(); } function useFlashLC(meth, args){ lcQueue[lcQueue.length]=meth; lcQueue[lcQueue.length]=args; checkQueue(); } function checkQueue(){ if (lc_busy || lcQueue.length == 0) return; var lc_temp1 = lcQueue[0]; var lc_temp2 = lcQueue[1]; var t_ar = new Array(); for (var act = 2; act"; document.getElementById(divcontainer).innerHTML = divinfo; } // --- End Local connection queue and functions --- // --- hidden and in development functions --- function sayAIResponseExported(ttsText,voice,lang,engine,account){ useFlashLC("sayAIResponseExported", escape(ttsText)+"~"+voice+"~"+lang+"~"+engine+"~"+account); } function sayAudioExported(audioName, stTime, account){ useFlashLC("sayAudioExported", audioName+"~"+stTime+"~"+account); } function sayTextExported(ttsText,voice,lang,engine,account){ useFlashLC("sayTextExported", escape(ttsText)+"~"+voice+"~"+lang+"~"+engine+"~"+account); } function sayTextEmo(ttsText,voice,lang,engine,emo){ useFlashLC("sayTextEmo", escape(ttsText)+"~"+voice+"~"+lang+"~"+engine+"~"+emo); } function hostSleep(_state){ useFlashLC("hostSleep", _state); } function getAnchorPosition(anchorname) { var useWindow=false; var coordinates=new Object(); var x=0,y=0; var use_gebi=false, use_css=false, use_layers=false; if (document.getElementById) { use_gebi=true; } else if (document.all) { use_css=true; } else if (document.layers) { use_layers=true; } if (use_gebi && document.all) { x=AnchorPosition_getPageOffsetLeft(document.all[anchorname]); y=AnchorPosition_getPageOffsetTop(document.all[anchorname]); } else if (use_gebi) { var o=document.getElementById(anchorname); x=AnchorPosition_getPageOffsetLeft(o); y=AnchorPosition_getPageOffsetTop(o); } else if (use_css) { x=AnchorPosition_getPageOffsetLeft(document.all[anchorname]); y=AnchorPosition_getPageOffsetTop(document.all[anchorname]); } else if (use_layers) { var found=0; for (var i=0; i=0&&h<=0){ deg = Math.abs(deg); }else if(w>=0&&h>0){ deg = 180 - deg; }else if(w<0&&h>0){ deg = Math.abs(deg)+180; }else if(w<0&&h<=0){ deg = 360 - deg; } if(radius>100) radius = 100; if((getMicroTime()-lastCallTime)>milSeconds){ setGaze(deg, 1, radius, 1); lastCallTime = getMicroTime(); } return true } mousemoveCapture(); function setNextSceneIndex(sceneRange){ useFlashLC("setNextSceneIndex", sceneRange); } function gotoScene(sceneIndex){ useFlashLC("gotoScene", sceneIndex); } function gotoNextScene (){ useFlashLC("gotoNextScene"); } function gotoPrevScene(){ useFlashLC("gotoPrevScene"); }