function smile(emoticon,motion)
{
var sr1 = (document.getElementById(motion).value).substring('0',document.getElementById(motion).selectionStart);  
var sr2 = (document.getElementById(motion).value).substr(document.getElementById(motion).selectionEnd);  
document.getElementById(motion).value = sr1+emoticon+sr2;
document.getElementById(motion).focus();
return;
}
function bbcode(bb,bb2,motion)
{
var sl = (document.getElementById(motion).value).substring(document.getElementById(motion).selectionStart,document.getElementById(motion).selectionEnd);  
var sr1 = (document.getElementById(motion).value).substring('0',document.getElementById(motion).selectionStart);  
var sr2 = (document.getElementById(motion).value).substr(document.getElementById(motion).selectionEnd);  
document.getElementById(motion).value = sr1+bb+sl+bb2+sr2;
document.getElementById(motion).focus();
return;
}
function clear(area)
{
document.getElementById(area).value="";
}
function showSmileyBar(barid,linkid)
{
if(document.getElementById(barid).style.display=="block") 
	{
	document.getElementById(barid).style.display="none";
	}
else if(document.getElementById(barid).style.display=="none")
	{
	document.getElementById(barid).style.display="block";
	}
}