var __ALC_Deployment = 70;

var _alc=new function(){this.utils={};this.utils.errorLog=function(msg){if(typeof(console)!='undefined'){if(typeof(console.error)!='undefined'){console.error(msg);}}}
this.utils.unregisterEvent=function(elem,event,callback,capture){elem=this.domcheck(elem);if(typeof(capture)!='undefined'){capture=true;}
if(event=='allchange'){this.unregisterEvent(elem,'change',callback,capture);this.unregisterEvent(elem,'click',callback,capture);this.unregisterEvent(elem,'keyup',callback,capture);return;}
if(elem.removeEventListener){elem.removeEventListener(event,callback,capture);}else{elem.detachEvent('on'+event,callback,capture);}}
this.utils.registerEvent=function(elem,event,callback,capture){elem=this.domcheck(elem);if(typeof(capture)!='undefined'){capture=true;}
if(event=='allchange'){this.registerEvent(elem,'change',callback,capture);this.registerEvent(elem,'click',callback,capture);this.registerEvent(elem,'keyup',callback,capture);return;}
if(elem.addEventListener){elem.addEventListener(event,callback,capture);}else{elem.attachEvent('on'+event,callback,capture);}}
this.utils.did=function(string){return document.getElementById(string);}
this.utils.domcheck=function(elem){if(typeof(elem)=='object'){return elem;}
return this.did(elem);}
this.utils.createDelegate=function(oObject,sMethodName){return function(){return oObject[sMethodName].apply(oObject,arguments);};}
this.utils.getCookie=function(name){var start=document.cookie.indexOf(name+"=");var len=start+name.length+1;if(start<0){return null;}
if(start==1){return null;}
var end=document.cookie.indexOf(';',len);if(end==-1){end=document.cookie.length;}
return unescape(document.cookie.substring(len,end));}
if(cbCheck()){return;}
var webRoot='//www.activalive.com/app/';this.ptUrl=document.location.protocol+'//cu1.activalive.com/';var firstPinged=false;var clientDetails=[];this.license_id=null;this.deployment_id=null;this.department_status={};this.repingTimeout=0;this.buttons=[];this.startTime=0;this.monitoring=[];this.framedChat=false;this._loaded=false;this.stid=false;this.chatPageOverride=null;this.notifyChatRequest=function(button_id){};var pingRate=28;this.invite=null;this.invites=new Array();this.invite_slider=new Array();var buttonString="";var inviteString='';var checkedDepts;var protocol=document.location.protocol;var coBrowseLoaded=false
var oref=oref=this.utils.getCookie('__ALC_OREF');var firstPingComplete=false;this.monitoringOff=false;this.defaultChatWidth=500;this.defaultChatHeight=325;this.ignoredCobrowseFields={};var tmpPtUrl=this.utils.getCookie('__ALC_PTURL');if(tmpPtUrl){this.ptUrl=document.location.protocol+'//'+tmpPtUrl;}
this.firstPingCallbacks=new Array();this.setup=function(license_id,deployment_id){addEventListener(window,'load',function(){_alc.startTracking(license_id,deployment_id);});}
this.startTracking=function(license_id,deployment_id){this.license_id=license_id;this.deployment_id=deployment_id;this._loaded=true;for(var i=0;i<this.invites.length;i++){if(this.invites[i].id){this.invites[i].createElement();}}
firstPing();}
this.getSessionId=function(){return this.stid;}
function firstPing(){firstPingComplete=false;var details={};if(typeof(window.navigator.language)!='undefined'){details.language=window.navigator.language;}else if(typeof(window.navigator.userLanguage)!='undefined'){details.language=window.navigator.userLanguage;}
if(_alc.monitoringOff){return pingDepCheck();}
details.custom=clientDetails;details['Flash Version']=_alc.GetSwfVer();details['Screen']=screen.width+'x'+screen.height;details.time_offset=0-new Date().getTimezoneOffset();src=_alc.ptUrl+'firstping?userAgent='+encodeURIComponent(window.navigator.userAgent);src+='&oref='+encodeURIComponent(_alc.utils.getCookie('__ALC_OREF'));src+='&loc='+encodeURIComponent(_alc.getLocation());var ptid=_alc.utils.getCookie('__ALC_CLIENT_ID');if(!ptid){ptid=_alc.utils.getCookie('__ALC_CLIENT_ID_'+__ALC_Deployment);if(!ptid){ptid=_alc.stid;}}
src+='&ptid='+encodeURIComponent(ptid);src+='&stid='+encodeURIComponent(_alc.stid);src+='&deployment='+encodeURIComponent(_alc.deployment_id);src+='&details='+encodeURIComponent(_alc.JSON.stringify(details));src+='&r='+Math.random();doPing(src,pingComplete);}
function pingDepCheck(){src=_alc.ptUrl+'depcheck?stid='+_alc.stid+'&loc='+encodeURIComponent(_alc.getLocation())
var ptid=_alc.utils.getCookie('__ALC_CLIENT_ID');if(!ptid){ptid=_alc.utils.getCookie('__ALC_CLIENT_ID_'+__ALC_Deployment);if(!ptid){ptid=_alc.stid;}}
src+='&ptid='+ptid;src+='&deployment='+_alc.deployment_id;src+='&oref='+_alc.utils.getCookie('__ALC_OREF');src+=buttonString;doPing(src,pingComplete);}
function pingDepCheck(){src=_alc.ptUrl+'depcheck?stid='+_alc.stid+'&loc='+encodeURIComponent(_alc.getLocation())
var ptid=_alc.utils.getCookie('__ALC_CLIENT_ID');if(!ptid){ptid=_alc.utils.getCookie('__ALC_CLIENT_ID_'+__ALC_Deployment);if(!ptid){ptid=_alc.stid;}}
src+='&ptid='+ptid;src+='&deployment='+_alc.deployment_id;src+='&oref='+_alc.utils.getCookie('__ALC_OREF');src+=buttonString;doPing(src,pingComplete);}
function pingComplete(){if(!firstPingComplete){_alc.firstPingCompleted();}
firstPingComplete=true;if(_alc.img.width==1){pingSuccess();}else if(_alc.img.width==2){firstPing();return;}else if(_alc.img.width==3){_alc.invite=_alc.img.height-1;_alc.handleInvite();}else if(_alc.img.width==4){departmentOffline.call(_alc,_alc.img.height-1)
regularPing();return;}else if(_alc.img.width==5){_alc.handleInviteRejection();}else if(_alc.img.width==6){_alc.initCoBrowse();regularPing();return;}
window.clearTimeout(this.repingTimeout);this.repingTimeout=window.setTimeout(regularPing,pingRate*1000);}
this.firstPingCompleted=function(){for(var i=0;i<_alc.firstPingCallbacks.length;i++){_alc.firstPingCallbacks[i].call(_alc);}}
function pingSuccess(){for(var i=0;i<checkedDepts.length;i++){for(var j=0;j<_alc.buttons.length;j++){_alc.buttons[j].setDepartmentStatus(checkedDepts[i],true);}}}
function regularPing(extras){if(_alc.monitoringOff){return pingDepCheck();}
if(_alc.monitoring.length<1&&buttonString==''){return;}
if(!extras){extras='';}
src=_alc.ptUrl+'ping?stid='+encodeURIComponent(_alc.stid)+'&r='+Math.random()+extras;src+=buttonString;src+=inviteString;doPing(src);}
this.addFirstPingCallback=function(callback){this.firstPingCallbacks.push(callback);}
this.handleInvite=function(){}
this.rollDownInvite=function(){if(this.invites[this.invite]){this.invites[this.invite].rollDown();}}
this.rollBackInvite=function(){if(this.invites[this.invite]){this.invites[this.invite].rollBack();}}
this.rejectInvite=function(){regularPing("&rejectInvite=1&deployment="+this.deployment_id);this.handleInviteRejection();this.invite=null;}
this.handleInviteRejection=function(){}
function doPing(url,callback){window.clearTimeout(this.repingTimeout);if(!_alc.img){_alc.img=new Image();if(!document.all){_alc.img.style.position='absolute';_alc.img.style.top='-1000px';_alc.img.id="activa_live_chat_tp";document.body.appendChild(_alc.img);}
if(callback){addEventListener(_alc.img,'load',callback);}}
_alc.img.src=url;}
this.forceCheck=function(){makeButtonString.call(this);if(firstPingComplete){regularPing();}}
this.addDetail=function(label,value,id){if(typeof(id)=='undefined'){id=null;}
clientDetails.push({label:label,value:value,id:id});}
function getHostname(){var tld=document.location.host.match(/[^.]*$/)[0];tld=tld.toLowerCase();switch(tld){case'com':case'edu':case'net':case'org':case'gov':case'mil':case'int':return document.location.host.match(/[^.]*.[^.]*$/)[0];default:return document.location.host.match(/[^.]*.[^.]*.[^.]*$/)[0];}}
this.__idGenerated=function(id){_alc.stid=id;_alc.initDeploymentTracking();window.setTimeout(function(){document.cookie='__ALC_STID='+encodeURIComponent(__ALC_Deployment+'|'+id)+';domain=.'+getHostname()+';path=/';},1);}
this.startTime=this.utils.getCookie('__ALC_START');if(!this.startTime){this.startTime=Math.floor(new Date().getTime()/1000);document.cookie='__ALC_START='+this.startTime+';domain=.'+getHostname()+';path=/';}
this.getLocation=function(){return window.location.href;}
this.createNewBreadcrumb=function(location){window.clearTimeout(this.repingTimeout);this.getLocation=function(){return location;};firstPing();}
this.createNewBreadcrumb=function(location){window.clearTimeout(this.repingTimeout);this.getLocation=function(){return location;};firstPing();}
function addEventListener(elem,event,callback){if(elem.addEventListener){elem.addEventListener(event,callback,false);}else{elem.attachEvent('on'+event,callback,false);}}
this.__setStartDeptStatus=function(dept,status){for(var i=0;i<this.buttons.length;i++){this.buttons[i].setDepartmentStatus(dept,status);}
if(!status){for(var j=0;j<this.monitoring.length;j++){if(this.monitoring[j]==dept){this.monitoring.splice(j,1);}}}
makeButtonString.call(this);}
this.createInvite=function(data){var btn=new Invite(data);this.invites.push(btn);inviteString+='&invites[]='+data.id;return btn;}
this.createCustomInvite=function(invite_id,element,position){var btn=new Invite({id:invite_id,element:element,position:position});this.invites.push(btn);inviteString+="&invites[]="+invite_id;}
function updateButtonStatus(badge){}
function makeDeptString(){var u={};var s='';for(var i=0;i<this.buttons.length;i++){for(var j=0;j<this.buttons[i].departments.length;j++){var d=this.buttons[i].departments[j];if(!u[d]){u[d]=1;s+='&d[]='+d;}}
if(typeof(this.buttons[i].fallback_department)!='undefined'){d=this.buttons[i].fallback_department;if(!u[d]){u[d]=1;s+='&d[]='+d;}}}
return s;}
function makeButtonIdString(){var u={};var s='';for(var i=0;i<this.buttons.length;i++){var id=this.buttons[i].id;if(id){if(!u[id]){u[id]=1;s+='&b[]='+id;}}}
return s;}
function inArray(arr,value){for(var i=0;i<arr.length;i++){if(arr[i]==value){return true;}}
return false;}
function findArray(arr,value){for(x in arr){if(arr[x]==value){return x;}}
return false;}
function makeButtonString(){checkedDepts=[];var found;for(var i=0;i<this.buttons.length;i++){if(this.buttons[i].online==false){continue;}
found=false;for(var j=0;j<checkedDepts.length;j++){if(inArray(this.buttons[i].departments,checkedDepts[j])){found=true;}else if(typeof(this.buttons[i].fallback_department)!='undefined'&&checkedDepts[j]==this.buttons[i].fallback_department){found=true;}}
if(!found){checkedDepts.push.apply(checkedDepts,this.buttons[i].departments);if(typeof(this.buttons[i].fallback_department)!='undefined'){checkedDepts.push(this.buttons[i].fallback_department);}}}
for(var g=0;g<this.monitoring.length;g++){if(!inArray(checkedDepts,this.monitoring[g])){checkedDepts.push(this.monitoring[g]);}}
if(checkedDepts.length>255){_alc.utils.errorLog("Number of departments associated with included badges may not exceed 255");return;}
buttonString='';for(var h=0;h<checkedDepts.length;h++){buttonString+='&d[]='+checkedDepts[h];}}
function departmentOffline(pos){dept=checkedDepts[pos];for(var i=0;i<this.buttons.length;i++){if(this.buttons[i].online==false){continue;}
this.buttons[i].setDepartmentStatus(dept,false);}
for(var j=0;j<this.monitoring.length;j++){if(this.monitoring[j]==dept){this.monitoring.splice(j,1);}}
makeButtonString.call(this);}
this.test=function(){departmentOffline.call(this,0);}
if(typeof(__ALC_Deployment)=='undefined'&&typeof(__ALC_Compatability_Mode)=='undefined'){alert("Deployment is not set");return;}
this.startChat=function(button_id,width,height){if(_alc.monitoringOff){_alc.monitoringOff=false;firstPing();}
if(button_id==null){if(this.invite!=null){button_id=this.invites[this.invite].id;}else if(this.rolledDownAutoInvite){button_id=this.rolledDownAutoInvite.id;}else{_alc.utils.errorLog("You must pass a button id when requesting a chat");return;}}
try{this.notifyChatRequest(button_id);}catch(e){_alc.utils.errorLog("Failed to call notifyChatRequest. "+e);}
if(!width){width=_alc.defaultChatWidth;}
if(!height){height=_alc.defaultChatHeight;}
if(this.invite!=null){this.handleInviteRejection();this.invite=null;}
this.clearAutoInvite();var ptid=this.utils.getCookie('__ALC_CLIENT_ID');if(!ptid){ptid=this.utils.getCookie('__ALC_CLIENT_ID_'+__ALC_Deployment);if(!ptid){ptid=this.stid;}}
var dt=new Date();document.cookie='__ALC_CHAT='+dt.getTime()+';domain=.'+getHostname()+';path=/';var hash="#license_id="+this.license_id+"&deployment_id="+this.deployment_id+"&button_id="+button_id+"&session_id="+this.getSessionId()+"&tracking_id="+ptid;for(var i=0;i<_alc.buttons.length;i++){if(_alc.buttons[i].id==button_id){if(!_alc.buttons[i].online){hash+="&offline=1";}}}
if(this.chatPageOverride){window.open(this.chatPageOverride+hash,'_blank','resizable=no,scrollbars=no,width='+width+',height='+height+',status=no');}else if(this.framedChat){window.location='http:'+webRoot+'chat.php?id='+this.deployment_id+'&button_id='+button_id+'&src='+encodeURIComponent(window.location.href)+hash,'_blank','resizable=no,scrollbars=no,width='+width+',height='+height+',status=no'}else{window.open('https:'+webRoot+'chat.php?id='+this.deployment_id+'&button_id='+button_id+'&src='+encodeURIComponent(window.location.href)+hash,'_blank','resizable=no,scrollbars=no,width='+width+',height='+height+',status=no');}}
this.clearChatCookie=function(){var dt=new Date();dt.setTime(dt.getTime()-3600);document.cookie='__ALC_CHAT=0;expires='+dt.toGMTString()+';domain=.'+getHostname()+';path=/';}
this.initCoBrowse=function(){if(!coBrowseLoaded){var s=document.createElement('script');s.type='text/javascript';s.src=webRoot+'js/cb.js';document.body.appendChild(s);}else{_alc.cobrowse.addSwf();}}
this.__getWebRoot=function(){return webRoot;}
function cbCheck(){if(navigator){if(navigator.userAgent){if(navigator.userAgent=='Activa Live Chat CoBrowse'){return true;}}}
return false;}
this.getButton=function(id){for(var i=0;i<this.buttons.length;i++){if(this.buttons[i].id==id){return this.buttons[i];}}
return new Button(false);}
this.addFlashButtonCallback=function(buttonId,SwfId,callbackFuncName){this.getButton(buttonId).addCallback(function(isAvailable){if(navigator.appName.indexOf("Microsoft")!=-1){window[SwfId][callbackFuncName](isAvailable);}else{document[SwfId][callbackFuncName](isAvailable);}});}
function Button(data){if(data){if(typeof(data.departments)!='undefined'){this.departments=data.departments;}else{this.departments=new Array();this.departments.push(parseInt(data.department));if(typeof(data.fallback_department)!='undefined'){this.departments.push(parseInt(data.fallback_department));}}
if(typeof(this.department)=='string'){this.department=parseInt(this.department);}
if(typeof(data.fallback_department)!='undefined'){this.fallback_department=data.fallback_department;if(typeof(this.fallback_department)=='string'){this.fallback_department=parseInt(this.fallback_department);}}
this.id=data.id;this.available_id=data.available;this.unavailable_id=data.unavailable;}
this.enableTimeout=false;this.online=null;this.__disabled=false;this.__active=true;this.__callbacks=[];this.setActive=function(){this.__active=true;this.updateState();}
this.setInactive=function(){this.__active=false;this.updateState();}
this.disable=function(){this.online=false;this.__disabled=true;this.updateState();if(this.enableTimeout){clearTimeout(this.enableTimeout);this.enableTimeout=false;}}
this.enable=function(){this.online=null;this.__disabled=false;_alc.forceCheck();}
this.addCallback=function(callback){this.__callbacks.push(callback);}
this.setDepartmentStatus=function(department,status){if(inArray(this.departments,department)){if(!status){this.departments.splice(findArray(this.departments,department),1);if(this.departments.length>0){return;}}
if(this.online!=status){if(!this.__disabled||!status){this.online=status;this.updateState();}}}
if(typeof(this.fallback_department)!='undefined'&&this.fallback_department==department){if(this.online!=status){if((!this.__disabled||!status)&&!this.online){this.online=status;this.updateState();}}
if(!status){delete this.fallback_department;}}}
this.updateState=function(){available=_alc.utils.did(this.available_id);unavailable=_alc.utils.did(this.unavailable_id);if(this.online&&!this.__disabled&&this.__active){if(available){available.style.display='';}
if(unavailable){unavailable.style.display='none';}
this.__notifyCallbacks(true);}else{if(available){available.style.display='none';}
if(unavailable){unavailable.style.display='';}
this.__notifyCallbacks(false);}}
this.__notifyCallbacks=function(isVisible){for(var i=0;i<this.__callbacks.length;i++){this.__callbacks[i](isVisible);}}
this.enableButtonAtDuration=function(duration,type){if(type=='site'){var elapsed=Math.ceil(new Date().getTime()/1000-_alc.startTime);if(elapsed>duration){this.__disabled=false;}else{this.disable();this.enableTimeout=setTimeout(_alc.utils.createDelegate(this,'enable'),(duration-elapsed)*1000);}}else if(type=='page'){this.enableAfterSeconds(duration);}}
this.disableButtonAtDuration=function(duration,type){if(type=='site'){var elapsed=Math.ceil(new Date().getTime()/1000-_alc.startTime);if(elapsed>duration){this.__disabled=true;this.updateState();}else{setTimeout(_alc.utils.createDelegate(this,'disable'),(duration-elapsed)*1000);}}else if(type=='page'){this.disableAfterSeconds(duration);}}
this.enableAfterSeconds=function(duration){if(this.enableTimeout){return;}
this.__disabled=true;this.updateState();this.enableTimeout=window.setTimeout(_alc.utils.createDelegate(this,'enable'),duration*1000);}
this.disableAfterSeconds=function(duration){setTimeout(_alc.utils.createDelegate(this,'disable'),duration*1000);}}
function Invite(data){this.slider=false;this.createElement=function(){if(this.slider){return;}
if(_alc.utils.did('__ALC_INVITE_DIV_'+this.id)){div=_alc.utils.did('__ALC_INVITE_DIV_'+this.id);}else if(this.type=='proactive'&&_alc.utils.did('alc_op_invite')){div=_alc.utils.did('alc_op_invite');}else if(this.type=='automated'&&_alc.utils.did('alc_auto_invite')){div=_alc.utils.did('alc_auto_invite');}else{var div=document.createElement('div');div.id='__ALC_INVITE_DIV_'+this.id;div.style.top='-1000px';div.style.position='absolute';div.style.zIndex='1000';if(this.html){div.innerHTML=this.html;}
var strGif=protocol+webRoot+'chat/invites/invite_filler.gif';var strFilter="progid:DXImageTransform.Microsoft.AlphaImageLoader";var arVersion=navigator.appVersion.split("MSIE");var version=parseFloat(arVersion[1]);if((version>=5.5&&version<8)&&(document.body.filters)){if(div.childNodes[0]){if(div.childNodes[0].childNodes[0]){if(div.childNodes[0].childNodes[0].id=='alc_invite_image_'+this.id){var img=div.childNodes[0].childNodes[0];if(img.src){var imgName=img.src.toUpperCase()
if(imgName.substring(imgName.length-3,imgName.length)=="PNG"){var span=document.createElement('span');span.id=img.id;span.className=img.className;span.title=img.title;span.style.cssText=img.style.cssText;span.style.display='inline-block';span.style.width=div.childNodes[0].style.width;span.style.height=div.childNodes[0].style.height;if(img.getAttribute('align')){span.style.float=img.getAttribute('align');}
if(img.parentElement.href){span.style.cursor='hand';}
span.style.filter=strFilter+"(src='"+img.src+"', sizingMethod='scale')";if(img.useMap){var imgMap=document.createElement('img');imgMap.style.position='absolute';imgMap.style.left='0';imgMap.style.width=div.childNodes[0].style.width;imgMap.style.height=div.childNodes[0].style.height;imgMap.src=strGif;imgMap.useMap=img.useMap;imgMap.border=img.border;}
div.childNodes[0].replaceChild(span,img);div.childNodes[0].insertBefore(imgMap,div.childNodes[0].childNodes[1]);}}}}}}}
document.body.appendChild(div);this.slider=new _alc.sliderTracker(div,this.position);return div;}
if(data&&!this.slider){this.id=data.id;this.type=data.type;this.position=data.position;if(data.html){this.html=data.html;if(_alc._loaded){this.createElement();}}else{if(data.element){if(data.element.parentNode){data.element.parentNode.removeChild(data.element);}
this.createElement().appendChild(data.element);if(data.element.style.display=='none'){data.element.style.display='block';}}}}
this.rollDown=function(){if(!this.slider){this.createElement();}
if(_alc.utils.getCookie('__ALC_SI_'+this.id)){this.slider.appear();}else{this.slider.start();document.cookie='__ALC_SI_'+this.id+'=1;domain=.'+getHostname()+';path=/';}}
this.rollBack=function(){if(!this.slider){this.createElement();}
this.slider.back();var dt=new Date();dt.setTime(dt.getTime()-3600);document.cookie='__ALC_SI_'+this.id+'=1;expires='+dt.toGMTString()+';domain=.'+getHostname()+';path=/';}}
this.rolledDownAutoInvite=false;function AutoInvite(data){Button.call(this,data);Invite.call(this,data);this.rolledDown=false;this.retractTimeout=null;this.updateState=function(){if(this.online&&!this.rolledDown){this.rollDown();}}
this.rollDown=function(){if(_alc.utils.getCookie('__ALC_CHAT')){this.preventReoccur();return;}
if(_alc.utils.getCookie('__ALC_RI_'+this.id)){return;}
if(_alc.rolledDownAutoInvite){return;}
if(!this.slider){this.createElement();}
if(_alc.utils.getCookie('__ALC_SI_'+this.id)){this.slider.appear();}else{this.slider.start();}
if(this.retractTimeout){setTimeout(_alc.utils.createDelegate(this,'retract'),this.retractTimeout*1000);}
_alc.rolledDownAutoInvite=this;document.cookie='__ALC_SI_'+this.id+'=1;domain=.'+getHostname()+';path=/';}
this.retract=function(){if(this.slider){this.slider.back();}
this.preventReoccur();_alc.rolledDownAutoInvite=false;}
this.retractAfterTime=function(secs){this.retractTimeout=secs;}
this.preventReoccur=function(){document.cookie='__ALC_RI_'+this.id+'=1;domain=.'+getHostname()+';path=/';}}
this.clearAutoInvite=function(){if(_alc.rolledDownAutoInvite){_alc.rolledDownAutoInvite.retract();}}
if(typeof(__ALC_Badges)=='undefined'){__ALC_Badges=[];}
for(var i=0;i<__ALC_Badges.length;i++){this.buttons.push(new Button(__ALC_Badges[i]));}
if(!oref){oref=encodeURIComponent(document.referrer);if(!oref){oref="Direct";}
document.cookie='__ALC_OREF='+oref+';domain=.'+getHostname()+';path=/';}
this.createAutoInvite=function(data){var btn=new AutoInvite(data);this.buttons.push(btn);makeButtonString.call(this);return btn;}
this.initDeploymentTracking=function(){var ptid=this.utils.getCookie('__ALC_CLIENT_ID');if(!ptid){ptid=this.utils.getCookie('__ALC_CLIENT_ID_'+__ALC_Deployment);if(ptid){var dt=new Date();dt.setFullYear(dt.getFullYear()+10);document.cookie='__ALC_CLIENT_ID='+ptid+';expires='+dt.toGMTString()+';path=/;domain=.'+getHostname();}}
if(!ptid){var dt=new Date();dt.setFullYear(dt.getFullYear()+10);ptid=__ALC_Deployment+'-'+this.stid;document.cookie='__ALC_CLIENT_ID='+ptid+';expires='+dt.toGMTString()+';path=/;domain=.'+getHostname();}
if(typeof(__ALC_Deployment)!='undefined'){document.write('<s'+'cript type="text/javascript" src="'+protocol+webRoot+'deployment.php?id='+__ALC_Deployment+'&ptid='+encodeURIComponent(ptid)+'&stid='+encodeURIComponent(this.getSessionId())+'&oref='+encodeURIComponent(oref)+'&chat='+this.utils.getCookie('__ALC_CHAT')+'&r='+Math.random()+makeDeptString.call(this)+makeButtonIdString.call(this)+'"></s'+'cript>');}}
function getNewSTID(){document.write('<sc'+'ript type="text/javascript" src="'+protocol+webRoot+'genid.php?r='+Math.random()+'"></sc'+'ript>');}
if(!this.utils.getCookie('__ALC_STID')){getNewSTID();}else{this.stid=this.utils.getCookie('__ALC_STID');if(this.stid.indexOf('|')>0){var parts=this.stid.split("|");if(parts[0]==__ALC_Deployment){this.stid=parts[1];this.initDeploymentTracking();}else{getNewSTID();}}else{this.initDeploymentTracking();}}
makeButtonString.call(this);this.googleTrack=function(button_id){if(typeof(pageTracker)!='undefined'){pageTracker._trackPageview('/ActivaLiveChat/Button_'+button_id);}else if(typeof(urchinTracker)!='undefined'){urchinTracker('/ActivaLiveChat/Button_'+button_id)}else{_alc.utils.errorLog("No google analytics code found");}}
this.omnitureTrack=function(button_id){if(typeof(s_gi)!='undefined'){var s=s_gi(__ALC_ANALYTICS_OMNITURE);s.tl(true,'o','Activa Live Chat');}}
this.webtrendsTrack=function(button_id){if(typeof(DCS)!='undefined'){__ALC_dcsMultiTrack("DCS.dcssip","www.activalive.com","DCSext.chat","Chat Requested");}}}
_alc.JSON=function(){function f(n){return n<10?'0'+n:n;}
Date.prototype.toJSON=function(){return this.getUTCFullYear()+'-'+
f(this.getUTCMonth()+1)+'-'+
f(this.getUTCDate())+'T'+
f(this.getUTCHours())+':'+
f(this.getUTCMinutes())+':'+
f(this.getUTCSeconds())+'Z';};var m={'\b':'\\b','\t':'\\t','\n':'\\n','\f':'\\f','\r':'\\r','"':'\\"','\\':'\\\\'};function stringify(value,whitelist){var a,i,k,l,r=/["\\\x00-\x1f\x7f-\x9f]/g,v;switch(typeof value){case'string':return r.test(value)?'"'+value.replace(r,function(a){var c=m[a];if(c){return c;}
c=a.charCodeAt();return'\\u00'+Math.floor(c/16).toString(16)+
(c%16).toString(16);})+'"':'"'+value+'"';case'number':return isFinite(value)?String(value):'null';case'boolean':case'null':return String(value);case'object':if(!value){return'null';}
a=[];if(typeof value.length==='number'&&!(value.propertyIsEnumerable('length'))){l=value.length;for(i=0;i<l;i+=1){a.push(stringify(value[i],whitelist)||'null');}
return'['+a.join(',')+']';}
if(whitelist){l=whitelist.length;for(i=0;i<l;i+=1){k=whitelist[i];if(typeof k==='string'){v=stringify(value[k],whitelist);if(v){a.push(stringify(k)+':'+v);}}}}else{for(k in value){if(typeof k==='string'){v=stringify(value[k],whitelist);if(v){a.push(stringify(k)+':'+v);}}}}
return'{'+a.join(',')+'}';}}
return{stringify:stringify,parse:function(text,filter){var j;function walk(k,v){var i,n;if(v&&typeof v==='object'){for(i in v){if(Object.prototype.hasOwnProperty.apply(v,[i])){n=walk(i,v[i]);if(n!==undefined){v[i]=n;}}}}
return filter(k,v);}
if(/^[\],:{}\s]*$/.test(text.replace(/\\./g,'@').replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(:?[eE][+\-]?\d+)?/g,']').replace(/(?:^|:|,)(?:\s*\[)+/g,''))){j=eval('('+text+')');return typeof filter==='function'?walk('',j):j;}
throw new SyntaxError('parseJSON');}};}();_alc.GetSwfVer=function(){var flashVer=-1;var isIE=(navigator.appVersion.indexOf("MSIE")!=-1)?true:false;var isWin=(navigator.appVersion.toLowerCase().indexOf("win")!=-1)?true:false;var isOpera=(navigator.userAgent.indexOf("Opera")!=-1)?true:false;if(navigator.plugins!=null&&navigator.plugins.length>0){if(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]){var swVer2=navigator.plugins["Shockwave Flash 2.0"]?" 2.0":"";var flashDescription=navigator.plugins["Shockwave Flash"+swVer2].description;var descArray=flashDescription.split(" ");var tempArrayMajor=descArray[2].split(".");var versionMajor=tempArrayMajor[0];var versionMinor=tempArrayMajor[1];if(descArray[3]!=""){tempArrayMinor=descArray[3].split("r");}else{tempArrayMinor=descArray[4].split("r");}
var versionRevision=tempArrayMinor[1]>0?tempArrayMinor[1]:0;var flashVer=versionMajor+"."+versionMinor+"."+versionRevision;}}
else if(navigator.userAgent.toLowerCase().indexOf("webtv/2.6")!=-1)flashVer=4;else if(navigator.userAgent.toLowerCase().indexOf("webtv/2.5")!=-1)flashVer=3;else if(navigator.userAgent.toLowerCase().indexOf("webtv")!=-1)flashVer=2;else if(isIE&&isWin&&!isOpera){flashVer=_alc.ControlVersion();}
return flashVer;}
_alc.ControlVersion=function()
{var version;var axo;var e;try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");version=axo.GetVariable("$version");}catch(e){}
if(!version)
{try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");version="WIN 6,0,21,0";axo.AllowScriptAccess="always";version=axo.GetVariable("$version");}catch(e){}}
if(!version)
{try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");version=axo.GetVariable("$version");}catch(e){}}
if(!version)
{try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");version="WIN 3,0,18,0";}catch(e){}}
if(!version)
{try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");version="WIN 2,0,0,11";}catch(e){version=-1;}}
return version;}
_alc.sliderTracker=function(elem,position){this.elem=elem;this.POSITION_TOP_CENTER='top_center';this.POSITION_LEFT_CENTER='left_center';this.POSITION_CENTER='center';this.POSITION_TOP_LEFT='top_left';this.POSITION_TOP_RIGHT='top_right';this.POSITION_BOTTOM_LEFT='bottom_left';this.POSITION_BOTTOM_RIGHT='bottom_right';this.delaySpeed=.75;this.realWidth=null;this.realHeight=null;this.xOffset=null;this.yOffset=null;this.xPos=null;this.yPos=null;this.xDestination=null;this.yDestination=null;switch(position){case'topcenter':this.startPosition=this.POSITION_TOP_CENTER;this.stopPosition=this.POSITION_CENTER;break;case'leftcenter':this.startPosition=this.POSITION_LEFT_CENTER;this.stopPosition=this.POSITION_CENTER;break;case'topleft':this.startPosition=this.POSITION_TOP_LEFT;this.stopPosition=this.POSITION_TOP_LEFT;break;case'topright':this.startPosition=this.POSITION_TOP_RIGHT;this.stopPosition=this.POSITION_TOP_RIGHT;break;case'bottomleft':this.startPosition=this.POSITION_BOTTOM_LEFT;this.stopPosition=this.POSITION_BOTTOM_LEFT;break;case'bottomright':this.startPosition=this.POSITION_BOTTOM_RIGHT;this.stopPosition=this.POSITION_BOTTOM_RIGHT;break;}
this.ACTION_APPEARING='appearing';this.ACTION_RETRACTING='retracting';this.action=null;this.delegate=_alc.utils.createDelegate(this,'define');this.start=function(){this.action=this.ACTION_APPEARING;this.elem.style.display='';_alc.utils.registerEvent(window,'resize',this.delegate);_alc.utils.registerEvent(window,'scroll',this.delegate);this.getWindowSize();this.getOffsets();switch(this.startPosition){case this.POSITION_TOP_CENTER:this.xPos=(this.realWidth-this.elem.offsetWidth)/2;this.yPos=-1*this.elem.offsetHeight;break;case this.POSITION_LEFT_CENTER:this.xPos=-1*this.elem.offsetWidth;this.yPos=(this.realHeight-this.elem.offsetHeight)/2;break;case this.POSITION_TOP_LEFT:this.xPos=10;this.yPos=10;break;case this.POSITION_TOP_RIGHT:this.xPos=this.realWidth-this.elem.offsetWidth-10;this.yPos=10;break;case this.POSITION_BOTTOM_LEFT:this.xPos=10;this.yPos=this.realHeight-this.elem.offsetHeight;break;case this.POSITION_BOTTOM_RIGHT:this.xPos=this.realWidth-this.elem.offsetWidth-10;this.yPos=this.realHeight-this.elem.offsetHeight;break;default:throw new Error("Unknown Start Position");}
this.moveTo(this.xPos+this.xOffset,this.yPos+this.yOffset);this.define();}
this.back=function(){if(!this.action){return;}
this.action=this.ACTION_RETRACTING;this.getWindowSize();this.getOffsets();switch(this.startPosition){case this.POSITION_TOP_CENTER:this.yDestination=-1*this.elem.offsetHeight;window.setTimeout(_alc.utils.createDelegate(this,'step'),5);break;case this.POSITION_LEFT_CENTER:this.xDestination=-1*this.elem.offsetWidth;window.setTimeout(_alc.utils.createDelegate(this,'step'),5);break;case this.POSITION_TOP_LEFT:case this.POSITION_TOP_RIGHT:case this.POSITION_BOTTOM_LEFT:case this.POSITION_BOTTOM_RIGHT:this.yPos=-1*this.elem.offsetHeight;this.yDestination=-1*this.elem.offsetHeight;this.moveTo(this.xPos,this.yPos);this.elem.style.display='none';_alc.utils.unregisterEvent(window,'resize',this.delegate);_alc.utils.unregisterEvent(window,'scroll',this.delegate);break;default:throw new Error("Unknown Start Position");}}
this.appear=function(){this.action=this.ACTION_APPEARING;this.elem.style.display='';_alc.utils.registerEvent(window,'resize',this.delegate);_alc.utils.registerEvent(window,'scroll',this.delegate);this.getWindowSize();this.getOffsets();switch(this.stopPosition){case this.POSITION_CENTER:this.xPos=(this.realWidth-this.elem.offsetWidth)/2;this.yPos=(this.realHeight-this.elem.offsetHeight)/2;break;case this.POSITION_TOP_LEFT:this.xPos=10;this.yPos=10;break;case this.POSITION_TOP_RIGHT:this.xPos=this.realWidth-this.elem.offsetWidth-10;this.yPos=10;break;case this.POSITION_BOTTOM_LEFT:this.xPos=10;this.yPos=this.realHeight-this.elem.offsetHeight;break;case this.POSITION_BOTTOM_RIGHT:this.xPos=this.realWidth-this.elem.offsetWidth-10;this.yPos=this.realHeight-this.elem.offsetHeight;break;default:throw new Error("Unknown Stop Position");}
this.moveTo(this.xPos+this.xOffset,this.yPos+this.yOffset);this.define();}
this.define=function(){this.getWindowSize();this.getOffsets();if(this.action==this.ACTION_APPEARING){switch(this.stopPosition){case this.POSITION_CENTER:this.xDestination=(this.realWidth-this.elem.offsetWidth)/2;this.yDestination=(this.realHeight-this.elem.offsetHeight)/2;window.setTimeout(_alc.utils.createDelegate(this,'step'),5);break;case this.POSITION_TOP_LEFT:this.xPos=10;this.yPos=10;this.moveTo(this.xPos+this.xOffset,this.yPos+this.yOffset);break;case this.POSITION_TOP_RIGHT:this.xPos=this.realWidth-this.elem.offsetWidth-20;this.yPos=10;this.moveTo(this.xPos+this.xOffset,this.yPos+this.yOffset);break;case this.POSITION_BOTTOM_LEFT:this.xPos=10;this.yPos=this.realHeight-this.elem.offsetHeight;this.moveTo(this.xPos+this.xOffset,this.yPos+this.yOffset);break;case this.POSITION_BOTTOM_RIGHT:this.xPos=this.realWidth-this.elem.offsetWidth-20;this.yPos=this.realHeight-this.elem.offsetHeight;this.moveTo(this.xPos+this.xOffset,this.yPos+this.yOffset);break;default:throw new Error("Unknown Stop Position");}}else if(this.action==this.ACTION_RETRACTING){switch(this.startPosition){case this.POSITION_TOP_CENTER:this.yDestination=-1*this.elem.offsetHeight;window.setTimeout(_alc.utils.createDelegate(this,'step'),5);break;case this.POSITION_LEFT_CENTER:this.xDestination=-1*this.elem.offsetWidth;window.setTimeout(_alc.utils.createDelegate(this,'step'),5);break;default:throw new Error("Unknown Start Position");}}}
this.step=function(){var dx=Math.abs((this.xOffset+this.xDestination)-(this.xPos));var dy=Math.abs((this.yOffset+this.yDestination)-(this.yPos));var d=Math.sqrt(dx*dx+dy*dy);var c=Math.ceil(d/10);if(this.xPos<(this.xOffset+this.xDestination)){this.xPos+=c*this.delaySpeed;if(this.xPos>this.xDestination){this.xPos=this.xDestination;}}else{this.xPos-=c*this.delaySpeed;if(this.xPos<this.xDestination){this.xPos=this.xDestination;}}
if(this.yPos<(this.yOffset+this.yDestination)){this.yPos+=c*this.delaySpeed;if(this.yPos>this.yDestination+this.yOffset){this.yPos=this.yDestination+this.yOffset;}}else{this.yPos-=c*this.delaySpeed;if(this.yPos<this.yDestination){this.yPos=this.yDestination;}}
this.moveTo(this.xPos,this.yPos);if(this.action==this.ACTION_RETRACTING&&this.yPos<(this.yOffset-this.elem.offsetHeight)){this.elem.style.display='none';}
if(this.xPos!=(this.xDestination+this.xOffset)||this.yPos!=(this.yDestination+this.yOffset)){window.setTimeout(_alc.utils.createDelegate(this,'step'),5);}}
this.moveTo=function(x,y){xpos=x;ypos=y;this.elem.style.top=y+'px';this.elem.style.left=x+'px';}
this.getWindowSize=function(){if(window.innerWidth){this.realWidth=window.innerWidth;}else if(document.documentElement&&document.documentElement.clientWidth){this.realWidth=document.documentElement.clientWidth;}else if(document.body){this.realWidth=document.body.clientWidth;}
if(window.innerHeight){this.realHeight=window.innerHeight;}else if(document.documentElement&&document.documentElement.clientHeight){this.realHeight=document.documentElement.clientHeight;}else if(document.body){this.realHeight=document.body.clientHeight;}}
this.getOffsets=function(){if(window.pageXOffset){this.xOffset=window.pageXOffset;}else if(document.documentElement&&document.documentElement.scrollLeft){this.xOffset=document.documentElement.scrollLeft;}else if(document.body){this.xOffset=document.body.scrollLeft;}
if(window.pageYOffset){this.yOffset=window.pageYOffset;}else if(document.documentElement&&document.documentElement.scrollTop){this.yOffset=document.documentElement.scrollTop}else if(document.body){this.yOffset=document.body.scrollTop;}}}