if (toolbarLocation == "top") { template['html'] += '<tr><td class="mceToolbarTop" align="' + toolbarAlign + '" height="1" nowrap="nowrap"><span id="' + editorId + '_toolbar" class="mceToolbarContainer">' + toolbarHTML + '</span></td></tr>'; } 
if (toolbarLocation == "top") template['html'] += '<tr><td dir="ltr" class="mceToolbarTop" align="' + toolbarAlign + '" height="1" nowrap="nowrap"><span id="' + editorId + '_toolbar" class="mceToolbarContainer">' + toolbarHTML + '</span></td></tr>'; 
	getEditorTemplate : function(settings, editorId) {		function removeFromArray(in_array, remove_array) {			var outArray = new Array(), skip;						for (var i=0; i<in_array.length; i++) {				skip = false;				for (var j=0; j<remove_array.length; j++) {					if (in_array[i] == remove_array[j]) {						skip = true;					}				}				if (!skip) {					outArray[outArray.length] = in_array[i];				}			}			return outArray;		}		function addToArray(in_array, add_array) {			for (var i=0; i<add_array.length; i++) {				in_array[in_array.length] = add_array[i];			}			return in_array;		}		var template = new Array();		var deltaHeight = 0;		var resizing = tinyMCE.getParam("theme_advanced_resizing", false);		var path = tinyMCE.getParam("theme_advanced_path", true);		var statusbarHTML = '<div id="{$editor_id}_path" class="mceStatusbarPathText" style="display: ' + (path ? "block" : "none") + '">&#160;</div><div id="{$editor_id}_resize" class="mceStatusbarResize" style="display: ' + (resizing ? "block" : "none") + '" onmousedown="tinyMCE.themes.advanced._setResizing(event,\'{$editor_id}\',true);"></div><br style="clear: both" />';		var layoutManager = tinyMCE.getParam("theme_advanced_layout_manager", "SimpleLayout");		// Setup style select options -- MOVED UP FOR EXTERNAL TOOLBAR COMPATABILITY!		var styleSelectHTML = '<option value="">{$lang_theme_style_select}</option>';		if (settings['theme_advanced_styles']) {			var stylesAr = settings['theme_advanced_styles'].split(';');						for (var i=0; i<stylesAr.length; i++) {				var key, value;				key = stylesAr[i].split('=')[0];				value = stylesAr[i].split('=')[1];				styleSelectHTML += '<option value="' + value + '">' + key + '</option>';			}			TinyMCE_AdvancedTheme._autoImportCSSClasses = false;		}		switch(layoutManager) {			case "SimpleLayout" : //the default TinyMCE Layout (for backwards compatibility)...				var toolbarHTML = "";				var toolbarLocation = tinyMCE.getParam("theme_advanced_toolbar_location", "bottom");				var toolbarAlign = tinyMCE.getParam("theme_advanced_toolbar_align", "center");				var pathLocation = tinyMCE.getParam("theme_advanced_path_location", "none"); // Compatiblity				var statusbarLocation = tinyMCE.getParam("theme_advanced_statusbar_location", pathLocation);				var defVals = {					theme_advanced_buttons1 : "bold,italic,underline,strikethrough,separator,justifyleft,justifycenter,justifyright,justifyfull,separator,styleselect,formatselect",					theme_advanced_buttons2 : "bullist,numlist,separator,outdent,indent,separator,undo,redo,separator,link,unlink,anchor,image,cleanup,help,code",					theme_advanced_buttons3 : "hr,removeformat,visualaid,separator,sub,sup,separator,charmap"				};				// Add accessibility control				toolbarHTML += '<a href="#" accesskey="q" title="' + tinyMCE.getLang("lang_toolbar_focus") + '"';				if (!tinyMCE.getParam("accessibility_focus"))					toolbarHTML += ' onfocus="tinyMCE.getInstanceById(\'' + editorId + '\').getWin().focus();"';				toolbarHTML += '></a>';				// Render rows				for (var i=1; i<100; i++) {					var def = defVals["theme_advanced_buttons" + i];					var buttons = tinyMCE.getParam("theme_advanced_buttons" + i, def == null ? '' : def, true, ',');					if (buttons.length == 0)						break;					buttons = removeFromArray(buttons, tinyMCE.getParam("theme_advanced_disable", "", true, ','));					buttons = addToArray(buttons, tinyMCE.getParam("theme_advanced_buttons" + i + "_add", "", true, ','));					buttons = addToArray(tinyMCE.getParam("theme_advanced_buttons" + i + "_add_before", "", true, ','), buttons);					for (var b=0; b<buttons.length; b++)						toolbarHTML += tinyMCE.getControlHTML(buttons[b]);					if (buttons.length > 0) {						toolbarHTML += "<br />";						deltaHeight -= 23;					}				}				// Add accessibility control				toolbarHTML += '<a href="#" accesskey="z" onfocus="tinyMCE.getInstanceById(\'' + editorId + '\').getWin().focus();"></a>';				// Setup template html				template['html'] = '<table class="mceEditor" border="0" cellpadding="0" cellspacing="0" width="{$width}" height="{$height}" style="width:{$width_style};height:{$height_style}"><tbody>';				if (toolbarLocation == "top") {					template['html'] += '<tr><td class="mceToolbarTop" align="' + toolbarAlign + '" height="1" nowrap="nowrap"><span id="' + editorId + '_toolbar" class="mceToolbarContainer">' + toolbarHTML + '</span></td></tr>';				}				if (statusbarLocation == "top") {					template['html'] += '<tr><td class="mceStatusbarTop" height="1">' + statusbarHTML + '</td></tr>';					deltaHeight -= 23;				}				template['html'] += '<tr><td align="center"><span id="{$editor_id}"></span></td></tr>';				if (toolbarLocation == "bottom") {					template['html'] += '<tr><td class="mceToolbarBottom" align="' + toolbarAlign + '" height="1"><span id="' + editorId + '_toolbar" class="mceToolbarContainer">' + toolbarHTML + '</span></td></tr>';				}				// External toolbar changes				if (toolbarLocation == "external") {					var bod = document.body;					var elm = document.createElement ("div");					toolbarHTML = tinyMCE.replaceVar(toolbarHTML, 'style_select_options', styleSelectHTML);					toolbarHTML = tinyMCE.applyTemplate(toolbarHTML, {editor_id : editorId});					elm.className = "mceToolbarExternal";					elm.id = editorId+"_toolbar";					elm.innerHTML = '<table width="100%" border="0" align="center"><tr><td align="center">'+toolbarHTML+'</td></tr></table>';					bod.appendChild (elm);					// bod.style.marginTop = elm.offsetHeight + "px";					deltaHeight = 0;					tinyMCE.getInstanceById(editorId).toolbarElement = elm;					//template['html'] = '<div id="mceExternalToolbar" align="center" class="mceToolbarExternal"><table width="100%" border="0" align="center"><tr><td align="center">'+toolbarHTML+'</td></tr></table></div>' + template["html"];				} else {					tinyMCE.getInstanceById(editorId).toolbarElement = null;				}				if (statusbarLocation == "bottom") {					template['html'] += '<tr><td class="mceStatusbarBottom" height="1">' + statusbarHTML + '</td></tr>';					deltaHeight -= 23;				}				template['html'] += '</tbody></table>';				//"SimpleLayout"			break;			case "RowLayout" : //Container Layout - containers defined in "theme_advanced_containers" are rendered from top to bottom.				template['html'] = '<table class="mceEditor" border="0" cellpadding="0" cellspacing="0" width="{$width}" height="{$height}" style="width:{$width}px;height:{$height}px"><tbody>';				var containers = tinyMCE.getParam("theme_advanced_containers", "", true, ",");				var defaultContainerCSS = tinyMCE.getParam("theme_advanced_containers_default_class", "container");				var defaultContainerAlign = tinyMCE.getParam("theme_advanced_containers_default_align", "center");				//Render Containers:				for (var i = 0; i < containers.length; i++)				{					if (containers[i] == "mceEditor") //Exceptions for mceEditor and ...						template['html'] += '<tr><td align="center" class="mceEditor_border"><span id="{$editor_id}"></span></td></tr>';					else if (containers[i] == "mceElementpath" || containers[i] == "mceStatusbar") // ... mceElementpath:					{						var pathClass = "mceStatusbar";						if (i == containers.length-1)						{							pathClass = "mceStatusbarBottom";						}						else if (i == 0)						{							pathClass = "mceStatusbar";						}						else						{							deltaHeight-=2;						}						template['html'] += '<tr><td class="' + pathClass + '" height="1">' + statusbarHTML + '</td></tr>';						deltaHeight -= 22;					} else { // Render normal Container						var curContainer = tinyMCE.getParam("theme_advanced_container_"+containers[i], "", true, ',');						var curContainerHTML = "";						var curAlign = tinyMCE.getParam("theme_advanced_container_"+containers[i]+"_align", defaultContainerAlign);						var curCSS = tinyMCE.getParam("theme_advanced_container_"+containers[i]+"_class", defaultContainerCSS);						curContainer = removeFromArray(curContainer, tinyMCE.getParam("theme_advanced_disable", "", true, ','));						for (var j=0; j<curContainer.length; j++)							curContainerHTML += tinyMCE.getControlHTML(curContainer[j]);						if (curContainer.length > 0) {							curContainerHTML += "<br />";							deltaHeight -= 23;						}						template['html'] += '<tr><td class="' + curCSS + '" align="' + curAlign + '" height="1">' + curContainerHTML + '</td></tr>';					}				}				template['html'] += '</tbody></table>';				//RowLayout			break;			case "CustomLayout" : //User defined layout callback...				var customLayout = tinyMCE.getParam("theme_advanced_custom_layout","");				if (customLayout != "" && eval("typeof(" + customLayout + ")") != "undefined") {					template = eval(customLayout + "(template);");				}			break;		}		if (resizing)			template['html'] += '<span id="{$editor_id}_resize_box" class="mceResizeBox"></span>';		template['html'] = tinyMCE.replaceVar(template['html'], 'style_select_options', styleSelectHTML);		// Set to default values		if (!template['delta_width'])			template['delta_width'] = 0;		if (!template['delta_height'])			template['delta_height'] = deltaHeight;		return template;	},
6462	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/6462/c8ebbaf32dfb0c21b86b110a4bb1a141d15a548e/editor_template.js/buggy/wp-includes/js/tinymce/themes/advanced/editor_template.js