window.setTimeout("tinyMCE.selectedInstance.setBaseHREF(tinyMCE.settings['base_href']);tinyMCE._resetIframeHeight();", 1); 
window.setTimeout("tinyMCE.selectedInstance.setBaseHREF(tinyMCE.settings.base_href);tinyMCE._resetIframeHeight();", 1); 
	handleEvent : function(e) {		var inst = tinyMCE.selectedInstance;		// Remove odd, error		if (typeof(tinyMCE) == "undefined")			return true;		//tinyMCE.debug(e.type + " " + e.target.nodeName + " " + (e.relatedTarget ? e.relatedTarget.nodeName : ""));		if (tinyMCE.executeCallback(tinyMCE.selectedInstance, 'handle_event_callback', 'handleEvent', e))			return false;		switch (e.type) {			case "beforedeactivate": // Was added due to bug #1439953			case "blur":				if (tinyMCE.selectedInstance)					tinyMCE.selectedInstance.execCommand('mceEndTyping');				tinyMCE.hideMenus();				return;			// Workaround for drag drop/copy paste base href bug			case "drop":			case "beforepaste":				if (tinyMCE.selectedInstance)					tinyMCE.selectedInstance.setBaseHREF(null);				// Fixes odd MSIE bug where drag/droping elements in a iframe with height 100% breaks				// This logic forces the width/height to be in pixels while the user is drag/dropping				if (tinyMCE.isRealIE) {					var ife = tinyMCE.selectedInstance.iframeElement;					/*if (ife.style.width.indexOf('%') != -1) {						ife._oldWidth = ife.width.height;						ife.style.width = ife.clientWidth;					}*/					if (ife.style.height.indexOf('%') != -1) {						ife._oldHeight = ife.style.height;						ife.style.height = ife.clientHeight;					}				}				window.setTimeout("tinyMCE.selectedInstance.setBaseHREF(tinyMCE.settings['base_href']);tinyMCE._resetIframeHeight();", 1);				return;			case "submit":				tinyMCE.removeTinyMCEFormElements(tinyMCE.isMSIE ? window.event.srcElement : e.target);				tinyMCE.triggerSave();				tinyMCE.isNotDirty = true;				return;			case "reset":				var formObj = tinyMCE.isIE ? window.event.srcElement : e.target;				for (var i=0; i<document.forms.length; i++) {					if (document.forms[i] == formObj)						window.setTimeout('tinyMCE.resetForm(' + i + ');', 10);				}				return;			case "keypress":				if (inst && inst.handleShortcut(e))					return false;				if (e.target.editorId) {					tinyMCE.instances[e.target.editorId].select();				} else {					if (e.target.ownerDocument.editorId)						tinyMCE.instances[e.target.ownerDocument.editorId].select();				}				if (tinyMCE.selectedInstance)					tinyMCE.selectedInstance.switchSettings();				// Insert P element				if ((tinyMCE.isGecko || tinyMCE.isOpera || tinyMCE.isSafari) && tinyMCE.settings['force_p_newlines'] && e.keyCode == 13 && !e.shiftKey) {					// Insert P element instead of BR					if (TinyMCE_ForceParagraphs._insertPara(tinyMCE.selectedInstance, e)) {						// Cancel event						tinyMCE.execCommand("mceAddUndoLevel");						return tinyMCE.cancelEvent(e);					}				}				// Handle backspace				if ((tinyMCE.isGecko && !tinyMCE.isSafari) && tinyMCE.settings['force_p_newlines'] && (e.keyCode == 8 || e.keyCode == 46) && !e.shiftKey) {					// Insert P element instead of BR					if (TinyMCE_ForceParagraphs._handleBackSpace(tinyMCE.selectedInstance, e.type)) {						// Cancel event						tinyMCE.execCommand("mceAddUndoLevel");						return tinyMCE.cancelEvent(e);					}				}				// Return key pressed				if (tinyMCE.isIE && tinyMCE.settings['force_br_newlines'] && e.keyCode == 13) {					if (e.target.editorId)						tinyMCE.instances[e.target.editorId].select();					if (tinyMCE.selectedInstance) {						var sel = tinyMCE.selectedInstance.getDoc().selection;						var rng = sel.createRange();						if (tinyMCE.getParentElement(rng.parentElement(), "li") != null)							return false;						// Cancel event						e.returnValue = false;						e.cancelBubble = true;						// Insert BR element						rng.pasteHTML("<br />");						rng.collapse(false);						rng.select();						tinyMCE.execCommand("mceAddUndoLevel");						tinyMCE.triggerNodeChange(false);						return false;					}				}				// Backspace or delete				if (e.keyCode == 8 || e.keyCode == 46) {					tinyMCE.selectedElement = e.target;					tinyMCE.linkElement = tinyMCE.getParentElement(e.target, "a");					tinyMCE.imgElement = tinyMCE.getParentElement(e.target, "img");					tinyMCE.triggerNodeChange(false);				}				return false;			break;			case "keyup":			case "keydown":				tinyMCE.hideMenus();				tinyMCE.hasMouseMoved = false;				if (inst && inst.handleShortcut(e))					return false;				if (e.target.editorId)					tinyMCE.instances[e.target.editorId].select();				if (tinyMCE.selectedInstance)					tinyMCE.selectedInstance.switchSettings();				var inst = tinyMCE.selectedInstance;				// Handle backspace				if (tinyMCE.isGecko && tinyMCE.settings['force_p_newlines'] && (e.keyCode == 8 || e.keyCode == 46) && !e.shiftKey) {					// Insert P element instead of BR					if (TinyMCE_ForceParagraphs._handleBackSpace(tinyMCE.selectedInstance, e.type)) {						// Cancel event						tinyMCE.execCommand("mceAddUndoLevel");						e.preventDefault();						return false;					}				}				tinyMCE.selectedElement = null;				tinyMCE.selectedNode = null;				var elm = tinyMCE.selectedInstance.getFocusElement();				tinyMCE.linkElement = tinyMCE.getParentElement(elm, "a");				tinyMCE.imgElement = tinyMCE.getParentElement(elm, "img");				tinyMCE.selectedElement = elm;				// Update visualaids on tabs				if (tinyMCE.isGecko && e.type == "keyup" && e.keyCode == 9)					tinyMCE.handleVisualAid(tinyMCE.selectedInstance.getBody(), true, tinyMCE.settings['visual'], tinyMCE.selectedInstance);				// Fix empty elements on return/enter, check where enter occured				if (tinyMCE.isIE && e.type == "keydown" && e.keyCode == 13)					tinyMCE.enterKeyElement = tinyMCE.selectedInstance.getFocusElement();				// Fix empty elements on return/enter				if (tinyMCE.isIE && e.type == "keyup" && e.keyCode == 13) {					var elm = tinyMCE.enterKeyElement;					if (elm) {						var re = new RegExp('^HR|IMG|BR$','g'); // Skip these						var dre = new RegExp('^H[1-6]$','g'); // Add double on these						if (!elm.hasChildNodes() && !re.test(elm.nodeName)) {							if (dre.test(elm.nodeName))								elm.innerHTML = "&nbsp;&nbsp;";							else								elm.innerHTML = "&nbsp;";						}					}				}				// Check if it's a position key				var keys = tinyMCE.posKeyCodes;				var posKey = false;				for (var i=0; i<keys.length; i++) {					if (keys[i] == e.keyCode) {						posKey = true;						break;					}				}				// MSIE custom key handling				if (tinyMCE.isIE && tinyMCE.settings['custom_undo_redo']) {					var keys = new Array(8,46); // Backspace,Delete					for (var i=0; i<keys.length; i++) {						if (keys[i] == e.keyCode) {							if (e.type == "keyup")								tinyMCE.triggerNodeChange(false);						}					}				}				// If Ctrl key				if (e.keyCode == 17)					return true;				// Handle Undo/Redo when typing content				if (tinyMCE.isGecko) {					// Start typing (not a position key or ctrl key, but ctrl+x and ctrl+p is ok)					if (!posKey && e.type == "keyup" && !e.ctrlKey || (e.ctrlKey && (e.keyCode == 86 || e.keyCode == 88)))						tinyMCE.execCommand("mceStartTyping");				} else {					// IE seems to be working better with this setting					if (!posKey && e.type == "keyup")						tinyMCE.execCommand("mceStartTyping");				}				// Store undo bookmark				if (e.type == "keydown" && (posKey || e.ctrlKey) && inst)					inst.undoBookmark = inst.selection.getBookmark();				// End typing (position key) or some Ctrl event				if (e.type == "keyup" && (posKey || e.ctrlKey))					tinyMCE.execCommand("mceEndTyping");				if (posKey && e.type == "keyup")					tinyMCE.triggerNodeChange(false);				if (tinyMCE.isIE && e.ctrlKey)					window.setTimeout('tinyMCE.triggerNodeChange(false);', 1);			break;			case "mousedown":			case "mouseup":			case "click":			case "dblclick":			case "focus":				tinyMCE.hideMenus();				if (tinyMCE.selectedInstance) {					tinyMCE.selectedInstance.switchSettings();					tinyMCE.selectedInstance.isFocused = true;				}				// Check instance event trigged on				var targetBody = tinyMCE.getParentElement(e.target, "html");				for (var instanceName in tinyMCE.instances) {					if (!tinyMCE.isInstance(tinyMCE.instances[instanceName]))						continue;					var inst = tinyMCE.instances[instanceName];					// Reset design mode if lost (on everything just in case)					inst.autoResetDesignMode();					// Use HTML element since users might click outside of body element					if (inst.getBody().parentNode == targetBody) {						inst.select();						tinyMCE.selectedElement = e.target;						tinyMCE.linkElement = tinyMCE.getParentElement(tinyMCE.selectedElement, "a");						tinyMCE.imgElement = tinyMCE.getParentElement(tinyMCE.selectedElement, "img");						break;					}				}				// Add first bookmark location				if (!tinyMCE.selectedInstance.undoRedo.undoLevels[0].bookmark && (e.type == "mouseup" || e.type == "dblclick"))					tinyMCE.selectedInstance.undoRedo.undoLevels[0].bookmark = tinyMCE.selectedInstance.selection.getBookmark();				// Reset selected node				if (e.type != "focus")					tinyMCE.selectedNode = null;				tinyMCE.triggerNodeChange(false);				tinyMCE.execCommand("mceEndTyping");				if (e.type == "mouseup")					tinyMCE.execCommand("mceAddUndoLevel");				// Just in case				if (!tinyMCE.selectedInstance && e.target.editorId)					tinyMCE.instances[e.target.editorId].select();				return false;			break;		}	},
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