function WindowOpen(host,dir,file,params){
  //var picture;
  //picture = '/Tablice/'+id+'.jpg';
  url = 'http://'+host+'/'+dir+'/'+file+'.php'+(params!=''?'?'+params:'');
  NewWindow=window.open(url,file,'width='+500+',height='+300+',toolbar=no,directories=no,menubar=no,locations=no,status=yes,scrollbars=yes,resizable=yes,fullscreen=no');
  //NewWindow.document.open();
  //NewWindow.document.write('czekaj...');
  //NewWindow.document.close();
  NewWindow.focus();
}
function WindowOpen2(url){
  NewWindow=window.open(url,'windowopen2','left=0, top=0, width='+550+',height='+550+',toolbar=no,directories=no,menubar=no,locations=no,status=yes,scrollbars=yes,resizable=yes,fullscreen=no');
  NewWindow.focus();
}
function WindowOpen3(url){
  NewWindow=window.open(url,'windowopen3','left=60, top=60, width='+650+',height='+500+',toolbar=no,directories=no,menubar=no,locations=no,status=yes,scrollbars=yes,resizable=yes,fullscreen=no');
  NewWindow.focus();
}
function WindowOpenEX(url,w,h){
  NewWindow=window.open(url,'windowopenex3','left=60, top=60, width='+w+',height='+h+',toolbar=no,directories=no,menubar=no,locations=no,status=yes,scrollbars=yes,resizable=yes,fullscreen=no');
  NewWindow.focus();
}
function WindowOpenEX2(url,name,w,h){
  NewWindow=window.open(url,name,'left=60, top=60, width='+w+',height='+h+',toolbar=no,directories=no,menubar=no,locations=no,status=yes,scrollbars=yes,resizable=yes,fullscreen=no');
  NewWindow.focus();
}
function PrintPage(sender)
{
  if (((navigator.appName.indexOf("Microsoft Internet Explorer")>=0) &&
     (parseFloat(navigator.appVersion.substring(navigator.appVersion.indexOf("MSIE")+5,
                                                navigator.appVersion.indexOf("MSIE")+8)
                )>4.0)) || (navigator.appName.indexOf("Netscape")>=0))
    sender.window.print();
  else
    alert('Wykorzystywana aktualnie przeglądarka nie umożliwia automatycznego drukowania');
}

function lf()
{
  document.form_login.usr_login.focus();
}


