function menu_open(id) {
 element = document.getElementById(id);
 if (element) {
 if (element.style.display == 'none') element.style.display='';
 else element.style.display = 'none';
 }
 id1 = "top_" + id;
 element = document.getElementById(id1);
 if (element) element.width = "77%";
 id2 = "imgl_" + id;
 element = document.getElementById(id2);
 if (element) element.width = "8%";
 id3 = "imgr_" + id;
 element = document.getElementById(id3);
 if (element) element.width = "15%";
}
var wnew=null
function wopen(src,ext,w,h) {
if(!wnew || wnew.closed) {
wnew=window.open('','new','left=150,top=100,width='+w+',height='+(h+20)+',scrollbars=auto,resizable')
wnew.wid=src
}
if(wnew.wid!=src) {wnew.focus();  wnew.resizeTo(w+12,h+50)}
wnew.document.clear()
wnew.document.write('<html><head><title>Картинка</title>\r\n</head>
<body onload="movelift()" onmousemove="X=cursX(event);Y=cursY(event)" onscroll="X=cursX(event);Y=cursY(event)" leftmargin="0" topmargin="0" rightmargin="0" bottommargin="0" marginwidth="0" marginheight="0" style="text-align: center; vertical-align: top; font: bold 9px Verdana">\r\n<img src="img/kat/'+src+'.'+ext+'" width="'+w+'" height="'+h+'" border="0"><br><a href="javascript:self.close()">Закрыть окно</a><img src="/logo_gnezdo2.jpg" name="lift" id="lift" width="67" height="50" style="position:absolute;z-index:5;left:1024;top:200"></body></html>')
wnew.wid=src
wnew.document.close()
wnew.focus()
}
var X=0,Y=0
function cursX(e) {
return (document.all)?e.clientX+document.body.scrollLeft:e.pageX
}
function cursY(e) {
return (document.all)?e.clientY+document.body.scrollTop:e.pageY
}
function movelift() {
var lift=document.images['lift']
if(lift) {
var liftY=parseInt(lift.style.top)
if((liftY>186 && Y<40+liftY || liftY<document.body.scrollHeight-288 && Y>80+liftY) && X<307) lift.style.top=liftY+(Y-60-liftY)/20
setTimeout("movelift()",25)
}
}