var divRe="",styRe="",oldOne="",flag=false,id="";
  
  if (navigator.appName == "Netscape")
     {
	 window.document.captureEvents(Event.MOUSEDOWN);
     window.document.onmousedown = Out; 
     divRe=".layers['";
     styRe="']";
     }
     else
     {
     divRe=".all['";
     styRe="'].style";
     }
  if (!document.all && document.getElementById)
     {
     divRe=".getElementById('";
     styRe="').style"; 
     }
	 
function Over(text,x,y){
	if (oldOne)
	{
	eval ("document"+divRe+oldOne+styRe+".visibility='hidden'");
	}
eval ("document"+divRe+text+styRe+".left="+x);
eval ("document"+divRe+text+styRe+".top="+y);
eval ("document"+divRe+text+styRe+".visibility='visible'");
oldOne=text;
}

function Status(text){
flag=text;
}

function Out(){
	if (flag)
	{
	for (var i=0;i<=3;i++) eval ("document"+divRe+"drop_down"+i+styRe+".visibility='hidden'");
	flag=false;
	}
}

function Timer(){
id=window.setInterval("Out()",1000);
window.clearInterval(id);
}

function openWindow(url, width, height)
{
	var idwindow = window.open("", "", "left = " + eval((screen.width / 2) - (width / 2)) + ", top = " + eval((screen.height / 2) - (height / 2)) + ", width = "+ eval(width + 10) +", height = "+ eval(height + 10) +", toolbar = 0, menubar = 0, location = 0, directories = 0, scrollbars = 0, resizable = 1");
	idwindow.focus();
	idwindow.document.writeln('<html><head><title>Просмотр подробного изображения</title>');
	idwindow.document.writeln('<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1251">');
	idwindow.document.writeln('<META NAME="Author" CONTENT=""></head>');
	idwindow.document.writeln('<body marginheight="0" marginwidth="0" bottommargin="5" topmargin="5" leftmargin="5" rightmargin="5">');
	idwindow.document.writeln('<table border="0" cellpadding="0" cellspacing="0" width="100%" height="100%"><tr><td align="center"><a href="#" onclick="window.close(); return false;"><img src="'+ url +'" width="'+ width +'" height="'+ height +'" border="0" alt="Закрыть окно"></a></td></tr></table>');
	idwindow.document.writeln('</body></html>');
}
