function winPopup(url,name,w,h,t,l,scroll,resize,center,adjust)
{
  // checks if the window should be centered on the screen
  if (center == 'yes'){
    // checks user resolution
    var winw = screen.width;
    var winh = screen.height;

    // sets size and place for big screens
    var winl = (winw - w) / 2;
    var wint = (winh - h) / 2;
  }
  else {
    // sets desired place
    var winl = l;
    var wint = t;
    var winw = w;
    var winh = h;
  }

  // checks if the window should be positioned to the opener window
  if (adjust == 'yes'){

    // adjusts size and place for small screens
    if (document.layers){
      var winl = (window.screenX + l);
      var wint = (window.screenY + t);
    } else {
      var winl = (window.screenLeft + l);
      var wint = (window.screenTop + t);
    }
  }

  // sets all statements into one
  winprops = 'width=' + w + ',height=' + h + ',top=' + wint + ',left=' + winl + ',scrollbars=' + scroll + ',resizable=' + resize

  // opens the window
  win = window.open(url, name, winprops)
  win.focus();
}
