<script type="text/javascript">
e=document.getElementsByTagName("TD");
for(k=15; k<e.length;k++) {
if(e[k].className=='posttdMessage') {
s=e[k].innerHTML;
while (s.indexOf('[spoiler]') != -1){
s=s.replace('[spoiler]','<fieldset><legend><font style="font-size: 10px; font-family: Verdana; color:red;">Спойлер</font></legend><div style="margin: 3px; margin-top:1px;"><div class="smallfont" style="margin-bottom:1px"><a href="#" onclick="return spoiler_js(this);"><span style="color:blue;"><b>Показать спойлер</b></span><span style="display:none;color:blue;"><b>Скрыть спойлер</b></span></a></div><div style="margin: 0px; padding:3px; display: none;">'); s=s.replace('[/spoiler]','</div></div></fieldset>');
e[k].innerHTML=s;
}
} }
</script>

<script type="text/javascript">
function spoiler_js(obj) {
var obj_content = obj.parentNode.parentNode.getElementsByTagName('div')[1];
var obj_text_show = obj.getElementsByTagName('span')[1];
var obj_text_hide = obj.getElementsByTagName('span')[0];

if (obj_content.style.display != '') {
obj_content.style.display = '';
obj_text_show.style.display = '';
obj_text_hide.style.display = 'none';
} else {
obj_content.style.display = 'none';
obj_text_show.style.display = 'none';
obj_text_hide.style.display = '';
}
return false;
}
</script>