 function lib_open_img_window(src,width,height){ 
   if(width==0)
     width=500;
   width+=20;
   if(height==0)
     height=400;
   height+=20;
   if(height>600)
     height=600;
   var left = (screen.availWidth/2) - (width/2);
   var top = (screen.availHeight/2) - (height/2);
   info=window.open('/img_preview.php?src='+src,'info','resizable=1, scrollbars=1, toolbar=0, status=0, width='+width+', height='+height+', left='+left+', top='+top);
   info.focus();
 }

 function opw(id){
   width=660;
   height=700;
   var left = (screen.availWidth/2) - (width/2);
   var top = (screen.availHeight/2) - (height/2);
   info=window.open('/descr.php?id='+id,'photo','resizable=1, scrollbars=1, toolbar=0, status=0, width='+width+', height='+height+', left='+left+', top='+top);
   info.focus();
 }
 
 function op_descr(id){
   width=660;
   height=700;
   var left = (screen.availWidth/2) - (width/2);
   var top = (screen.availHeight/2) - (height/2);
   info=window.open('/op_descr.php?id='+id,'photo','resizable=1, scrollbars=1, toolbar=0, status=0, width='+width+', height='+height+', left='+left+', top='+top);
   info.focus();
 }
 function open_img_window(id,width,height,text){ 
   if(width==0)
     width=500;
   width+=20;
   if(height==0)
     height=400;
   height+=20;
   if(text!=0)
     height+=50;
   
   var left = (screen.availWidth/2) - (width/2);
   var top = (screen.availHeight/2) - (height/2);
   info=window.open('/photos_view.php?id='+id,'info','resizable=1, scrollbars=1, toolbar=0, status=0, width='+width+', height='+height+', left='+left+', top='+top);
   info.focus();
 }
 
 function open_img_window_news(id,width,height,text){ 
   if(width==0)
     width=500;
   width+=20;
   if(height==0)
     height=400;
   height+=20;
   if(text!=0)
     height+=50;
   
   var left = (screen.availWidth/2) - (width/2);
   var top = (screen.availHeight/2) - (height/2);
   info=window.open('/photos_view_news.php?id='+id,'info','resizable=1, scrollbars=1, toolbar=0, status=0, width='+width+', height='+height+', left='+left+', top='+top);
   info.focus();
 }
 
 function menuover(mid) {
	el = document.getElementById('me_'+mid);
	el.className='knp_on';
	s1=mid-1;
	el = document.getElementById('r'+mid);
	if (el.className!='rz_on'){
		el.className='rzd_on';}
		el = document.getElementById('r'+s1);
		if (el.className!='rz_on'){
			el.className='rzd_on';}


}
function menuout(mid) {
	el = document.getElementById('me_'+mid);
	el.className='knp';
	s1=mid-1;
	el = document.getElementById('r'+s1);
	if (el.className!='rz_on'){
		el.className='rzd';}
		el = document.getElementById('r'+mid);
		if (el.className!='rz_on'){
			el.className='rzd';}

}
function mar (te) {}