var nn_win=0;
function winopen(l,w,h,s) {
  var sc;
  if(!w) w=660;
  if(!h) h=360;

   url = l;
  if(l.href)
     url=l.href

  if(!s) {
  	s=0;
  	sc="yes";
  } else sc="no";

  if (nn_win) if (nn_win.close) nn_win.close();
  nn_win=0;

  posx=parseInt((800-w)/2);
  posy=parseInt((600-w)/2);

  var d = new Date();
  var t = d.getTime();

  nn_win = window.open(url,"nnwin","top="+posy+",left="+posx+",width="+w+",height="+h+",status=no,toolbar=no,resizable=no,location=no,scrollbars="+sc+",top=120,left=150");
  if (nn_win.focus) nn_win.focus();
}
