var bolGroupChatAdhocCon=true; var strLCName = null; var strCurrentURL = 'http://www.africanvideoproduction.com/dnn/DesktopModules/dnnGroupChat/'; var swf_url = "preloader.swf"; var seconds = 0; var winW = 0; var winH = 0; var swf_logic = strCurrentURL+"logic.swf";var gcroom = '';var gcrecorder = '';var gcvideo = '';var gcpushcam = ''; if (strLCName == null) strLCName = getLCName(null); /** * SWFObject v1.5: Flash Player detection and embed - http://blog.deconcept.com/swfobject/ * * SWFObject is (c) 2007 Geoff Stearns and is released under the MIT License: * http://www.opensource.org/licenses/mit-license.php * */ if(typeof deconcept=="undefined"){var deconcept=new Object();}if(typeof deconcept.util=="undefined"){deconcept.util=new Object();}if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object();}deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a){if(!document.getElementById){return;}this.DETECT_KEY=_a?_a:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params=new Object();this.variables=new Object();this.attributes=new Array();if(_1){this.setAttribute("swf",_1);}if(id){this.setAttribute("id",id);}if(w){this.setAttribute("width",w);}if(h){this.setAttribute("height",h);}if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(!window.opera&&document.all&&this.installedVer.major>7){deconcept.SWFObject.doPrepUnload=true;}if(c){this.addParam("bgcolor",c);}var q=_7?_7:"high";this.addParam("quality",q);this.setAttribute("useExpressInstall",false);this.setAttribute("doExpressInstall",false);var _c=(_8)?_8:window.location;this.setAttribute("xiRedirectUrl",_c);this.setAttribute("redirectUrl","");if(_9){this.setAttribute("redirectUrl",_9);}};deconcept.SWFObject.prototype={useExpressInstall:function(_d){this.xiSWFPath=!_d?"expressinstall.swf":_d;this.setAttribute("useExpressInstall",true);},setAttribute:function(_e,_f){this.attributes[_e]=_f;},getAttribute:function(_10){return this.attributes[_10];},addParam:function(_11,_12){this.params[_11]=_12;},getParams:function(){return this.params;},addVariable:function(_13,_14){this.variables[_13]=_14;},getVariable:function(_15){return this.variables[_15];},getVariables:function(){return this.variables;},getVariablePairs:function(){var _16=new Array();var key;var _18=this.getVariables();for(key in _18){_16[_16.length]=key+"="+_18[key];}return _16;},getSWFHTML:function(){var _19="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute("swf",this.xiSWFPath);}_19='0){_19+='flashvars="'+_1c+'"';}_19+="/>";}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");this.setAttribute("swf",this.xiSWFPath);}_19='';_19+='';var _1d=this.getParams();for(var key in _1d){_19+='';}var _1f=this.getVariablePairs().join("&");if(_1f.length>0){_19+='';}_19+="";}return _19;},write:function(_20){if(this.getAttribute("useExpressInstall")){var _21=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){this.setAttribute("doExpressInstall",true);this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title);}}if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){var n=(typeof _20=="string")?document.getElementById(_20):_20;n.innerHTML=this.getSWFHTML();return true;}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}return false;}};deconcept.SWFObjectUtil.getPlayerVersion=function(){var _23=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var x=navigator.plugins["Shockwave Flash"];if(x&&x.description){_23=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}}else{if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){var axo=1;var _26=3;while(axo){try{_26++;axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+_26);_23=new deconcept.PlayerVersion([_26,0,0]);}catch(e){axo=null;}}}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}catch(e){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");_23=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always";}catch(e){if(_23.major==6){return _23;}}try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}catch(e){}}if(axo!=null){_23=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}}}return _23;};deconcept.PlayerVersion=function(_29){this.major=_29[0]!=null?parseInt(_29[0]):0;this.minor=_29[1]!=null?parseInt(_29[1]):0;this.rev=_29[2]!=null?parseInt(_29[2]):0;};deconcept.PlayerVersion.prototype.versionIsValid=function(fv){if(this.majorfv.major){return true;}if(this.minorfv.minor){return true;}if(this.rev=0;i--){_2f[i].style.display="none";for(var x in _2f[i]){if(typeof _2f[i][x]=="function"){_2f[i][x]=function(){};}}}};if(deconcept.SWFObject.doPrepUnload){if(!deconcept.unloadSet){deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};window.attachEvent("onunload",deconcept.SWFObjectUtil.cleanupSWFs);};window.attachEvent("onbeforeunload",deconcept.SWFObjectUtil.prepUnload);deconcept.unloadSet=true;}}if(!document.getElementById&&document.all){document.getElementById=function(id){return document.all[id];};}var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject; function setVisibilityState(state,expDays) { var exdate=new Date(); exdate.setDate(exdate.getDate()+expDays); document.cookie = "gcVisibilityState=" +state+ ((expDays==null) ? "" : ";expires="+exdate.toGMTString()); } function getVisibilityState() { var c_name = "gcVisibilityState"; if (document.cookie.length>0) { c_start=document.cookie.indexOf(c_name + "="); if (c_start!=-1) { c_start=c_start + c_name.length+1; c_end=document.cookie.indexOf(";",c_start); if (c_end==-1) c_end=document.cookie.length; return document.cookie.substring(c_start,c_end); } } return "0"; } function getFlashMovieObject(movieName) { 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); } } var isVisible = getVisibilityState(); /*** Handle GroupChat JS API Events ***/ function gcStatusOnline(strName) { if (document.getElementById("dnn_dnnGROUPCHAT_imgChatOffline") != null) document.getElementById("dnn_dnnGROUPCHAT_imgChatOffline").style.display = "none"; if (document.getElementById("dnn_dnnGROUPCHAT_imgChatOnline") != null) document.getElementById("dnn_dnnGROUPCHAT_imgChatOnline").style.display = "block"; if (document.getElementById("dnn_dnnGROUPCHAT_divGuestName") != null) document.getElementById("dnn_dnnGROUPCHAT_divGuestName").innerHTML = "[ " + strName + " ]"; } function gcStatusOffline() { if (document.getElementById("dnn_dnnGROUPCHAT_imgChatOnline") != null) document.getElementById("dnn_dnnGROUPCHAT_imgChatOnline").style.display = "none"; if (document.getElementById("dnn_dnnGROUPCHAT_imgChatOffline") != null) document.getElementById("dnn_dnnGROUPCHAT_imgChatOffline").style.display = "block"; } function InitVisibility(strForceAction) { if (strForceAction != null && strForceAction == "show") { document.getElementById("Layer1").style.visibility = "visible"; setVisibilityState('1', 1); isVisible = '1'; return; } if (strForceAction != null && strForceAction == "hide") { document.getElementById("Layer1").style.visibility = "hidden"; setVisibilityState('0', 1); isVisible = '0'; return; } if (document.getElementById("Layer1").style.visibility == "visible") { document.getElementById("Layer1").style.visibility = "hidden"; setVisibilityState('0', 1); isVisible = '0'; } else { document.getElementById("Layer1").style.visibility = "visible"; setVisibilityState('1', 1); isVisible = '1'; } } function keepVisibility() { if (isVisible == '1' || gcroom != '') { isVisible = 1; document.getElementById("Layer1").style.visibility="visible"; } else { document.getElementById("Layer1").style.visibility="hidden"; } if (getFlashMovieObject("logic") != null) getFlashMovieObject("logic").SetVariable("watcher.notifygcstatus",""); } function openRoom(strRoomName) { //showLayer(); InitVisibility("show"); getFlashMovieObject("logic").SetVariable("watcher.roomname", strRoomName); } function openPlayer(videoName) { //showLayer(); InitVisibility("show"); getFlashMovieObject("logic").SetVariable("watcher.openvideo", videoName); } function openRecorder(strRoomName) { //showLayer(); InitVisibility("show"); getFlashMovieObject("logic").SetVariable("watcher.roomname", strRoomName); getFlashMovieObject("logic").SetVariable("watcher.openrecorder", strRoomName); } function messageReceived(from) { //showLayer(); InitVisibility("show"); openSucWindow(from); } function openSucWindow(jid) { InitVisibility("show"); getFlashMovieObject("logic").SetVariable("watcher.sucinit",jid); } function setHashTag(strMsg) { getFlashMovieObject("logic").SetVariable("watcher.sethashtag",strMsg); } function addContactDialog(strName) { getFlashMovieObject("logic").SetVariable("watcher.addcontact",strName); } function loadLogic(user, pass, server, cserver, port, lang, enablevideo, rtmpserver, enablevideoclip, rtmpclipserver, cleanofflinerosterusers, gcdisableaddcontact, gccontactsearch, anonymous, licensetype) { fo = new SWFObject(swf_logic, "logic", "0", "0", "8", "#FFFFFF"); fo.addVariable("user", user); fo.addVariable("pass", pass); fo.addVariable("server", server); fo.addVariable("ctype", "flash"); fo.addVariable("cserver",cserver); fo.addVariable("port",port); fo.addVariable("rtmpserver", rtmpserver); fo.addVariable("rtmpclipserver", rtmpclipserver); fo.addVariable("saveclipurl",strCurrentURL+"saveclip.aspx"); fo.addVariable("getclipthumburl", strCurrentURL+"getclipinfo.aspx"); fo.addVariable("xprop",0); fo.addVariable("yprop",0); fo.addVariable("lang",lang); fo.addVariable("btype","ie"); fo.addVariable("hideroster","false"); fo.addVariable("videoconference",enablevideo); fo.addVariable("videoclip",enablevideoclip); fo.addVariable("anonymous",anonymous); fo.addVariable("lcname",strLCName); fo.addVariable("gccontactsearch", gccontactsearch); fo.addVariable("cleanofflinerosterusers", cleanofflinerosterusers); fo.addVariable("gcdisableaddcontact", gcdisableaddcontact); fo.addVariable("gcroom",""); fo.addVariable("gcrecorder",""); fo.addVariable("gcvideo",""); fo.addVariable("gcpushcam",""); fo.addVariable("backlinkurl", document.location); fo.addVariable("cameralimitonroomenter", -1); fo.addVariable("licensetype", licensetype); fo.write("GroupchatLogic"); //fo2 = new SWFObject(swf_as3bridge, "gcas3bridge", "0", "0", "9", "#FFFFFF"); //fo2.addVariable("lcname",strLCName); //fo2.write("gcas3bridge"); } function initGCLogic(strOperator, user, pass, server, cserver, port, lang, enablevideo, rtmpserver, enablevideoclip, rtmpclipserver, cleanofflinerosterusers, gcdisableaddcontact, gccontactsearch, anonymous, licensetype) { if (!document.getElementById("GroupchatLogic")) { document.write("
"); document.write("<\/div>"); document.write("
"); document.write("<\/div>"); loadLogic(user, pass, server, cserver, port, lang, enablevideo, rtmpserver, enablevideoclip, rtmpclipserver, cleanofflinerosterusers, gcdisableaddcontact, gccontactsearch, anonymous, licensetype); operatorJid = strOperator; } } function moveWindow() { if (document.getElementById("Layer1")) { var ref = document.getElementById("Layer1"); var val = 0; if (document.documentElement && document.documentElement.scrollTop>0) { var val = document.documentElement.scrollTop; } else if (document.body && document.body.scrollTop) { var val = document.body.scrollTop; } var noPx = document.childNodes ? 'px' : 0; ref.style.top = val + noPx; } self.setTimeout('moveWindow()',300); } function gup( name ) { name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]"); var regexS = "[\\?&]"+name+"=([^&#]*)"; var regex = new RegExp( regexS ); var results = regex.exec( window.location.href ); if( results == null ) return ""; else return results[1]; } function gcSetCookie( name, value, expires, path, domain, secure ) { // set time, it's in milliseconds var today = new Date(); today.setTime( today.getTime() ); if ( expires ) { expires = expires * 1000; } var expires_date = new Date( today.getTime() + (expires) ); document.cookie = name + "=" +escape( value ) + ( ( expires ) ? ";expires=" + expires_date.toGMTString() : "" ) + ( ( path ) ? ";path=" + path : "" ) + ( ( domain ) ? ";domain=" + domain : "" ) + ( ( secure ) ? ";secure" : "" ); } function gcGetCookie( check_name ) { // first we'll split this cookie up into name/value pairs // note: document.cookie only returns name=value, not the other components var a_all_cookies = document.cookie.split( ';' ); var a_temp_cookie = ''; var cookie_name = ''; var cookie_value = ''; var b_cookie_found = false; // set boolean t/f default f for ( i = 0; i < a_all_cookies.length; i++ ) { // now we'll split apart each name=value pair a_temp_cookie = a_all_cookies[i].split( '=' ); // and trim left/right whitespace while we're at it cookie_name = a_temp_cookie[0].replace(/^\s+|\s+$/g, ''); // if the extracted name matches passed check_name if ( cookie_name == check_name ) { b_cookie_found = true; // we need to handle case where cookie has no value but exists (no = sign, that is): if ( a_temp_cookie.length > 1 ) { cookie_value = unescape( a_temp_cookie[1].replace(/^\s+|\s+$/g, '') ); } // note that in cases where cookie is initialized but no value, null is returned return cookie_value; break; } a_temp_cookie = null; cookie_name = ''; } if ( !b_cookie_found ) { return null; } } function gcDeleteCookie( name, path, domain ) { if ( gcGetCookie( name ) ) document.cookie = name + "=" + ( ( path ) ? ";path=" + path : "") + ( ( domain ) ? ";domain=" + domain : "" ) + ";expires=Thu, 01-Jan-1970 00:00:01 GMT"; } function getLCName(strLCName) { //read sessionStorage on load and show if s.th. is stored var bolDOMStoreCapable = false; var bolDOMStoreEnabled = false; if (typeof(sessionStorage) != 'undefined' && sessionStorage != null) { bolDOMStoreCapable = true; try { var mytester = sessionStorage.lcname; bolDOMStoreEnabled = true; } catch(e) { } } if (bolDOMStoreCapable && bolDOMStoreEnabled) { // HTML5 way if (sessionStorage.lcname != null) { strLCName = sessionStorage.lcname; } else { strLCName = new Date().getTime(); sessionStorage.lcname = strLCName; } } else { // IE 5-7 cookie way strLCName = gcGetCookie('lcname'); if (strLCName != null) gcDeleteCookie('lcname', '/', '') if(window.attachEvent) { window.attachEvent('onunload',gcUnloadEvent); } else { window.addEventListener('unload', gcUnloadEvent, false); } if (strLCName == null) { strLCName = new Date().getTime(); } } return strLCName; } function gcUnloadEvent() { var bolDOMStoreCapable = false; var bolDOMStoreEnabled = false; if (typeof(sessionStorage) != 'undefined' && sessionStorage != null) { bolDOMStoreCapable = true; try { var mytester = sessionStorage.lcname; bolDOMStoreEnabled = true; } catch(e) { } } if (bolDOMStoreCapable == false || bolDOMStoreEnabled == false) { // No DOM storage, so use classic cookie gcSetCookie( 'lcname', objGCConfig.strLCName, '60', '/', '', '' ); } } function gcRemoveChat() { var remgui = document.getElementById("Layer1"); var rembridge = document.getElementById("gcas3bridge"); var remlogic = document.getElementById("GroupchatLogic"); if (remgui) { var remguiparent = remgui.parentNode; remguiparent.removeChild(remgui); } if (rembridge) { var rembridgeparent = rembridge.parentNode; rembridgeparent.removeChild(rembridge); } if (remlogic) { var remlogicparent = remlogic.parentNode; remlogicparent.removeChild(remlogic); } } function setLocation(strLocation) { swf_url = strLocation + swf_url; if (bolGroupChatAdhocCon || window.parent.frames["frmGCLogic"]) { LoadGui(); moveWindow(); } } function resizeGCGUI() { if (document.getElementById("Layer1") != null) { var isGuiVisible = document.getElementById("Layer1").style.visibility == "visible" ? true : false; var olddiv = document.getElementById("Layer1"); var currwinh=getWindowHeight(); var currwinw=getWindowWidth(); var olddiv = document.getElementById("Layer1"); olddiv.style.width=currwinw+'px'; olddiv.style.height=currwinh+'px'; } } function showLayer() { if (bolGroupChatAdhocCon) InitVisibility('show'); else parent.frmGCLogic.InitVisibility('show'); } function hideLayer() { if (bolGroupChatAdhocCon) InitVisibility('hide'); else parent.frmGCLogic.InitVisibility('hide'); } function getWindowWidth() { var curwinw = 0; if (parseInt(navigator.appVersion)>3) { if (navigator.appName=="Netscape") { curwinw = document.documentElement.offsetWidth; } if (navigator.appName.indexOf("Microsoft")!=-1) { if(document.documentElement.clientWidth == 0) { curwinw = document.body.clientWidth; } else { curwinw = document.documentElement.clientWidth; } } } return curwinw; } function getWindowHeight() { var curwinh = 0; if (parseInt(navigator.appVersion)>3) { if (navigator.appName=="Netscape") { curwinh = window.innerHeight; } if (navigator.appName.indexOf("Microsoft")!=-1) { if(document.documentElement.clientHeight == 0) { curwinh = document.body.clientHeight; } else { curwinh = document.documentElement.clientHeight; } } } return curwinh; } function insertGuiLayer(strGuiDiv) { if (typeof(document.body.insertAdjacentHTML) != 'undefined') { // IE if (!document.getElementById("Layer1")) document.body.insertAdjacentHTML("afterBegin", strGuiDiv); } else { var r = document.body.ownerDocument.createRange(); r.setStartBefore(document.body); var parsedHTML = r.createContextualFragment(strGuiDiv); document.body.insertBefore(parsedHTML, document.body.firstChild); } } function LoadGui() { flashW = "100%"; flashH = "100%"; winW = getWindowWidth(); winH = getWindowHeight(); if (!document.getElementById("Layer1")) { if (!document.getElementById("Layer1")) insertGuiLayer(" "); } if (bolGroupChatAdhocCon) keepVisibility(); else parent.frmGCLogic.keepVisibility(); document.write("\n"); } // called by flash gui search contacts link function gcSearchContacts(strURL) { location.href = strURL; } // called by flash gui in muc: invite a friend function inviteAFriend(strRoomName, strBacklinkUrl, strMyChatName, strLanguage) { var mylink; if (strLanguage != null && strLanguage == "de") { mylink = "mailto:?subject=Einladung zum GroupChat&body=Hi,%0D%0A%0D%0AIch besuche gerade eine GroupChat Konferenz online und moechte Dich zur Teilname einladen. Gerne kannst du mir auch einen Termin zwecks Verabredung vorschlagen; zum Text-, Voice- oder Video-Chat.%0D%0A%0D%0AChat-Raumname: " + strRoomName + "%0D%0A%0D%0ARaum-Link: " + strBacklinkUrl + "%0D%0A%0D%0AMein Chatname: " + strMyChatName + "%0D%0A%0D%0AFreue mich darauf Dich hier zu sehen,%0D%0A%0D%0ABis bald"; } else { mylink = "mailto:?subject=Invitation to join GroupChat&body=Hi,%0D%0A%0D%0AI am just participating a GroupChat conference online and would like to invite you to join. You may also suggest me an appointment to meet me here by text, voice or video chat.%0D%0A%0D%0AChat room name: " + strRoomName + "%0D%0A%0D%0ARoom link: " + strBacklinkUrl + "%0D%0A%0D%0AMy chat name: " + strMyChatName + "%0D%0A%0D%0ALooking forward to see you here,%0D%0A%0D%0ABye"; } location.href = mylink; } // called by userdirectory module function onGCAddContactClick(strName) { if (window.parent.frames["frmGCLogic"]) { parent.frmGCLogic.addContactDialog(strName); } else { addContactDialog(strName); } } if(window.attachEvent) { if (bolGroupChatAdhocCon) window.attachEvent('onload',keepVisibility); if (!bolGroupChatAdhocCon && parent.frmGCLogic) window.attachEvent('onload',parent.frmGCLogic.keepVisibility); window.attachEvent('onresize',resizeGCGUI); window.attachEvent('onunload',gcRemoveChat); } else { if (bolGroupChatAdhocCon) window.addEventListener('load', keepVisibility, false); if (!bolGroupChatAdhocCon && parent.frmGCLogic) window.addEventListener('load', parent.frmGCLogic.keepVisibility, false); window.addEventListener('resize',resizeGCGUI,false); window.addEventListener('unload',gcRemoveChat,false); } setLocation(strCurrentURL);