Image to use:

The Scream

Canvas:

Your browser does not support the HTML5 canvas tag.

Note: The canvas tag is not supported in Internet Explorer 8 and earlier versions.

This is the Panel constructor:

function Panel(element, canClose, closeHandler) {
  this.element = element;
  this.canClose = canClose;
  this.closeHandler = function () { if (closeHandler) closeHandler() };
}