rem: } var img = image; if (!img) { var sel   = editor._getSelection(); 
add: var a = link; if (!a) { editor._doc.execCommand("createlink", false, param.f_href); a = editor.getParentElement(); var sel = editor._getSelection(); 
context: 	this._popupDialog(editor.config.servletPath + "ChangeImage?meta_id=" + editor.config.metaId + "&img=76348&editor_image=true", function(param) {		if (!param) {	// user must have pressed Cancel			return false;		}		var img = image;		if (!img) {			var sel   = editor._getSelection();			var range = editor._createRange(sel);			if (HTMLArea.is_ie) {				editor._doc.execCommand("insertimage", false, param.imageref);				img = range.parentElement();				// wonder if this works...				if (img.tagName.toLowerCase() != "img") {					img = img.previousSibling;				}			} else {				// TU				img = null ;				img = document.createElement("img");				editor.insertNodeAtSelection(img);				img.src = param.imageref ;							}		} else {			img.src = param.imageref;		}		for (field in param) {			var value = param[field];			switch (field) {			    //case "imageref"     : img.src    = value ; break ;			    case "image_name"   : img.name   = value ; break ;			    case "image_width"  : img.width  = parseInt(value || "0") ; break ;			    case "image_height" : img.height = parseInt(value || "0") ; break ;			    case "image_border" : img.border = parseInt(value || "0") ; break ;			    case "v_space"      : img.vspace = parseInt(value || "0") ; break ;			    case "h_space"      : img.hspace = parseInt(value || "0") ; break ;			    case "image_align"  : img.align  = value ; break ;			    case "alt_text" :						img.alt   = value ;						img.title = value ;						break ;			}		}	}, outparam);
meta: 6464	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/6464/e24e57956b54251f4d7c3fbafdaf11632f94f326/htmlarea.js/buggy/web/imcms/htmlarea/htmlarea.js