var presentationSessionFormatID; var isLoaded = false; function copy_text(meintext) { if (window.clipboardData) { window.clipboardData.setData("Text", meintext); } else if (window.netscape) { netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect'); var clip = Components.classes['@mozilla.org/widget/clipboard;1'] .createInstance(Components.interfaces.nsIClipboard); if (!clip) return; var trans = Components.classes['@mozilla.org/widget/transferable;1'] .createInstance(Components.interfaces.nsITransferable); if (!trans) return; trans.addDataFlavor('text/unicode'); var str = new Object(); var len = new Object(); var str = Components.classes["@mozilla.org/supports-string;1"] .createInstance(Components.interfaces.nsISupportsString); var copytext=meintext; str.data=copytext; trans.setTransferData("text/unicode",str,copytext.length*2); var clipid=Components.interfaces.nsIClipboard; if (!clip) return false; clip.setData(trans,null,clipid.kGlobalClipboard); } } function copy(theField) { var tempval= document.getElementById(theField); copy_text(tempval.innerHTML); return false; } function HighlightAll(theField) { // var tempval=eval("document."+theField) var tempval=document.getElementById(theField); tempval.focus() tempval.select() // if (document.all&©toclip==1){ // therange=tempval.createTextRange() // therange.execCommand("Copy") // window.status="Contents highlighted and copied to clipboard!" // setTimeout("window.status=''",1800) // } return false; } function RestoreText(theField, text) { var tempval=document.getElementById(theField); tempval.value = text; } function isIE(){ return /msie/i.test(navigator.userAgent) && !/opera/i.test(navigator.userAgent);} function pres(EventKey) { window.open("session_purchase.asp?ip_ek=" + EventKey, "presentation_control", "width=780,height=560,scrollbars=yes,resizable=no,status=no"); } function getScreenSize() { var oScreen = new Object(); switch(screen.width) { case 800: oScreen.width = 720; oScreen.height = 540; oScreen.x = 40; oScreen.y = 0; break; case 1024: oScreen.width = 944; oScreen.height = 708; oScreen.x = 40; oScreen.y = 0; break; case 1280: oScreen.width = 1269; oScreen.height = 964; oScreen.x = 0; oScreen.y = 0; break; default: oScreen.height = screen.height - 60; oScreen.width = oScreen.height * 1.33; oScreen.x = 0; oScreen.y = 0; break; } oScreen.innerWidth = 0; oScreen.innerHeight = 0; if( typeof( window.innerWidth ) == 'number' ) { //Non-IE oScreen.innerWidth = window.innerWidth; oScreen.innerHeight = window.innerHeight; } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) { //IE 6+ in 'standards compliant mode' oScreen.innerWidth = document.documentElement.clientWidth; oScreen.innerHeight = document.documentElement.clientHeight; } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) { //IE 4 compatible oScreen.innerWidth = document.body.clientWidth; oScreen.innerHeight = document.body.clientHeight; } return oScreen; } function openPresWindow(EventKey) { var lScreen; lScreen = getScreenSize(); window.open("http://www.present.ie/5.5/presenter/login.asp?ip_ek=" + EventKey, "presenterwindow", "width=" + lScreen.width + ",height=" + lScreen.height + ",top=" + lScreen.y + ",left=" + lScreen.x + ",titlebar=no,scrollbars=auto,resizable=yes,status=yes"); } function openDemoWindow(EventKey, ScreenName, Email) { var lScreen; lScreen = getScreenSize(); window.open("http://www.present.ie/5.5/viewer/login.asp?ip_ek=" + EventKey + "&ScreenName=" + ScreenName + "&Email=" + Email + "&time=" + Math.random() * 100000 + "", "viewerwindow", "width=" + lScreen.width + ",height=" + lScreen.height + ",top=" + lScreen.y + ",left=" + lScreen.x + ",titlebar=no,scrollbars=auto,resizable=yes,status=no"); } function playRecording(recID) { var lScreen; lScreen = getScreenSize(); window.open("http://www.present.ie/5.0_ipRecordingPlayer/default.asp?c_psrid=" + recID, "recordingwindow", "width=" + lScreen.width + ",height=" + lScreen.height + ",top=" + lScreen.y + ",left=" + lScreen.x + ",titlebar=no,scrollbars=auto,resizable=yes,status=no"); } function InstallPlugin() { MM_openBrWindow("http://wip.webdialogs.com/browser/plugin.asp?brand=InstantPresenter&locale=","_install", "width=760,height=400"); } function InstallPlugin_new() { //alert("The install will be available momentarilly. Please try back in 5 minutes. Thank you!"); MM_openBrWindow("http://" + serverWeb + "/component_download.asp?start=true","_install", "width=760,height=450,status=1,scrollbars=1"); } function OpenVideoPluginWindow() { //alert("The install will be available momentarilly. Please try back in 5 minutes. Thank you!"); MM_openBrWindow("http://" + serverWeb + "/AccountManager/Other/VideoComponentDownload.aspx?start=true","_install", "width=760,height=450,status=1"); } function openContentUpload(encEventID) { //var contentURL = "http://www.present.ie/5.5/presenter//presentation_upload.asp?ip_e=" + encEventID; var contentURL = "http://www.present.ie/AccountManager/Presentation/PresentationActiveUpload.aspx?ip_e=" + encEventID; if (window.showModalDialog) // ie { window.showModalDialog(contentURL, self, "width=400,height=200,status=1,toolbars=0"); } else { MM_openBrWindow(contentURL, "_upload", "modal,width=400,height=200,status=1"); } } function MM_openBrWindow(theURL,winName,features) { //v2.0 window.open(theURL,winName,features); } function MM_preloadImages() { //v3.0 var d=document; if(d.images) { if(!d.MM_p) d.MM_p=new Array(); var i,j=d.MM_p.length, a=MM_preloadImages.arguments; for(i=0; i < a.length; i++){ if (a[i].indexOf("#")!=0) { d.MM_p[j]=new Image; d.MM_p[j++].src=a[i]; } } } } function MM_swapImgRestore() { //v3.0 var i,x,a=document.MM_sr; for(i=0; a && i < a.length && (x=a[i]) && x.oSrc;i++) { x.src=x.oSrc; } } function MM_findObj(n, d) { //v4.01 var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0 && parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p); } if(!(x=d[n]) && d.all) x=d.all[n]; for(i=0;!x && i < d.forms.length;i++) x=d.forms[i][n]; for(i=0;!x && d.layers && i < d.layers.length; i++) x=MM_findObj(n,d.layers[i].document); if(!x && d.getElementById) x=d.getElementById(n); return x; } function MM_swapImage() { //v3.0 var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3) if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];} } //**************************************************// //*********** MEETING FUNCTIONS ********************// //**************************************************// function detectPlugin() { //if (isIE()) //{ var oPlugin = document.getElementById("CosNetControl"); //var oPre = document.getElementById("install_status"); var oInstalled = "undefined"; try { oInstalled = typeof(oPlugin.FPS); //if (asVer != "undefined") // asVer = "unknown"; } catch(err) { oInstalled = "undefined"; } if (oInstalled != "undefined") return true; else return false; //} //else // return false; } function detectApplet() { var oPlugin = document.getElementById("CosNetControl"); //var oPre = document.getElementById("install_status"); if(oPlugin.isActive != undefined) return true; else return false; } //********************************************************************** //This group of functions dealing with the launching of a URL window function URLLaunch(theURL){ var myWindow; var myScreen = getScreenSize(); theURL = theURL.replace(/,_self/g, ""); sentURL = theURL; launchURL = 'http://www.present.ie/5.5/viewer/url_launch_frameset.asp?url=' + theURL; urlWindow = window.open(launchURL,'urlWindow','width=780,height=500,screenX=120,screenY=120,top=120,left=120,toolbar=0,location=0,status=1,menubar=0,resizable=1,scrollbars=1'); setTimeout(checkURLLaunch, 2000); } function URLLaunch2() { urlWindow = window.open(launchURL,'urlWindow','width=780,height=500,screenX=120,screenY=120,top=120,left=120,toolbar=0,location=0,status=1,menubar=0,resizable=1,scrollbars=1'); hideBlockedURLMessage(); } function hideBlockedURLMessage() { who = "launchedURLDiv"; if(typeof who== 'string') who=document.getElementById(who); if(who && who.parentNode)who.parentNode.removeChild(who); } function showBlockedURLMessage() { var myDiv = document.createElement("
"); myDiv.id = "launchedURLDiv"; myDiv.style.textAlign = "center"; myDiv.style.position = "absolute"; myDiv.style.zIndex = "200"; myDiv.style.top = "30%"; myDiv.style.backgroundColor = "#eeeeee"; myDiv.style.left = "40%"; myDiv.style.width = "300"; myDiv.style.height = "200px"; myDiv.style.border = "8px solid #cccccc"; myDiv.style.padding = "4px"; var closeLink = "
[close]
"; var myLink = "The Presenter has sent you a web page link, but it was blocked by your pop-up blocker.

Please click here to open the link now.

Note: You may need to hold the Control (CTRL) key while you click the link.
"; myDiv.innerHTML = myLink; document.body.appendChild(myDiv); } function checkURLLaunch() { var IE = isIE(); alertText = "WARNING: Your browser has a pop-up blocker installed. The presenter has tried to send you this link below.\n\nCopy and paste this link into a new browser window."; if (urlWindow==null || typeof(urlWindow)=="undefined") { //has pop-up blocker showBlockedURLMessage(); } else { try { urlWindow.focus(); } catch(e) { //has pop-up blocker showBlockedURLMessage(); } } } function urlRedirect(theURL) { //if (theURL.toLowerCase().indexOf("http") == -1) // theURL = "http://" + theURL; window.location = "http://www.present.ie/5.5/viewer//url_launch_frameset.asp?url=" + theURL; } function doBreakout(theURL) { canClose = true; var url = theURL; //theURL + "?ScreenName=" + lScreenName + "&Email=" + lEmail; //alert("doBreakout: " + url); window.location = url; } //****************************************************************** function getFocus() { //window.focus(); } //**** SCREEN SHARING FUNCTIONS ************************************ var protocol = "rtmp"; var port = "1935"; var curTries = 0; var maxTries = 2; var gsID; var gR; var connecting = false; var SSControl; var isMinimized = false; var isScreenSharing = false; var canClose = true; var hasPlugin = true; function onStatus(pCode) { //alert(pCode); if (pCode != "NetStream.Record.Start") { if (pCode == "NetStream.Unpublish.Success" && isScreenSharing == false) { pCode = "NetConnection.Connect.Failed"; } doCall("ip_control", "_level0.swfProxy_mc.IPScreenShare_mc.Plugin_onStatus," + pCode + ";" + "" + ";"); if (pCode == "NetStream.Publish.Start" || pCode == "NetStream.Unpublish.Success" || pCode == "NetConnection.Connect.Closed") { switch(pCode) { case "NetStream.Publish.Start": //startedScreenShare(); isScreenSharing = true; break; case "NetStream.Unpublish.Success": case "NetConnection.Connect.Closed": stopScreenShare(); break; } } if (pCode == "NetConnection.Connect.Success") { curTries = 0; connecting = false; isScreenSharing = true; } if (pCode == "NetStream.Publish.BadName") { //msgbox "BadName"; } if (pCode == "NetConnection.Connect.Failed") { protocol = "rtmpt"; port = "80"; if (curTries < maxTries && connecting == true) { curTries++; setTimeout("retryStartScreenShare()", 500); } else stopScreenShare(); } } } function retryStartScreenShare() { //if (gsID != undefined && gR != undefined) //if (isIE()) startScreenShare(gsID, gR); } function startScreenShare(sID, r) { //if (isIE()) //{ var CosNetControl = document.getElementById("CosNetControl"); if (CosNetControl != undefined) { //alert("startScreenShare: " + sID + ", " + r + ", " + protocol + ",8.7.25.139"); gsID = sID; gR = r; CosNetControl.ColorQuality = 16; // default is 24, possible values 4,8,24 CosNetControl.FPS = 4;// default is 2, possible values 1-5 CosNetControl.ForceMode = 'WINDOWS_GDI'; //default is DIRECTX_9, possible values: WINDOWS_GDI, DIRECTX_9 //CosNetControl.StartShareDesktop('Sharing'+sID, protocol + '://8.7.25.139/screenshare/'+ sID,r.toUpperCase(),1); var s = "Sharing" + sID; var a = protocol + "://8.7.25.139:" + port + "/screenshare/" + sID; var rr = r.toUpperCase(); SSControl = CosNetControl; if (isIE()) setTimeout("SSControl.StartShareDesktop('" + s + "', '" + a + "', '" + rr + "', 1)", 500); else { rr = r.toLowerCase(); var strStart = "SSControl.StartShareDesktop('" + s + "', '" + a + "', '" + rr + "', false)"; setTimeout(strStart, 500); } connecting = true; } //} } function startedScreenShare() { var oScreen = getScreenSize(); window.moveTo(0,0); window.resizeTo(250, screen.availHeight); window.screenX = 0; window.screenY = 0; } function stopScreenShare() { if (isScreenSharing == true) { stoppedScreenShare(); var CosNetControl = document.getElementById("CosNetControl"); if (CosNetControl.StopShareDesktop != undefined) { CosNetControl.StopShareDesktop(); } } } function stoppedScreenShare() { connecting = false; curTries = 0; if (isScreenSharing) { var oScreen = getScreenSize(); window.moveTo(0, 0); //window.resizeTo(oScreen.width, oScreen.height); self.resizeTo(screen.availWidth,screen.availHeight); } isScreenSharing = false; } function checkHasScreenShare() { var CosNetControl = document.getElementById("CosNetControl"); if (CosNetControl != undefined) { if (CosNetControl.ScreenXWidth != undefined) return true; else return false; } else return false; } function doOnResize() { } function restoreMinimized() { if (isMinimized == true) Maximize(); }; function Maximize() { //alert("Maximize"); window.moveTo(0,0); window.resizeTo(screen.width - 11, screen.height - 79); window.screenX = 0; window.screenY = 0; alwaysLowered = false; isMinimized = false; }; function Minimize() { window.resizeTo(10, 10); window.moveTo(screen.width, screen.height); alwaysLowered = true; isMinimized = true; }; function fileUploaded(filename) { //alert("fileUploaded: " + sp + filename); doCall("ip_control", "_level0.swfProxy_mc.presentation_mc.loadUploadedContent," + sp + filename); } function doUnload() { if (canClose == true) return; else return "If you close this window, you will be logged out of the active presentation."; } function theUnload() { doCall("ip_control", "_level0.swfProxy_mc.doUnload, 1"); //alert("did unload"); } function doOnLoad() { canClose = false; //alert(typeof(initVideo)); //if (typeof(initVideo) != "undefined") // initVideo(); /* videohide(); var oPlayer = document.getElementById("wmvMediaPlayer"); //show or hide our player and start playing if (oPlayer) { if (oPlayer.URL != "") { videoshow(); videoplay(); } else { videohide(); } } */ if (checkHasScreenShare() == true) hasPlugin = true; else hasPlugin = false; isLoaded = true; } function unloadActiveX() { var CosNetControl = document.getElementById("CosNetControl"); if (CosNetControl != undefined) CosNetControl.removeNode(true); } function refreshAfterPluginInstall(loadedWin) { if (loadedWin != null) loadedWin.close(); /* var CosNetControl = document.getElementById("CosNetControl"); if (CosNetControl != undefined) { canClose = true; alert("ATTENTION: We will now reload the window so that the Screen Sharing plug-in may become active."); window.location.reload(); } */ loadScreenSharePlugin(); } function checkLoaded() { if (checkHasScreenShare() == true) hasPlugin = true; else hasPlugin = false; //alert("checkLoaded: " + hasPlugin); doCall("ip_control", "_level0.swfProxy_mc.IPScreenShare_mc.Plugin_resultHasPlugin," + hasPlugin.toString()); } function loadFromCodebase() { document.write(""); } function loadScreenSharePlugin() { if (!isIE()) { loadApplet(); //alert("loaded Applet"); } else if (isIE()) { loadActiveX(); //alert("loaded IE"); } else { alert("Sorry, your browser is currently not supported for screen sharing."); } } function loadApplet() { var oPlugin = document.getElementById("plugin"); if(oPlugin) { oPlugin.innerHTML = ""; checkLoaded(); return true; } else return false; } function jsOnStatus() { CosNetControl_OnStatus(arguments[0], arguments[1], arguments[2], arguments[3]); } function loadActiveX() { unloadActiveX(); var oPlugin = document.getElementById("plugin"); if(oPlugin) { oPlugin.innerHTML = ""; var CosNetControl = document.getElementById("CosNetControl"); CosNetControl.attachEvent("OnStatus", jsOnStatus); checkLoaded(); return true; } else return false; } function noScreenSharePluginInstalled(){ //alert("noScreenSharePluginInstalled"); hasPlugin = false; } function makePresenter() { if (!isIE()) { //alert("makePresenter"); if (checkHasScreenShare() == false) loadApplet(); } } function setFormatID(strFormat) { presentationSessionFormatID = Number(strFormat); if (typeof(setBandwidthProfile) != "undefined") { switch(presentationSessionFormatID) { case 10: setBandwidthProfile("small"); /* if (p != 1) { var lScreen; lScreen = getScreenSize(); //alert(window.outerHeight + ", " + document.body.clientHeight) var diff = lScreen.height - lScreen.innerHeight; window.resizeTo(lScreen.width,(lScreen.width * 0.5) + diff); } */ break; case 15: canClose = true; break; default: setBandwidthProfile("small"); break; } } } function doCall(swfId, what){ //alert("doCall: " + what); var swf = document.getElementById(swfId) if (swf) swf.SetVariable('_root.externalFunction', what); } function ip_control_DoFSCommand(command, args) { switch(command) { case "returnToAccountManager": if (p == 1) returnToAccountManager(); else { canClose = true; goToExitPage(); } break; case "startScreenShare": //alert("fscommand - screenshare"); startedScreenShare(); startScreenShare(sid, args); break; case "stopScreenShare": stopScreenShare(); break; case "openURL": URLLaunch(args); break; case "redirectURL": canClose = true; if (p == 1) { returnToAccountManager(); } urlRedirect(args); break; case "doBreakout": doBreakout(args); break; case "openContentUpload": openContentUpload(enceid); break; case "getHasPlugin": doCall("ip_control", "_level0.swfProxy_mc.IPScreenShare_mc.Plugin_resultHasPlugin," + hasPlugin.toString()); break; case "getHasVideoPlugin": if (typeof(PluginVideoCheckLoaded) != 'undefined') PluginVideoCheckLoaded(); break; case "installPlugin": InstallPlugin_new(); break; case "getScreenSize": var CosNetControl = document.getElementById("CosNetControl"); if (isIE()) doCall("ip_control", "_level0.swfProxy_mc.IPScreenShare_mc.Plugin_resultScreenSize," + CosNetControl.ScreenXWidth + ";" + CosNetControl.ScreenYHeight); else { //alert("width: " + CosNetControl.ScreenXWidth() + ", height: " + CosNetControl.ScreenYHeight()); doCall("ip_control", "_level0.swfProxy_mc.IPScreenShare_mc.Plugin_resultScreenSize," + CosNetControl.ScreenXWidth() + ";" + CosNetControl.ScreenYHeight()); } break; case "setQuality": break; case "setFrameRate": break; case "getFocus": getFocus(); break; case "makePresenter": makePresenter(); break; case "FormatID": setFormatID(args); break; case "onVideoSize": //alert("onVideoSize"); if (typeof(videoresize) != 'undefined') videoresize(args); break; case "menuShow": if (typeof(videohide) != 'undefined') videohide(); break; case "menuHide": if (typeof(videoshow) != 'undefined') videoshow(); break; case "videoHide": if (typeof(videohide) != 'undefined') videohide(); break; case "videoShow": if (typeof(videoshow) != 'undefined') videoshow(); break; case "PluginStartBroadcast": if (typeof(PluginStartBroadcast) != 'undefined') PluginStartBroadcast(args); break; case "PluginStopBroadcast": if (typeof(PluginStopBroadcast) != 'undefined') PluginStopBroadcast(); break; case "PluginSetMic": if (typeof(PluginSetMic) != 'undefined') PluginSetMic(args); break; case "PluginSettings": if (typeof(PluginSettings) != 'undefined') PluginSettings(args); break; case "PluginSetCamera": if (typeof(PluginSetCamera) != 'undefined') PluginSetCamera(args); break; } }; //function returnToAccountManager() //{ // canClose = true; // if (window.opener == "undefined" || !window.opener) // { // // window.location = "http://www.present.ie/my_account.asp"; // // } // else // { // // window.opener.location = "http://www.present.ie/my_account.asp"; // // window.close(); // } //}; function isValidUploadType(filename) { var dot = filename.lastIndexOf("."); var extention = filename.substr(dot + 1); var validTypes = "ppt,pps,pptx,pdf,jpg,swf,flv,wav,mp3,mpg,mpeg,avi,mov,gif,png,wmv,doc,xls"; if (validTypes.search(extention) != "-1") return true; else return false; }