 




var asyncLoadFlag = "0";

var protocalType  = (window.location.protocol.indexOf("https") != -1 ? 'https' : 'http') 

var timeHour1 = parseInt("3");
timeHour1 = timeHour1+1;

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));
}

//---------------retriv the queryString parameter----------
function getParameter( parameterName ) {
	var queryString = "";
	try
	{
	   queryString = window.top.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 lschatWinLoadStatus = getParameter("ls_cs");
var ls_chatsess_s = escape(livsrvgetCookie("ls_chatsess9657"));
var ls_chatbox_s  = escape(livsrvgetCookie("ls_chatbox9657"));
var ls_brodet_s	  = escape(livsrvgetCookie("ls_brodet9657"));

var tls_tempcs_id = livsrvgetCookie("ls_tempcs_id9657");
var tls_serverip = livsrvgetCookie("ls_serverip9657");
var pInitSess = livsrvgetCookie("ls_initsess9657");

if (tls_tempcs_id == "")
{
	tls_tempcs_id =  "NA";
	tls_serverip = "NA";
}
if(pInitSess == "")
{
	pInitSess = "NA";
}

var ls_nexturl = "";
var did = "9657";


var pageUrl = "NA";

try{
pageUrl = escape(window.top.location.href);
}
catch(e){}


var testpageUrl = "";
try
{
    testpageUrl = window.location.search.substring(1);
}
catch(e)
{}



if(pageUrl.indexOf("livserv_cs_id")>=0 || testpageUrl.indexOf("test_cs_id") != -1)
{
	ls_chatsess_s = "";
}

var livpropSessionId = "";

try{
  livpropSessionId = document.getElementById("UserSessionID").value;
}
catch(e){
}

var ls_chat_url = "";

if(pageUrl.indexOf("brigadegroup.com/residential/helpful-tools/electronic-fund-transfer")== -1){
    if (ls_chatsess_s == "")
    {
    	ls_nexturl = '<script src="' + protocalType + '://sub1.livserv.in/livserv/livservtemp3/index.jsp?did=9657&pid=1&gtm=null' + '&count=' + new Date().getTime() + '"></script>';
    	ls_chat_url = protocalType + '://sub1.livserv.in/livserv/livservtemp3/index.jsp?did=9657&pid=1&gtm=null' + '&count=' + new Date().getTime();
    }
    else
    {
    	ls_nexturl = '<script src="' + protocalType + '://sub1.livserv.in/livserv/livservtemp3/GetLivservWindow.jsp?did=9657&pid=1&exParam=null&browserUrl=' +  pageUrl + '&ls_chatsess=' + ls_chatsess_s + '&ls_chatbox=' + ls_chatbox_s + '&ls_brodet=' + ls_brodet_s + '&pCsid=' + tls_tempcs_id + '&pSrvid=' + tls_serverip + '&pInitSess=' + pInitSess + '&livpropSessionId=' + livpropSessionId +  '&count=' + new Date().getTime() + '" ></script>';

    	ls_chat_url = protocalType + '://sub1.livserv.in/livserv/livservtemp3/GetLivservWindow.jsp?did=9657&pid=1&exParam=null&browserUrl=' +  pageUrl + '&ls_chatsess=' + ls_chatsess_s + '&ls_chatbox=' + ls_chatbox_s + '&ls_brodet=' + ls_brodet_s + '&pCsid=' + tls_tempcs_id + '&pSrvid=' + tls_serverip + '&pInitSess=' + pInitSess + '&livpropSessionId=' + livpropSessionId +  '&count=' + new Date().getTime();
    }
}



if(9657 == 508   || 9657 ==  2553  || 9657 ==  16253 || 9657 ==  5662  || 9657 ==  18576 || 9657 == 20686   || 9657 == 22068 || 9657 == 20973 ||  9657 == 21675 || 9657 == 20981 || 9657 == 16184 || 9657 == 9901 || 9657 == 7655 || 9657 == 13852 || 9657 == 9042  || 9657 == 3422 || 9657 == 15085 || 9657 =="20973" || 9657 =="9725" || 9657 =="18942" || 9657 =="15102" || 9657 =="12981" || 9657 =="13108" || 9657 =="20177" || 9657 =="18990" || 9657 =="19690" || 9657 =="9650" || 9657 =="20185"  || 9657 =="9657" || 9657 =="918" || 9657 == 19045  ||  9657 == 19205 ||  9657 == 9527 || 9657 == 4456 ||  9657 == 2546 || 9657 == 16869 || 9657 == 20488 || 9657 == 7596 || 9657 == "8228" || 9657 == "1983" || 9657 ==  "8907" || 9657 ==  "12108" || 9657 == "11912" || 9657 == "12196" || 9657 == "17015" || 9657 == "14218" || 9657 == "17339" || 9657 == "4331" || 9657 == "18185" || 9657 == "15144" || 9657 == "17552"  || 9657 == "10975" || 9657 == "6202" || 9657 == "18637" || 9657 == "18492" || 9657 == "16353" || 9657 == "16345" || 9657 == "8228"  || 9657 == "8623" || 9657 == "14373" || 9657 == "16661"  || 9657 == "6808"  || 9657 == "5054"  || 9657 == "16394"  || 9657 == "6171"  || 9657 == "16378"  ||  9657 =="18990" || 9657 =="8502" || 9657 == "16386")
{
	loadLsChat();
}
else if(9657 == 21801)
{
	if(pageUrl.indexOf("asterhospitals.in/gift-a-life")==-1)
	{
		loadLsChat();
	}
	else{
		var lsWinBlockCss = "<style>#livprop_chatbox{display:none}</style>";
		document.body.insertAdjacentHTML("beforeEnd", lsWinBlockCss);
	}
}
else if(9657 == 7980){
	if(pageUrl.indexOf("feedback_form.php")== -1)
	{
		loadLsChat();
	}	
}
else if( 9657 == 7153 ){
    if(lschatWinLoadStatus != "no"){
        loadLsChat();
    }
}
else if(9657 == 57200000)
{
	
	if((timeHour1 <= 7 || timeHour1 > 18))
	{
		document.write(ls_nexturl);
	}

}
else{
    document.write(ls_nexturl);
    //loadLsChat();
}

function loadLsChat(){

	(function(){
		var s = document.createElement('script');
		s.type = "text/javascript";
		s.async = true;
		s.src = ls_chat_url;
		document.body.appendChild(s);
	})();
}