function validatesearch(){ if (document.search.q.value.length == 0 || document.search.q.value.replace(/ /gi,"").length < 2) { alert("Задан слишком общий критерий!\nВведите не менее 2 символов"); return false; } } function ShowAlt(event,href) { if(!href.title & !href.my_title) {return} div = document.getElementById('alt_hint') div.innerHTML = href.title if (href.title == '') { div.innerHTML = href.my_title } else { href.my_title = href.title } href.title = '' div.style.display='block'; div.style.visibility='visible'; div.style.left = event.clientX + document.body.scrollLeft + 10 div.style.top = event.clientY + document.body.scrollTop + 10 } function HideAlt(href) { document.getElementById('alt_hint').style.display='none'; document.getElementById('alt_hint').style.visibility='hidden'; } function open_pic(u,w,h,max_w,max_h) { var max_w=max_w||800; var max_h=max_w||600; if (window.screen) { max_w = window.screen.width - 20; max_h = window.screen.height - 53; } win_w = w + 0; win_h = h + 0; if (win_w > max_w) win_w = max_w; if (win_h > max_h) win_h = max_h; win = window.open('','',"width=" + win_w + ", height=" + win_h + ",scrollbars=auto,resizable=1,resizable=yes"); win.document.open(); win.document.write(''); win.document.write(''); win.document.close(); win.focus(); return(win); }