function get_cookie(name) { var arg = name + "="; var alen = arg.length; var clen = document.cookie.length; var i = 0; while (i < clen) { var j = i + alen; if (document.cookie.substring(i, j) == arg) { return get_cookie_val(j); } i = document.cookie.indexOf(" ", i) + 1; if (i == 0) { break; } } return null; } function get_cookie_val(offset) { var endstr = document.cookie.indexOf(";", offset); if (endstr == -1) { endstr = document.cookie.length; } return unescape(document.cookie.substring(offset, endstr)); } function set_cookie ( name , value ) { var argv = set_cookie.arguments; var argc = set_cookie.arguments.length; var expires = (argc > 2) ? argv[2] : null; var path = (argc > 3) ? argv[3] : null; var domain = (argc > 4) ? argv[4] : null; var secure = (argc > 5) ? argv[5] : false; document.cookie = name + "=" + escape(value) + ((expires == null) ? "" : ("; expires=" + expires.toGMTString())) + ((path == null) ? "" : ("; path=" + path)) + ((domain == null) ? "" : ("; domain=" + domain)) + ((secure == true) ? "; secure" : ""); //No I18N } function removeTrialDiv_C() { var c_value = "ZohomeetingFreeTrial_"+document.username_for_setcookie.userName.value; //No I18N del_cookie(c_value) ; var portal_name = arguments[0]; var signOutUrl = "/jsp/signout.jsp";//No I18N if(arguments.length > 0 && portal_name != "null") { if( portal_name == "assist") { location.href= signOutUrl+'?service=assist'; } else if ( portal_name == "meeting" || portal_name == "" ) { location.href= signOutUrl+'?service=meeting'; } else { location.href= signOutUrl+'?portal='+portal_name; } } else { location.href= signOutUrl; } } var w; var h; function positionOfDiv(div) { var divId = div; if(navigator.appName == 'Netscape') { document.getElementById( divId ) .style.position = 'fixed'; }else { document.getElementById( divId ) .style.position = 'absolute'; } documentHeightAndWidth(); if(divId =='trialDiv') { document.getElementById(divId).style.left = (w/2)-250+'px'; document.getElementById(divId).style.top = (h/2)-100+'px'; } else { document.getElementById(divId).style.left = (w/2)-100+'px'; document.getElementById(divId).style.top = '0px'; } } function documentHeightAndWidth() { if (self.innerHeight) // all except Explorer { h= self.innerHeight; w= self.innerWidth; } else if (document.documentElement && document.documentElement.clientHeight)// Explorer 6 Strict Mode { h= document.documentElement.clientHeight; w= document.documentElement.clientWidth; } else if (document.body) // other Explorers { h= document.body.clientHeight; w= document.body.clientWidth; } return[ w , h ]; } function showInline( id ) { var div = document.getElementById(id) ; if(div !== null) { div.style.display = "inline"; } } function getJreVersion() { //For mozilla / netscape browser. NOT for IE var compatiblejavaPlugin = false; if(navigator.plugins) { navigator.plugins.refresh(false); } // check for Java plugin in installed plugins if(navigator.mimeTypes) { for (var i=0; i < navigator.mimeTypes.length; i++) { if( (navigator.mimeTypes[ i].type != null) && (navigator.mimeTypes[ i].type.indexOf("java-applet;jpi-version") > 0) ) { jVersion = navigator.mimeTypes[ i].type.split( "=")[1]; if(((jVersion.split( ".")[0] >= 1) && (jVersion.split( ".")[1] > 6)) || ((jVersion.split( ".")[1] = 6)&& (jVersion.split( "_")[1] >= 10))) { compatiblejavaPlugin = true; break; } } } } return compatiblejavaPlugin; } function getFFVersion() { var ffversion= 2; if (/Firefox[\/\s](\d+\.\d+)/.test(navigator.userAgent)){ //test for Firefox/x.x or Firefox x.x (ignoring remaining digits); ffversion=(RegExp.$1); // capture x.x portion and store as a number } return ffversion; } function supports_HTML5() { return !!document.createElement('canvas').getContext; } function displayHtmlViewer() { var joinHtmlViewer = document.getElementById("html5Div"); if(supports_HTML5()) { if(joinHtmlViewer != null) { joinHtmlViewer.style.display="block"; //No I18N } } else { if(joinHtmlViewer != null) { joinHtmlViewer.style.display="none"; //No I18N } } } String.prototype.equals = function ( anObject ){ return ( this == anObject ); }; String.prototype.equalsIgnoreCase = function ( anObject ){ if ( anObject instanceof String || 'string'.equals( typeof( anObject ) ) ) { return ( this.toUpperCase() === anObject.toUpperCase() ); } return false; }; String.prototype.trim = function () { return this.replace(/^\s*(\S*(\s+\S+)*)\s*$/, "$1"); }; function alert_( sMessage, sHeadMsg, callback ) { if ( sHeadMsg === null ) { sHeadMsg = Global.i18nMsg.ALERT; } $('#DimBackgroundDiv').show(); if ( $('#alert_2Div').length == 0 ){ var alertdiv = "
" + sHeadMsg + "

" + sMessage + "
"; $('body').append( alertdiv ); $('#alert_2Div').center(); } else { $('#sHeadMsg').html( sHeadMsg ); $('#sMessage').html( sMessage ); $('#alert_2Div').show(); $('#alert_2Div').center(); } $("#alert_2_ok").click( function() { $('#alert_2Div').hide(); if( callback ) { callback(true); } }); } var gAnalytics = { pushtoGA: function(gastr) { try{ _gaq.push(['_trackPageview', gastr]);//No I18N } catch (err) { } }, pushTranstoGA: function(gastr,orderid,plan,amount,jprofileid,payperiod,prodName) { try { _gaq.push(['_trackPageview', gastr]); _gaq.push(['_addTrans',orderid,prodName,amount]);//No I18N _gaq.push(['_addItem',orderid,jprofileid,prodName,plan+'-'+payperiod,amount,'1']);//No I18N _gaq.push(['_trackTrans']); } catch (err) { } } }; var Validate = { //Validats the email which are given as a string. //Returns an object as response. emailList:function (sEmail){ try{ //replaces ';'s white spaces with ','s sEmail = sEmail.replace(/;/g,',').replace(/\s/g,','); //Emptys these pattens "(.*?)", <,> present in the given string sEmail = sEmail.replace(/"(.*?)"/g,'').replace(//g,''); //replaces line breakers and Carriage return character with ',' sEmail = sEmail.replace(/\n|\r/g, ','); //splits the string to array var emailArr = sEmail.split( /,\s*/ ); emailArr = cleanArray(emailArr); sEmail = emailArr.toString(); var isValid = true; sEmail = sEmail.trim(); if(sEmail != "" && sEmail != "\n") { for ( var i=0; i= 0) { WebMessanger.setDomain(document.commonValuesForm.wmsDomain.value); } WebMessanger.setNickName(nickName); var wmssettings = WMSSessionConfig.CHAT | WMSSessionConfig.CHAT_PRESENCE | WMSSessionConfig.PRESENCE_PERSONAL; WebMessanger.setConfig(wmssettings); if (zuid == "null" || zuid == null) { if (annonID != null) { // Modified on Feb 22, 2013 for bug fixing 404 url call ( "/jsp/login.jsp" ) // // When registering with anonymous id, use "WebMessanger.registerAnnon" instead of "WebMessanger.register" // WebMessanger.registerAnnon('MT', annonID, nickName, TP); //No i18n } else { WebMessanger.register('MT', nickName, TP); //No i18n } } else if ((TP != null) && ("true" == TP)) { WebMessanger.registerZuid('MT', zuid, nickName, true); //No i18n } else { WebMessanger.registerZuid('MT', zuid, nickName); //No i18n } } catch (err) {} }; function getBrowserNameandVersion() { var ua= navigator.userAgent, tem, M= ua.match(/(opera|edge|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i) || []; //handling microsoft edge case if(ua.match(/Edge\/(\d+)/i)){ return 'Edge'; //no i18n } //handling microsoft edge case if(ua.match(/Edg\/(\d+)/i)){ tem= ua.match(/Edg\/(\d+)/i) || []; return 'Edg '+(tem[1] || ''); //no i18n } if(/trident/i.test(M[1])){ tem= /\brv[ :]+(\d+)/g.exec(ua) || []; return 'IE '+(tem[1] || ''); //No i18n } if(/msie/i.test(M[1])){ tem= ua.match(/\bMSIE (\d+)/); return 'IE '+(tem[1] || ''); //No i18n } if(M[1]=== 'Chrome'){ tem= ua.match(/\bOPR\/(\d+)/); if(tem!= null) { return 'Opera '+tem[1]; //No i18n } } M= M[2]? [M[1], M[2]]: [navigator.appName, navigator.appVersion, '-?']; if((tem= ua.match(/version\/(\d+)/i))!= null) { M.splice(1, 1, tem[1]); } return M.join(' '); } function getBrowserNameandOsName() { var browserNameandVersion = getBrowserNameandVersion(); var splitVal = browserNameandVersion.split(" "); var browserName = splitVal[0]; var os_name; if (navigator.appVersion.indexOf('Win') != -1) { os_name = 'Windows'; //NO I18N } if (navigator.appVersion.indexOf('Mac') != -1) { os_name = 'Mac'; //NO I18N } if (navigator.appVersion.indexOf('X11') != -1) { os_name = 'UNIX'; //NO I18N } if (navigator.appVersion.indexOf('Linux') != -1) { os_name = 'Linux'; //NO I18N } if (navigator.appVersion.indexOf('iPad') != -1) { os_name = 'iPad'; //NO I18N } if (navigator.appVersion.indexOf('iPhone') != -1) { os_name = 'iPhone'; //NO I18N } if (navigator.appVersion.indexOf('ipod') != -1) { os_name = 'ipod'; //NO I18N } var browserAndOs = { os_name : os_name, browser_name : browserName } return browserAndOs; } function sendDataTomonitoring(monitorData, key){ var csrfToken = get_cookie("ZMEET_CSRF_TOKEN"); //NO I18N monitorData = JSON.stringify(monitorData); $.ajax({ url : "/sendDataToMonitoring", //NO I18N type: "POST", //NO I18N data : "session_id="+key+"&data="+monitorData+"&zmeetreqcsrf="+csrfToken //NO I18N }) } Utils.logthis = function (msg) { var params = {}; params.log = msg; $.ajax({ url : '/logthis', // no i18n type : 'POST', // no i18n data : params }); } function getCSRFHeader(){ //ZR_ACCESS_CSRF_TOKEN //zremoteaccesscsrf var _headers={}; var csrf_value=getCookie('ZMEET_CSRF_TOKEN'); //no i18n if(csrf_value) { _headers['X-ZCSRF-TOKEN'] = 'zmeetreqcsrf='+csrf_value ; // no i18n return _headers; $.ajaxSetup({ headers: { 'X-ZCSRF-TOKEN': 'zmeetreqcsrf='+csrf_value } // no i18n }); } //For Remote Access Product csrf_value = getCookie('ZR_ACCESS_CSRF_TOKEN'); //No I18N if(csrf_value){ _headers['X-ZCSRF-TOKEN'] = 'zremoteaccesscsrf='+csrf_value ; // no i18n $.ajaxSetup({ headers: { 'X-ZCSRF-TOKEN': 'zremoteaccesscsrf='+csrf_value } // no i18n }); } //For Lens csrf_value = getCookie('ZL_CSRF_TOKEN'); //NO I18N if(csrf_value) { _headers['X-ZCSRF-TOKEN'] = 'zlenscsrf='+csrf_value ; // no i18n $.ajaxSetup({ headers: { 'X-ZCSRF-TOKEN': 'zlenscsrf='+csrf_value } // no i18n }); } } function getLauncherApplicationText(os,browser){ if(browser === 'Firefox'){ return 'Open link'; //no i18n }else if(os === 'Mac' && browser === 'Chrome'){ //No I18N return 'Open Join'; //no i18n }else if(os === 'Windows' && browser === 'Chrome'){ //No I18N return 'Open Zoho Assist'; //no i18n }else if(os === 'Windows' && browser === 'Edge'){ //No I18N return 'Yes'; //no i18n }else if(os === 'Windows' && browser === 'IE' ){ //No I18N return 'Allow'; //no i18n }else if(os === 'Mac' && browser === 'Safari'){ //No I18N return 'Allow'; //no i18n }else if(os === 'UNIX' || os === 'Linux'){ //No I18N return 'Open zohojoin'; //no i18n } return 'Open Zoho Assist'; //no i18n } function getLauncherApplicationImage(os,browser){ if(os === 'Mac' && browser === 'Firefox'){ return '../images/join/mac_firefox_launcher.png'; //no i18n }else if(os === 'Mac' && browser === 'Chrome'){ //No I18N return '../images/join/mac_chrome_new_launcher.png'; //no i18n }else if(os === 'Windows' && browser === 'Chrome'){ //No I18N return '../images/join/win_chrome_launcher.png'; //no i18n }else if(os === 'Windows' && browser === 'Firefox'){ //No I18N return '../images/join/win_firefox_new_launcher.png'; //no i18n }else if(os === 'Windows' && browser === 'Edge'){ //No I18N return '../images/join/win_ie_launcher.png'; //no i18n }else if(os === 'Windows' && browser === 'IE'){ //No I18N return '../images/join/win_ie_old_launcher.png'; //no i18n }else if(os === 'Mac' && browser === 'Safari'){ //No I18N return '../images/join/mac_safari_launcher.png'; //no i18n }else if(os === 'Windows' && browser === 'Edg'){ //no i18n return '../images/join/win_edg_launcher.png'; //no i18n } else if(os === 'UNIX' || os === 'Linux' && browser === 'Firefox'){//No I18N return '../images/join/linux_firefox_launch.png'; //no i18n }else if(os === 'UNIX' || os === 'Linux'){ //No I18N return '../images/join/linux_chrome_launch.png'; //no i18n } return ''; }