function view_foto(adr,w,h){
var new_foto=window.open('view_foto.php?adr='+adr,'','width='+w+',height='+h);
}

function send_faq(){
var sendfaq=window.open('send_faq.php','send_faq','width=280,height=260');
}
function openPictureWindow(Width,Height,Path,Title)
{	
	if(Path=="images/map_b.gif")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"){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 setFormElements(e,name){
	var targetElement=e.target?e.target:e.srcElement;
	targetElement.className=name;
}
