var oli=new Image(),cli=new Image(),etm=new Date();etm.setTime(etm.getTime()+100*24*3600000);oli.src='img/open_lock.gif';cli.src='img/close_lock.gif';var menu_locked=getcookie('lock');function lockmenu(){var sc;if(menu_locked=='on'){document.getElementById('menu_lock').src='img/l2.gif';slidecont(1);menu_locked='off'}else{document.getElementById('menu_lock').src='img/l1.gif';slidecont(0);menu_locked='on'}document.cookie='lock='+menu_locked+'; expires='+etm.toGMTString()+'; '}function slidecont(up){var pc=document.getElementById('pagecontent');if(up){if(pcont_t>148){pcont_t-=17;pc.style.top=pcont_t+'px';setTimeout('slidecont(1)',30)}else{pcont_t=133;pc.style.top='133px'}}else{if(pcont_t<320){pcont_t+=17;pc.style.top=pcont_t+'px';setTimeout('slidecont(0)',30)}else{pcont_t=335;pc.style.top='335px'}}}var menustat=0,lockimg=document.getElementById('lockimg'),lockdiv=document.getElementById('lockdiv'),menupanel=document.getElementById('menupanel'),menu_div=document.getElementById('menu_div');if(menu_locked=='on')menustat=1;var fx,fy;function showmenu(nm){if(!nm)setTimeout('showmenu(1)',300);else if((mousey<135)&&(mousey>40)&&!menustat&&!menu_resizing&&!drag){var txf=document.getElementById('text');if(txf)txf.blur();menu_resizing=1;menustat=1;lockimg.src=oli.src;resizemenu(1)}}function hidemenu(){if(menustat&&!menu_resizing&&menu_locked!='on'&&!drag){menu_resizing=1;menustat=0;lockimg.src=cli.src;resizemenu(0)}}function wl(lnk){if(menu_locked!='on'){lockimg.src='img/closed_lock.gif';lockdiv.style.top='84px';menupanel.style.top='-245px';menu_div.style.height='25px'}window.location=lnk}function getcookie(str){var ret=null,val=str+'=';if(document.cookie.length>0){var i=document.cookie.indexOf(val);if(i!=-1){i+=val.length;var to=document.cookie.indexOf(';',i);if(to==-1)to=document.cookie.length;ret=document.cookie.substring(i,to)}}return ret}var t=-245,imgt=84,menu_resizing=0,pcont_t=133,pi=Math.PI,step=pi/60,maxang=pi/2,ang=0;if(menu_locked=='on'){t=-45;imgt=284;pcont_t=335;ang=maxang}function slidestep(show){t=Math.sin(ang)*200-245;ang+=(show)?step:-step;setTimeout('resizemenu('+show+')',30)}function resizemenu(show){if(show){if(ang<maxang)slidestep(show);else{ang=maxang;t=-45;menu_resizing=0;if((mousey>320)||(mousey<25))hidemenu()}}else{if(ang>0)slidestep(show);else{ang=0;t=-245;menu_div.style.height='25px';menu_resizing=0}}menupanel.style.top=t+'px';menu_div.style.height=t+270+'px';lockdiv.style.top=t+329+'px'}document.onscroll=function(){if(menu_locked=='on')lockimg.src='img/opened_lock.gif';else if(!menustat)lockimg.src='img/closed_lock.gif'};document.getElementById('panleft').innerHTML="<a href='javascript:lockmenu();'><img id='menu_lock' src='img/l2.gif' alt='&sect;' title='Не закрывать меню' /><\/a>";if(menu_locked=='on')document.getElementById('menu_lock').src='img/l1.gif';else{lockimg.src='img/closed_lock.gif';lockdiv.style.top=imgt+'px';menupanel.style.top=t+'px';menu_div.style.height='25px'}