rem: tinyMCE.execCommand ("mceAddControl", true, "mceReplaceMe" + objId) 
add: tinyMCE.execCommand ("mceAddControl", true, objId) 
context: function addInitCreateButtonClicked (){	div = addInitFieldsDlg.div	div.style.visibility = "hidden"	// Figure out which fields were selected and add them to the view	options = div.options	objectFields = new Array ()	var firstField = null	for (i in options)	{		if (options[i].myCheck.checked)		{			field = options[i].fieldName			objField = lessonPlan.addField (field, optionalFields[field], true, false)			optionalFields[field][FIELD_USED] = true;			objectFields.push (objField.id)			// Create a second copy of this box to work around a bug in rendering the			// first dynamically generated text box			if (!firstField && firstBox)			{				firstField = objField				objField2 = lessonPlan.addField (field, optionalFields[field], true, false)				objectFields.push (objField2.id)			}		}	}	for (id in objectFields)	{		objId = objectFields[id]		tinyMCE.execCommand ("mceAddControl", true, "mceReplaceMe" + objId)		obj = document.getElementById ("mceReplaceMe" + objId)		obj.style.margin = "20px"		obj.style.width = "90%"	}	// Delete the mis-rendered box.  Note that this has to be done in a timeout	// loop due to a bug in Firefox that would cause a crash if done immediately.	deleteBox = function ()	{		var mainDiv = document.getElementById ("mainDiv")		mainDiv.removeChild (lessonPlan.fields[firstField.id])		delete lessonPlan.fields[firstField.id]		firstBox = false	}	if (firstBox && firstField)		setTimeout (deleteBox, 100)}
meta: 4793	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4793/cb81ced60c4a7353d1a8b7619cd6ff102c22c261/add_init_fields.js/clean/teaching_boxes/web/scripts/lesson_plan/add_init_fields.js