
function initDynamicMenu(menuname) {
	var tpl = "var sfHover_" + menuname + " = function() { ";
	tpl += "var el = document.getElementById('" + menuname + "_menu');";
	tpl += "if (el) {";
	tpl += "var sfEls = el.getElementsByTagName('LI'); ";
	tpl += "for (var i=0; i<sfEls.length; i++) { ";
	tpl += "sfEls[i].onmouseover=function() { ";
	tpl += "this.className+=' sfhover'; ";
	tpl += "};";
	tpl += "sfEls[i].onmouseout=function() { ";
	tpl += "this.className=this.className.replace(new RegExp(' sfhover'), ''); ";
	tpl += "};";
	tpl += "} ";
	tpl += "}; ";
	tpl += "}; ";
	tpl += "if (window.attachEvent) window.attachEvent('onload', sfHover_" + menuname + ");";
	eval(tpl);
}

function changeGameType(sel) {
	var val = sel.options[sel.selectedIndex].value;
	if (val == 'single') {
		document.getElementById('player3').style.display = 'none';
		document.getElementById('player4').style.display = 'none';
	} else {
		document.getElementById('player3').style.display = '';
		document.getElementById('player4').style.display = '';
	}
}

function setReservationAction(act, msg, btn) {
	var confirm = window.confirm(msg);
	if (confirm) {
		document.getElementById('act').value = act;
		btn.form.submit();
	}
}
