function menuOpen(id, obj) {
	for(var i = 1; i <=100; i++) {
		if(document.getElementById('menu_'+i) != null) {
			document.getElementById('menu_'+i).style.display = 'none';
			document.getElementById('menu'+id).className = ' ';
		}
	}
	// otvorenie
	alert(document.getElementById('menu'+id).childNodes[3].style);
	document.getElementById('menu'+id).childNodes[3].style.display = 'block';
	//document.getElementById('menu_'+id).style.display = 'block';
	document.getElementById('menu'+id).className = 'sel';
	obj.setAttribute("onclick",'menuClose(' + id + ', this); return false;');
}

function menuClose(id, obj) {
	for(var i = 1; i <=100; i++) {
		if(document.getElementById('menu_'+i) != null) {
			document.getElementById('menu_'+i).style.display = 'none';
			document.getElementById('menu'+id).className = ' ';
		}
	}
	obj.setAttribute("onclick",'menuOpen(' + id + ', this); return false;');
}

function verifyDelete(conf,presmerovanie) {
	if (confirm(conf)) {
		location.href = presmerovanie;
	} else {
		    return false;
	    }
}

function redirect(url) {
	window.location = url;
}

function verifyDeleteForm(conf) {
	if (confirm(conf)) {
		 document.getElementById('confirm').value = "yes";
	} 
}

function myPopup(url, width, height) {
	window.open( url, "myWindow", "status = 0, height = " + height + ", width = " + width + ", resizable = 0" )
}

function PopupCenter(pageURL, title,w,h) {
	var left = (screen.width/2)-(w/2);
	var top = (screen.height/2)-(h/2);
	var targetWin = window.open (pageURL, title, 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width='+w+', height='+h+', top='+top+', left='+left);
} 
