document.SetTimeOut = 'true';
var iBuyerCount = 0;

window.onunload = Logout;
function Logout()
{
	try
	{
		if( event.clientY < 0 )
		{
			sendRequest( strBuyerURL + "RemoveProActive.aspx", 1, 1 );
			window.opener.closed;
		}
	}
	catch(e)
	{}
}
	
function pgBuyerTranscriptPull()
{
	if( document.SetTimeOut != 'true' ) return;

	var strReqURL;

	try
	{
		document.PageTitle = document.title;
		if( !document.PageTitle )
		{
			document.PageTitle = document.location;
		}
	}
	catch(err1)
	{}

	strReqURL = strBuyerURL + "ProActiveBuyerPull.aspx?LocationID=" + document.LocationID + "&CompanyID=" + document.CompanyID + "&TeamID=" + document.TeamID + "&srcnum=" + iBuyerCount + "&HostAddress=" + document.PageTitle + "&OpenerURL=" + document.location + "&ReVisitor=" + getIsUserReVisitor();

	try
	{
		if (document.OneTimePull == 'true')
		{
			strReqURL += "&OneTimePull=true";
		}
	}
	catch(e)
	{alert(e);}

	sendRequest( strReqURL, 1, iBuyerCount);

	try
	{
		if( document.SetTimeOut == 'true' )
		{
			setTimeout("pgBuyerTranscriptPull()", TimeOutTime);
		}
	}
	catch(e)
	{
		alert(e);
	}

	iBuyerCount++;
}

function showProactiveRequest()
{
	document.SetTimeOut = 'false';
	try
	{
		var w = new WindowClass(document.strMessage);
		w.Show();
	}
	catch(errormsg1)
	{}
}