var cMenuer = Class.create({
	initialize: function(_aktualis) {
		this.aktualis = _aktualis;
		this.aktualisTartalom = 'js_hiba';
		this.showTartalom('valaszto');
		$(_aktualis+'_div').show();
		$(_aktualis+'_gomb').className = 'menu_ember_hover';
		this.isThisActive = true;
	},
	changeIt: function(melyik) {
		$(this.aktualis+'_div').hide();
		$(this.aktualis+'_gomb').className = 'menu_ember';

		var realchange = false;
		if (this.aktualis != melyik) realchange = true;

		this.aktualis = melyik;
		$(melyik+'_div').show();
		$(melyik+'_gomb').className = 'menu_ember_hover';

		// megnezi, hogy kell-e figyelmeztetni a juzert, es figyelmezteti
		// kiszedve, mert mindig torolni kell
		/*if (realchange && userer.checkMenuAlert(melyik)) {
			return;
		}*/
		if (realchange) {
			this.cleanAllParams();
		}
	},
	cleanAllParams: function() {
		// kiszedve, mert mindig torolni kell
		/*if (userer.getSetting('clean_params_on_menu_change') == 0) {
			return;
		}*/
		universe.userAlert('Szűrési feltételek törölve.');
		$('search_text').value = '';
		//$('szabad').value = '';
		//$('search_same').value = '';
		gt('mufaj1').value='';
		gt('mufaj2').value='';
		gt('mufaj3').value='';
		//Select_getSelected('mufaj1');
		gt('milyet').value='';
		gt('ajanlas').value='';
		gt('filmvege').value='';
		gt('orszag').value='';
		//Select_getSelected('orszag');
		gt('ev').value='';
		//Select_getSelected('ev');
		gt('humor').value='';
		gt('kivel').value='';
		//Select_getSelected('filmvege');
		$('in_cinema').checked = false;
		$('tori').checked = false;
		$('kisgyerek').checked = false;
		tagger.resetTags();
		browserFilter.clearFilterBox();
		//universe.getViewByName('valaszto').onParamsChangeHidden();
	},
	isParamsExists: function() {
		if ($('search_text').value != '') return true;
		//if ($('szabad').value != '') return true;
		//if ($('search_same').value != '') return true;
		if (gt('mufaj1').value != '') return true;
		if (gt('orszag').value != '') return true;
		if (gt('ev').value != '') return true;
		if (gt('filmvege').value!='') return true;
		if ($('in_cinema').checked != false) return true;
		if (tagger.hasSelected()) return true;
		return false;
	},
	noneOfThem: function() {
		$(this.aktualis+'_gomb').className = 'menu_ember_halfhover';
	},
	resetButtons: function() {
		this.changeIt('uresmenu');
	},
	showTartalom: function(melyik) {
		if ($('tartalom_'+melyik) == null) {
			return;
		}
		this.isThisActive = true;
		universe.deactivateAll();
		$('tartalom_'+this.aktualisTartalom).hide();
		this.aktualisTartalom = melyik;
		$('tartalom_'+melyik).show();
		if (melyik != 'ads') {
			this.noneOfThem();
		}
	},
	refreshTartalom: function() {
		if (this.isThisActive) {
			this.showTartalom(this.aktualisTartalom);
		}
	},
	hideAllTartalom: function() {
		this.isThisActive = false;
		$('tartalom_'+this.aktualisTartalom).hide();
	},
	isActive: function() {
		return this.isThisActive;
	},
	checkOnloadShow: function() {
		var a = document.location.href.indexOf('?');
		if (a > -1) {
			var b = document.location.href.substring(a+1, document.location.href.length);
			this.showTartalom(b);
			return true;
		}
		return false;
	}
});


