function dim_in()
	{
	$("#dim").fadeIn();
	};

function dim_out()
	{
	$("#dim").fadeOut();
	};

function popup_open(popup_div, width)
	{
	/*
	[function-description]Kezdőlapi popup ablak feldobása.
	
	Amennyiben egy flash kitakarná a popupot, a flash-t be kell rakni a egy popup_flash div-be, alternatív tartalmat a pupup_alt div-be és kiszedni a kommentelt sorokat ezen funkció és a popup_close() forrásából.[/function-description]
	[function-parameters]width - a popup szélessége[/function-parameters]
	[function-return][/function-return]
	*/
	var x = 0;
	if(self.innerWidth)
		{
		x = self.innerWidth;
		}
	else if(document.documentElement && document.documentElement.clientWidth)
		{
		x = document.documentElement.clientWidth;
		}
	else if(document.body)
		{
		x = document.body.clientWidth;
		};
	var left_margin = (x - width) / 2;
	document.getElementById(popup_div).style.display = "block";
	//Amennyiben egy flash kitakarná a popuopot, a flash-t be kell rakni a popup_flash div-be és kiszedni a kommenteket.
	//document.getElementById('popup_flash').style.display = "none";
	//document.getElementById('popup_alt').style.display = "block";
	
	var objLoad = document.getElementById(popup_div);
	objLoad.style.marginLeft = left_margin+"px";
	objLoad.style.marginTop = scroll_position() + 'px';
	dim_in();
	};

function popup_close(popup_div)
	{
	/*
	[function-description]Kezdőlapi popup ablak bezárása.[/function-description]
	[function-parameters][/function-parameters]
	[function-return][/function-return]
	*/
	document.getElementById(popup_div).style.display = "none";
	//Amennyiben egy flash kitakarná a popuopot, a flash-t be kell rakni a popup_flash div-be és kiszedni a kommenteket.
	//document.getElementById('popup_flash').style.display = "block";
	//document.getElementById('popup_alt').style.display = "none";
	dim_out();
	};

