rendered paste body<script type="text/javascript">Page = Class.create();Page.prototype={ browser:null, templateDiv:null, templateHtml:'', FCK:null, initialize:function( FCKEditor){ this.FCK = FCKEditor; this.templateDiv = $('templateDiv'); }, pull_Template:function(templateId){ var p = 'templateId='+templateId; var callB = new Ajax.Request('./callBack/ajax.action',{method:'get', params:p ,onSuccess: this.fill_template.bind(this)}); }, fill_template:function( cb ){ this.templateDiv.style.display = 'none'; this.templateHtml = cb.responseText; this.templateDiv.innerHTML = this.FCK.Create(); this.FCK.setHTML(this.templateHtml); Effect.SlideDown(this.templateDiv); }};</script><script type="text/javascript">Event.observe(window, 'load', function(){window.PageObj = new Page(oFCKeditorhtml);});</script><body> <div id="template1" onmouseover="this.style.cursor='pointer';this.style.textDecoration='underline'" onmouseout="this.style.textDecoration='none'"; class="templateDiv" onclick="PageObj.fill_template('1');" > <img src="./images/mindstormTemplate.gif" style="margin-bottom:5px;"><br> Default Mindstorm </div><div id="templateDiv"></div></body>