
var protocol=('https:'==window.location.protocol)?'https:':'http:';
FL_CHAT_CUSTOMER_ID='25817976';
FL_CHAT_LINK_ID='_lpChatBtn';
FL_CHAT_LINK_IMAGES_PATH=protocol+'//content.fiberlink.com/www/globalHeader/Chat';
FL_CHAT_IMG_SRC=protocol+'//server.iad.liveperson.net/hc/'+FL_CHAT_CUSTOMER_ID+'/?cmd=repstate&site='+FL_CHAT_CUSTOMER_ID+'&channel=web&ver=1&skill=Technical%20Support&imageUrl='+FL_CHAT_LINK_IMAGES_PATH;
FL_CHAT_LINK_URL='https://server.iad.liveperson.net/hc/'+FL_CHAT_CUSTOMER_ID+'/?cmd=file&file=visitorWantsToChat&site='+FL_CHAT_CUSTOMER_ID+'&SESSIONVAR!skill=Technical%20Support&imageUrl='+FL_CHAT_LINK_IMAGES_PATH;
FL_CHAT_IMG_NAME='hcIcon';
FL_CHAT_WINDOW_ID='chat'+FL_CHAT_CUSTOMER_ID;
function FL_ChatManager()
{
this.SetChatLink=FL_ChatManager_SetChatLink;
this.SetChatIcon=FL_ChatManager_SetChatIcon;
this.Init=FL_ChatManager_Init;
this.OnChat=FL_ChatManager_OnChat;
this.GetChatBaseUrl=FL_ChatManager_GetChatBaseUrl;
this.GetChatFullUrl=FL_ChatManager_GetChatFullUrl;
this.linkElem=null;
this.imgElem=null;
}
function FL_ChatManager_SetChatLink(strElemId)
{
this.linkElem=document.getElementById(strElemId);
}
function FL_ChatManager_SetChatIcon(strElemId)
{
this.imgElem=document.getElementById(strElemId);
}
function FL_ChatManager_Init()
{
if(this.linkElem)
{
this.linkElem.id=FL_CHAT_LINK_ID;
var tmpThis=this;
this.linkElem.onclick=function(){tmpThis.OnChat();return false;};
}
if(this.imgElem)
{
this.imgElem.name=FL_CHAT_IMG_NAME;
this.imgElem.src=FL_CHAT_IMG_SRC;
}
}
function FL_ChatManager_OnChat()
{
var chatUrl=this.GetChatFullUrl();
window.open(chatUrl,FL_CHAT_WINDOW_ID,'width=475,height=400,resizable=yes');
}
function FL_ChatManager_GetChatBaseUrl()
{
return FL_CHAT_LINK_URL;
}
function FL_ChatManager_GetChatFullUrl()
{
var lpButtonCTTUrl=this.GetChatBaseUrl()+'&referrer='+escape(document.location);
if(typeof(lpAppendVisitorCookies)!='undefined')
lpButtonCTTUrl=lpAppendVisitorCookies(lpButtonCTTUrl);
if(typeof(lpMTag)!='undefined'&&typeof(lpMTag.addFirstPartyCookies)!='undefined')
lpButtonCTTUrl=lpMTag.addFirstPartyCookies(lpButtonCTTUrl);
return lpButtonCTTUrl;
}
