function popup(name)
{ alert(name);
	document.getElementById(name).style.display='block';
	document.getElementById(name).style.pixelTop=document.body.scrollTop + document.body.clientHeight;
}

function views(url,name)
{
	foto=window.open('/images/view.php?foto='+url+'&name='+name,'foto','width=300,height=300');
	foto.focus();
}
function view(url,name)
{
	foto=window.open('/images/view.php?foto='+url+'&name='+name,'foto','width=300,height=300');
	foto.focus();
}
function view_hist(url,name)
{
	foto=window.open('/images/view2.php?foto='+url+'&name='+name,'foto','width=800,height=600, scrollbars=yes');
	foto.focus();
}
function sub(){
  if (confirm("Вы уверены?")) { document.F.submit; return true; } else { return false;  }
}

function del(ref){
  if (confirm("Вы действительно хотите удалить?")) { document.F.submit; return true; } else { return false;  }
}



function off(mode)
{   if (mode!=1)
    {document.getElementById('inv1').style.display='none';}
	if (mode!=2)
    {document.getElementById('inv2').style.display='none';}
	if (mode!=3)
    {document.getElementById('inv3').style.display='none';}
	if (mode!=4)
    {document.getElementById('inv4').style.display='none';}
	if (mode!=5)
    {document.getElementById('inv5').style.display='none';}
	if (mode!=6)
    {document.getElementById('inv6').style.display='none';}
}


function on(id)
{   if (id!=1)
    {document.getElementById('inv1').style.display='none';}
	if (id!=2)
    {document.getElementById('inv2').style.display='none';}
	if (id!=3)
    {document.getElementById('inv3').style.display='none';}
	if (id!=4)
    {document.getElementById('inv4').style.display='none';}
	if (id!=5)
    {document.getElementById('inv5').style.display='none';}
	if (id!=6)
    {document.getElementById('inv6').style.display='none';}
	document.getElementById(id).style.display='block';
}


function windowOpener(windowHeight, windowWidth, windowName, windowUri)
{
var centerWidth=(window.screen.width-windowWidth)/2;
var centerHeight=(window.screen.height-windowHeight)/2;

newWindow=window.open(windowUri, windowName,'fullscreen=0,toolbar=0,location=0,directories=0,status=0,menubar=0,resizable=0,width='+windowWidth+',height='+windowHeight);
newWindow.blur();
newWindow.moveTo(centerWidth, centerHeight);
newWindow.focus();
return newWindow.name;
}