//----------- AJAX object implementation -----------


function AJAX_synchronous (xmlPayload, href)
{
	if (window.ActiveXObject)
	{
		this.xmlhttp = new ActiveXObject ("Microsoft.XMLHTTP")
	}
	else
	{
		this.xmlhttp = new XMLHttpRequest()
	}
	this.xmlhttp.open ("POST", href, false)
	this.xmlhttp.send (xmlPayload)
	return this.xmlhttp
}

function AKAX_500Error (str)
{
	//** in case of server error, display the server error message in a popup window
	var Win;
	try
	{
		Win = window.open('', 'AjaxError')
		Win.document.body.innerHTML = str
		Win.focus ()
	}
	catch(e)
	{
		//** if pop-up is blocked, inform user
		alert ('An error occurred, but the error message cannot be displayed because of your browser\'s pop-up blocker.\nPlease allow pop-ups from this Web site.')
	}
}


function AJAX ()
{
	this.sync = AJAX_synchronous			//* for synchronous AJAX calls
	this.error500 = AKAX_500Error			//* used internally
}


