add:  if (!AutoValidator.validate(formObj)) { alert(tinyMCE.getLang('lang_invalid_data')); return false; } 
context: function insertAction() {	var inst = tinyMCE.getInstanceById(tinyMCE.getWindowArg('editor_id'));	var elm = inst.getFocusElement();	var formObj = document.forms[0];	var src = formObj.src.value;	var onmouseoversrc = formObj.onmouseoversrc.value;	var onmouseoutsrc = formObj.onmouseoutsrc.value;	if (tinyMCE.getParam("accessibility_warnings")) {		if (formObj.alt.value == "") {			var answer = confirm(tinyMCE.getLang('lang_advimage_missing_alt', '', true));			if (answer == true) {				formObj.alt.value = " ";			}		} else {			var answer = true;		}		if (!answer)			return;	}	if (onmouseoversrc && onmouseoversrc != "")		onmouseoversrc = "this.src='" + convertURL(onmouseoversrc, tinyMCE.imgElement) + "';";	if (onmouseoutsrc && onmouseoutsrc != "")		onmouseoutsrc = "this.src='" + convertURL(onmouseoutsrc, tinyMCE.imgElement) + "';";	if (elm != null && elm.nodeName == "IMG") {		setAttrib(elm, 'src', convertURL(src, tinyMCE.imgElement));		setAttrib(elm, 'mce_src', src);		setAttrib(elm, 'alt');		setAttrib(elm, 'title');		setAttrib(elm, 'border');		setAttrib(elm, 'vspace');		setAttrib(elm, 'hspace');		setAttrib(elm, 'width');		setAttrib(elm, 'height');		setAttrib(elm, 'onmouseover', onmouseoversrc);		setAttrib(elm, 'onmouseout', onmouseoutsrc);		setAttrib(elm, 'id');		setAttrib(elm, 'dir');		setAttrib(elm, 'lang');		setAttrib(elm, 'longdesc');		setAttrib(elm, 'usemap');		setAttrib(elm, 'style');		setAttrib(elm, 'class', getSelectValue(formObj, 'classlist'));		setAttrib(elm, 'align', getSelectValue(formObj, 'align'));		//tinyMCEPopup.execCommand("mceRepaint");		// Repaint if dimensions changed		if (formObj.width.value != orgImageWidth || formObj.height.value != orgImageHeight)			inst.repaint();		// Refresh in old MSIE		if (tinyMCE.isMSIE5)			elm.outerHTML = elm.outerHTML;	} else {		var html = "<img";		html += makeAttrib('src', convertURL(src, tinyMCE.imgElement));		html += makeAttrib('mce_src', src);		html += makeAttrib('alt');		html += makeAttrib('title');		html += makeAttrib('border');		html += makeAttrib('vspace');		html += makeAttrib('hspace');		html += makeAttrib('width');		html += makeAttrib('height');		html += makeAttrib('onmouseover', onmouseoversrc);		html += makeAttrib('onmouseout', onmouseoutsrc);		html += makeAttrib('id');		html += makeAttrib('dir');		html += makeAttrib('lang');		html += makeAttrib('longdesc');		html += makeAttrib('usemap');		html += makeAttrib('style');		html += makeAttrib('class', getSelectValue(formObj, 'classlist'));		html += makeAttrib('align', getSelectValue(formObj, 'align'));		html += " />";		tinyMCEPopup.execCommand("mceInsertContent", false, html);	}	tinyMCE._setEventsEnabled(inst.getBody(), false);	tinyMCEPopup.close();}
meta: 10343	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10343/524e24acf79702622c51dba4bb678337072e34b9/functions.js/clean/mambots/editors/tinymce/jscripts/tiny_mce/plugins/advimage/jscripts/functions.js