/**
 * Tagastab objekti AJAXi päringute tegemiseks
 */
function getAjax()
{
	var xmlHttp;
	try {
		xmlHttp = new XMLHttpRequest();// Firefox 1.0+, Opera 8.0+, Safari
	} catch (e) {
		try {
			xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");// IE 6.0+
		} catch (e) {
			try {
				xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");// IE 5.5+
			} catch (e) {
				xmlHttp = null;// mingi jama brauser
			}
		}
	}
	return xmlHttp;
}

/*    
ajax = new getAjax();

ajax.open("GET", url, true);
ajax.send(null);

ajax.open("POST", url, true);
ajax.setRequestHeader("Content-Type", 'application/x-www-form-urlencoded');
ajax.send('action=get&id=' + id);

ajax.onreadystatechange = function() {
	if (ajax.readyState == 4 && ajax.status == 200) {
		alert(ajax.responseText);
		alert(ajax.responseXML);
	}
}
*/
