rem:  addFields = function () 
add:  for (item in requiredFields) 
context: function LessonPlan (name, desc){	// Members	this.fields  = new Array ()	this.mainDiv = document.getElementById ('mainDiv')	this.toolbar = top.document.getElementById ('toolbar')    this.name    = name    this.desc    = desc	// Methods	this.addField     = addField	this.setupToolbar = setupToolbar	this.addLink	  = addLink	this.saveYourself = saveYourself	// Title	title = document.createElement ("h1")	text = document.createTextNode (name)	title.appendChild (text)	this.mainDiv.appendChild (title)	// Description	this.mainDiv.appendChild (document.createTextNode (desc))	// Toolbar	this.setupToolbar (this)    // Work around a bug in the MCE    addFields = function ()    {        // Fields        for (item in requiredFields)        {            var myField = lessonPlan.addField (item, requiredFields[item], false, true)			// Bug fix for Firefox.  It displays the first dynamic box as a grey box			// with larger text.  This creates a new box that is well formed, and			// sets up the old one to be deleted.			if (requiredFields[item][FIELD_TYPE] == TYPE_TEXTAREA && firstBox == true)			{				firstBox = myField				lessonPlan.addField (item, requiredFields[item], false, true)			}	        }		// If we have a box to delete, do it here.		if (firstBox)		{			myRemoveFields = function (firstField) {				id = firstField.id				fieldName = firstField.fieldName				lessonPlan.mainDiv.removeChild (firstField)				delete lessonPlan.fields[id]				firstBox = false			}			// Bug fix for Firefox, it crashes without this.			setTimeout('myRemoveFields(firstBox)', 200)		}    }    setTimeout('addFields()', 1)}
meta: 4793	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4793/cb81ced60c4a7353d1a8b7619cd6ff102c22c261/lesson_plan.js/clean/teaching_boxes/web/scripts/lesson_plan/lesson_plan.js