var controlokno = window.controlokno;

function NoveOkno(link,Name,w,h)
 {
 var widthParametr=w;
 var heightParametr=h;
 var open=true;
      if (controlokno!=null && !controlokno.closed)
      {
        controlokno.focus();
		controlokno.location.href=link.href;
      }
      else
      {
        controlokno=window.open(link.href,Name,'width='+widthParametr+', height='+heightParametr+',  left=50, top=50, location=0, menubar=0, toolbar=0, scrollbars=0, resizable=1, status=0');
        if (controlokno==null || typeof(controlokno)=="undefined")
          open=false;
        else
        {
          link.target=Name;
          controlokno.focus();
        }
      }
      return open;
    };
