function openPictureWindow(Width,Height,Path,Title)
{	
	if(Path=="/images/map_b.gif" || Path=="/images/map_b.jpg")Hei=Height+60;
	else Hei=Height;
	WinFeatures = (Width<=screen.width && Height<=screen.height)? "top="+(screen.height-Height)/2+",left="+(screen.width-Width)/2+",width="+Width+",height="+Hei+",Status=no,toolbar=no,menubar=no,location=no,directories=no,scrollbars=no" : "top="+(screen.height-Height)/2+",left="+(screen.width-Width)/2+",width="+(Width+20)+",height="+(Height+20)+",Status=no,toolbar=no,menubar=no,location=no,directories=no,scrollbars=yes";
	w = window.open("","PictureWindow",WinFeatures);
	w.document.open();
	w.document.write('<head><title>&quot;'+Title+'&quot;</title><meta http-equiv="Content-Type" content="text/html; charset=windows-1251"><link rel=stylesheet type=text/css href=main.css></head>');
	w.document.write("<body bgcolor=white leftmargin='0' topmargin='0' marginwidth='0' marginheight='0'><a href=JavaScript:self.close(); title='Закрыть окно'><IMG src='"+Path+"' height='"+Height+"' width='"+Width+"' alt='&quot;"+Title+"&quot;' border=0>"); 
	if(Path=="/images/map_b.gif" || Path=="/images/map_b.jpg"){w.document.write("<p align=center><input type=button onClick=\"window.print();\" value='напечатать схему' class=knop></p>");}
	w.document.write("</a></body>");
	w.document.close();
}
function show_blocks_at_all(arg){
arg='id_'+arg;
var d=eval('document.getElementById("'+arg+'").style');
if(d.display=='block'){d.display='none';}
 else{d.display='block';}
}

function show(arg){
arg='id_'+arg;
var d=eval('document.getElementById("'+arg+'").style');
for(i=0; i<mass.length; i++){
	if(mass[i]!=arg){
		document.getElementById(mass[i]).style.display='none';
	}
}
var styl=d.display;
if(styl=='block'){d.display='none';}
 else{d.display='block';}
}

function view_foto(adr,w,h){
var new_foto=window.open('view_foto.php?adr='+adr,'','width='+w+',height='+h);
}

function openPictureWindownew(Width,Height,Path,Title)
{	
	if(Path=="/images/map_b_2.gif" || Path=="/images/map_b_2.jpg")Hei=Height+60;
	else Hei=Height;
	WinFeatures = (Width<=screen.width && Height<=screen.height)? "top="+(screen.height-Height)/2+",left="+(screen.width-Width)/2+",width="+Width+",height="+Hei+",Status=no,toolbar=no,menubar=no,location=no,directories=no,scrollbars=no" : "top="+(screen.height-Height)/2+",left="+(screen.width-Width)/2+",width="+(Width+20)+",height="+(Height+20)+",Status=no,toolbar=no,menubar=no,location=no,directories=no,scrollbars=yes";
	w = window.open("","PictureWindow",WinFeatures);
	w.document.open();
	w.document.write('<head><title>&quot;'+Title+'&quot;</title><meta http-equiv="Content-Type" content="text/html; charset=windows-1251"><link rel=stylesheet type=text/css href=main.css></head>');
	w.document.write("<body bgcolor=white leftmargin='0' topmargin='0' marginwidth='0' marginheight='0'><a href=JavaScript:self.close(); title='Закрыть окно'><IMG src='"+Path+"' height='"+Height+"' width='"+Width+"' alt='&quot;"+Title+"&quot;' border=0>"); 
	if(Path=="/images/map_b_2.gif" || Path=="/images/map_b_2.jpg"){w.document.write("<p align=center><input type=button onClick=\"window.print();\" value='напечатать схему' class=knop></p>");}
	w.document.write("</a></body>");
	w.document.close();
}
