function noveokno(url,title,sirka,vyska) 
{ 
  // odsranění nebezpečných znaků pro použití jako title
  var pom = escape(title); 
  var pole = pom.split('%');
  pom=''; 
  for(i = 0; i < pole.length; i++)
  { 
    pom+=pole[i]; 
  } 

/*  var obr = new Image();
  obr.src = url;
  // pokud je proměnná x nebo y nulová dotáhne se velikost z obrázku
  if(sirka<=0 || vyska<=0)
  {
    sirka = obr.width;
    vyska = obr.height;
  }
*/
  if(sirka<=0 || vyska<=0)
  {
    sirka = 640;
    vyska = 480;
    resize = true;
  }

  var okno=window.open('',pom,'width='+sirka+',height='+vyska+',resizble=0,menubar=0,toolbar=0,left=10,top=10,directories=0,location=0,scroolbars=0,copyhistory=0,status=1'); 
  okno.document.open(); 
  okno.document.writeln('<html>\n<head>\n<title>'+title+'</title>\n</head>\n<body background="" topmargin="0" leftmargin="0">'); 
  okno.document.writeln('<img onLoad="velikost()" name="obr" src="'+url+'">'); 
  okno.document.writeln('</body>\n</html>'); 
  if(resize)
  {
    okno.document.writeln('<script>');
    okno.document.writeln('function velikost() {');
    okno.document.writeln('window.resizeTo(document.images["obr"].width+10,document.images["obr"].height+20);');
    okno.document.writeln('}');
    okno.document.writeln('</script>');
  }
} 

function popUp(URL,x,y) 
{
  day = new Date();
  id = day.getTime();
  eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width="+x+",height="+y+"');");
}