noweokno=null;



function winopen(plik, w, h, scroll) {

if(window.screen) {

  aw=screen.availwidth;

  ah=screen.availheight;

}else{

  aw=640;

  ah=450;

}if(noweokno==null || noweokno.closed){

 ustawienia=

 "left="+(aw-w)/2+","

 +"top="+(ah-h)/2+","

 +"screenX="+(aw-w)/2+","

 +"screenY="+(ah-h)/2+","

 +"width="+w+","

 +"height="+h+","

 +"toolbar=no,"

 +"location=no,"

 +"directories=no,"

 +"status=np,"

 +"menubar=no,"

 +"scrollbars="+scroll+","

 +"resizable=no"

 noweokno=window.open(plik,'nowe',ustawienia);

 noweokno.focus();

}else{

 noweokno.close();

  ustawienia=

 "left="+(aw-w)/2+","

 +"top="+(ah-h)/2+","

 +"screenX="+(aw-w)/2+","

 +"screenY="+(ah-h)/2+","

 +"width="+w+","

 +"height="+h+","

 +"toolbar=no,"

 +"location=no,"

 +"directories=no,"

 +"status=np,"

 +"menubar=no,"

 +"scrollbars="+scroll+","

 +"resizable=no"

 noweokno=window.open(plik,'nowe',ustawienia);

 noweokno.focus();

}

}
