//Popup per Privacy
function popuprivacy(w, h, t)
{
  window.open("",t,"width="+w+",height="+h+",scrollbars=yes,toolbar=no,directories=no,menubar=no");
};

function PopUp(wintarget, name, width, height)
{
  winleft = (screen.width-width)/2;
  wintop = (screen.height) ? (screen.height-height)/2 : 100;
  width = width + 15;
  height = height + 15;
  
  f = window.open(wintarget, name,"toolbar=no,directories=no,menubar=no,left=" + winleft + ",top=" + wintop + ",width=" + width + ",height=" + height + ",scrollbars=yes,resizable=yes");
  f.focus();
}

function FindWindow(w)
{
  if (w.opener != null)
    return FindWindow(w.opener);
  else
    if (w.parent == w)
      return w;
    else
      return FindWindow(w.parent);
}

function PopUpNewsArchivio(wintarget)
{
  PopUp(wintarget, 'news', 500, 550);
}

function PopUpImmagini(wintarget)
{
  PopUp(wintarget, 'img', 500, 550);
}

function PopUpProdotto(wintarget)
{
  PopUp(wintarget, 'prodotto', 500, 550);
}

function PopUpStampaOrdine(wintarget)
{
  PopUp(wintarget, 'stpordine', 660, 550);
}

