
//RETURN FUNCTION
var callbackhash_call_chat = {

	process: function (result) {

		// parse xml into dom object
		this.returnObject = eval('(' + result + ')');
		
		// iterate over all id -> html combinations
		/*
		returnlen = new String (this.returnObject);
		if (returnlen.length > 6) {
			var obj       = document.getElementById('chatquestion');
			obj.innerHTML = this.returnObject;
		}
		*/
		returnlen = new String (this.returnObject['chatquestion']);
		if (returnlen.length > 6 || this.returnObject['chatquestion'] == '<div></div>') {
			var obj       = document.getElementById('chatquestion');
			//obj.innerHTML = this.returnObject['chatquestion'];
			
			
			
			var re = /jjj/gi;
			obj.innerHTML = returnlen.replace(re,"\'");
			//document.getElementById('testxx').innerHTML = returnlen.replace(re,"\'");
		}
		if(this.returnObject['chatlist']) {
			var obj       = document.getElementById('chatlist');
			obj.innerHTML = this.returnObject['chatlist'];
		}
		
	}
}

var ajax_call_chat  = new call_chat(callbackhash_call_chat);

function do_call_chat(uid,chatlist,href) {

	var post_object          = new Object();
	post_object['uid'] = uid;
	post_object['chatlist'] = chatlist;
	post_object['_language'] = 'de';
	post_object['href'] = href;
	ajax_call_chat.process(post_object);

} // end do_call_chat
