function win(url, winname, h, w, scroll, tool)  {
    var winl = (screen.width - w) / 2;
    var wint = (screen.height - h) / 2;
    openwin = window.open(url, winname,"height=" + h + ",width=" + w + ",top="+wint+",left="+winl+", menubar=0,resizable=yes,scrollbars=" + scroll + ",status=0,titlebar=0,toolbar="+tool);
    openwin.focus();
    if (parseInt(navigator.appVersion) >= 4) { openwin.window.focus(); }
  }
  
  
  
  function regwin(url, winname, h, w, scroll, tool)  {
    var winl = (screen.width - w) / 2;
    var wint = (screen.height - h) / 2;
    openwin = window.open(url, winname,"height=" + h + ",width=" + w + ",top="+wint+",left="+winl+", menubar=0,resizable=yes,scrollbars=" + scroll + ",status=1,titlebar=0,toolbar="+tool);
    openwin.focus();
    if (parseInt(navigator.appVersion) >= 4) { openwin.window.focus(); }
  }