function ajax(){
	
	// Degisken tanimlamalari
	this.nesne = null;
	this.veri = null;
	this.adres = null;
	this.fonksiyon = null;
	this.hatafonksiyon = null;
	this.method = 'GET';
	
	// Nesne olusturma
	this.olustur = function() {
		var browser = null;
		try	{
		// Firefox, Opera 8.0+, Safari vs için
			browser=new XMLHttpRequest();
		}
		catch (e){
		// Internet Explorer için
			try {
				browser=new ActiveXObject("Msxml2.XMLHTTP");
			}
			catch (e) {
				try {
					browser=new ActiveXObject("Microsoft.XMLHTTP");
				}
				catch (e) {
					browser=false;
				}
			}
		}
		return browser;
	}
	this.calistir = function(){
		this.nesne = this.olustur();
		var aktar = this;
		this.nesne.onreadystatechange = function(){
			var cevap = null;
			if(aktar.nesne.readyState == 4){
				if(aktar.nesne.status == 200){
					aktar.fonksiyon(aktar.nesne);
				}
				else{
					aktar.hatafonksiyon(aktar.nesne);
				}
			}
		}
		this.nesne.open(this.method,this.adres,true);
		if(this.method == 'POST') {
			this.nesne.setRequestHeader('Content-type', 'application/x-www-form-urlencoded; charset=utf-8');
		}
		this.nesne.send(this.veri);
	}
	// Temel fonksiyon
	this.gonder = function(veri,adres,method,fonksiyon,hatafonksiyon){
		this.veri = veri;
		this.adres = adres;
		this.fonksiyon = fonksiyon;
		this.hatafonksiyon = hatafonksiyon;
		this.method = method;
		this.calistir();
	}
}
function ajax_hata(nesne){
	alert(nesne.status + " - " + nesne.statusText);	
}
