var xhttp	= null;
var ajaxAvbl= true;

function checkAjax() {
	ajaxAvbl = createXHR();
}

function createXHR() {
	try {
    	// IE7, Firefox, Opera 8.0+, Safari
    	xhttp = new XMLHttpRequest();
    }
    catch (e) {
    	// Internet Explorer < v7.0
    	try {
    		xhttp = new ActiveXObject("Msxml2.XMLHTTP");
    	}
    	catch (e) {
    		try {
    			xhttp = new ActiveXObject("Microsoft.XMLHTTP");
    		}
    		catch (e) {
    			//alert("Your browser does not support AJAX!");
    			return false;
    		}
    	}
    }
    return true;
}

function doRequest(addr, p, f) {	  
	p	= p ? p : null;
	f	= f ? f : null;
	
	createXHR();
	xhttp.open('POST', addr, true);
	xhttp.onreadystatechange = f;
	xhttp.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
	xhttp.send(p);
}

//checkAjax();
