if (!head) { 
 if (!head || !doc.body) { 
	setupContent : function(editor_id) {		var inst = tinyMCE.instances[editor_id], i;		var doc = inst.getDoc();		var head = doc.getElementsByTagName('head').item(0);		var content = inst.startContent;		// HTML values get XML encoded in strict mode		if (tinyMCE.settings.strict_loading_mode) {			content = content.replace(/&lt;/g, '<');			content = content.replace(/&gt;/g, '>');			content = content.replace(/&quot;/g, '"');			content = content.replace(/&amp;/g, '&');		}		tinyMCE.selectedInstance = inst;		inst.switchSettings();		// Not loaded correctly hit it again, Mozilla bug #997860		if (!tinyMCE.isIE && tinyMCE.getParam("setupcontent_reload", false) && doc.title != "blank_page") {			// This part will remove the designMode status			// Failes first time in Firefox 1.5b2 on Mac			try {doc.location.href = tinyMCE.baseURL + "/blank.htm";} catch (ex) {}			window.setTimeout("tinyMCE.setupContent('" + editor_id + "');", 1000);			return;		}		if (!head) {			window.setTimeout("tinyMCE.setupContent('" + editor_id + "');", 10);			return;		}		// Import theme specific content CSS the user specific		tinyMCE.importCSS(inst.getDoc(), tinyMCE.baseURL + "/themes/" + inst.settings['theme'] + "/css/editor_content.css");		tinyMCE.importCSS(inst.getDoc(), inst.settings['content_css']);		tinyMCE.dispatchCallback(inst, 'init_instance_callback', 'initInstance', inst);		// Setup keyboard shortcuts		if (tinyMCE.getParam('custom_undo_redo_keyboard_shortcuts')) {			inst.addShortcut('ctrl', 'z', 'lang_undo_desc', 'Undo');			inst.addShortcut('ctrl', 'y', 'lang_redo_desc', 'Redo');		}		// BlockFormat shortcuts keys		for (i=1; i<=6; i++)			inst.addShortcut('ctrl', '' + i, '', 'FormatBlock', false, '<h' + i + '>');		inst.addShortcut('ctrl', '7', '', 'FormatBlock', false, '<p>');		inst.addShortcut('ctrl', '8', '', 'FormatBlock', false, '<div>');		inst.addShortcut('ctrl', '9', '', 'FormatBlock', false, '<address>');		// Add default shortcuts for gecko		if (tinyMCE.isGecko) {			inst.addShortcut('ctrl', 'b', 'lang_bold_desc', 'Bold');			inst.addShortcut('ctrl', 'i', 'lang_italic_desc', 'Italic');			inst.addShortcut('ctrl', 'u', 'lang_underline_desc', 'Underline');		}		// Setup span styles		if (tinyMCE.getParam("convert_fonts_to_spans"))			inst.getBody().setAttribute('id', 'mceSpanFonts');		if (tinyMCE.settings['nowrap'])			doc.body.style.whiteSpace = "nowrap";		doc.body.dir = this.settings['directionality'];		doc.editorId = editor_id;		// Add on document element in Mozilla		if (!tinyMCE.isIE)			doc.documentElement.editorId = editor_id;		inst.setBaseHREF(tinyMCE.settings['base_href']);		// Replace new line characters to BRs		if (tinyMCE.settings['convert_newlines_to_brs']) {			content = tinyMCE.regexpReplace(content, "\r\n", "<br />", "gi");			content = tinyMCE.regexpReplace(content, "\r", "<br />", "gi");			content = tinyMCE.regexpReplace(content, "\n", "<br />", "gi");		}		// Open closed anchors	//	content = content.replace(new RegExp('<a(.*?)/>', 'gi'), '<a$1></a>');		// Call custom cleanup code		content = tinyMCE.storeAwayURLs(content);		content = tinyMCE._customCleanup(inst, "insert_to_editor", content);		if (tinyMCE.isIE) {			// Ugly!!!			window.setInterval('try{tinyMCE.getCSSClasses(tinyMCE.instances["' + editor_id + '"].getDoc(), "' + editor_id + '");}catch(e){}', 500);			if (tinyMCE.settings["force_br_newlines"])				doc.styleSheets[0].addRule("p", "margin: 0;");			var body = inst.getBody();			body.editorId = editor_id;		}		content = tinyMCE.cleanupHTMLCode(content);		// Fix for bug #958637		if (!tinyMCE.isIE) {			var contentElement = inst.getDoc().createElement("body");			var doc = inst.getDoc();			contentElement.innerHTML = content;			// Remove weridness!			if (tinyMCE.isGecko && tinyMCE.settings['remove_lt_gt'])				content = content.replace(new RegExp('&lt;&gt;', 'g'), "");			if (tinyMCE.settings['cleanup_on_startup'])				tinyMCE.setInnerHTML(inst.getBody(), tinyMCE._cleanupHTML(inst, doc, this.settings, contentElement));			else				tinyMCE.setInnerHTML(inst.getBody(), content);			tinyMCE.convertAllRelativeURLs(inst.getBody());		} else {			if (tinyMCE.settings['cleanup_on_startup']) {				tinyMCE._setHTML(inst.getDoc(), content);				// Produces permission denied error in MSIE 5.5				eval('try {tinyMCE.setInnerHTML(inst.getBody(), tinyMCE._cleanupHTML(inst, inst.contentDocument, this.settings, inst.getBody()));} catch(e) {}');			} else				tinyMCE._setHTML(inst.getDoc(), content);		}		// Fix for bug #957681		//inst.getDoc().designMode = inst.getDoc().designMode;		tinyMCE.handleVisualAid(inst.getBody(), true, tinyMCE.settings['visual'], inst);		tinyMCE.dispatchCallback(inst, 'setupcontent_callback', 'setupContent', editor_id, inst.getBody(), inst.getDoc());		// Re-add design mode on mozilla		if (!tinyMCE.isIE)			tinyMCE.addEventHandlers(inst);		// Add blur handler		if (tinyMCE.isIE) {			tinyMCE.addEvent(inst.getBody(), "blur", TinyMCE_Engine.prototype._eventPatch);			tinyMCE.addEvent(inst.getBody(), "beforedeactivate", TinyMCE_Engine.prototype._eventPatch); // Bug #1439953			// Workaround for drag drop/copy paste base href bug			if (!tinyMCE.isOpera) {				tinyMCE.addEvent(doc.body, "mousemove", TinyMCE_Engine.prototype.onMouseMove);				tinyMCE.addEvent(doc.body, "beforepaste", TinyMCE_Engine.prototype._eventPatch);				tinyMCE.addEvent(doc.body, "drop", TinyMCE_Engine.prototype._eventPatch);			}		}		// Trigger node change, this call locks buttons for tables and so forth		inst.select();		tinyMCE.selectedElement = inst.contentWindow.document.body;		// Call custom DOM cleanup		tinyMCE._customCleanup(inst, "insert_to_editor_dom", inst.getBody());		tinyMCE._customCleanup(inst, "setup_content_dom", inst.getBody());		tinyMCE._setEventsEnabled(inst.getBody(), false);		tinyMCE.cleanupAnchors(inst.getDoc());		if (tinyMCE.getParam("convert_fonts_to_spans"))			tinyMCE.convertSpansToFonts(inst.getDoc());		inst.startContent = tinyMCE.trim(inst.getBody().innerHTML);		inst.undoRedo.add({ content : inst.startContent });		// Cleanup any mess left from storyAwayURLs		if (tinyMCE.isGecko) {			// Remove mce_src from textnodes and comments			tinyMCE.selectNodes(inst.getBody(), function(n) {				if (n.nodeType == 3 || n.nodeType == 8)					n.nodeValue = n.nodeValue.replace(new RegExp('\\s(mce_src|mce_href)=\"[^\"]*\"', 'gi'), "");				return false;			});		}		// Remove Gecko spellchecking		if (tinyMCE.isGecko)			inst.getBody().spellcheck = tinyMCE.getParam("gecko_spellcheck");		// Cleanup any mess left from storyAwayURLs		tinyMCE._removeInternal(inst.getBody());		inst.select();		tinyMCE.triggerNodeChange(false, true);	},
3623	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/3623/32d3515ec5cf941c718954b41f19cc777ee4a50e/tiny_mce_src.js/buggy/ain7-website/ain7/media/js/tiny_mce/tiny_mce_src.js