/* Глобальные переменные */ var timer = null; var showdiv = 0; var overdiv = 0; var present = 0; var isNav = null; var x = -1; var y = -1; function detect_browser(){ if (document.layers) {navigator.family = "nn4"} if (document.all) {navigator.family = "ie4"} if (window.navigator.userAgent.toLowerCase().match("gecko")) { navigator.family = "gecko" } isNav = (navigator.appName.indexOf("Netscape") !=-1); if (isNav){ try{ if (document.addEventListener){ document.addEventListener("mousemove", handlerMM, true); } //document.captureEvents(Event.MOUSEMOVE); } catch(err){ } } if (navigator.appName.indexOf("Opera") !=-1){ navigator.family = "opera"; } try { document.onmousemove = handlerMM; } catch(err){ } } function window_open(url, width, height, name, scroll_bar, location){ _top = Math.ceil((screen.height - height)/2); _left = Math.ceil((screen.width - width)/2); if(scroll_bar != true){ var scroll = 'no'; }else{ var scroll = 'yes'; } if(typeof location != "undefined" && location == true){ var location = 'yes'; }else{ var location = 'no'; } if(name == undefined){ name = Math.round(999999 * Math.random()); } new_win = window.open(url, name , 'width=' + width + ',height=' + height + ',location='+ location +',status=no,toolbar=no,menubar=no,resizable=yes,scrollbars=' + scroll + ',top=' + _top + ',left=' + _left); new_win.focus(); return new_win; } function submit_to_popup(url, width, height, form_name, name, location){ _top = Math.ceil((screen.height - height)/2); _left = Math.ceil((screen.width - width)/2); if (typeof location != "undefined" && location == true){ var location = 'yes'; }else{ var location = 'no'; } new_win = window.open('', name , 'width=' + width + ',height=' + height + ',location='+ location +',status=no,toolbar=no,menubar=no,resizable=yes,scrollbars=no,top=' + _top + ',left=' + _left); new_win.name = name; new_win.focus(); form_name.action = url; form_name.target = name; form_name.submit(); return false; } function window_close(do_refresh, url){ if(do_refresh == true){ if (url == undefined){ try { window.opener.location.reload(); } catch(err){ window.close(); } }else { try { window.opener.location.href = url; } catch(err){ window.close(); } } } window.close(); return false; } function paging_go(url, page_num, url_postfix){ var page = parseInt(page_num); if (typeof url_postfix == "undefined"){ url_postfix = ''; } if (!isNaN(page)){ if (page - 1 < 0) page = 0; document.location.href = url + (page - 1) + '.html'+url_postfix; }else{ var z = document.getElementById('page_nr'); z.value = ''; } return false; } select_all_status = true; function select_all(val, elements_name){ var el = document.getElementsByName(elements_name); for (i = 0; i< el.length; i++){ el[i].checked = select_all_status; } select_all_status = !select_all_status; } function show_money_menu(title, host_name){ timer = setTimeout("build_money_menu('" + title + "', '" + host_name + "')", 600); } function show_context_menu(prf_id, prf_nick, prf_phs_id, host_name, session_id){ if (prf_id == '') return; timer = setTimeout("build_context_menu('" + prf_id + "','" + prf_nick + "','" + prf_phs_id + "','" + host_name + "','" + session_id + "','')", 600); } function show_context_menu_i(prf_id, prf_nick, prf_phs_id, host_name, session_id, image_url){ if (prf_id == '') return; timer = setTimeout("build_context_menu('" + prf_id + "','" + prf_nick + "','" + prf_phs_id + "','" + host_name + "','" + session_id + "','" + image_url + "')", 600); } function highlightCell(cell, visible){ if (visible){ cell.className = 'context_menu_'; }else{ cell.className = 'context_menu'; } } function show_tornado_menu(host_name, tornado){ menu = '