
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}



function changeClass(szam) {
base="pp";
over="oo";
maxtab= 4;

for (i=1;i<=maxtab;i++)
	{
	id = "p" + i;
	layer = "Layer" + i;
	if (i == szam)
		{
		identity=document.getElementById(id);
		identity.className=over;
		MM_showHideLayers(layer,'','show');
		}
		else
		{
		identity=document.getElementById(id);
		identity.className=base;
		MM_showHideLayers(layer,'','hide');
		
		} 

	}
}





/***********************************************
* Switch Menu script- by Martial B of http://getElementById.com/
* Modified by Dynamic Drive for format & NS4/IE4 compatibility
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/

if (document.getElementById){ //DynamicDrive.com change
document.write('<style type="text/css">\n')
document.write('.subinf{display: none;}\n')
document.write('.submenu{display: none;}\n')
document.write('</style>\n')
}

function SwitchMenu(obj,MasterID){
if(document.getElementById){
	var el = document.getElementById(obj);
	var ar = document.getElementById(MasterID).getElementsByTagName("div");

	 //DynamicDrive.com change
		if(el.style.display != "block"){ //DynamicDrive.com change
			for (var i=0; i<ar.length; i++){
				if (ar[i].className=="submenu") //DynamicDrive.com change
				ar[i].style.display = "none";
			}
			el.style.display = "block";
		}else{
			el.style.display = "none";
		}
	}
}




if (document.getElementById){ //DynamicDrive.com change
document.write('<style type="text/css">\n')
document.write('.tabcontent{display: none;}\n')
document.write('.tabcontent{display: none;}\n')
document.write('</style>\n')
}

function expandcontent(obj,MastID,currentObj){
	if(document.getElementById){
	var openPage     = document.getElementById(obj);
	var TABholder = document.getElementById(MastID).getElementsByTagName("div");
	var currTab			= document.getElementById(currentObj);

	 //DynamicDrive.com change
		if(openPage.style.display != "block"){ //DynamicDrive.com change
			for (var i=0; i<TABholder.length; i++){
				if (TABholder[i].className=="tabcontent") //DynamicDrive.com change
					TABholder[i].style.display = "none";
					
				if (TABholder[i].className=="current") 
					TABholder[i].className = "tabclass";
					
			}
				openPage.style.display = "block";
				currTab.className = "current";
		}
	}

}

function doOnload(){


	expandcontent('mkfe1','elonyok','m1');
expandcontent('sc1', 'ddimagetabs','s2');
 initListGroup('links', document.forms[0].category, document.forms[0].site);

	}





function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}

function AdWin() { //v2.0 theURL,winName,features
/*if (readCookie("pop") == "") {
	writeCookie("pop", "int", 24);
	  document.getElementById('loadBannerID').style.display='block';
	}
else if (readCookie("pop") == "int") {

}*/
 if (location.href == "http://www.mkfealkusz.hu/")
	 {
	  document.getElementById('loadBannerID').style.display='block';
	 }

}

function writeCookie(name, value, days)
{
  var expire = "";
  if(days != null)
  {
    expire = new Date((new Date()).getTime() + days * 3600000);
    expire = "; expires=" + expire.toGMTString();
  }
  document.cookie = name + "=" + escape(value) + expire;
}

function readCookie(name)
{
  var cookieValue = "";
  var search = name + "=";
  if(document.cookie.length > 0)
  { 
    offset = document.cookie.indexOf(search);
    if (offset != -1)
    { 
      offset += search.length;
      end = document.cookie.indexOf(";", offset);
      if (end == -1) end = document.cookie.length;
      cookieValue = unescape(document.cookie.substring(offset, end))
    }
  }
  return cookieValue;
}




