function FormPopup(oDiv) {
  var oHider = document.createElement("div");
  var oCadre = document.createElement("div");
  var oContent = oDiv;
  
  this.killPopup = function() {
    document.body.appendChild(oContent);
    oContent.style.display = "none";
    document.body.removeChild(oCadre);
    document.body.removeChild(oHider);
  }
  
  this.hideScreen = function() {
    oHider.style.position = "absolute";
    oHider.style.top = "0";
    oHider.style.left = "0";
    oHider.style.width = "100%";
    oHider.style.height = document.body.scrollHeight + "px";
    oHider.style.backgroundColor = "#555";
    oHider.style.filter = "alpha(opacity=" + 70 + ")";
    oHider.style.opacity = 0.7;
    oHider.style.mozOpacity = 0.7;
    oHider.style.zIndex = 50000;
    oHider.style.cursor = "pointer";
    oHider.onclick = this.killPopup;
    
    document.body.appendChild(oHider);
  }
  
  this.showImage = function() {
    oCadre.style.position = "absolute";
    oCadre.style.padding = "10px";
    oCadre.style.backgroundColor = "#fff";
    oCadre.style.zIndex = 50001;
    
    oDiv.style.display = "block";
    oCadre.appendChild(oDiv);
    document.body.appendChild(oCadre);

    oCadre.style.top = ((document.documentElement.clientHeight - oCadre.offsetHeight) / 2) + document.documentElement.scrollTop + "px";
    oCadre.style.left = ((document.body.offsetWidth - oCadre.offsetWidth) / 2) + "px";
  }

  this.hideScreen();
  this.showImage();
}