function ajax(url, post) {
	if (!url) {
		url = 'index.html';	
	}
	
	if(window.XMLHttpRequest) {
		xhr = new XMLHttpRequest();
	}
	else if(window.ActiveXObject) {
		try {
			xhr = new ActiveXObject('Msxml2.XMLHTTP');
		} catch (e) {
			xhr = new ActiveXObject('Microsoft.XMLHTTP');
		}
	}
	else {
		return false;
	}
	
	if (post) {
		xhr.open('POST', url, false);
		xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
		xhr.send(post);
	}
	else {
		xhr.open('GET', url, false);
		xhr.send(null);
	}
	
	if(xhr.readyState == 4) {
		return xhr.responseText;
	}
	else {
		return false;
	}
}
