function favChange(rnum)
  {
	f = document.newMsg;

	if (f.favs.selectedIndex >= 0)
	  {
		f.msgTo.value = f.favs.options[f.favs.selectedIndex].value;
	  }

	if (f.favs.selectedIndex > 0 && f.favs.selectedIndex <= rnum + 1)
	  {
		f.Note.focus();
	  }
  else
	  {
		f.msgTo.focus();
    }
  }

function popup(nomefile, larghezza, altezza, x, y)
  {
  win_popup = window.open(nomefile,"popup","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,copyhistory=0,width=" + larghezza + ",height=" + altezza);
  if(x && y);
    {
    x = parseInt(x);
    y = parseInt(y);
    win_popup.moveTo(x, y);
    } 
  }


