!function(){function e(e){var i=l[e-1];o=i,c(),domUtils.setStyles(r.childNodes[e-1],{"background-color":"lemonChiffon",border:"#ccc 1px solid"}),t.innerHTML=i.preHtml||""}var o,i=editor,t=$G("preview"),r=$G("preitem"),l=templates,c=function(){for(var e,i=r.children,o=0;e=i[o++];)domUtils.setStyles(e,{"background-color":"",border:"white 1px solid"})};dialog.onok=function(){$G("issave").checked||i.execCommand("cleardoc");var e={html:o&&o.html};i.execCommand("template",e)},function(){for(var e,i="",o=0;e=l[o++];)i+='<div class="preitem" onclick="pre('+o+')"><img src="images/'+e.pre+'" '+(e.title?"alt="+e.title+" title="+e.title:"")+"></div>";r.innerHTML=i}(),(window.pre=e)(2)}();