browser_name = navigator.appName;
browser_version = parseFloat(navigator.appVersion);

if (browser_name == "Netscape" && browser_version >= 3.0) { browser_ok = 'true'; }
else if (browser_name == "Microsoft Internet Explorer" && browser_version >= 3.0) { 
browser_ok = 'true'; }
else { browser_ok = 'false'; }

function change(img, ref) {
   if (browser_ok == 'true') {
       document.images[img].src = ref;
   }
}

if (browser_ok == 'true')
{
a1=new Image; a1.src="images/menu1_h.gif";
a2=new Image; a2.src="images/menu2_h.gif";
}

function popwin(w,h,path,tit,scrl)
	{
	var x1 = (document.all) ? window.screenLeft : screenX;
	var x2 = (document.all) ? document.body.clientWidth : window.innerWidth;
	var y = (document.all) ? window.screenTop : screenY;
	var wleft = (x1 + (x2/2)) - (w/2);
	var wtop = 0;
	if (navigator.appName == "Microsoft Internet Explorer") { wtop = 10; } else { wtop = y + 10; };
	var yesno = "no";
	if (scrl) { yesno = "yes"; } else { yesno = "no"; };
	var feat = "width=" + w + ",height=" + h + ",top=" + wtop + ",left=" + wleft + ",status=no,location=no,menubar=no,scrollbars=no,resizable=no";
	var popup = window.open('','popupwin',feat);
	var title = "&nbsp;";
	if (tit) { title = tit; } else { title = "Апто"; };
	var htmltext = "<html><head><title>" + title + " </title><link rel=stylesheet href=/style.css type=text/css><style type=text/css media=all><!-- .b {border: 0px solid #000000;} --></style></head><body bgcolor=#ffffff topmargin=0 leftmargin=0 bottommargin=0 rightmargin=0 marginheight=0 marginwidth=0><table align=center cellpadding=0 border=0 cellspacing=0 width=100% height=100%><tr><td align=center valign=middle width=100% height=100%><a href='javascript:self.close()'><img class=b border=0 alt='закрыть окно' src=" + path + "></a></td></tr></table></body></html>"
	popup.document.open();
	popup.document.write(htmltext);
	popup.document.close();
	}