rem: var html = tinyMCE.getParam('doctype') + '<html><head xmlns="http: 
add: html = tinyMCE.getParam('doctype') + '<html><head xmlns="http: 
context: 	_onAdd : function(replace_element, form_element_name, target_document) {		var hc, th, to, editorTemplate;		th = this.settings['theme'];		to = tinyMCE.themes[th];		var targetDoc = target_document ? target_document : document;		this.targetDoc = targetDoc;		tinyMCE.themeURL = tinyMCE.baseURL + "/themes/" + this.settings['theme'];		this.settings['themeurl'] = tinyMCE.themeURL;		if (!replace_element) {			alert("Error: Could not find the target element.");			return false;		}		if (to.getEditorTemplate)			editorTemplate = to.getEditorTemplate(this.settings, this.editorId);		var deltaWidth = editorTemplate['delta_width'] ? editorTemplate['delta_width'] : 0;		var deltaHeight = editorTemplate['delta_height'] ? editorTemplate['delta_height'] : 0;		var html = '<span id="' + this.editorId + '_parent" class="mceEditorContainer">' + editorTemplate['html'];		html = tinyMCE.replaceVar(html, "editor_id", this.editorId);		this.settings['default_document'] = tinyMCE.baseURL + "/blank.htm";		this.settings['old_width'] = this.settings['width'];		this.settings['old_height'] = this.settings['height'];		// Set default width, height		if (this.settings['width'] == -1)			this.settings['width'] = replace_element.offsetWidth;		if (this.settings['height'] == -1)			this.settings['height'] = replace_element.offsetHeight;		// Try the style width		if (this.settings['width'] == 0)			this.settings['width'] = replace_element.style.width;		// Try the style height		if (this.settings['height'] == 0)			this.settings['height'] = replace_element.style.height; 		// If no width/height then default to 320x240, better than nothing		if (this.settings['width'] == 0)			this.settings['width'] = 320;		if (this.settings['height'] == 0)			this.settings['height'] = 240;		this.settings['area_width'] = parseInt(this.settings['width']);		this.settings['area_height'] = parseInt(this.settings['height']);		this.settings['area_width'] += deltaWidth;		this.settings['area_height'] += deltaHeight;		this.settings['width_style'] = "" + this.settings['width'];		this.settings['height_style'] = "" + this.settings['height'];		// Special % handling		if (("" + this.settings['width']).indexOf('%') != -1)			this.settings['area_width'] = "100%";		else			this.settings['width_style'] += 'px';		if (("" + this.settings['height']).indexOf('%') != -1)			this.settings['area_height'] = "100%";		else			this.settings['height_style'] += 'px';		if (("" + replace_element.style.width).indexOf('%') != -1) {			this.settings['width'] = replace_element.style.width;			this.settings['area_width'] = "100%";			this.settings['width_style'] = "100%";		}		if (("" + replace_element.style.height).indexOf('%') != -1) {			this.settings['height'] = replace_element.style.height;			this.settings['area_height'] = "100%";			this.settings['height_style'] = "100%";		}		html = tinyMCE.applyTemplate(html);		this.settings['width'] = this.settings['old_width'];		this.settings['height'] = this.settings['old_height'];		this.visualAid = this.settings['visual'];		this.formTargetElementId = form_element_name;		// Get replace_element contents		if (replace_element.nodeName == "TEXTAREA" || replace_element.nodeName == "INPUT")			this.startContent = replace_element.value;		else			this.startContent = replace_element.innerHTML;		// If not text area or input		if (replace_element.nodeName != "TEXTAREA" && replace_element.nodeName != "INPUT") {			this.oldTargetElement = replace_element;			// Debug mode			if (tinyMCE.settings['debug']) {				hc = '<textarea wrap="off" id="' + form_element_name + '" name="' + form_element_name + '" cols="100" rows="15"></textarea>';			} else {				hc = '<input type="hidden" id="' + form_element_name + '" name="' + form_element_name + '" />';				this.oldTargetDisplay = tinyMCE.getStyle(this.oldTargetElement, 'display', 'inline');				this.oldTargetElement.style.display = "none";			}			html += '</span>';			if (tinyMCE.isGecko)				html = hc + html;			else				html += hc;			// Output HTML and set editable			if (tinyMCE.isGecko) {				var rng = replace_element.ownerDocument.createRange();				rng.setStartBefore(replace_element);				var fragment = rng.createContextualFragment(html);				tinyMCE.insertAfter(fragment, replace_element);			} else				replace_element.insertAdjacentHTML("beforeBegin", html);		} else {			html += '</span>';			// Just hide the textarea element			this.oldTargetElement = replace_element;			if (!tinyMCE.settings['debug']) {				this.oldTargetDisplay = tinyMCE.getStyle(this.oldTargetElement, 'display', 'inline');				this.oldTargetElement.style.display = "none";			}			// Output HTML and set editable			if (tinyMCE.isGecko) {				var rng = replace_element.ownerDocument.createRange();				rng.setStartBefore(replace_element);				var fragment = rng.createContextualFragment(html);				tinyMCE.insertAfter(fragment, replace_element);			} else				replace_element.insertAdjacentHTML("beforeBegin", html);		}		// Setup iframe		var dynamicIFrame = false;		var tElm = targetDoc.getElementById(this.editorId);		if (!tinyMCE.isIE) {			// Node case is preserved in XML strict mode			if (tElm && (tElm.nodeName == "SPAN" || tElm.nodeName == "span")) {				tElm = tinyMCE._createIFrame(tElm, targetDoc);				dynamicIFrame = true;			}			this.targetElement = tElm;			this.iframeElement = tElm;			this.contentDocument = tElm.contentDocument;			this.contentWindow = tElm.contentWindow;			//this.getDoc().designMode = "on";		} else {			if (tElm && tElm.nodeName == "SPAN")				tElm = tinyMCE._createIFrame(tElm, targetDoc, targetDoc.parentWindow);			else				tElm = targetDoc.frames[this.editorId];			this.targetElement = tElm;			this.iframeElement = targetDoc.getElementById(this.editorId);			if (tinyMCE.isOpera) {				this.contentDocument = this.iframeElement.contentDocument;				this.contentWindow = this.iframeElement.contentWindow;				dynamicIFrame = true;			} else {				this.contentDocument = tElm.window.document;				this.contentWindow = tElm.window;			}			this.getDoc().designMode = "on";		}		// Setup base HTML		var doc = this.contentDocument;		if (dynamicIFrame) {			var html = tinyMCE.getParam('doctype') + '<html><head xmlns="http://www.w3.org/1999/xhtml"><base href="' + tinyMCE.settings['base_href'] + '" /><title>blank_page</title><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></head><body class="mceContentBody"></body></html>';			try {				if (!this.isHidden())					this.getDoc().designMode = "on";				doc.open();				doc.write(html);				doc.close();			} catch (e) {				// Failed Mozilla 1.3				this.getDoc().location.href = tinyMCE.baseURL + "/blank.htm";			}		}		// This timeout is needed in MSIE 5.5 for some odd reason		// it seems that the document.frames isn't initialized yet?		if (tinyMCE.isIE)			window.setTimeout("tinyMCE.addEventHandlers(tinyMCE.instances[\"" + this.editorId + "\"]);", 1);		// Setup element references		var parentElm = this.targetDoc.getElementById(this.editorId + '_parent');		this.formElement = tinyMCE.isGecko ? parentElm.previousSibling : parentElm.nextSibling;		tinyMCE.setupContent(this.editorId, true);		return true;	},
meta: 3891	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/3891/e8e3862e104280a24076077196c7b5713720de70/tiny_mce_src.js/buggy/plugins/editors/tinymce/jscripts/tiny_mce/tiny_mce_src.js