pendingClear = "false";
clearTimer = "";


if(document.images){
	
	homeOn= new Image();
	homeOn.src="images/btn1-on.jpg";  
	homeOff= new Image();
	homeOff.src="images/btn1-off.jpg";

	aboutOn= new Image();
	aboutOn.src="images/btn2-on.jpg";  
	aboutOff= new Image();
	aboutOff.src="images/btn2-off.jpg";

	philosophyOn= new Image();
	philosophyOn.src="images/btn4-on.jpg";  
	philosophyOff= new Image();
	philosophyOff.src="images/btn4-off.jpg";
	
	servicesOn= new Image();
	servicesOn.src="images/btn3-on.jpg";  
	servicesOff= new Image();
	servicesOff.src="images/btn3-off.jpg";
	
	contactOn= new Image();
	contactOn.src="images/contact-on.jpg";  
	contactOff= new Image();
	contactOff.src="images/contact-off.jpg";
	

}
		

function killMenu(menu) { 
	clearTimer = setTimeout("clearMenu('" + menu + "')",2000);
}


function showMenu(menu){
	if (document.getElementById){
		document.getElementById('zupansMenu').style.visibility = "hidden";
		document.getElementById('cateringMenu').style.visibility = "hidden";
		document.getElementById('tastingMenu').style.visibility = "hidden";
		document.getElementById('wineMenu').style.visibility = "hidden";
		document.getElementById(menu).style.visibility = 'visible';
		clearTimeout(clearTimer);
	} else {
		document.all.zupansMenu.style.visibility = "hidden";
		document.all.cateringMenu.style.visibility = "hidden";
		document.all.tastingMenu.style.visibility = "hidden";
		document.all.wineMenu.style.visibility = "hidden";
		eval('document.all.' + menu).style.visibility = 'visible';
		clearTimeout(clearTimer);
	}
}

function clearMenu(menu){
	// turn off the last selected menu
	if(menu != 'HomeMenu'){
		if (document.getElementById){
			document.getElementById(menu).style.visibility = 'hidden';
		}else{
			eval('document.all.' + menu).style.visibility = 'hidden';
		}
	}
	/*if (document.getElementById){
		document.getElementById('HomeMenu').style.visibility = 'visible';
	}else{
		document.all.HomeMenu.style.visibility = 'visible';
	}*/
}


function waxOn(imgName,mode){
	if(document.images){
		if(document.all){
			document.all[imgName].src = eval(imgName+mode+'.src');
		}else{
			document[imgName].src = eval(imgName+mode+'.src');
		}
	}	
}


	xWidth=screen.width;
	yHeight=screen.height;
	xCenter = (xWidth/2)-(300/2);
	yCenter = (yHeight/2)-(350/2);

function popUp(url){
	var winName = "popup";
	myWin = window.open( url, winName,'width=300,height=350,left=' + xCenter + ',top=' + yCenter + ',directories=no,location=yes,menubar=no,scrollbars=yes,status=yes,toolbar=no,resizable=yes');
}

