function windowopen(lnk,w,h,names)
{
var left=(window.screen.availWidth-w)/2;
var top=(window.screen.availHeight-h)/2;
var x=window.close;
var x=window.open(lnk, names,'width='+(w+20)+',height='+(h+25)+',top='+top+', left='+left+',directories=0,location=0,menubar=0,status=1,toolbar=0,scrollbars=0,resizable=0');
}
function superwindowopen(lnk,w,h)
{
if (window.supe)
{
	 if (window.supe.closed) // Если окно закрыто то убивает его окончательно
		 {
		 supe=closed
		 }
	 else
		 {
		 //alert ("Окно уже есть");
		 supe.focus();
		 return (false);
		 }
}
var left=(window.screen.availWidth-w)/2;
var top=(window.screen.availHeight-h)/2;
supe=window.open(lnk,'vlad','width='+(w+20)+',height='+(h+25)+',top='+top+', left='+left+',directories=0,location=0,menubar=0,status=0,toolbar=0,scrollbars=0,resizable=0');
}
function windowopenptest(lnk,w,h)
{
var left=(window.screen.availWidth-w)/2;
var top=(window.screen.availHeight-h)/2;
var x=window.close;
var x=window.open(lnk,'ptest','width='+(w+20)+',height='+(h+25)+',top='+top+', left='+left+',directories=0,location=0,menubar=0,status=1,toolbar=0,scrollbars=0,resizable=0');
}
function windowopenscr(lnk)
{
var w=window.screen.availWidth-200
var h=window.screen.availHeight-200
var left=(window.screen.availWidth-w)/2;
var top=(window.screen.availHeight-h)/2;
var x1=window.close;
var x1=window.open(lnk,'windowopenscr','width='+(w+20)+',height='+(h+25)+',top='+top+', left='+left+',directories=0,location=0,menubar=0,status=0,toolbar=0,scrollbars=1,resizable=0');
}
function windowopenlog(lnk,w,h)
{
var left=(window.screen.availWidth-w)/2;
var top=(window.screen.availHeight-h)/2;
var x2=window.close;
var x2=window.open(lnk,'log','width='+(w+20)+',height='+(h+25)+',top='+top+', left='+left+',directories=0,location=0,menubar=0,status=1,toolbar=0,scrollbars=1,resizable=0');
}
