﻿// remove ? from unique urls on nav
var navs = $('#nav > div > ul > li > a');
$(navs).each(function() {
    this.href = this.href.replace('?', '');
})
// remove ? from unique urls on breadcrumb
var bcs = $('div.bc a');
$(bcs).each(function() {
    this.href = this.href.replace('?', '');
})
// create section heading
var heading = $('#nav > div > ul > li.A-Menu-ChildSel > a span');
if ($('div.header span').text()=='') {
    $('div.header span').text(heading.text());
}
if ($('h1.nl').length > 0) { $('h2.section-heading').hide(); $('p.moreinfo').hide(); }

// one-column layout detector
var oc = $('#one-column');
if (oc.length > 0) { $('div.right').hide(); $('div.left').css('width', '920px'); };

 
$(function() {

    $("a.signin").mouseover(function() {
        $('form.lview').show();
        $(this).addClass("active");
    });
    $("a.signin").mouseout(function() {
        $('form.lview').hide();
        $(this).removeClass("active");
    });
    $("form.lview").mouseover(function() {
        $(this).show();
        $("a.signin").addClass("active");
    });
    $("form.lview").mouseout(function() {
        $(this).hide();
        $("a.signin").removeClass("active");
    });
});



 if ($('div.alt-bc').length > 0) {
     var bcp = window.location.pathname
     var bc = "";
     var bctext = "";
     // build breadcrumbs and style navigation
     bctext = bcp.substring(bcp.lastIndexOf('/') + 1, bcp.length);
     bcp = bcp.substring(0, bcp.lastIndexOf('/'));
     bc = ' > <span>' + bctext + '</span>';
     while (bcp.lastIndexOf('/') > 0) {
         var a = $('a[href = ' + bcp + ']');
         $(a).parent('li').addClass('A-Menu-ChildSel').parent('li').addClass('A-Menu-ChildSel');
         $(a).parent('li').parent('ul').parent('li').addClass('A-Menu-ChildSel');
         $(a).parent('li').parent('ul').parent('li').parent('ul').parent('li').addClass('A-Menu-ChildSel');
         $(a).addClass('A-Menu-Sel');
         bctext = bcp.substring(bcp.lastIndexOf('/')+1, bcp.length);
         bc = ' > <span><a href="' + bcp + '">' + bctext + '</a></span>' + bc;
         bcp = bcp.substring(0, bcp.lastIndexOf('/'));
     }
     var root = $('#nav > div > ul > li.A-Menu-ChildSel > a');
     bc = ' > <span><a href="' + root[0].href + '">' + root[0].text + '</a></span>' + bc;
     $('div.alt-bc span').append(bc);
     $('div.header span').text(bcp.substring(1, bcp.length));
 }
$("#qsbtn").click(function() {
    $('.error').hide();
    email = $("input#quicksign").val();
    if (isValidEmailAddress(email)) {
        if (email.indexOf('@')<4){alert('The email address must be at least four characters long!'); return false;}
    } else {
        alert('Please enter a valid email address!');
        $("input#quicksign").focus();
        return false;
    }
});
//$('input[type=text]').css({ backgroundColor: "#FFFFFF" });
//$('input[type=text]').focus(function() {
    //$(this).css({ backgroundColor: "#FFDDAA" });
//});
//$('input[type=text]').blur(function() {
    //$(this).css({ backgroundColor: "#FFFFFF" });
//});
function ShowMenu(URL, WinTitle, WinWidth, WinHeight, WinLeft, WinTop){
    attr = "resizable=no,width=" + WinWidth + ",height=" + WinHeight + ",screenX=" + WinLeft + ",screenY=" + WinTop + ",left=" + WinLeft + ",top=" + WinTop + "";
    msgWindow=open(URL, WinTitle, attr);
    if (msgWindow.opener == null) msgWindow.opener = self;
} 

function isValidEmailAddress(emailAddress) {
    var pattern = new RegExp(/^(("[\w-\s]+")|([\w-]+(?:\.[\w-]+)*)|("[\w-\s]+")([\w-]+(?:\.[\w-]+)*))(@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$)|(@\[?((25[0-5]\.|2[0-4][0-9]\.|1[0-9]{2}\.|[0-9]{1,2}\.))((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})\.){2}(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})\]?$)/i);
    return pattern.test(emailAddress);
} 

String.prototype.trim = function () {
	return this.replace(/^\s*/, "").replace(/\s*$/, "");
}

reset_form_value = function(str1, str2, val) {
	if(str1 == val.value.trim())
		val.value = str2;
}

_alc_depothost="depot.liveagentforsalesforce.com";
var _alc=new (function(){function f(){w=false;var a={};if(typeof window.navigator.language!="undefined")a.language=window.navigator.language;else if(typeof window.navigator.userLanguage!="undefined")a.language=window.navigator.userLanguage;if(_alc.monitoringOff)return h();a.custom=C;a["Flash Version"]=_alc.GetSwfVer();a.Screen=screen.width+"x"+screen.height;a.time_offset=0-(new Date).getTimezoneOffset();var b=_alc.ptUrl+"firstping?userAgent="+encodeURIComponent(window.navigator.userAgent);b+="&oref="+
encodeURIComponent(_alc.utils.getCookie("__ALC_OREF"));b+="&loc="+encodeURIComponent(_alc.getLocation());var c=_alc.utils.getCookie("__ALC_CLIENT_ID");if(!c){c=_alc.utils.getCookie("__ALC_CLIENT_ID_"+__ALC_Deployment);if(!c)c=_alc.stid}b+="&ptid="+encodeURIComponent(c);b+="&stid="+encodeURIComponent(_alc.stid);b+="&deployment="+encodeURIComponent(_alc.deployment_id);b+="&details="+encodeURIComponent(_alc.JSON.stringify(a));b+="&r="+Math.random();_alc.firstPingTimeout=window.setTimeout(i,1E4);k(b,
g)}function i(){_alc.img.src="";var a=document.createElement("script");a.type="text/javascript";a.src=y+_alc.webRoot+"genid.php?id="+__ALC_Deployment+"&hostonly&r="+Math.random();document.body.appendChild(a)}function h(){src=_alc.ptUrl+"depcheck?stid="+_alc.stid+"&loc="+encodeURIComponent(_alc.getLocation());var a=_alc.utils.getCookie("__ALC_CLIENT_ID");if(!a){a=_alc.utils.getCookie("__ALC_CLIENT_ID_"+__ALC_Deployment);if(!a)a=_alc.stid}src+="&ptid="+a;src+="&deployment="+_alc.deployment_id;src+=
"&oref="+_alc.utils.getCookie("__ALC_OREF");src+=v;src+="&r="+Math.random();k(src,g)}function g(){w||_alc.firstPingCompleted();w=true;if(_alc.img.width==1)for(var a=0;a<n.length;a++)for(var b=0;b<_alc.buttons.length;b++)_alc.buttons[b].setDepartmentStatus(n[a],true);else if(_alc.img.width==2){f();return}else if(_alc.img.width==3){_alc.invite=_alc.img.height-1;_alc.handleInvite()}else if(_alc.img.width==4){D.call(_alc,_alc.img.height-1);j();return}else if(_alc.img.width==5)_alc.rejectInvite(false,
false,false);else if(_alc.img.width==6){_alc.initCoBrowse();j();return}window.clearTimeout(this.repingTimeout);this.repingTimeout=window.setTimeout(j,F*1E3)}function j(a){if(_alc.monitoringOff)return h();if(!(_alc.monitoring.length<1&&v=="")){a||(a="");src=_alc.ptUrl+"ping?stid="+encodeURIComponent(_alc.stid)+"&r="+Math.random()+a;src+=v;src+=z;k(src)}}function k(a,b){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)}b&&m(_alc.img,"load",b)}_alc.img.src=a}function m(a,b,c){a.addEventListener?a.addEventListener(b,c,false):a.attachEvent("on"+b,c,false)}function q(){for(var a={},b="",c=0;c<this.buttons.length;c++){for(var d=0;d<this.buttons[c].departments.length;d++){var e=this.buttons[c].departments[d];if(!a[e]){a[e]=1;b+="&d[]="+e}}if(typeof this.buttons[c].fallback_department!="undefined"){e=this.buttons[c].fallback_department;if(!a[e]){a[e]=
1;b+="&d[]="+e}}}return b}function o(){for(var a={},b="",c=0;c<this.buttons.length;c++){var d=this.buttons[c].id;if(d)if(!a[d]){a[d]=1;b+="&b[]="+d}}return b}function p(a,b){for(var c=0;c<a.length;c++)if(a[c]==b)return true;return false}function t(a,b){for(x in a)if(a[x]==b)return x;return false}function s(){n=[];for(var a,b=0;b<this.buttons.length;b++)if(this.buttons[b].online!=false){a=false;for(var c=0;c<n.length;c++)if(p(this.buttons[b].departments,n[c]))a=true;else if(typeof this.buttons[b].fallback_department!=
"undefined"&&n[c]==this.buttons[b].fallback_department)a=true;if(!a){n.push.apply(n,this.buttons[b].departments);typeof this.buttons[b].fallback_department!="undefined"&&n.push(this.buttons[b].fallback_department)}}for(a=0;a<this.monitoring.length;a++)p(n,this.monitoring[a])||n.push(this.monitoring[a]);if(n.length>255)_alc.utils.errorLog("Number of departments associated with included badges may not exceed 255");else{v="";for(a=0;a<n.length;a++)v+="&d[]="+n[a]}}function D(a){dept=n[a];for(a=0;a<this.buttons.length;a++)this.buttons[a].online!=
false&&this.buttons[a].setDepartmentStatus(dept,false);for(a=0;a<this.monitoring.length;a++)this.monitoring[a]==dept&&this.monitoring.splice(a,1);s.call(this)}function A(a){if(a){if(typeof a.departments!="undefined")this.departments=a.departments;else{this.departments=[];this.departments.push(parseInt(a.department));typeof a.fallback_department!="undefined"&&this.departments.push(parseInt(a.fallback_department))}if(typeof this.department=="string")this.department=parseInt(this.department);if(typeof a.fallback_department!=
"undefined"){this.fallback_department=a.fallback_department;if(typeof this.fallback_department=="string")this.fallback_department=parseInt(this.fallback_department)}this.id=a.id;this.available_id=a.available;this.unavailable_id=a.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(b){this.__callbacks.push(b)};this.setDepartmentStatus=function(b,c){if(p(this.departments,b)){if(!c){this.departments.splice(t(this.departments,b),1);if(this.departments.length>0)return}if(this.online!=c)if(!this.__disabled||!c){this.online=c;this.updateState()}}if(typeof this.fallback_department!=
"undefined"&&this.fallback_department==b){if(this.online!=c)if((!this.__disabled||!c)&&!this.online){this.online=c;this.updateState()}c||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(b){for(var c=0;c<this.__callbacks.length;c++)this.__callbacks[c](b)};this.enableButtonAtDuration=function(b,c){if(c=="site"){var d=Math.ceil((new Date).getTime()/1E3-_alc.startTime);if(d>b)this.__disabled=false;else{this.disable();this.enableTimeout=setTimeout(_alc.utils.createDelegate(this,"enable"),(b-d)*1E3)}}else c=="page"&&this.enableAfterSeconds(b)};this.disableButtonAtDuration=function(b,
c){if(c=="site"){var d=Math.ceil((new Date).getTime()/1E3-_alc.startTime);if(d>b){this.__disabled=true;this.updateState()}else setTimeout(_alc.utils.createDelegate(this,"disable"),(b-d)*1E3)}else c=="page"&&this.disableAfterSeconds(b)};this.enableAfterSeconds=function(b){if(!this.enableTimeout){this.__disabled=true;this.updateState();this.enableTimeout=window.setTimeout(_alc.utils.createDelegate(this,"enable"),b*1E3)}};this.disableAfterSeconds=function(b){setTimeout(_alc.utils.createDelegate(this,
"disable"),b*1E3)}}function B(a){this.slider=false;this.createElement=function(){if(!this.slider){if(_alc.utils.did("__ALC_INVITE_DIV_"+this.id))b=_alc.utils.did("__ALC_INVITE_DIV_"+this.id);else if(this.type=="proactive"&&_alc.utils.did("alc_op_invite"))b=_alc.utils.did("alc_op_invite");else if(this.type=="automated"&&_alc.utils.did("alc_auto_invite"))b=_alc.utils.did("alc_auto_invite");else{var b=document.createElement("div");b.id="__ALC_INVITE_DIV_"+this.id;b.style.top="-1000px";b.style.position=
"absolute";b.style.zIndex="1000";if(this.html)b.innerHTML=this.html;var c=y+_alc.webRoot+"chat/invites/invite_filler.gif",d=navigator.appVersion.split("MSIE");d=parseFloat(d[1]);if(d>=5.5&&d<8&&document.body.filters)if(b.childNodes[0])if(b.childNodes[0].childNodes[0])if(b.childNodes[0].childNodes[0].id=="alc_invite_image_"+this.id){d=b.childNodes[0].childNodes[0];if(d.src){var e=d.src.toUpperCase();if(e.substring(e.length-3,e.length)=="PNG"){e=document.createElement("span");e.id=d.id;e.className=
d.className;e.title=d.title;e.style.cssText=d.style.cssText;e.style.display="inline-block";e.style.width=b.childNodes[0].style.width;e.style.height=b.childNodes[0].style.height;d.getAttribute("align")&&e.setStyle("float",d.getAttribute("align"));if(d.parentElement.href)e.style.cursor="hand";e.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+d.src+"', sizingMethod='scale')";if(d.useMap){var l=document.createElement("img");l.style.position="absolute";l.style.left="0";l.style.width=
b.childNodes[0].style.width;l.style.height=b.childNodes[0].style.height;l.src=c;l.useMap=d.useMap;l.border=d.border}b.childNodes[0].replaceChild(e,d);b.childNodes[0].insertBefore(l,b.childNodes[0].childNodes[1])}}}}document.body.appendChild(b);this.slider=new _alc.sliderTracker(b,this.position);return b}};if(a&&!this.slider){this.id=a.id;this.type=a.type;this.position=a.position;if(a.html){this.html=a.html;_alc._loaded&&this.createElement()}else if(a.element){a.element.parentNode&&a.element.parentNode.removeChild(a.element);
this.createElement().appendChild(a.element);if(a.element.style.display=="none")a.element.style.display="block"}}this.rollDown=function(){this.slider||this.createElement();if(_alc.utils.getCookie("__ALC_SI_"+this.id))this.slider.appear();else{this.slider.start();_alc.setCookie("__ALC_SI_"+this.id,"1")}};this.rollBack=function(){this.slider||this.createElement();this.slider.back();var b=new Date;b.setTime(b.getTime()-3600);_alc.setCookie("__ALC_SI_"+this.id,"1",b.toGMTString())}}function G(a){A.call(this,
a);B.call(this,a);this.rolledDown=false;this.retractTimeout=null;this.updateState=function(){this.online&&!this.rolledDown&&this.rollDown()};this.rollDown=function(){if(_alc.utils.getCookie("__ALC_CHAT"))this.preventReoccur();else if(!_alc.utils.getCookie("__ALC_RI_"+this.id))if(!_alc.rolledDownAutoInvite){this.slider||this.createElement();if(_alc.utils.getCookie("__ALC_SI_"+this.id))this.slider.appear();else{this.slider.start();j("&autoinvite="+this.id)}this.retractTimeout&&setTimeout(_alc.utils.createDelegate(_alc,
"retractAutoInvite"),this.retractTimeout*1E3);_alc.rolledDownAutoInvite=this;_alc.setCookie("__ALC_SI_"+this.id,"1")}};this.retract=function(){this.slider&&this.slider.back();this.preventReoccur();_alc.rolledDownAutoInvite=false};this.retractAfterTime=function(b){this.retractTimeout=b};this.preventReoccur=function(){_alc.setCookie("__ALC_RI_"+this.id,"1")}}function E(a){document.write('<script type="text/javascript" src="'+y+a+"genid.php?id="+__ALC_Deployment+"&r="+Math.random()+'"><\/script>')}this.utils=
{};this.utils.errorLog=function(a){typeof console!="undefined"&&typeof console.error!="undefined"&&console.error(a)};this.utils.unregisterEvent=function(a,b,c,d){a=this.domcheck(a);if(typeof d!="undefined")d=true;if(b=="allchange"){this.unregisterEvent(a,"change",c,d);this.unregisterEvent(a,"click",c,d);this.unregisterEvent(a,"keyup",c,d)}else a.removeEventListener?a.removeEventListener(b,c,d):a.detachEvent("on"+b,c,d)};this.utils.registerEvent=function(a,b,c,d){a=this.domcheck(a);if(typeof d!="undefined")d=
true;if(b=="allchange"){this.registerEvent(a,"change",c,d);this.registerEvent(a,"click",c,d);this.registerEvent(a,"keyup",c,d)}else a.addEventListener?a.addEventListener(b,c,d):a.attachEvent("on"+b,c,d)};this.utils.did=function(a){return document.getElementById(a)};this.utils.domcheck=function(a){if(typeof a=="object")return a;return this.did(a)};this.utils.createDelegate=function(a,b){return function(){return a[b].apply(a,arguments)}};this.utils.getCookie=function(a){var b=document.cookie.indexOf(a+
"=");a=b+a.length+1;if(b<0)return null;if(b==1)return null;b=document.cookie.indexOf(";",a);if(b==-1)b=document.cookie.length;return unescape(document.cookie.substring(a,b))};this.utils.setCookie=function(a,b,c,d,e){a=a+"="+b+";";if(typeof c!="undefined")a+="expires="+c+";";if(typeof d!="undefined")a+="domain="+d+";";if(typeof e!="undefined")a+="path="+e+";";document.cookie=a};var r;a:{if(navigator)if(navigator.userAgent)if(navigator.userAgent=="Activa Live Chat CoBrowse"){r=true;break a}r=false}if(!r){this.webRoot=
"//"+_alc_depothost+"/app/";this.ptUrl=document.location.protocol+"//alc.local:1080/";var C=[];this.deployment_id=this.license_id=null;this.department_status={};this.repingTimeout=0;this.buttons=[];this.startTime=0;this.monitoring=[];this.stid=this._loaded=this.framedChat=false;this.chatPageOverride=null;this.deploymentInitialized=false;this.useFlashWindows=true;this.chatRequestNotificationHandlers=[];var F=18;this.invite=null;this.invites=[];this.invite_slider=[];var v="",z="",n,y=document.location.protocol,
u=u=this.utils.getCookie("__ALC_OREF"),w=false;this.monitoringOff=false;this.defaultChatWidth=500;this.defaultChatHeight=325;this.ignoredCobrowseFields={};if(r=this.utils.getCookie("__ALC_PTURL"))this.ptUrl=document.location.protocol+"//"+r;this.firstPingCallbacks=[];this.setCookie=function(a,b,c,d,e){if(typeof d=="undefined"){a:{d=document.location.host.match(/[^.]*$/)[0];d=d.toLowerCase();switch(d){case "com":case "edu":case "net":case "org":case "gov":case "mil":case "int":d=document.location.host.match(/[^.]*.[^.]*$/)[0];
break a;default:d=document.location.host.match(/[^.]*.[^.]*.[^.]*$/)[0];break a}}d="."+d}if(typeof e=="undefined")e="/";this.utils.setCookie(a,b,c,d,e)};this.setup=function(a,b){m(window,"load",function(){_alc.startTracking(a,b)})};this.startTracking=function(a,b){this.license_id=a;this.deployment_id=b;this._loaded=true;for(var c=0;c<this.invites.length;c++)this.invites[c].id&&this.invites[c].createElement();f()};this.getSessionId=function(){return this.stid};this.retryFirstPing=function(){f()};this.firstPingCompleted=
function(){this.firstPingTimeout&&window.clearTimeout(this.firstPingTimeout);for(var a=0;a<_alc.firstPingCallbacks.length;a++)_alc.firstPingCallbacks[a].call(_alc)};this.addFirstPingCallback=function(a){this.firstPingCallbacks.push(a)};this.handleInvite=function(){};this.rollDownInvite=function(){this.invites[this.invite]&&this.invites[this.invite].rollDown()};this.rollBackInvite=function(){this.invites[this.invite]&&this.invites[this.invite].rollBack()};this.rejectInvite=function(a,b,c){if(typeof a==
"undefined")a=true;if(typeof b=="undefined")b=false;if(typeof c=="undefined")c=true;if(this.invite!=null)if(!b){b="&reject_invite="+this.invites[this.invite].id+"&deployment="+this.deployment_id;if(a)b+="&manual=true";if(c)b+="&proactive=true";j(b)}this.handleInviteRejection();this.invite=null};this.handleInviteRejection=function(){};this.forceCheck=function(){s.call(this);w&&j()};this.addDetail=function(a,b,c){if(typeof c=="undefined")c=null;C.push({label:a,value:b,id:c})};this.__idGenerated=function(a){_alc.stid=
a;_alc.initDeploymentTracking();window.setTimeout(function(){_alc.setCookie("__ALC_STID",encodeURIComponent(__ALC_Deployment+"|"+a))},1)};this.startTime=this.utils.getCookie("__ALC_START");if(!this.startTime){this.startTime=Math.floor((new Date).getTime()/1E3);this.setCookie("__ALC_START",this.startTime)}this.getLocation=function(){return window.location.href};this.createNewBreadcrumb=function(a){window.clearTimeout(this.repingTimeout);this.getLocation=function(){return a};f()};this.__setStartDeptStatus=
function(a,b){for(var c=0;c<this.buttons.length;c++)this.buttons[c].setDepartmentStatus(a,b);if(!b)for(c=0;c<this.monitoring.length;c++)this.monitoring[c]==a&&this.monitoring.splice(c,1);s.call(this)};this.createInvite=function(a){var b=new B(a);this.invites.push(b);z+="&invites[]="+a.id;return b};this.createCustomInvite=function(a,b,c){this.invites.push(new B({id:a,element:b,position:c}));z+="&invites[]="+a};this.test=function(){D.call(this,0)};

if(typeof __ALC_Deployment=="undefined"&&typeof __ALC_Compatability_Mode=="undefined")alert("Deployment is not set");
else{this.startChat=function(a,b,c){if(_alc.monitoringOff){_alc.monitoringOff=false;f()}if(a==null)if(this.invite!=null)a=this.invites[this.invite].id;else if(this.rolledDownAutoInvite)a=this.rolledDownAutoInvite.id;else{_alc.utils.errorLog("You must pass a button id when requesting a chat");return}try{this.notifyChatRequest(a)}catch(d){_alc.utils.errorLog("Failed to call notifyChatRequest. "+d)}if(!b)b=_alc.defaultChatWidth;if(!c)c=_alc.defaultChatHeight;
if(this.invite!=null)this.rejectInvite(false,this.invites[this.invite].id==a?true:false);if(this.rolledDownAutoInvite)this.clearAutoInvite(false,this.rolledDownAutoInvite.id==a?true:false);var e=this.utils.getCookie("__ALC_CLIENT_ID");if(!e){e=this.utils.getCookie("__ALC_CLIENT_ID_"+__ALC_Deployment);if(!e)e=this.stid}this.setCookie("__ALC_CHAT",(new Date).getTime());e="#license_id="+this.license_id+"&deployment_id="+this.deployment_id+"&button_id="+a+"&session_id="+this.getSessionId()+"&tracking_id="+
e;for(var l=0;l<_alc.buttons.length;l++)if(_alc.buttons[l].id==a)_alc.buttons[l].online||(e+="&offline=1");l="";this.useFlashWindows||(l="html/");if(this.chatPageOverride)window.open(this.chatPageOverride+e,"_blank","resizable=no,scrollbars=no,width="+b+",height="+c+",status=no");else if(this.framedChat)window.location="http:"+this.webRoot+l+"chat.php?id="+this.deployment_id+"&button_id="+a+"&src="+encodeURIComponent(window.location.href)+e;else window.open("https:"+this.webRoot+l+"chat.php?id="+
this.deployment_id+"&button_id="+a+"&src="+encodeURIComponent(window.location.href)+e,"_blank","resizable=no,scrollbars=no,width="+b+",height="+c+",status=no")};this.clearChatCookie=function(){var a=new Date;a.setTime(a.getTime()-3600);this.setCookie("__ALC_CHAT","0",a.toGMTString())};this.initCoBrowse=function(){var a=document.createElement("script");a.type="text/javascript";a.src=this.webRoot+"js/cb.js";document.body.appendChild(a)};this.__getWebRoot=function(){return this.webRoot};this.getButton=
function(a){for(var b=0;b<this.buttons.length;b++)if(this.buttons[b].id==a)return this.buttons[b];return new A(false)};this.addFlashButtonCallback=function(a,b,c){this.getButton(a).addCallback(function(d){navigator.appName.indexOf("Microsoft")!=-1?window[b][c](d):document[b][c](d)})};this.rolledDownAutoInvite=false;this.retractAutoInvite=function(){this.clearAutoInvite(false)};this.clearAutoInvite=function(a,b){if(typeof a=="undefined")a=true;if(typeof b=="undefined")b=false;if(_alc.rolledDownAutoInvite){if(!b){var c=
"&reject_invite="+_alc.rolledDownAutoInvite.id;if(a)c+="&manual=true";j(c)}_alc.rolledDownAutoInvite.retract()}};if(typeof __ALC_Badges=="undefined")__ALC_Badges=[];for(r=0;r<__ALC_Badges.length;r++)this.buttons.push(new A(__ALC_Badges[r]));if(!u){(u=encodeURIComponent(document.referrer))||(u="Direct");this.setCookie("__ALC_OREF",u)}this.createAutoInvite=function(a){a=new G(a);this.buttons.push(a);s.call(this);return a};this.initDeploymentTracking=function(){if(!this.deploymentInitialized){var a=
this.utils.getCookie("__ALC_CLIENT_ID");if(!a)if(a=this.utils.getCookie("__ALC_CLIENT_ID_"+__ALC_Deployment)){var b=new Date;b.setFullYear(b.getFullYear()+10);this.setCookie("__ALC_CLIENT_ID",a,b.toGMTString())}if(!a){b=new Date;b.setFullYear(b.getFullYear()+10);a=__ALC_Deployment+"-"+this.stid;this.setCookie("__ALC_CLIENT_ID",a,b.toGMTString())}typeof __ALC_Deployment!="undefined"&&document.write('<script type="text/javascript" src="'+y+this.webRoot+"deployment.php?id="+__ALC_Deployment+"&ptid="+
encodeURIComponent(a)+"&stid="+encodeURIComponent(this.getSessionId())+"&oref="+encodeURIComponent(u)+"&chat="+this.utils.getCookie("__ALC_CHAT")+"&r="+Math.random()+q.call(this)+o.call(this)+'"><\/script>');this.deploymentInitialized=true}};if(this.utils.getCookie("__ALC_STID")){this.stid=this.utils.getCookie("__ALC_STID");if(this.stid.indexOf("|")>0){r=this.stid.split("|");if(r[0]==__ALC_Deployment){this.stid=r[1];this.initDeploymentTracking()}else E(this.webRoot)}else this.initDeploymentTracking()}else E(this.webRoot);
s.call(this);this.googleTrack=function(a){if(typeof pageTracker!="undefined")pageTracker._trackPageview("/SalesforceLiveAgent/Button_"+a);else typeof urchinTracker!="undefined"?urchinTracker("/SalesforceLiveAgent/Button_"+a):_alc.utils.errorLog("No google analytics code found")};this.omnitureTrack=function(){typeof s_gi!="undefined"&&s_gi(__ALC_ANALYTICS_OMNITURE).tl(true,"o","Salesforce Live Agent")};this.webtrendsTrack=function(){typeof DCS!="undefined"&&__ALC_dcsMultiTrack("DCS.dcssip","liveagentforsalesforce.com",
"DCSext.chat","Chat Requested")};this.notifyChatRequest=function(a){for(var b=0;b<this.chatRequestNotificationHandlers.length;b++)this.chatRequestNotificationHandlers[b].call(this,a)};this.addChatRequestNotificationHandler=function(a){this.chatRequestNotificationHandlers.push(a)}}}});
_alc.JSON=function(){function f(g){return g<10?"0"+g:g}function i(g,j){var k,m,q,o;k=/["\\\x00-\x1f\x7f-\x9f]/g;var p;switch(typeof g){case "string":return k.test(g)?'"'+g.replace(k,function(t){var s=h[t];if(s)return s;s=t.charCodeAt();return"\\u00"+Math.floor(s/16).toString(16)+(s%16).toString(16)})+'"':'"'+g+'"';case "number":return isFinite(g)?String(g):"null";case "boolean":case "null":return String(g);case "object":if(!g)return"null";k=[];if(typeof g.length==="number"&&!g.propertyIsEnumerable("length")){o=
g.length;for(m=0;m<o;m+=1)k.push(i(g[m],j)||"null");return"["+k.join(",")+"]"}if(j){o=j.length;for(m=0;m<o;m+=1){q=j[m];if(typeof q==="string")(p=i(g[q],j))&&k.push(i(q)+":"+p)}}else for(q in g)if(typeof q==="string")(p=i(g[q],j))&&k.push(i(q)+":"+p);return"{"+k.join(",")+"}"}}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 h={"\u0008":"\\b",
"\t":"\\t","\n":"\\n","\u000c":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};return{stringify:i,parse:function(g,j){function k(q,o){var p,t;if(o&&typeof o==="object")for(p in o)if(Object.prototype.hasOwnProperty.apply(o,[p])){t=k(p,o[p]);if(t!==undefined)o[p]=t}return j(q,o)}var m;if(/^[\],:{}\s]*$/.test(g.replace(/\\./g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(:?[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){m=eval("("+g+")");return typeof j==="function"?k("",m):m}throw new SyntaxError("parseJSON");
}}}();

_alc.GetSwfVer=function(){var f=-1,i=navigator.appVersion.indexOf("MSIE")!=-1?true:false,h=navigator.appVersion.toLowerCase().indexOf("win")!=-1?true:false,g=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"]){f=navigator.plugins["Shockwave Flash"+(navigator.plugins["Shockwave Flash 2.0"]?" 2.0":"")].description.split(" ");h=f[2].split(".");i=h[0];h=h[1];tempArrayMinor=
f[3]!=""?f[3].split("r"):f[4].split("r");f=i+"."+h+"."+(tempArrayMinor[1]>0?tempArrayMinor[1]:0)}}else if(navigator.userAgent.toLowerCase().indexOf("webtv/2.6")!=-1)f=4;else if(navigator.userAgent.toLowerCase().indexOf("webtv/2.5")!=-1)f=3;else if(navigator.userAgent.toLowerCase().indexOf("webtv")!=-1)f=2;else if(i&&h&&!g)f=_alc.ControlVersion();return f};
_alc.ControlVersion=function(){var f,i;try{i=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");f=i.GetVariable("$version")}catch(h){}if(!f)try{i=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");f="WIN 6,0,21,0";i.AllowScriptAccess="always";f=i.GetVariable("$version")}catch(g){}if(!f)try{i=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");f=i.GetVariable("$version")}catch(j){}if(!f)try{new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");f="WIN 3,0,18,0"}catch(k){}if(!f)try{new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
f="WIN 2,0,0,11"}catch(m){f=-1}return f};

_alc.sliderTracker=function(f,i){this.elem=f;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=0.75;this.yDestination=this.xDestination=this.yPos=this.xPos=this.yOffset=this.xOffset=this.realHeight=this.realWidth=null;switch(i){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.stopPosition=this.startPosition=this.POSITION_TOP_LEFT;break;case "topright":this.stopPosition=this.startPosition=this.POSITION_TOP_RIGHT;break;case "bottomleft":this.stopPosition=this.startPosition=this.POSITION_BOTTOM_LEFT;break;case "bottomright":this.stopPosition=this.startPosition=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.yPos=this.xPos=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 Error("Unknown Start Position");}this.moveTo(this.xPos+this.xOffset,this.yPos+this.yOffset);this.define()};this.back=function(){if(this.action){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 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.yPos=this.xPos=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 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.yPos=this.xPos=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 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 Error("Unknown Start Position");}};this.step=function(){var h=Math.abs(this.xOffset+this.xDestination-this.xPos),g=Math.abs(this.yOffset+this.yDestination-this.yPos);h=Math.ceil(Math.sqrt(h*h+g*g)/10);if(this.xPos<this.xOffset+this.xDestination){this.xPos+=h*this.delaySpeed;if(this.xPos>this.xDestination)this.xPos=this.xDestination}else{this.xPos-=
h*this.delaySpeed;if(this.xPos<this.xDestination)this.xPos=this.xDestination}if(this.yPos<this.yOffset+this.yDestination){this.yPos+=h*this.delaySpeed;if(this.yPos>this.yDestination+this.yOffset)this.yPos=this.yDestination+this.yOffset}else{this.yPos-=h*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(h,g){xpos=h;ypos=g;this.elem.style.top=g+"px";this.elem.style.left=h+"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}};

