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