var cView = Class.create({
	initialize: function(_name, _container, _reference) {
		this.name = _name;
		this.filters = {};
		this.container = _container;
		this.reference = _reference;
		this.inited = false;
	},
	// feltolti tartalommal
	init: function() {
		this.inited = true;
	},
	// aktivalja a nezetet, ha meg nem volt soha, akkor elobb feltolti tartalommal
	activateView: function() {
		if (this.container == null) {
			return;
		}
		this.container.show();
		this.resizeView();
		if (!this.inited) {
			this.init();
		}
	},
	deactivateView: function() {
		this.container.hide();
	},
	getTop: function() {
		return getElementTopByRef(this.container);
	},
	getLeft: function() {
		return getElementLeftByRef(this.container);
	},
	getAvailableHeight: function() {
		var top = this.getTop();
		var maxHeight = document.documentElement.clientHeight;
		// a rejtettek miatt kell :(
		return ((maxHeight - Math.max(160, top)) - 40);
	},
	getAvailableWidth: function() {
		var left = this.getLeft();
		var maxWidth = document.documentElement.clientWidth;
		// a rejtettek miatt kell :(
		return ((maxWidth - Math.max(150, left)) - 40);
	},
	getRealHeight: function() {
		return this.container.clientHeight;
	},
	getRealWidth: function() {
		return this.container.clientWidth;
	},
	getFilters: function() {
		return this.filters;
	},
	onParamsChange: function(filters) {
		if (!this.inited) {
			this.init();
		}
		if (filters) {
			this.filters = filters;
		}
	},
	onParamsChangeHidden: function(filters) {
		this.onParamsChange(filters);
	}/*,
	onParamsChange: function(opj) {
		this.onParamsChangeStyle(opj);
		this.reloadFilters(null);
	},
	onParamsChangeStyle: function(opj) {
		if (opj != null && opj.type != 'checkbox') {
			if (opj.value == '') {
				opj.className = '';
			} else {
				opj.className = 'aktiv_gomb';
			}
		}
	}*/,
	resetAllElement: function() {   // osszes elemet ujrarajzolja, ez mondjuk bejelentkezes utan hasznos, mert ott uj funkcio gombok jelennek meg
	},
	resizeView: function() {
	}/*,
	setParam: function(mit, mire) {
		var a = $(mit);
		a.value = mire;
		this.onParamsChange(a);
	}*/
});

