// egyéb funkciók

function MM_reloadPage(init) {
  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 ShowNav(navItem) {
	ypSlideOutMenu.showMenu(navItem + 'Menu');
}
function HideNav(navItem) {
	ypSlideOutMenu.hideMenu(navItem + 'Menu');
}

function SwapNavImage(menuObj, state) {

	var thisNav;
	switch(menuObj) {
		case 0: thisNav = "navServices"; break;
		case 1: thisNav = "navAbout"; break;
		case 2: thisNav = "navClients"; break;
		case 3: thisNav = "navContact"; break;
		default: thisNav = ""; break;
	}

	if (thisNav != "") {
		if (state == "over") {
			SwapImage(thisNav, 'over');
			if (getImageObject(thisNav).style) { getImageObject(thisNav).style.borderBottom = "1px solid #b3b3b3"; }
		} else {
			SwapImage(thisNav, 'out');
			if (getImageObject(thisNav).style) { getImageObject(thisNav).style.borderBottom = "1px solid #fff"; }
		}
	}
}

var start = 201;
var step = 23;

var menus = [
	new ypSlideOutMenu("navServicesMenu",   "down", 113, (start+0*step), 107, 260),
	new ypSlideOutMenu("navAboutMenu",		"down", 113, (start+1*step), 107, 130),
	new ypSlideOutMenu("navClientsMenu",	"down", 113, (start+1*step), 107, 75),
	new ypSlideOutMenu("navContactMenu",	"down", 113, (start+2*step), 107, 75)
]

for (var i = 0; i < menus.length; i++) {
	menus[i].onactivate = new Function("SwapNavImage(" + i + ", 'over');");
	menus[i].ondeactivate = new Function("SwapNavImage(" + i + ", 'out');");
}
