function open_center_layer(element,x,y,mode){
	document.getElementById(element).style.display = "none";
	leftpos = 0 ;
	toppos = 0 ;

	if(mode==0){
		/* TOP */
		if(self.pageYOffset){
			yScroll = self.pageYOffset;
		}else if(document.documentElement && document.documentElement.scrollTop){
			yScroll = document.documentElement.scrollTop;
		}else if(document.body){
			yScroll = document.body.scrollTop;
		}
		if (self.innerHeight) {
			inheight = self.innerHeight;
		} else if (document.documentElement && document.documentElement.clientHeight) {
			inheight = document.documentElement.clientHeight;
		} else if (document.body) {
			inheight = document.body.clientHeight;
		}
		toppos = (yScroll + (inheight/2)) - y;
	}else{        
		toppos = y;
	}

	if(mode==0){
		/* LEFT */
		if (screen){
			leftpos = (document.body.clientWidth/2) - x ;
		}

		if (leftpos<0)
			leftpos = 10 ;
	}else if(mode==2){
		leftpos = x;
	}

	document.getElementById(element).style.left = leftpos+'px';
	document.getElementById(element).style.top = toppos+'px';
}

function showmessagebox(mode){
	var elem = '';
	if(mode==0){
		elem = 'error_message';
	}else if(mode==1){
		elem = 'success_message';
	}else{
		elem = 'messagebox';
	}

	document.getElementById(elem).style.display = "block" ;
	window.focus() ;

	document.onclick = function(){
		document.getElementById(elem).style.display = "none" ;
		window.focus() ;
		document.onclick = empty ;
	}
}
function empty(){
}

function showflash(file,width,height,bgcolor) {
	document.write('<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0\" width=\"'+width+'\" height=\"'+height+'\">');
	document.write('<param name=\"allowScriptAccess\" value=\"always\" />');
	document.write('<param name=\"movie\" value=\"'+file+'\" />');
	document.write('<param name=\"quality\" value=\"high\" />');
	document.write('<param name=\"wmode\" value=\"opaque\" />');
	document.write('<param name=\"bgcolor\" value=\"'+bgcolor+'\" />');
	document.write('<param name=\"swliveconnect\" value=\"true\" />');
	document.write('<param name=\"menu\" value=\"false\" />');
	document.write('<embed src=\"'+file+'\" quality=\"high\" bgcolor=\"'+bgcolor+'\" width=\"'+width+'\" height=\"'+height+'\" allowScriptAccess=\"always\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" wmode=\"opaque\"  swliveconnect=\"true\" menu=\"false\"/>');
	document.write('</object>');    
}

function showmp3playlist(file,width,height) {
	document.write('<object type=\"application/x-shockwave-flash\" data=\"http://www.spanyolnatha.hu/mp3player.swf?playlist_url=http://www.spanyolnatha.hu/zene/playlist/'+file+'\" width=\"'+width+'\" height=\"'+height+'\">');
	document.write('<param name=\"allowScriptAccess\" value=\"always\" />');
	document.write('<param name=\"movie\" value=\"http://www.spanyolnatha.hu/mp3player.swf?playlist_url=http://www.spanyolnatha.hu/zene/playlist/'+file+'\" />');
	document.write('<param name=\"quality\" value=\"high\" />');
	document.write('<param name=\"wmode\" value=\"opaque\" />');
	document.write('<param name=\"bgcolor\" value=\"f7f7f7\" />');
	document.write('<param name=\"swliveconnect\" value=\"true\" />');
	document.write('<param name=\"menu\" value=\"false\" />');	
	document.write('<embed src=\"http://www.spanyolnatha.hu/mp3player.swf?playlist_url=http://www.spanyolnatha.hu/zene/playlist/'+file+'\" quality=\"high\" bgcolor=\"f7f7f7\" width=\"'+width+'\" height=\"'+height+'\" allowScriptAccess=\"always\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" wmode=\"opaque\"  swliveconnect=\"true\" menu=\"false\"/>');	
	document.write('</object>');  
}

function showmovie1(file,width,height) {
	document.write('<object id=\"MediaPlayer\" classid=\"CLSID:22D6f312-B0F6-11D0-94AB-0080C74C7E95\" type=\"application/x-oleobject\" standby=\"Loading Windows Media Player componentsâŚ\"  codebase=\"http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,7,1112\" width=\"'+width+'\" height=\"'+height+'\">');
	document.write('<param name=\"filename\" value=\"http://www.spanyolnatha.hu/video/'+file+'\" />');    
	document.write('<param name=\"allowScriptAccess\" value=\"always\" />');
	//document.write('<param name=\"movie\" value=\"http://www.spanyolnatha.hu/mp3player.swf?playlist_url=http://www.spanyolnatha.hu/zene/playlist/'+file+'\" />');
	document.write('<param name=\"quality\" value=\"high\" />');
	document.write('<param name=\"wmode\" value=\"opaque\" />');
	document.write('<param name=\"bgcolor\" value=\"f7f7f7\" />');
	document.write('<param name=\"Showcontrols\" value=\"true\" />');
	document.write('<param name=\"autostart\" value=\"false\" />');    
	document.write('<embed type=\"application/x-mplayer2\" src=\"http://www.spanyolnatha.hu/video/'+file+'\" name=\"MediaPlayer\" bgcolor=\"f7f7f7\" width=\"'+width+'\" height=\"'+height+'\" allowScriptAccess=\"always\" wmode=\"opaque\" autostart=\"0\" menu=\"false\"/>');    
	document.write('</object>');  
}
function showmovie(file,width,height) {
	document.write('<object id=\"MediaPlayer\" classid=\"CLSID:22D6f312-B0F6-11D0-94AB-0080C74C7E95\" type=\"application/x-oleobject\" standby=\"Loading Windows Media Player componentsâŚ\"  codebase=\"http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,7,1112\" width=\"'+width+'\" height=\"'+height+'\">');
	document.write('<param name=\"filename\" value=\"http://www.spanyolnatha.hu/video/'+file+'\" />');    
	document.write('<param name=\"allowScriptAccess\" value=\"always\" />');
	//document.write('<param name=\"movie\" value=\"http://www.spanyolnatha.hu/mp3player.swf?playlist_url=http://www.spanyolnatha.hu/zene/playlist/'+file+'\" />');
	document.write('<param name=\"quality\" value=\"high\" />');
	document.write('<param name=\"wmode\" value=\"opaque\" />');
	document.write('<param name=\"bgcolor\" value=\"f7f7f7\" />');
	document.write('<param name=\"Showcontrols\" value=\"true\" />');
	document.write('<param name=\"autostart\" value=\"true\" />');    
	document.write('<embed type=\"application/x-mplayer2\" src=\"http://www.spanyolnatha.hu/video/'+file+'\" name=\"MediaPlayer\" bgcolor=\"f7f7f7\" width=\"'+width+'\" height=\"'+height+'\" allowScriptAccess=\"always\" wmode=\"opaque\" autostart=\"1\" menu=\"false\"/>');    
	document.write('</object>');  
}

// RADIO BUTTONOK MEGJELĂLT ĂRTĂKĂNEK VISSZAADĂSA
function getradiovalue(radioObj)
	{
	if (!radioObj)
		return "" ;
	var radioLength = radioObj.length ;
	if (radioLength == undefined)
		if (radioObj.checked)
			return radioObj.value ;
		else
			return "" ;
	for (var i = 0; i < radioLength; i++)
			{
		if (radioObj[i].checked)
			{
			return radioObj[i].value ;
			}
		}
	return "" ;
	}

function showelement(element)
	{
	document.getElementById(element).style.display = "block" ;
	window.focus() ;
	}

function hideelement(element)
	{
	document.getElementById(element).style.display = "none" ;
	window.focus() ;
	}
function hideall(elements){
	var element = elements.split(',');
	for(i=0; i<element.length; i++)	{
		e = element[i];
		if(document.getElementById(e)){
			document.getElementById(e).style.display = "none" ;
		}
	}
	window.focus() ;
}
function showhideelement(element)
	{
	if (document.getElementById(element).style.display=='none')
	showelement(element) ;
	else
	hideelement(element) ;
	window.focus() ;
	}   

var font_size = 16;
var font_orig = 16;

function text_size(size) {
	if (size==1 && font_size < font_orig + 2){
		font_size += 1;
	}else if (size==0 && font_size > font_orig - 3){
		font_size -= 1;
	}
	// lead szĂśvege
	if(document.getElementById('article_lead'))
	document.getElementById('article_lead').style.fontSize = (font_size) + "px";
	// text szĂśvege
	if(document.getElementById('article_text'))
	document.getElementById('article_text').style.fontSize = (font_size) + "px";
}

/* FLASH arg ĂĄtĂ­rĂĄs */
function flashfix() {
	var embedArray = document.getElementsByTagName('embed');
	for (i=0;i<embedArray.length;i++) {
		if (embedArray[i].setAttribute) {
			embedArray[i].setAttribute('wmode','opaque');
		}
	}
	
	var objectArray = document.getElementsByTagName('object');
	
	for (i=0;i<objectArray.length;i++) {
		if (objectArray[i].setAttribute) {
			objectArray[i].setAttribute('wmode','opaque');
		}
		
		if (objectArray[i].outerHTML) {
			objectArray[i].outerHTML=objectArray[i].outerHTML;
		}	
	}
}