function showPopup(popup_id) {
   $("popupContainer").current_popup = popup_id;
   $(popup_id).show();
   $("greyOut").show();

   new Effect.Opacity("greyOut", { from: 0.0, to: 0.7 } , {duration:1.0});
   new Effect.toggle("popupOuterContainer", "appear", {duration:1.0} );
}

function hidePopup() {
  window.setTimeout(hideGreyOut, 1000);
  new Effect.Opacity("greyOut", { from: 0.7, to: 0.0 }, {duration:1.0});
  new Effect.toggle("popupOuterContainer", "appear", {duration:1.0});
}

function hideGreyOut() {
  $($("popupContainer").current_popup).hide();
  $("popupContainer").current_popup = null;
  $("greyOut").hide();					
}