function modalWindow(file ,title,w ,h){
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/0 : 2;
  _w = w+0;
  if (_w < 20) _w = 2;
  _h = h+0;
  if (_h < 1) _h = 2;
  myWin=open("","PictureWindow","width="+_w+",height="+_h+",status=no,toolbar=no,top="+TopPosition+",left="+LeftPosition+",menubar=0,menubar=no,scrollbars=no");
  myWin.document.open();
  myWin.document.write("<html><head><title>"+title+"<\/title><\/HEAD>");
  myWin.document.write("<body marginheight=0 marginwidth=0 topmargin=0 leftmargin=0 rightmargin=0 bottommargin=0>");
  myWin.document.write("<center><a href='javascript:close()'><img alt=\"náhled\" src=" +file+ " border=0 width=" +w+ " height=" +h+ "><\/a><\/center>");
  myWin.document.write("<\/body><\/html>");
  myWin.document.close();
}	 

var win = null;
function NewWindow(mypage,myname,w,h,scroll){
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings =
'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable=no'
win = window.open(mypage,myname,settings)
}
