




// full oldal cover  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #  #
var FullCover = new Class
({
	// johet onclick fuggveny
	initialize: function(onclick_function)
	{
		// id generalas
		//this.cover_id = 'full_cover_' + $random(12345, 98765);

		// letrehoz
		//this.cover = new Element('div', {'class':'fullCover', 'id':this.cover_id}).inject($(document.body));
		this.cover = $('Full_cover');

		// stilus
		this.cover.set(
			{'styles':{
				'width':window.getScrollSize().x,
				'height':window.getScrollSize().y,
				'opacity': 0.65,
			}}
		)

		// onclick
		if (onclick_function)
			this.cover.addEvent('click', function(){eval(onclick_function())});
	},


	// bekapcsol
	show: function()
	{
		this.cover.setStyle('display', 'block');
		this.cover.setStyle('height', 1);
		this.cover.setStyle('height', window.getScrollSize().y);
		// selectek elrejtese ie6 alatt
		if (Browser.Engine.trident4)
		{
			this.selects = document.getElements('select');
			this.selects.each
			(
			function(s)
			{
				s.setStyle('visibility', 'hidden');
			}
			)
		}
	},


	// kikapcsol
	hide: function()
	{
		//this.cover.dispose();
		this.cover.setStyle('display', 'none');
		
		// selectek visszarakasa ie6 alatt
		if (Browser.Engine.trident4)
		{
			this.selects.each
			(
			function(s)
			{
				s.setStyle('visibility', 'visible');
			}
			)
		}
	},


	// meret beallitas
	updateSize: function(w, h)
	{
		if (w>0)
			this.cover.setStyle('width', w);
		if (h>0)
			this.cover.setStyle('height', h);
	},


	// meret reset: az ablakhoz igazija
	resetSize: function()
	{
		this.cover.setStyle('width', window.getScrollSize().x);
		this.cover.setStyle('height', window.getScrollSize().y);
	}
});

// globalis valtozo a egy peldany tarolasara
var COVER;

