// the functions for the asynchronous communications..

var reqs = 0;

function getreq(ao, cbfunc)
{
	reqs++;
	ao.method = 'GET';
	ao.onCompletion = cbfunc;
	ao.runAJAX();
}

function postreq(ao, url, params, cbfunc)
{
	ao.method = 'POST';
	ao.onCompletion = cbfunc;

	for (i = 0; i < params.length; i++)
	{
		ao.setVar(params[i]['key'], params[i]['value']);
	}
	ao.requestFile = url;
	ao.runAJAX();
}
