function emoticon(text, objc) {
	var sel;
	text = text + ' ';
	objc.focus();
	sel = document.selection.createRange();
	sel.text = text;
	objc.focus();
}

function bbcode(vbcode, objc) {
	var sel;
	objc.focus();
	sel = document.selection.createRange();
	sel.text = '[' + vbcode + ']' + sel.text + '[/' + vbcode + ']';
	objc.focus();
}

function quote(objc){
    var name = document.selection.createRange();
	var input = objc;
	if (name.text!="") input.value = input.value + "[quote]" + name.text + "[/quote]";
}


function toggleLine(obj) {
   if (obj.style.display == "none") { obj.style.display = ""; } else { obj.style.display = "none"; };
}