1 /* Copyright (c) 2010 Arnaud Renevier, Inc, published under the modified BSD
4 var CloseBtn = Class.create({
5 initialize: function(elt, options) {
6 var btn, imgsrc, style;
13 style = Object.extend({
18 }, typeof options === "object" ? options.style: {});
20 imgsrc = (options && options.closeBtnSrc) || "icons/close.png";
21 btn = new Element("input", { type: "image", src: imgsrc, alt: "X"}).setStyle(style);
22 elt.insert({top: btn});
23 btn.observe("click", function(evt) {