var Request = $.inherit({
	__constructor : function() {
		this._data = new Object();
		this._data.name = 'request';
		this._data.search = '';
		this._data.style = 0;
		this._data.p = 0;
		this._data.display = 20;
		this._data.template = '';
		this._data.isRefreshOnSet = 0;
		this._data.action = 'listing';
		this._data.htmlTarget = '';
		this._data.timezone = userTimezone;
	},
	set : function(key, value) {
		this._data[key] = value;
		if(this._data.isRefreshOnSet == 1 && key != 'isRefreshOnSet')
			this.show(this._data.htmlTarget, this);
	},
	isRefreshOnSet : function(bool) {
		this._data.isRefreshOnSet = bool;
	},
	show : function(htmlTarget, obj) {
		$.ajax({
			type	: 'GET',
			cache	: false,
			url		: '/ajax.php',
			data	: this.getParam(),
			complete: function(data) {		
				document.getElementById(htmlTarget).innerHTML = data.responseText;					
				obj.addFunctionAfterShow();
			}
		});
	},
	addFunctionAfterShow : function(){
	
	},
	getParam : function(){
		var array = new Array();
		var count = 0;
		for(key in this._data) {
			array[count] = key+'='+this._data[key];
			count++;
		}
		return (array.join('&'));
	},
	info : function(){
		alert('Objet : ' + this.getParam());
	}
});
