function pjson(json) {
  jmsg = eval("(" + json + ")");
  jQuery('#msg').text(jmsg.retmsg);
  jQuery('#msg').fadeIn('slow').fadeOut('slow');

  if (jmsg.friendbox != null) {
    jQuery('#friends').replaceWith(jmsg.friendbox);
  }

  if (jmsg.bottom_notices != null) {
    jQuery('#notices').replaceWith(jmsg.bottom_notices);
  }

  if (jmsg.notices != null) {
    jQuery('#notices').replaceWith(jmsg.notices);
  }

  document.getElementById('noticescount').innerHTML = jmsg.notecount;

  if (jmsg.notices != null) {
    jQuery('#notices').replaceWith(jmsg.notices);
  }
}
