
function rslInitObject() {
	var obj;

	try {
		obj = new ActiveXObject('Msxml2.XMLHTTP');
	} catch (e) {
		try {
			obj = new ActiveXObject('Microsoft.XMLHTTP');
		} catch (oc) {
			obj = null;
		}
	}

	if(!obj && typeof XMLHttpRequest != 'undefined')
		obj = new XMLHttpRequest();

	return(obj);
}

function rslCall(url, callback) {
	var obj = rslInitObject();
	obj.open('GET', url, true);

	obj.onreadystatechange = function() {

		if(obj.readyState != 4) 
			return;

		var status = obj.responseText.charAt(0);
		var data = obj.responseText.substring(2);

		if (status == '-') {
			// do nothing!
		} else {
			callback(data);
		}

	}

	obj.send(null);
	delete obj;
}
