function add_emotion(event){comment=document.getElementById('comment');if(comment.selectionStart||comment.selectionStart=='0'){var startPos=comment.selectionStart;var endPos=comment.selectionEnd;comment.value=comment.value.substring(0,startPos)
+" "+this.alt+" "
+comment.value.substring(endPos,comment.value.length);}
else{comment.value+=" "+this.alt+" ";}}
function load_emotion(){var emotion=document.getElementById('emotion');if(emotion){var emotions=emotion.getElementsByTagName('img');for(i=0;i<emotions.length;i++){emotions[i].onclick=add_emotion;}}}
if(document.all){attachEvent('onload',load_emotion);}
else{addEventListener('load',load_emotion,false);}