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 objectXY(obj) {

var dobj=eval('document.getElementById("'+obj+'")')

   var x = 0, y = 0;

do{

    x += dobj.offsetLeft;

    y += dobj.offsetTop;

  }while (typeof(dobj = dobj.offsetParent) != 'undefined' && dobj != null);

   return [x,y];

}



function get_arrow_pos(arg){

ar=objectXY(arg);

var cll=ar[0];

var clt=ar[1];

clar=[cll,clt];

}



function bg(name,color){

	name.style.backgroundColor=color;

}







