nowZoom = null;

function zoom(plik_strony, w, h, przew){
    if (!w) {w=600;}
    if (!h) {w=400;}
	if (!przew) {przew='yes';}
  if(window.screen){
    aw=screen.availWidth;
    ah=screen.availHeight;
  }else{
    aw=630;
    ah=450;
  }
  if(nowZoom==null || nowZoom.open){
    ustawienia=
     "left=" + (aw-w)/2 + ","
    +"top=" + (ah-h)/2 + ","
    +"screenX=" + (aw-w)/2 + ","
    +"screenY=" + (ah-h)/2 + ","
    +"width=" + w + ","
    +"height=" + h + ","
    +"innerWidth=" + w + ","
    +"innerHeight=" + h + ","
    +"toolbar=no,"
    +"location=no,"
    +"directories=no,"
    +"status=no,"
    +"menubar=no,"
    +"scrollbars==yes,"
    +"resizable=yes"
    nowZoom = window.open(plik_strony,'',ustawienia);
  }
  
  nowZoom.document.close();
  nowZoom.focus();
}
