Код:
<script type="text/javascript"> var theme=document.getelementbyid('pun-main').getelementsbytagname("h1")[0].innerhtml if (theme.indexof(">>")!=-1) {if (theme.indexof("редактирование")!=-1) {document.getelementbyid('pun-main').getelementsbytagname("h1")[0].innerhtml=theme.substring(0, theme.indexof(">>"))+" - редактирование сообщения</span>"} else {document.getelementbyid('pun-main').getelementsbytagname("h1")[0].innerhtml=theme.substring(0, theme.indexof(">>"))+"</span>"}} </script> <script type="text/javascript"> var descs=document.getelementsbytagname("td") var z=0 for (z=0; z<=(descs.length-1); z++) {if (descs[z].innerhtml.indexof(">>")!=-1) {if (descs[z].classname=="tcl") {descs[z].innerhtml=descs[z].innerhtml.substring(0, descs[z].innerhtml.indexof(">>"))+"</a><br />"+"<font size='1'>"+descs[z].innerhtml.substring((descs[z].innerhtml.indexof(">>")+8), (descs[z].innerhtml.tolowercase().indexof("</a>")))+"</font>"+descs[z].innerhtml.substr((descs[z].innerhtml.tolowercase().indexof("</a>")+4)) } else {descs[z].getelementsbytagname("a")[0].innerhtml=descs[z].getelementsbytagname("a")[0].innerhtml.substring(0, descs[z].getelementsbytagname("a")[0].innerhtml.indexof(">")) }}} </script> <script type="text/javascript"> if (document.getelementbyid('pun-main').getelementsbytagname("h1")[0].innerhtml.indexof("начать новую")!=-1) {document.getelementsbytagname("form")[0].innerhtml=document.getelementsbytagname("form")[0].innerhtml.substring(0, (document.getelementsbytagname("form")[0].innerhtml.indexof("areafield")-10))+"<p><label for='descr'>описание</label><br />"+"<span class='input'>"+"<input id='descr'"+" type='text'"+" size='80'"+" maxlength='35' /></span></p>"+document.getelementsbytagname("form")[0].innerhtml.substr( (document.getelementsbytagname("form")[0].innerhtml.indexof("areafield")-10)) if (document.getelementbyid('fld3').value.indexof(">>")!=-1) { document.getelementbyid('descr').value=document.getelementbyid('fld3').value.substr(document.getelementbyid('fld3').value.indexof(">>")+2) document.getelementbyid('fld3').value=document.getelementbyid('fld3').value.substring(0, document.getelementbyid('fld3').value.indexof(">>")) } document.getelementsbyname("submit")[0].onclick=adddesc document.getelementsbyname("preview")[0].onclick=adddesc} function adddesc() {document.getelementbyid('fld3').value=document.getelementbyid('fld3').value+">>"+document.getelementbyid('descr').value return true} </script>