// MENÜ KEZELÉS
startList = function() {
	if (document.all&&document.getElementById) {
		navRoot = document.getElementById('nav');
		for (i=0; i<navRoot.childNodes.length; i++) {
			node = navRoot.childNodes[i];
			if (node.nodeName=='LI') {
				node.onmouseover=function() {
					this.className+='over';
  				}
  				node.onmouseout=function() {
  					this.className=this.className.replace('over', '');
   				}
   			}
  		}
 	}
}
window.onload=startList;

//FOTOALBUMHOZ
function fotoalbum(cat,foto,l)
    {
    var popupwidth = 900, popupheight = 700 ; /*760, 540*/
    width = screen.width ;
    height = screen.height ;
    if (document.all)
        {
        width = document.body.clientWidth ;
        height = document.body.clientHeight ;
        }
    else if (document.layers)
        {
        width = window.innerWidth ;
        height = window.innerHeight ;
        }
    leftpos = (width-popupwidth)/2 ;
    toppos = (height-popupheight)/2 ;
    window.open("http://www.miskolcholding.hu/fotoalbum.php?cat="+cat+"&foto="+foto+"&lang="+l,"_blank","toolbar=0,location=0,directories=0,status=0,menubar=0,resizable=0,width=900,height=700,scrollbars=0,top="+toppos+",left="+leftpos) ;
    }


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=\"bgcolor\" value=\"'+bgcolor+'\" />');
	document.write('<param name=\"swliveconnect\" value=\"true\" />');
	document.write('<param name=\"menu\" value=\"false\" />');
	document.write('<param name="wmode" value="transparent">');
	document.write('<embed src=\"'+file+'\" wmode=\"transparent\" quality=\"high\" bgcolor=\"'+bgcolor+'\" width=\"'+width+'\" height=\"'+height+'\" wmode=\"transparent\" allowScriptAccess=\"always\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" wmode=\"transparent\"  swliveconnect=\"true\" menu=\"false\"/>');
	document.write('</object>');    
	}


// gyik megjelenítése
function showfaq(element)
    {
    document.getElementById(element).style.display = "block" ;
    document.getElementById("a"+element).href = "javascript: hidefaq('"+element+"')" ;
    window.focus() ;
    }
// gyik elrejtése
function hidefaq(element)
    {
    document.getElementById(element).style.display = "none" ;
    document.getElementById("a"+element).href = "javascript: showfaq('"+element+"')" ;
    window.focus() ;
    }

function urlap_action(){
	urlap=document.getElementById('urlap2');
    urlap_select=document.getElementById('urlap2_s');
	
	urlap.action= urlap_select.value;
	urlap.submit();
}

function centermessagebox(){
    
	document.getElementById('messagebox').style.display = "none";
	leftpos = 0 ;
    toppos = 0 ;
	
	/**/
	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)) - 60;
	/**/
	
    if (screen){
        leftpos = (document.body.clientWidth/2) - 165 ;
	}
	
	document.getElementById('messagebox').style.left = leftpos+'px';
	document.getElementById('messagebox').style.top = toppos+'px';
	
    document.onclick = hidemessagebox ;
} 
function hidemessagebox()
    {
    document.getElementById("messagebox").style.display = "none" ;
    window.focus() ;
    document.onclick = empty ;
    }




function showelement(element)
    {
    document.getElementById(element).style.display = "block" ;
    window.focus() ;
    }
function hideelement(element)
    {
    document.getElementById(element).style.display = "none" ;
    window.focus() ;
    }
function showhideelement(element)
    {
    if (document.getElementById(element).style.display=='none')
	showelement(element) ;
    else
	hideelement(element) ;
    window.focus() ;
    }
function elrejt(element){
	document.getElementById(element).style.visibility = "hidden" ;
	window.focus() ;
}
function felfed(element){
	document.getElementById(element).style.visibility = "visible" ;
	window.focus() ;
}
/*------------------*/
var xmouse;
var ymouse;
function mouseMove(e){
	if(!e) var e = window.event;

	if(e.pageX){
		xmouse = e.pageX;
		ymouse = e.pageY;
	}else if(e.clientX){
		xmouse = e.clientX;
		ymouse = e.clientY
	}else return;

}
document.onmousemove = mouseMove;

function centerbox(t){
	
	var box = 'messagebox';

	document.getElementById(box).style.display = "none";
	leftpos = 0 ;
    toppos = 0 ;
	
	/**/
	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)) - 60;
	/**/

    if (screen){
        leftpos = (document.body.clientWidth/2) - 160 ;
	}
	if(t){
		toppos = t;
	}
	
	document.getElementById(box).style.left = leftpos+'px';
	document.getElementById(box).style.top = toppos+'px';


	document.onclick = function() {
		document.getElementById(box).style.display = "none" ;
		window.focus() ;
		document.onclick = empty ;
	}

}

function empty()
    {
    }

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 "" ;
	}

