function lcgaddMonitor(){ var lcgQstr= "&lcgRef=" + escape(document.referrer) + "&lcgCP=" + escape(document.location.href) + "&lcgBrzr=" + escape(navigator.userAgent) + "&t=" + new Date().getTime(); var lcgmtrURL="http://processor.livechatpros.com/addMonitor.asp?Account=8112851952403&Site=FWP&USID=" + lcgGetUserSID() + lcgQstr ; var lcgimgMtr=new Image; lcgimgMtr.src=lcgmtrURL; } function lcgopenchatwin(){ window.open("http://processor.livechatpros.com/chatstart.asp?Account=8112851952403&Site=FWP&USID=" + lcgGetUserSID(),"ChatWin","width=472,height=320,scrollbars=no,location=no"); } //**********For checking and opening the proactive************** var lcg_horiposleft=350; var lcg_verpostop=100; var lcg_layWidth=250; var lcg_layHight=150; var lcg_outbcolor="424242"; var lcg_titletext="Live Support"; var lcg_titlextcolor="FFFFFF"; var lcg_msgpanelcolor="FFFFFF"; var lcg_innerbordercolor="424242"; var lcg_chatwinbgcolor="FFFFFF"; var lcg_typemsgcolor="Black"; var lcg_typemsgtext="Type your reply here"; var lcg_SendButtonText="Send Reply"; var lcg_msgtextcolor="424242"; var lcg_opNickName; var lcg_messagetext="Hi, this is Live Support."; var lcgDetImg=new Image; var lcgLayerOpened=false; function lcgCheckProActive(){ if (! lcgLayerOpened ){ var lcgCDetecURL="http://processor.livechatpros.com/chkProactive.asp?Account=8112851952403&SiteID=FWP&USID=" + lcgGetUserSID()+ "&t=" + new Date().getTime(); lcgDetImg=new Image; lcgDetImg.src=lcgCDetecURL; lcgDetImg.onload=lcgCheckResults; } lcgsetMonitorFlag("SA"); setTimeout("lcgCheckProActive()",1000); } function lcgCheckResults(){ if (lcgDetImg.width==1){ lcggetInvitmsg(); } } function lcgopenPAInvit(){ showMe(); lcgwinBlink(); lcgsetMonitorFlag("IO"); } function lcgwinBlink(){ document.getElementById("lcgPAtxt").focus(); self.focus(); } function lcgsetMonitorFlag(lcgtypeVal){ var lcgimgSFlgURL="http://processor.livechatpros.com/setFlags.asp?T=" + lcgtypeVal + "&Account=8112851952403&SiteID=FWP&USID=" + lcgGetUserSID() + "&t=" + new Date().getTime(); lcgimgSFlg=new Image; lcgimgSFlg.src= lcgimgSFlgURL; } function lcgOpenAccept(){ var lcgCPAreply= document.getElementById("lcgPAtxt").value; var lcgimgStartC=new Image; window.open("http://processor.livechatpros.com/messanger.asp?Account=8112851952403&Site=FWP&opid=" + lcg_opNickName + "&sid=" + lcgGetUserSID() + "&msg=" + lcgCPAreply ,"ChatWin","width=472,height=320,scrollbars=no,location=no"); hideMe(); } function lcggetInvitmsg(){ var lcgSobj=document.createElement("script"); lcgSobj.type="text/javascript"; lcgSobj.defer=true; lcgSobj.src="http://processor.livechatpros.com/getInvitMsg.asp?Account=8112851952403&Site=FWP&sid=" + lcgGetUserSID() + "&t=" + new Date().getTime(); document.getElementById("lcgLY001").appendChild(lcgSobj); } isIE=document.all; isNN=!document.all&&document.getElementById; isN4=document.layers; isHot=false; //*************************FIXED LAYER CODE with dragging*********************************** function ddInit(e){ topDog=isIE ? "BODY" : "HTML"; whichDog=isIE ? document.all.lcgLY001 : document.getElementById("lcgLY001"); hotDog=isIE ? event.srcElement : e.target; while (hotDog.id!="titleBar"&&hotDog.tagName!=topDog){ hotDog=isIE ? hotDog.parentElement : hotDog.parentNode; } if (hotDog.id=="titleBar"){ offsetx=isIE ? event.clientX : e.clientX; offsety=isIE ? event.clientY : e.clientY; nowX=parseInt(whichDog.style.left); nowY=parseInt(whichDog.style.top); ddEnabled=true; document.onmousemove=dd; } } function dd(e){ if (!ddEnabled) return; whichDog.style.left=isIE ? nowX+event.clientX-offsetx : nowX+e.clientX-offsetx; whichDog.style.top=isIE ? nowY+event.clientY-offsety : nowY+e.clientY-offsety; return false; } function ddN4(whatDog){ if (!isN4) return; N4=eval(whatDog); N4.captureEvents(Event.MOUSEDOWN|Event.MOUSEUP); N4.onmousedown=function(e){ N4.captureEvents(Event.MOUSEMOVE); N4x=e.x; N4y=e.y; } N4.onmousemove=function(e){ if (isHot){ N4.moveBy(e.x-N4x,e.y-N4y); return false; } } N4.onmouseup=function(){ N4.releaseEvents(Event.MOUSEMOVE); } } function showMe(){ lcg_showproLayer(); } document.onmousedown=ddInit; document.onmouseup=Function("ddEnabled=false"); //************************************************************************** //Common functions for both fixed and floating layers to hide and show layer function hideMe(){ if (isIE||isNN) whichDog.style.visibility="hidden"; else if (isN4) document.lcgLY001.visibility="hide"; lcgLayerOpened=false; lcgsetMonitorFlag("IC"); } function lcg_showproLayer(){ var lcg_lyrinnerhtml= '
' + lcg_titletext + 'X
' + lcg_opNickName + ': ' + lcg_messagetext + '

' + lcg_typemsgtext + ':
' whichDog=isIE ? document.all.lcgLY001 : document.getElementById("lcgLY001"); if (isIE||isNN){ whichDog.innerHTML=lcg_lyrinnerhtml whichDog.style.left=lcg_horiposleft; whichDog.style.top=lcg_verpostop; whichDog.style.height=lcg_layHight; whichDog.style.width=lcg_layWidth; whichDog.style.visibility="visible"; } else if (isN4){ document.lcgLY001.innerHTML=lcg_lyrinnerhtml document.lcgLY001.left=lcg_horiposleft; document.lcgLY001.top=lcg_verpostop; document.lcgLY001.height=lcg_layHight; document.lcgLY001.width=lcg_layWidth; document.lcgLY001.visibility="show"; } lcgLayerOpened=true; } //Functions for Setting Getting SessID function lcgGetUserSID(){ var lcgUserSID= lcggetCookie('lcgUSIDQQGGQQ'); if (lcgUserSID==''){ var lcgdmyDate= new Date(); var lcgTTexpir= (lcgdmyDate.getDate()+3) + "/" + lcgdmyDate.getMonth() + "/" + lcgdmyDate.getYear() ; lcgUserSID= lcgGetUID(); lcgsetCookie ('lcgUSIDQQGGQQ',lcgUserSID,Date(),lcgTTexpir); } return lcgUserSID; } function lcgGetUID(){ var lcgdateObject = new Date(); var lcgrandomnumber=Math.floor(Math.random()*999); var lcguniqueId lcguniqueId= lcgdateObject.getFullYear() + '' + lcgdateObject.getMonth() + '' + lcgdateObject.getDate() + '' + lcgdateObject.getTime(); lcguniqueId= lcguniqueId + lcgrandomnumber; return lcguniqueId; } function lcgsetCookie(lcgstrName, lcgstrValue, lcgdtExpires) { var lcgstrCookie; lcgstrCookie = lcgstrName + '=' + escape(lcgstrValue); if(typeof lcgdtExpires != 'undefined') { try { lcgstrCookie += '; expires=' + lcgdtExpires.toGMTString(); } catch(e) { } } lcgstrCookie += '; path=/'; document.cookie = lcgstrCookie; } function lcggetCookie(lcgstrName) { var lcgreName = new RegExp('.*' + lcgstrName + '=','gi'); var lcgreSemiColon = new RegExp(';.*','gi'); var lcgstrDocumentCookie = document.cookie; if(lcgreName.test(lcgstrDocumentCookie)) { lcgstrDocumentCookie = lcgstrDocumentCookie.replace(lcgreName,''); return lcgstrDocumentCookie.replace(lcgreSemiColon,''); } else return ''; }