function showPane(id) {
  var e,i;
  var PID = "preview"; // the id of the parent element
  var p = document.getElementById(PID); // parent element
  // loop through each of the childNodes of the parent element
  for (i=0; i<p.childNodes.length; i++) {
    e = p.childNodes[i];
    if (e.nodeType!=1) continue; // pass over non-element nodes
    if (e.getAttribute("id") == id) {
      e.style.display = "block";
    }
    else {
      e.style.display = "none";
    }
  }
}
