<!--
// Modified 05.25.2001
// Daniel J. Garcia
// icontact Proactive Code
// WIT v2.3
var binPath ="http://ae.livehelpservices.com/bin/icx.dll";
var bin_sslPath ="https://icserver/bin_ssl/icx.dll";
ic_pnotify = new Image(1,1);
ic_uppage = new Image(1,1);
ic_beatGraphic = new Image(1,1);
var ic_zoneinfo = new Image(1,1);
ic_beatGraphic.onload = beatSuccess;
ic_beatGraphic.onerror = beatError;
var thisPage = escape(document.location);
var thisTitle = escape(document.title);
var engageMsg = ('Would you like to be engaged in conversation with a NetRep?');
var thisZone = escape("Services");
var randomNumber = 1000000 + Math.round(Math.random()*9999999);
var theNumber = getRandom();
var beatVal = 0;
var c_dllPath;
if (location.protocol == "http:") c_dllPath = binPath;
else if (location.protocol == "https:") c_dllPath = bin_sslPath;
c_beatRate = 7;

ic_pnotify.src = c_dllPath + "?pnotify?" + thisTitle + "&" + randomNumber
ic_uppage.src = c_dllPath + "?uppage?" + thisPage + "&" + randomNumber
ic_zoneinfo.src = c_dllPath + "?zoneinfo?" + thisZone + "&" + randomNumber

if (self.name != "content") ic_beatGraphic.src = c_dllPath + "?beat?" + beatVal + "&" + theNumber;
else
{
	if (window.onload) oldOnLoadFcn = window.onload;
	else oldOnLoadFcn = new Function();
	window.onload = doOnLoad;
}


function doOnLoad()
{
	oldOnLoadFcn();
	changeTargets();
}

function changeTargets()
{
	for (i = 0; i < document.links.length; i++)
	{
		if (document.links[i].protocol == "http:") c2_dllPath = binPath;
		else if (document.links[i].protocol == "https:") c2_dllPath = bin_sslPath;
		if (document.links[i].protocol == "http:" || document.links[i].protocol == "https:")
		{
			if (location.protocol != document.links[i].protocol)
			{
				if ((document.links[i].target != "_new") && (document.links[i].target != "_blank"))
				{
					document.links[i].target = "_top";
					document.links[i].href = c2_dllPath + "?pushpage?" + escape(document.links[i].href);
				}
			}
		}
	}
}

function getRandom()
{
	var max_random = 32000;
 	return Math.floor(max_random * Math.random());
}

function doBeat()
{
    ic_beatGraphic.src = c_dllPath + "?beat?" + beatVal + "&" + getRandom();
}

function beatError()
{
	if (beatVal == 0)
	{
		setTimeout("doBeat()", c_beatRate * 1000);
	}
	else if (beatVal == 1)
	{
		if (self.name != "content")
		{
			if(confirm(engageMsg))
			{
			top.location = c_dllPath+"?cap?"+escape(document.location);
			}
			else
			{
			top.location = c_dllPath+"?drop_me?"+escape(document.location);
			}
		}
	}
}



function beatSuccess()
{
	if (self.name != "content")
	{
		beatVal++;
		setTimeout("doBeat()", 1000);
	}
}
//-->