var menu_all=2; var closeTimeout, openTimeout, i; function showLayer(item){ /*if (document.all) { document.all["m"+item].style.visibility = "visible"; } else { if (document.layers) { eval('document.layers.m'+item+'.x = '+ (126 * (item - 1))); eval('document.layers.m'+item+'.visibility = "visible"'); } } */ document.getElementById("m"+item).style.visibility = "visible"; } function hideLayer(item){ /* if (document.all) { document.all["m"+item].style.visibility = "hidden"; } else { if (document.layers) { eval('document.layers.m'+item+'.visibility = "hidden"'); } } */ document.getElementById("m"+item).style.visibility = "hidden"; } function menuOn(parent, tdname) { ResetCloseTimeout(); if (!parent) { SetOpenTimeout(tdname); } } function menuOff(parent, tdname) { if(!parent) { ResetOpenTimeout(); } SetCloseTimeout(); } function SetOpenTimeout(item) { clearTimeout(openTimeout); openTimeout = setTimeout("onOpenEvent("+item+")", 10); } function onOpenEvent(item) { ResetCloseTimeout(); onCloseEvent(); showLayer(item); } function onCloseEvent() { for (var i=1; i <= menu_all; i++) { hideLayer(i); } } function ResetOpenTimeout() { if(openTimeout) clearTimeout(openTimeout); } function SetCloseTimeout() { clearTimeout(closeTimeout); closeTimeout = setTimeout("onCloseEvent()", 250); } function ResetCloseTimeout() { if(closeTimeout) clearTimeout(closeTimeout); } function ChangeLeague(lg_id) { ofm = document.getElementById("chleague"); ofm.league.value = lg_id; ofm.submit(); } function ShowErrorWindow(errortext) { top_x = (document.body.clientWidth-400)/2; top_y = (document.body.clientHeight-100)/2; err_shadow = document.getElementById("error_shadow"); err_window = document.getElementById("error_window"); err_text = document.getElementById("errortext"); err_shadow.style.left = top_x+4; err_shadow.style.top = top_y+4; err_window.style.left = top_x; err_window.style.top = top_y; err_text.innerHTML = errortext; err_window.style.display=''; err_shadow.style.display=''; } function sell() { if (confirm("Продать игрока?")) { field = document.getElementById("trans_field"); form = field.contentWindow.document.forms['fsell']; form.submit(); } } function sellall() { if (confirm("Продать ВСЕХ игроков? Вы уверены?")) { field = document.getElementById("trans_field"); form = field.contentWindow.document.forms['fsell']; form.all.value = 1; form.submit(); } } function setBudget(val) { document.getElementById("trans_ytm_prc").innerHTML = val; } function get_all(obj) { var s_url = "", b_summ = ""; if (document.getElementById("all_tms").checked) { s_url = s_url + "&tm=" + obj.tm.value; document.forms["scors_filter"].tm.value = obj.tm.value; document.forms["def_filter"].tm.value = obj.tm.value; document.forms["halfdef_filter"].tm.value = obj.tm.value; document.forms["goalie_filter"].tm.value = obj.tm.value; b_summ = true; } if (document.getElementById("all_nemm").checked) { s_url = s_url + "&prm=" + obj.prm.value; document.forms["scors_filter"].prm.value = obj.prm.value; document.forms["def_filter"].prm.value = obj.prm.value; document.forms["halfdef_filter"].prm.value = obj.prm.value; document.forms["goalie_filter"].prm.value = obj.prm.value; b_summ = true; } if (document.getElementById("all_prc").checked) { s_url = s_url + "&prc=" + obj.prc.value; document.forms["scors_filter"].prc.value = obj.prc.value; document.forms["def_filter"].prc.value = obj.prc.value; document.forms["halfdef_filter"].prc.value = obj.prc.value; document.forms["goalie_filter"].prc.value = obj.prc.value; b_summ = true; } if (b_summ) { if (obj.name != "scors_filter") { document.getElementById("scors_list").src = "transfer_list.asp?am=4" + s_url; } else { obj.submit(); } if (obj.name != "def_filter") { document.getElementById("def_list").src = "transfer_list.asp?am=2" + s_url; } else { obj.submit(); } if (obj.name != "halfdef_filter") { document.getElementById("halfdef_list").src = "transfer_list.asp?am=3" + s_url; } else { obj.submit(); } if (obj.name != "goalie_filter") { document.getElementById("goalie_list").src = "transfer_list.asp?am=1" + s_url; } else { obj.submit(); } } else { obj.submit(); } } function To(act,id,amp) { form=document.forms["sstl"]; form.act.value=act; form.pl.value=id; form.am.value=amp; form.submit(); } function ShowInfo(id) { wnd = window.open('/pinfo.asp?id='+id+'&mode=window', 'info', 'height=400,width=400,status=no,toolbar=no,menubar=no,scrollbars=yes'); }