﻿function On(object) {
object.className='On';
}

function Of(object) {
object.className='Off';
}

function SM(strCode) {
document.getElementById ("contents").value +="[" + strCode +"]";
document.getElementById ("smdiv").style.display="none";
}

function ShowSM() {
document.getElementById ("smdiv").style.display='block';
document.getElementById ("smdiv").style.left =tblC.offsetLeft +25    ;
document.getElementById ("smdiv").style.top =tblC.offsetTop +95     ;
}

function WriteSM(){
s="<div dir=ltr class=\"sbox\" id=\"smdiv\"><div style=\"width:15px;float:right\" align=right ><a style=\"text-decoration: none; color: #800000; font-family: Arial; font-size: 8pt; font-weight: bold\" onclick=\"document.getElementById ('smdiv').style.display='none';\" href=\"javascript:void(0);\">	X</a></div>\n";
s+="<div><img border=\"0\" src=\"images/sim/1.gif\" width=\"18\" height=\"18\" hspace=2 class=\"Off\" onclick=\"SM('لبخند')\" onmouseover=\"On(this)\" onmouseout =\"Of(this)\" ><img border=\"0\" src=\"images/sim/2.gif\" width=\"18\" height=\"18\" hspace=2 class=\"Off\" onclick=\"SM('ناراحت')\" onmouseover=\"On(this)\" onmouseout =\"Of(this)\" ><img border=\"0\" src=\"images/sim/3.gif\" width=\"18\" height=\"18\" hspace=2 class=\"Off\" onclick=\"SM('چشمک')\" onmouseover=\"On(this)\" onmouseout =\"Of(this)\"><img border=\"0\" src=\"images/sim/4.gif\" width=\"18\" height=\"18\" hspace=2 class=\"Off\" onclick=\"SM('نیشخند')\" onmouseover=\"On(this)\" onmouseout =\"Of(this)\"><img border=\"0\" src=\"images/sim/5.gif\" width=\"18\" height=\"18\" hspace=2 class=\"Off\" onclick=\"SM('خنده')\" onmouseover=\"On(this)\" onmouseout =\"Of(this)\" ></div>\n";
s+="<div><img border=\"0\" src=\"images/sim/6.gif\"  width=\"18\" height=\"18\" hspace=2 class=\"Off\" onclick=\"SM('گریه')\" onmouseover=\"On(this)\" onmouseout =\"Of(this)\" ><img border=\"0\" src=\"images/sim/7.gif\"  width=\"18\" height=\"18\" hspace=2 class=\"Off\" onclick=\"SM('قلب')\" onmouseover=\"On(this)\" onmouseout =\"Of(this)\" ><img border=\"0\" src=\"images/sim/8.gif\"  width=\"18\" height=\"18\" hspace=2 class=\"Off\" onclick=\"SM('خجالت')\" onmouseover=\"On(this)\" onmouseout =\"Of(this)\"><img border=\"0\" src=\"images/sim/9.gif\"  width=\"18\" height=\"18\" hspace=2 class=\"Off\" onclick=\"SM('زبان')\" onmouseover=\"On(this)\" onmouseout =\"Of(this)\"><img border=\"0\" src=\"images/sim/10.gif\" width=\"18\" height=\"18\" hspace=2 class=\"Off\" onclick=\"SM('بوسه')\" onmouseover=\"On(this)\" onmouseout =\"Of(this)\" ></div>\n";
s+="<div><img border=\"0\" src=\"images/sim/11.gif\"  width=\"18\" height=\"18\" hspace=2 class=\"Off\" onclick=\"SM('قلب شکسته')\" onmouseover=\"On(this)\" onmouseout =\"Of(this)\" ><img border=\"0\" src=\"images/sim/12.gif\"  width=\"18\" height=\"18\" hspace=2 class=\"Off\" onclick=\"SM('تعجب')\" onmouseover=\"On(this)\" onmouseout =\"Of(this)\" ><img border=\"0\" src=\"images/sim/13.gif\"  width=\"18\" height=\"18\" hspace=2 class=\"Off\" onclick=\"SM('عصبانی')\" onmouseover=\"On(this)\" onmouseout =\"Of(this)\"><img border=\"0\" src=\"images/sim/14.gif\"  width=\"18\" height=\"18\" hspace=2 class=\"Off\" onclick=\"SM('رضایت')\" onmouseover=\"On(this)\" onmouseout =\"Of(this)\"><img border=\"0\" src=\"images/sim/15.gif\" width=\"18\" height=\"18\" hspace=2 class=\"Off\" onclick=\"SM('خونسرد')\" onmouseover=\"On(this)\" onmouseout =\"Of(this)\" ></div>\n";
s+="<div><img border=\"0\" src=\"images/sim/16.gif\"  width=\"18\" height=\"18\" hspace=2 class=\"Off\" onclick=\"SM('تشویش')\" onmouseover=\"On(this)\" onmouseout =\"Of(this)\" ><img border=\"0\" src=\"images/sim/17.gif\"  width=\"18\" height=\"18\" hspace=2 class=\"Off\" onclick=\"SM('شیطونک')\" onmouseover=\"On(this)\" onmouseout =\"Of(this)\" ><img border=\"0\" src=\"images/sim/18.gif\"  width=\"18\" height=\"18\" hspace=2 class=\"Off\" onclick=\"SM('بدرود')\" onmouseover=\"On(this)\" onmouseout =\"Of(this)\"><img border=\"0\" src=\"images/sim/19.gif\"  width=\"18\" height=\"18\" hspace=2 class=\"Off\" onclick=\"SM('ناخوش')\" onmouseover=\"On(this)\" onmouseout =\"Of(this)\"><img border=\"0\" src=\"images/sim/20.gif\" width=\"18\" height=\"18\" hspace=2 class=\"Off\"  onclick=\"SM('گل')\" onmouseover=\"On(this)\" onmouseout =\"Of(this)\" ></div>\n";
s+="</div>";
document.write (s);
}

WriteSM();
