CommentViewHandler={show_more:function(){var which=this.innerHTML;if(this.id.indexOf("_")){var id=this.id.split("_")[1];if(id.length>0&&$('cbody_'+id)){if(which=='[More]'){$('cbody_'+id).style.height='auto';this.innerHTML='[Less]';}else{$('cbody_'+id).style.height='50px';this.innerHTML='[More]';}}}
return false;},show_all:function(){var which=this.innerHTML;$$('div.commentbody').each(function(body){if(body.id.indexOf("_")){var id=body.id.split("_")[1];}
if(which=='[Expand All]'){body.style.height='auto';if(id&&$('clink_'+id)){$('clink_'+id).innerHTML='[Less]';}}else{body.style.height='50px';if(id&&$('clink_'+id)){$('clink_'+id).innerHTML='[More]';}}});if(which=='[Expand All]'){this.innerHTML='[Collapse All]';}else{this.innerHTML='[Expand All]';}
return false;}}
Event.addBehavior({'a.cmore_link:click':CommentViewHandler.show_more,'a#cmore_all:click':CommentViewHandler.show_all});