function openCenter(w,h,lnk,attributi,winName)
{
  newWin = null;

  if (winName == null)
    winName = "noName";

  if (attributi== null)
    attributi = "toolbar=0,location=no,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,";

  if (parseFloat(navigator.appVersion) >= 4 )
  {

    if (screen.availWidth < w)
      w=screen.availWidth;

    if (screen.availHeight < h)
      h=screen.availHeight;


    t  = (screen.availWidth - w) / 2;
    l  = (screen.availHeight - h) / 2;

    if (screen.availWidth <= 800 && t < 30)
    {
      t=0;
      l=0;
    }

    if (navigator.appName == "Netscape")
    {
     newWin = window.open(lnk,
                          winName,
                          attributi+"width="+w+",height="+h+",screenX="+t+",screenY="+l,"Prova");
    }
    else
    {
      newWin = window.open(lnk,
                           winName,
                           attributi+'width='+w+',height='+h+',left='+t+',top='+l,'Prova');
    }
    if (screen.availWidth<= 800)
      newWin.resizeTo(w,h);
    newWin.focus();
  }
}
