function _extensionsInit(){ Extensions.init(); } window.addEvent("domready",_extensionsInit); Extensions = { // add class attributes to elements to add Classes (space delimited) tags: {}, // these are attributes that will be transferred to new classes. divAttributes: ["id","class","style","onclick","ret","tabindex"], emptyTags: { "IMG": true, "BR": true, "INPUT": true, "META": true, "LINK": true, "PARAM": true, "HR": true }, prebuiltId: "prebuilt_extensions", inited: false, init: function(){ if(!this.inited){ this.inited = true; this.prebuilts = $(this.prebuiltId); if(this.prebuilts){ this.prebuilts.remove(); } this.divsChanged(); if(navigator.appName.indexOf("Microsoft") == -1)this.mozillaOuterHTML(); EventDispatcher.implement(this); } }, mozillaOuterHTML: function(){ HTMLElement.prototype.__defineGetter__("outerHTML", function () { var attrs = this.attributes; var str = "<" + this.tagName; for (var i = 0; i < attrs.length; i++) str += " " + attrs[i].name + "=\"" + attrs[i].value + "\""; if (Extensions.emptyTags[this.tagName])return str + "/>"; return str + ">" + this.innerHTML + ""; }); }, getPrebuilt: function(id){ this.init(); var div = this.findChild(this.prebuilts, id); return div; }, findChild: function(within, id){ var children = within.getChildren(); for(var i=0; i