add: img.setAttribute('kupu-src') = url; 
context: function ImageTool() {    /* Image tool to add images */        this.initialize = function(editor) {        /* attach the event handlers */        this.editor = editor;    };    this.createImageHandler = function(event) {        /* create an image according to a url entered in a popup */        var imageWindow = openPopup('kupupopups/image.html', 300, 200);        imageWindow.imagetool = this;        imageWindow.focus();    };    this.newNode = function(name, obj) {        var ed = this.editor;        var currobj = ed.getNearestParentOfType(ed.getSelectedNode(), name);        if (currobj) {            var p = currobj.parentNode;            p.insertBefore(obj, currobj);            p.removeChild(currobj);            return obj;        } else {            return ed.insertNodeAtSelection(obj, 1);        }    };    this.createImage = function(url, alttext, imgclass) {        /* create an image */        var img = this.editor.getInnerDocument().createElement('img');        img.src = url;        img.removeAttribute('height');        img.removeAttribute('width');        if (alttext) {            img.alt = alttext;        };        if (imgclass) {            img.className = imgclass;        };        this.newNode('IMG', img);        return img;    };    this.create_flash = function(url, alttext, className, width, height) {        var ed = this.editor;        var obj = ed.newElement('object',            {src:url, alt:alttext, className:className, width:width, height:height, type:'application/x-shockwave-flash',            'data':url},            [ed.newElement('param', {name:'movie', value:url})]);        this.newNode('OBJECT', obj);    };    this.setImageClass = function(imgclass) {        /* set the class of the selected image */        var currnode = this.editor.getSelectedNode();        var currimg = this.editor.getNearestParentOfType(currnode, 'IMG');        if (currimg) {            currimg.className = imgclass;        };    };    this.createContextMenuElements = function(selNode, event) {        return [new ContextMenuElement(_('Create image'), this.createImageHandler, this)];    };}
meta: 2380	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/2380/3ad597531f8a36647c11a2b37126012cc116fc5b/kupubasetools.js/clean/kupu/common/kupubasetools.js