context: function bbfontstyle(bbopen, bbclose){	theSelection = false;			var textarea = document.forms[form_name].elements[text_name];	textarea.focus();	if ((clientVer >= 4) && is_ie && is_win)	{		// Get text selection		theSelection = document.selection.createRange().text;		if (theSelection)		{			// Add tags around selection			document.selection.createRange().text = bbopen + theSelection + bbclose;			document.forms[form_name].elements[text_name].focus();			theSelection = '';			return;		}	}	else if (document.forms[form_name].elements[text_name].selectionEnd && (document.forms[form_name].elements[text_name].selectionEnd - document.forms[form_name].elements[text_name].selectionStart > 0))	{		mozWrap(document.forms[form_name].elements[text_name], bbopen, bbclose);		document.forms[form_name].elements[text_name].focus();		theSelection = '';		return;	}		//The new position for the cursor after adding the bbcode	var caret_pos = getCaretPosition(textarea).start;	var new_pos = caret_pos + bbopen.length;			// Open tag	insert_text(bbopen + bbclose);	// Center the cursor when we don't have a selection	// Gecko and proper browsers	if (!isNaN(textarea.selectionStart))	{		textarea.selectionStart = new_pos;		textarea.selectionEnd = new_pos;	}		// IE	else if (document.selection)	{				var range = textarea.createTextRange();        	range.move("character", new_pos); 		range.select();		storeCaret(textarea);	}	textarea.focus();	return;}
meta: 2692	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/2692/09c9a3e7a10d36dc7cbfa7d48f8c533f6a2fd107/editor.js/clean/styles/subsilver2/template/editor.js