var Attachments = new Array();

function displayAttachments(postid){
 var atcbox = document.getElementById("atcontentbox"+postid);
 var atdisplay = document.getElementById("atdisplay"+postid);
 var pat = document.getElementById("pat"+postid);

 pat.style.display = "";
 atdisplay.style.display = "none";

 for (var attid in Attachments[postid]) {
  if(document.getElementById("atimg"+attid) != null){
   att = document.getElementById("atimg"+attid);
   att.src = Attachments[postid][attid];
  }
 } 
}