function xmlUpdate(elementId, method, file){
 if(window.XMLHttpRequest){
  xmlhttp=new XMLHttpRequest();
 }
 xmlhttp.onreadystatechange=function(){
  if(xmlhttp.readyState==4 && xmlhttp.status==200){
   document.getElementById(elementId).innerHTML=xmlhttp.responseText;
  }
 }
 xmlhttp.open(method, file,true);
 xmlhttp.send();
}

function showPosts(tag){
 xmlUpdate("left", "GET", "posts.php?tag="+tag);
}

function showPost(pid){
 xmlUpdate("left", "GET", "posts.php?post="+pid);
}

function showProject(pid){
 xmlUpdate("display", "GET", "project.php?id="+pid);
}

function showPostPage(page){
 xmlUpdate("left", "GET", "posts.php?page="+page);
}

function HideContent(d) {
if(d.length < 1) { return; }
document.getElementById(d).style.display = "none";
}
function ShowContent(d) {
if(d.length < 1) { return; }
var dd = document.getElementById(d);
dd.style.display = "block";
}

function showEventPhotos(eid){
 xmlUpdate("bubble", "GET", "photos.php?eid="+eid);
}
