function open_Picture(id, name, w, h, title) {
	vvv=open('',id+'pic', 'width='+w+',height='+h+', top=40, left=50, toolbar=0, location=0, directories=0, status=0,menuBar=0,scrollBars=0,resizable=1'); 
	vvv.document.write('<html><head><title>'+title+'</title></head><body leftmargin=0 topmargin=0 marginwidth=0 marginheight=0>'); 
	vvv.document.write('<img border=0  ondblclick="window.close();" alt="Окно закрывается по двойному щелчку" src="'+name+'"  width='+w+' height='+h+'>');
	vvv.document.write('</body></html>'); 
	vvv.document.close(); 
	vvv.focus();
}
function open_g_Picture(id, url, w, h, title) {
	vvv=open('/'+url+'/full/?id='+id,id+'pic', 'width='+(w+42)+',height='+(h+62)+', top=40, left=50, toolbar=0, location=0, directories=0, status=0,menuBar=0,scrollBars=1,resizable=1'); 
	vvv.focus();
}

var onDiv = false;
var timer;
var timeout = 200;


function setVisibility(menu,mode) {
	document.getElementById('smenu'+menu).style.visibility = mode;
	document.getElementById('smenu'+menu).style.top = In_top[menu];
}


function hideAll() {
  var i
  if (!onDiv) {
   for (i=0; i<Menu_top.length;i++)  setVisibility(i,"hidden");
  }
}
/*In_left=new Array(80,66,59,68,47,29);
In_top=new Array(268,298,328,358,388,418);
In_width=new Array(46,60,67,58,80,98);
Menu_top=new Array(266,296,326,356,386);
*/
In_left=new Array(80,66,59,47);
In_top=new Array(268,298,328,388);
In_width=new Array(46,60,67,80);
Menu_top=new Array(266,296,326,386);
function showMenu(menu) {
  hideAll();
	if ( menu < Menu_top.length ) {
	  onDiv = true;
  	setVisibility(menu,"visible");
	}
	document.getElementById("liner").style.top = In_top[menu];
	document.getElementById("liner").style.left = In_left[menu];
	document.getElementById("liner").style.width = In_width[menu];
	document.getElementById("liner").style.visibility = "visible";
}

function hideMenu() {
	onDiv = false;
	document.getElementById("liner").style.visibility = "hidden";
  timer = setTimeout('hideAll();', timeout);

}