function AnselImage(A){this.editor=A}AnselImage._pluginInfo={name:"AnselImage",version:"1.0",developer:"Roel Gloudemans",developer_url:"http://www.gloudemans.info/",sponsor:"Horde Project",sponsor_url:"http://www.horde.org/",license:"htmlArea"};HTMLArea.prototype._insertImage=function(C){var B=this;var D=null;if(typeof C=="undefined"){C=this.getParentElement();if(C&&!/^img$/i.test(C.tagName)){C=null}}if(C){D={f_base:B.config.baseHref,f_url:HTMLArea.is_ie?B.stripBaseURL(C.src):C.getAttribute("src"),f_alt:C.alt,f_border:C.border,f_align:C.align,f_vert:C.vspace,f_horiz:C.hspace}}var A=_editor_url+"plugins/AnselImage/insert_image.php";this._popupDialog(A,function(J){if(!J){return false}var F=C;if(!F){if(HTMLArea.is_ie){var H=B._getSelection();var E=B._createRange(H);B._doc.execCommand("insertimage",false,J.f_url);F=E.parentElement();if(F.tagName.toLowerCase()!="img"){F=F.previousSibling}}else{F=document.createElement("img");F.src=J.f_url;B.insertNodeAtSelection(F);if(!F.tagName){F=E.startContainer.firstChild}}}else{F.src=J.f_url}for(var I in J){var G=J[I];switch(I){case"f_alt":F.alt=G;break;case"f_border":F.border=parseInt(G||"0");break;case"f_align":F.align=G;break;case"f_vert":F.vspace=parseInt(G||"0");break;case"f_horiz":F.hspace=parseInt(G||"0");break}}},D)}