/* JavaScript - funkce

Programoval:
   Radovan Moser - PATROKOLOS
   internetové služby
   http://www.patrokolos.eu
   moser@patrokolos.eu
   
Všechna práva vyhrazena!
Jakékoliv kopírování částí tohoto souboru
není dovoleno bez vědomí a souhlasu jejich tvůrce!
*/

// Nové okno
var popWindow=0;
function okno(url,title,x,y,status,toolbar) {
   if (popWindow != 0) popWindow.close();
   if (!title) title = "okno";
   if (!status) status = "yes";
   if (!toolbar) toolbar = "yes";
   if (!x) x = screen.width;
   else x=x+40;
   if (x > (screen.width - 40)) x = (screen.width - 40);
   if (x < 650) x = 650;
   if (!y) y = screen.height;
   else y=y+176;
//   if (y > (screen.height - 100)) y = (screen.height - 100);
   winx = (screen.width-x) / 2;
   winy = (screen.height-y) / 2 - 80;
   if (winx < 0) winx = 0;
   if (winy < 0) winy = 0;
   popWindow = window.open( url , title ,"toolbar="+toolbar+",menubar=no,location=no,directories=no,scrollbars=yes,resizable=no,status="+status+",top="+winy+",left="+winx+",width="+x+",height="+y);
   popWindow.focus();
   return;
}

