function ajaxBk (url, callbackFunction, synchrone, kindOfRequest, arguments){
	this.id				= null;
	this.url			= '';
	this.synchrone		= false;
	this.ajaxObject		= null;
	this.loadGifPfad	= '/images/load-small.gif';
	var functionName	= '';
	this.$ = function(id){
		return document.getElementById(id);
	};

	this.getNewAjaxObject = function(){
		try{
			return new ActiveXObject("Microsoft.XMLHTTP");
		}catch(Error){
			try{
				return new ActiveXObject("MSXML2.XMLHTTP");
			}catch(Error){
				try{
					return new XMLHttpRequest();
				}catch(Error){}
			}
		}
	};
	this.setAjaxObject = function(){
		this.ajaxObject = this.getNewAjaxObject();
	};
	this.startAjax = function(){
		this.ajaxObject = this.getNewAjaxObject();
		var DateTime = new Date();
		if(this.url.indexOf('?') >=0){
			this.url += '&tsAjaxBk='+DateTime.getTime();
		}else{
			this.url += '?tsAjaxBk='+DateTime.getTime();
		}
		this.ajaxObject.open(this.kindOfRequest,encodeURI(this.url),this.synchrone);
		if(this.kindOfRequest == 'POST'){
			this.ajaxObject.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
		}
		this.ajaxObject.onreadystatechange =  this.isRequestReady;
		this.ajaxObject.send(this.arguments);
	};

	this.isRequestReady = function(){
		if(typeof(that.ajaxObject) == 'object'){
			if(that.ajaxObject.readyState==4){
				try{
				that.callback(that.ajaxObject.responseText);
				}catch(e){}
			}
		}else{
			if(this.readyState==4){
				that.callback(this.responseText);
			}
		}
	};

	this.addContent = function(content){
		if(this.$(this.id)){
			this.$(this.id).innerHTML	= content;
		}
	};
	this.clearId = function(){
		this.id	= '';
	};
	this.url			= url || '';
	this.callback		= callbackFunction || function () {};
	this.synchrone		= synchrone || false;
	this.kindOfRequest  = kindOfRequest || "GET";
	if(this.kindOfRequest != "POST"){
		this.kindOfRequest = "GET";
	}
	this.arguments		= arguments || null;
	var that			= this;
	this.startAjax();

};

//erfolg = new ajaxBk('/js/ajax/loadErfolgsstory.php',erfolgsstory,true);
//erfolg.setFunctionName('erfolgsstory');

/*reisen = new ajaxBk;
reisen.setId('singlereisenTest');
reisen.setSynchrone(true);
reisen.addLoadGif();
reisen.setUrl('/js/ajax/loadSinglereisen.php');
reisen.startAjax();
*/


