var url=tinyMCE.getParam("external_image_list_url");if(url!=null){if(url.charAt(0)!="/"&&url.indexOf("://")==-1){url=tinyMCE.documentBasePath+"/"+url;}document.write("<sc"+"ript language=\"javascript\" type=\"text/javascript\" src=\""+url+"\"></sc"+"ript>");}function insertImage(){var _1=document.forms[0].src.value;var _2=document.forms[0].alt.value;var _3=document.forms[0].border.value;var _4=document.forms[0].vspace.value;var _5=document.forms[0].hspace.value;var _6=document.forms[0].width.value;var _7=document.forms[0].height.value;var _8=document.forms[0].align.options[document.forms[0].align.selectedIndex].value;tinyMCEPopup.restoreSelection();tinyMCE.themes["advanced"]._insertImage(_1,_2,_3,_5,_4,_6,_7,_8);tinyMCEPopup.close();}function init(){tinyMCEPopup.resizeToInnerSize();document.getElementById("srcbrowsercontainer").innerHTML=getBrowserHTML("srcbrowser","src","image","theme_advanced_image");var _9=document.forms[0];for(var i=0;i<document.forms[0].align.options.length;i++){if(document.forms[0].align.options[i].value==tinyMCE.getWindowArg("align")){document.forms[0].align.options.selectedIndex=i;}}_9.src.value=tinyMCE.getWindowArg("src");_9.alt.value=tinyMCE.getWindowArg("alt");_9.border.value=tinyMCE.getWindowArg("border");_9.vspace.value=tinyMCE.getWindowArg("vspace");_9.hspace.value=tinyMCE.getWindowArg("hspace");_9.width.value=tinyMCE.getWindowArg("width");_9.height.value=tinyMCE.getWindowArg("height");_9.insert.value=tinyMCE.getLang("lang_"+tinyMCE.getWindowArg("action"),"Insert",true);if(isVisible("srcbrowser")){document.getElementById("src").style.width="180px";}if(typeof(tinyMCEImageList)!="undefined"&&tinyMCEImageList.length>0){for(var i=0;i<_9.image_list.length;i++){if(_9.image_list.options[i].value==tinyMCE.getWindowArg("src")){_9.image_list.options[i].selected=true;}}}}var preloadImg=new Image();function resetImageData(){var _b=document.forms[0];_b.width.value=_b.height.value="";}function updateImageData(){var _c=document.forms[0];if(_c.width.value==""){_c.width.value=preloadImg.width;}if(_c.height.value==""){_c.height.value=preloadImg.height;}}function getImageData(){preloadImg=new Image();tinyMCE.addEvent(preloadImg,"load",updateImageData);tinyMCE.addEvent(preloadImg,"error",function(){var _d=document.forms[0];_d.width.value=_d.height.value="";});preloadImg.src=tinyMCE.convertRelativeToAbsoluteURL(tinyMCE.settings["base_href"],document.forms[0].src.value);}