var did="1821"; var pid="1"; var exParam = ""; //--ger repeat visitor ids var getreapvisid = livsrvgetCookie("reapvisid"+1821); var timeHour1 = parseInt("15"); timeHour1 = timeHour1+1; var weekday1 = parseInt("5"); var timeMinutes1 = "32"; var dte = new Date(); dte.setTime(dte.getTime() +(dte.getTimezoneOffset()+330)*60*1000); var timeHour = dte.getHours()+1; var weekday = dte.getDay()+1; var timeMinutes = dte.getMinutes(); var winRefUrl = ""; var ozoneQueryString = ""; var vbhcId = ""; var domainurl = ""; var leadSourceval = ""; var web_domain = window.location.hostname; ls_chat_url = ""; //-------get ga id var ls_userAgent = navigator.userAgent; var ls_gaclientId = ""; var ls_gaclientIdCookie = ""; try{ ls_gaclientIdCookie = ""+livsrvgetCookie("_ga="); var ls_gaclientIdSplit = ls_gaclientIdCookie.split("."); if(ls_gaclientIdSplit.length > 2){ ls_gaclientId = ls_gaclientIdSplit[2]; } } catch(e){} if(did != "9050" && did != "3499" && did != "7485" && did != "4896" && did != "9234" && did != "9725" && did != "9901"){ exParam = ""; } domainurl = "http://first.livserv.in:8080/bnaindia"; var pageprotocol = window.location.protocol; if ( pageprotocol.indexOf("https") != -1 ) { domainurl = "https://livserv.in/bnaindia"; } if(did == "6120" || did == "6127"){ var utm_source = getParameter("utm_source"); if(utm_source != 0){ ozoneQueryString = window.location.search.substring(1); } } var ashianaUtm = ""; if(did == "2169"){ var utm_source = getParameter("utm_source"); if(utm_source != 0){ ashianaUtm = window.parent.location.search.substring(1); } } try{ //document.getElementById("ls_chatFrameDiv").innerHTML = "

The chat service will be temporarily unavailable till 6.30 pm on 18th April 015, Regret the inconvenience.
"; } catch(e){ } var utmtrackCode = ""; if(did == "6774"){ var utm_source = getParameter("matchtype"); if(utm_source != 0){ utmtrackCode = window.location.search.substring(1); } var utm_source1 = getParameter("utm_source"); if(utm_source1 != 0){ utmtrackCode = window.location.search.substring(1); } } else if(did == "6528" || did == "7655" || did == "7741" || did == "7765" || did == "8196" || did == "8218" || did == "8378" || did == "8385" || did == "8655" || did == "8662" || did == "8669" || did == "8676" || did == "8683" || did == "8690"){ var utm_source = getParameter("utm_source"); if(utm_source != 0){ utmtrackCode = window.location.search.substring(1); } var vbhcUniqueID = getParameter("UniqueID"); if(vbhcUniqueID != 0){ vbhcId = " - UniqueID="+vbhcUniqueID; } } else if(did == "8179" || did == "9621" || did == "9614" || did == "9664" || did == "9685"){ var utm_source = getParameter("utm_source"); if(utm_source != 0){ utmtrackCode = window.location.search.substring(1); } } else if(did == "3661" || did == "572" || did == "2141" || did == "8780" || did == "5101"){ var utm_source = getParameter("utm_"); if(utm_source != 0){ utmtrackCode = window.location.search.substring(1); } } else if(did == "8228" || did == "3441" || did == "508" || did == "1983" || did == "11656" || did == "11648" || did == "11640" || did == "11632" || did == "11844"){ var utm_source = getParameter("utm_source"); if(utm_source != 0){ try{ utmtrackCode = window.parent.location.search.substring(1); } catch(e){} } } else if(did == "10180"){ var utm_source = getParameter("utm_source"); if(utm_source != 0){ var source = window.parent.location.search.substring(1); var utmsourceSplit = source.split("utm_source="); if(utmsourceSplit.length > 1){ utmsourcevalueSpit = utmsourceSplit[1].split("&"); utmtrackCode = utmsourcevalueSpit[0]; } } } //----get edm id--- var ls_edmString = window.location.search; var ls_edmvalue="na"; var ls_camp_id = 0; if(ls_edmString != "") { if(ls_edmString.indexOf("pr=") > 0 ) { ls_edmvalue = ls_edmString.replace("?",""); ls_camp_id = ls_edmvalue.split("camp_id="); ls_camp_id = ls_camp_id[1]; } } //---------------client Info--------- var allSearchKey = ""; if("null" != "null") { try { allSearchKey = "null"; } catch(e){ } } else { allSearchKey = "null"; } var userIp = "216.154.223.20"; var browVersion = ""; var browType = ""; var jsVersion = ""; var opSystem = ""; var agt = ""; agt = navigator.userAgent.toLowerCase(); if(!!navigator.userAgent.match(/Trident.*rv[ :]*11\./)){ browType = "IE"; browVersion = "11"; } else if(agt.indexOf("msie")!=-1) { browType="IE"; //try //{ var temp365=agt.split("msie") browVersion=parseFloat(temp365[1]) //} //catch(e) //{ // browVersion="6.0"; //} } else if(navigator.userAgent.indexOf("Firefox")!=-1) { browType="Firefox"; var mvar=agt.split("firefox/") browVersion=mvar[1] } else if(agt.indexOf("netscape")!=-1) { browType="Netscape"; var nvar=agt.split("netscape/") browVersion=nvar[1] } else if(agt.indexOf("chrome")!=-1) { browType="Chrome"; browVersion=""; } else if(agt.indexOf("safari")!=-1) { browType="safari"; } else if(agt.indexOf("opera")!=-1) { browType="Opera"; var ovar=agt.split("opera/") var ovar1=ovar[1] var ovar2=ovar1.split("(") browVersion=ovar2[0] } browType = browType.substring(0,80); //--------platform-------- var is_winxp = ((agt.indexOf("winxp")!=-1) || (agt.indexOf("windows nt 5.1")!=-1)); if(is_winxp) {opSystem="Windows xp"} var is_winvista = agt.indexOf("windows nt 6.0")!=-1; if(is_winvista) {opSystem="Windows Vista"} var is_win7 = agt.indexOf("windows nt 6.1")!=-1; if(is_win7) {opSystem="Windows 7"} var is_win8 = agt.indexOf("windows nt 6.2")!=-1; if(is_win8) {opSystem="Windows 8"} var is_win81 = agt.indexOf("windows nt 6.3")!=-1; if(is_win81) {opSystem="Windows 8.1"} var is_win10 = agt.indexOf("windows nt 10")!=-1; if(is_win10) {opSystem="Windows 10"} var isMac = agt.indexOf("mac os")!=-1; if(isMac) {opSystem="Mac OS"} var is_Unix = (agt.indexOf("unix")!=-1); if(is_Unix) {opSystem="Unix"} var is_linux = (agt.indexOf("inux")!=-1); if(is_linux) {opSystem="linex"} var isiphone = agt.indexOf("iphone")!=-1; if(isiphone) {opSystem="iPhone"} var isipad = agt.indexOf("ipad")!=-1; if(isipad) {opSystem="iPad"} var isandroid= agt.indexOf("android")!=-1; if(isandroid) { opSystem="Android" var ismobile = agt.indexOf("mobile")!=-1; if(ismobile){ opSystem = opSystem+" Mobile"; } else{ opSystem = opSystem+" Tablet"; } } var isBlackBerry = agt.indexOf("blackberry")!=-1; if(isBlackBerry) {opSystem="BlackBerry"} var isubuntu = agt.indexOf("ubuntu")!=-1; if(isubuntu) {opSystem="Ubuntu"} var is_winme = ((agt.indexOf("win 9x 4.90")!=-1)); if(is_winme) {opSystem="Windows me"} var is_win2k = ((agt.indexOf("windows nt 5.0")!=-1)); if(is_win2k) {opSystem="Windows 2000"} var is_win98 = ((agt.indexOf("win98")!=-1) || (agt.indexOf("windows 98")!=-1)); if(is_win98) {opSystem="Windows 98"} var is_sun = (agt.indexOf("sunos")!=-1); if(is_sun) {opSystem="sun"} var is_hpux = (agt.indexOf("hp-ux")!=-1); if(is_sun) {opSystem="hp"} var browserName = browType +' '+ browVersion; //---------refferel URL------------- var refUrl = document.referrer; if(did == "8228" || did == "1821" || did == "5176" || did == "4515" || did == "8806" || did == "8765" || did == "8404" || did == "833" || did == "3661" || did == "10532" || did == "1310" || did == "11844" || did =="10180" || did == "2169" || did == "3303" || did == "1937"){ try{ refUrl = window.parent.parent.document.referrer; } catch(e){ } } refUrl = refUrl.replace("http://",""); refUrl = refUrl.replace("https://",""); var refUrl1 = refUrl.split("/"); var userRefUrl = ""; if(refUrl1[0] == "") { var winUrl = window.location; winUrl = winUrl.toString(); urlSplit = winUrl.split("/"); userRefUrl = urlSplit[2]; userRefUrl = userRefUrl+leadSourceval winRefUrl = urlSplit[2]; } else { userRefUrl = refUrl1[0]; userRefUrl = userRefUrl+leadSourceval winRefUrl = refUrl1[0]; } var parentUrl; if(did == "1821"){ try{ parentUrl = window.parent.location.href; if(parentUrl.indexOf("visitor-management.html") != -1){ userRefUrl = parentUrl; } } catch(e){ } } if(did == "6187"){ try{ parentUrl = window.parent.location.href; if(parentUrl.indexOf("3719-2") != -1 || parentUrl.indexOf("landing-page-iconia") != -1 || parentUrl.indexOf("anding-page-crimson") != -1 || parentUrl.indexOf("landing-page-venezia") != -1){ userRefUrl = parentUrl; } } catch(e){ } } if(did == "2141" || did == "7893" || did == "5910"){ try{ userRefUrl = window.location.href; if(userRefUrl.indexOf("chat.html") != -1){ userRefUrl = window.parent.location.href; } } catch(e){ } } if(did == "10180" || did == "1937" || did == "6187" || did =="3661"){ userRefUrl = window.parent.parent.document.referrer; } //------------------------- var ls_key_result = ""; function ls_search_key() { var qsParm = new Array(); var ls_query = refUrl.split("?"); if(ls_query[1] != null) { var ls_parms = ls_query[1].split('&'); for (var i=0; i 0) { var ls_key = ls_parms[i].substring(0,pos); var ls_val = ls_parms[i].substring(pos+1); qsParm[ls_key] = ls_val; } } } var ls_searchKey = 0 ; if(userRefUrl.search("search.live") >= 0 || userRefUrl.search("msn") >= 0 || userRefUrl.search("google") >= 0) { ls_searchKey = 1; } else if(userRefUrl.search("yahoo") >= 0) { ls_searchKey = 2; } switch (ls_searchKey) { case 1: ls_key_result = qsParm["q"]; break; case 2: ls_key_result = qsParm["p"]; break; default: ls_key_result = 'Direct'; } ls_key_result = ls_key_result+""; if(ls_key_result == "undefined"){ ls_key_result = ""; } if(did =="10180"){ ls_key_result = ""; } ls_key_result = ls_key_result + leadSourceval +" "+ozoneQueryString+" "+ashianaUtm+" "+utmtrackCode+" "+vbhcId; if(1821 == 2690) { ls_key_result = winRefUrl +"-"+ ls_key_result; } if(ls_key_result.length > 240){ ls_key_result = ls_key_result.substring(0,240); } //alert(ls_key_result) } ls_search_key() //---------------------------- if(did == "2286") { if(livsrvgetCookie("transCookie") == "" ) { try{ //document.getElementById("ls_theLayer").style.display = "none"; cookiestring="transCookie=4;PATH=/"; document.cookie=cookiestring; //document.getElementById("top_text02").innerHTML = "LIVE CHAT"; } catch(e) {} } else { //cookiestring="transCookie=0;;PATH=/"; //document.cookie=cookiestring; } } function livservVisible(){ //if(document.getElementById("ls_theLayer") != null){ try{ ls_load_LivWinWin(); cookiestring="transCookie=0;PATH=/"; document.cookie=cookiestring; setTimeout("ls_win_visibility()", 1000 ); } catch(e){ //alert(e) } //} } function ls_win_visibility(){ document.getElementById("ls_theLayer").style.visibility="visible"; } var pageUrl = window.location.href; if(did == "6120" || did == "1310" || did == "8765" || did == "10180" || did == "2169" || did == "3303" || did == "1937" || did == "6187" || did =="3661"){ try{ pageUrl = window.parent.location.href; } catch(e){} } /* pageUrl = pageUrl.replace(/&/g,"---"); if(pageUrl.indexOf("http://") != -1) { pageUrl = pageUrl.replace("http://","") } if(pageUrl.indexOf("https://") != -1) { pageUrl = pageUrl.replace("https://","") } if(pageUrl.indexOf("/") == -1) { pageUrl = pageUrl + "/index.html"; } else { var spliturl = pageUrl.split("/"); if(spliturl[1] == "") { pageUrl = pageUrl + "index.html"; } } */ //---------------retriv the queryString parameter---------- function getParameter( parameterName ) { var queryString = window.location.search.substring(1); if(did == "8228" || did == "3441" || did == "508" || did == "1983" || did == "2169" || did == "11844" || did == "10180" || did == "1937" || did == "6187" || did =="3661"){ try{ queryString = window.parent.location.search.substring(1); } catch(e){ } } var parameters = new Array(); parameters = queryString.split('&'); for(var i = 0; i < parameters.length; i++) { if (parameters[i].indexOf(parameterName)>=0) { var parameterValue = new Array(); parameterValue = parameters[i].split('='); return parameterValue[1]; } } return 0; } var prelivserLivWinid = livsrvgetCookie("cs_idnew"+1821); var test_cs_id = getParameter("test_cs_id"); if(test_cs_id != 0) { //alert(test_cs_id); prelivserLivWinid = test_cs_id; } else if(getParameter("livserv_cs_id") != 0) { prelivserLivWinid = getParameter("livserv_cs_id"); } else if (prelivserLivWinid == "") { prelivserLivWinid = 1; } if(did =="10180"){ //userRefUrl = userRefUrl +"-"+ ls_key_result; } userRefUrl = userRefUrl.substring(0,220); var LivWintemp='' ls_chat_url = domainurl + '/livservtemp/GetLivservWindow.jsp?did='+ did +'&pid='+ pid +'&cs_id='+ prelivserLivWinid + '&refUrl='+ escape(userRefUrl) + '&opSystem='+ escape(opSystem) + ' &browserName='+ escape(browserName) + '&browserUrl='+ escape(pageUrl)+'&ls_searchkey='+ escape(ls_key_result) +'&ls_campid='+ls_camp_id+'&exParam='+exParam+'&userAgent='+escape(ls_userAgent)+'&repeatVisIds='+escape(getreapvisid)+'&gaclientId='+ls_gaclientId+'&count=' + new Date().getTime(); var searchWords = "null"; var regExpPatern = searchWords.split("-"); var livservSearchFlag = livsrvgetCookie("livservSearch") if(1821 == 1526 && ls_key_result != "NA" && livservSearchFlag != "false") { if(allSearchKey != "null") { for(var k=0;k= 1 && timeHour < 7) || (timeHour >= 23 && timeHour <= 24)) { document.write(LivWintemp); } //else if(weekday == 1 || weekday == 7) //{ // document.write(LivWintemp); //} //} //else //{ // document.write(LivWintemp); //} } else if(1821 == 572) { if((timeHour1 >= 1 && timeHour1 < 10) || (timeHour1 >= 18 && timeHour1 <= 24)) { if(weekday1 != 1){ document.write(LivWintemp); } } } else if(1821 == 3441) { if((timeHour1 >= 1 && timeHour1 < 10) || (timeHour1 >= 19 && timeHour1 <= 24)) { document.write(LivWintemp); } } else if(1821 == 1286) { if(weekday1 == 1) { if((timeHour1 >= 1 && timeHour1 < 10) || (timeHour1 > 17 && timeHour1 <= 24)){ document.write(LivWintemp); } } else if((timeHour1 >= 1 && timeHour1 < 10) || (timeHour1 > 21 && timeHour1 <= 24)) { document.write(LivWintemp); } } */ else if(1821 == 5454) { if((timeHour1 >= 1 && timeHour1 < 8) || (timeHour1 == 24)) { document.write(LivWintemp); } } else if(1821 == 2141) { //if(pageUrl.indexOf("cloud.ctrls.com") != -1 || pageUrl.indexOf("cloud.ctrls.com/cloud-vps.php") != -1 || pageUrl.indexOf("cloud.ctrls.com/private-cloud.php") != -1 || pageUrl.indexOf("cloud.ctrls.com/enterprise-mycloud.php") != -1 ) //{ //if((timeHour >= 1 && timeHour < 9) || (timeHour >= 20 && timeHour <= 24)) //{ //document.write(LivWintemp); //} //} //if((timeHour >= 1 && timeHour < 8) || (timeHour >= 16 && timeHour <= 24) ) //if((timeHour >= 1 && timeHour < 9) || (timeHour == 24)){ //if((timeHour >= 1 && timeHour < 9) || (timeHour == 19)){ //document.write(LivWintemp); //} /* if(weekday1 == 7){ if(timeHour1 == 24){ document.write(LivWintemp); } } else if(weekday1 == 2){ if((timeHour1 >= 1 && timeHour1 < 9)) { document.write(LivWintemp); } } if(weekday1 == 1 || weekday1 == 7) { document.write(LivWintemp); } else{ if((timeHour1 >= 1 && timeHour1 < 10) || (timeHour1 == 24)) { document.write(LivWintemp); } } */ document.write(LivWintemp); } else if(1821 == 8796 || 1821 == 8604 || 1821 == 8014 || 1821 == 2598 || 1821 == 12005 || 1821 == 11912 || 1821 == 12917 || 1821 == 13514 || 1821 == 13522){ if(opSystem.indexOf("iPhone")== -1 && opSystem.indexOf("Android")== -1) { document.write(LivWintemp); } } else if(1821 == 10543){ if(opSystem.indexOf("iPhone")== -1 && opSystem.indexOf("Android")== -1) { document.write(LivWintemp); } } else if(1821 == 8471){ if(pageUrl.indexOf("puneville")!= -1) { document.write(LivWintemp); } } else if(1821 == 3303){ if(pageUrl.indexOf("thekeralaayurveda")== -1) { document.write(LivWintemp); } } else if(1821 == 2690) { web_domain = window.location.hostname; if(web_domain.indexOf("puravankara.com")!=-1) { document.write(LivWintemp); } } else if(1821 == 2683) { setTimeout(loadLsChat, 1000) } else if(1821 == 508) { loadLsChat(); } else if(1821 == 2029 || 1821 == 1529 || 1821 == 1390 || 1821 == 1345 || 1821 == 2498 || 1821 == 890 || 1821 == 2286 || 1821 == 1879 || 1821 == 2718 || 1821 == 1186 || 1821 == 885 || 1821 == 2102) { } else if(1821 == 508123){ var vidId = livsrvgetCookie("cs_idnew"+1821); var perDayCookie = livsrvgetCookie("onechatperday"); var agentId = livsrvgetCookie("livservAgent"); alert("vidId "+vidId); alert("perDayCookie "+perDayCookie); alert("agent = "+agentId); //---set Cookie for one day if(perDayCookie == "" || agentId == "NA"){ //livsrvsetCookieForOneDay("onechatperday",vidId); document.write(LivWintemp); } else if((agentId != "NA") && (vidId == perDayCookie)){ document.write(LivWintemp); } } else { if(livservSearchFlag != "false") { document.write(LivWintemp); } } function loadUnichatWindow(){ document.write(LivWintemp); } function loadLivWinwidnow() { userRefUrl = userRefUrl.substring(0,220); var LivWintemp='' document.write(LivWintemp); } function loadLsChat(){ (function(){ var s = document.createElement('script'); s.type = "text/javascript"; s.async = true; s.src = ls_chat_url; document.body.appendChild(s); })(); } function livsrvgetCookie(cookiename) { var cookiestring=""+document.cookie; var index1=cookiestring.indexOf(cookiename); if (index1==-1 || cookiename=="") return ""; var index2=cookiestring.indexOf(';',index1); if (index2==-1) index2=cookiestring.length; return unescape(cookiestring.substring(index1+cookiename.length+1,index2)); } function livsrvstatus() { var livsrvLivWinstatus = window.location.search var livsrvtrue = livsrvLivWinstatus.indexOf("livsrv=true",0); var livsrvfalse = livsrvLivWinstatus.indexOf("livsrv=false",0); if (livsrvtrue != -1) { livsrvsetCookie("livsrv","true"); } else if (livsrvfalse != -1) { livsrvsetCookie("livsrv","false"); } return livsrvgetCookie("livsrv"); } function livsrvsetCookie(name,value) { cookiestring=name+"="+escape(value)+";EXPIRES="+livsrvgetexpirydate(365)+";PATH=/"; document.cookie=cookiestring; } function livsrvsetCookieForOneDay(name,value) { cookiestring=name+"="+escape(value)+";EXPIRES="+livsrvgetexpirydate(1)+";PATH=/"; document.cookie=cookiestring; } function livsrvgetexpirydate(nodays) { var UTCstring; Today = new Date(); nomilli=Date.parse(Today); Today.setTime(nomilli+nodays*24*60*60*1000); UTCstring = Today.toUTCString(); return UTCstring; } function setCookieSearch(name,value) { var cookiestring=name+"="+value+";PATH=/"; document.cookie=cookiestring; }