﻿function ajaxHttp(strURL, strElementID) {
	strURL = strURL + "?&T=" + (new Date()).getTime();
	
	document.getElementById(strElementID).innerHTML = '<small><i>Yükleniyor ...</i></small>';
	if (window.XMLHttpRequest) {
		XmlHttp=new XMLHttpRequest();
		XmlHttp.onreadystatechange = function(){XMLContent(strElementID)};
		XmlHttp.open("GET",strURL,true);
		XmlHttp.send(null)
	} 
	else if (window.ActiveXObject) {
		XmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
		 if (XmlHttp) {
		 	XmlHttp.onreadystatechange = function(){XMLContent(strElementID)};
			XmlHttp.open("GET", strURL, true);
			XmlHttp.send()
		}
	}
}

function XMLContent(strElementID) {
	if (XmlHttp.readyState==4) {
		if (XmlHttp.status==200 && XmlHttp.responseText != "") {
				document.getElementById(strElementID).innerHTML = XmlHttp.responseText;
		} 
		else {
			alert('İşlem gerçekleştirilemedi!');
		}
	}
}
