floatX=10;
floatY=10;
layerwidth=325;
layerheight=280;
halign="center";
valign="center";
delayspeed=2;
NS6=false;
IE4=(document.all);
if (!IE4) {NS6=(document.getElementById);}
NS4=(document.layers);
function adjust() {
if ((NS4) || (NS6)) {
if (lastX==-1 || delayspeed==0)
{
lastX=window.pageXOffset + floatX;
lastY=window.pageYOffset + floatY;
}
else
{
var dx=Math.abs(window.pageXOffset+floatX-lastX);
var dy=Math.abs(window.pageYOffset+floatY-lastY);
var d=Math.sqrt(dx*dx+dy*dy);
var c=Math.round(d/10);
if (window.pageXOffset+floatX>lastX) {lastX=lastX+delayspeed+c;}
if (window.pageXOffset+floatXlastY) {lastY=lastY+delayspeed+c;}
if (window.pageYOffset+floatYlastX) {lastX=lastX+delayspeed+c;}
if (document.body.scrollLeft+floatXlastY) {lastY=lastY+delayspeed+c;}
if (document.body.scrollTop+floatY');}
if ((IE4) || (NS6)) {document.write('');}
document.write("<%=proactivecode%>");
if (NS4)
{
document.write('');
}
if ((IE4) || (NS6))
{
document.write('
');
}
ifloatX=floatX;
ifloatY=floatY;
define();
window.onresize=define;
lastX=-1;
lastY=-1;
adjust();
var rnd = 0;
function xlaALSshowinvite(){
if (xlaALSinvited!=0){
return(0);
}
if (xlaALSinvite.style.display) {
xlaALSinvite.style.display = "";
} else {
xlaALSinvite.visibility= "show";
}
}
var xlaALSproactive_hit=0;
var xlaALSinvited=0;
function xlaALScheckproactive(){
if (xlaALSproactive_hit==0){
var time = new Date()
var ms = time.getMilliseconds()
var xlaALSprosize=document.getElementById('xlaALSprotrack');
if (xlaALSprosize.width==2){
<%if appsettings.allowcustominvite>"" then response.write("document.getElementById('xlaALSinvitemsg').src='" & applicationurl & "proactivemsg.aspx?r=' + ms;" & vbcrlf)%>
xlaALSproactive_hit=1;
//Initiate Proactive Chat
xlaALSshowinvite();
} else {
xlaALSprosize.src='<%=proactiveimg%>?r=' + ms;
setTimeout( "xlaALScheckproactive()",5000);
}
}
}
function xlaALScancelinvite(){
document.getElementById("xlaALSinvite").innerHtml='';
document.getElementById("xlaALSinvite").style.display='none';
document.getElementById('xlaALSprotrack').src='<%=proactiveimg%>?action=cancel';
xlaALSinvited=1;
}
function xlaALSacceptinvite(){
var w = 640, h = 480;
if (document.all || document.layers) {
w = screen.availWidth;
h = screen.availHeight;
}
var leftPos = (w-<%=appsettings.userwidth%>)/2, topPos = (h-<%=appsettings.userheight%>)/2;
xlaALSwindow=window.open("<%=theurl%>","ALSRoom","toolbar=0,location=0,status=0,menubar=0,scrollbars=1,resizable=1,width=<%=appsettings.userwidth%>,height=<%=appsettings.userheight%>,top=" + topPos + ",left=" + leftPos);
xlaALSwindow.focus();
xlaALScancelinvite();
}
<%if doproactive then response.write("xlaALScheckproactive();")%>
<%if doengage then%>
function xlaALSdoengage(){
document.getElementById('xlaALSprotrack').width=2;
xlaALScheckproactive();
document.getElementById('xlaALSprotrack').src='<%=proactiveimg%>?action=engage';
}
setTimeout( "xlaALSdoengage()",<%=appsettings.autoengagetime*1000%> );
<%end if%>