tinyMCE.openWindow(template, {editor_id : editor_id, mce_store_selection : value['store_selection'], inline : "yes", command : "mceColorPicker", input_color : inputColor}); 
tinyMCE.openWindow(template, {editor_id : editor_id, mce_store_selection : value['store_selection'], inline : "yes", command : "mceColorPicker", input_color : value['color']}); 
	execCommand : function(editor_id, element, command, user_interface, value) {		switch (command) {			case 'mceHelp':				tinyMCE.openWindow({					file : 'about.htm',					width : 480,					height : 380				}, {					tinymce_version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion,					tinymce_releasedate : tinyMCE.releaseDate,					inline : "yes"				});			return true;			case "mceLink":				var inst = tinyMCE.getInstanceById(editor_id);				var doc = inst.getDoc();				var selectedText = "";				if (tinyMCE.isMSIE) {					var rng = doc.selection.createRange();					selectedText = rng.text;				} else					selectedText = inst.getSel().toString();				if (!tinyMCE.linkElement) {					if ((tinyMCE.selectedElement.nodeName.toLowerCase() != "img") && (selectedText.length <= 0))						return true;				}				var href = "", target = "", title = "", onclick = "", action = "insert", style_class = "";				if (tinyMCE.selectedElement.nodeName.toLowerCase() == "a")					tinyMCE.linkElement = tinyMCE.selectedElement;				// Is anchor not a link				if (tinyMCE.linkElement != null && tinyMCE.getAttrib(tinyMCE.linkElement, 'href') == "")					tinyMCE.linkElement = null;				if (tinyMCE.linkElement) {					href = tinyMCE.getAttrib(tinyMCE.linkElement, 'href');					target = tinyMCE.getAttrib(tinyMCE.linkElement, 'target');					title = tinyMCE.getAttrib(tinyMCE.linkElement, 'title');					onclick = tinyMCE.getAttrib(tinyMCE.linkElement, 'onclick');					style_class = tinyMCE.getAttrib(tinyMCE.linkElement, 'class');					// Try old onclick to if copy/pasted content					if (onclick == "")						onclick = tinyMCE.getAttrib(tinyMCE.linkElement, 'onclick');					onclick = tinyMCE.cleanupEventStr(onclick);					href = eval(tinyMCE.settings['urlconverter_callback'] + "(href, tinyMCE.linkElement, true);");					// Use mce_href if defined					mceRealHref = tinyMCE.getAttrib(tinyMCE.linkElement, 'mce_href');					if (mceRealHref != "") {						href = mceRealHref;						if (tinyMCE.getParam('convert_urls'))							href = eval(tinyMCE.settings['urlconverter_callback'] + "(href, tinyMCE.linkElement, true);");					}					action = "update";				}				var template = new Array();				template['file'] = 'link.htm';				template['width'] = 310;				template['height'] = 200;				// Language specific width and height addons				template['width'] += tinyMCE.getLang('lang_insert_link_delta_width', 0);				template['height'] += tinyMCE.getLang('lang_insert_link_delta_height', 0);				if (inst.settings['insertlink_callback']) {					var returnVal = eval(inst.settings['insertlink_callback'] + "(href, target, title, onclick, action, style_class);");					if (returnVal && returnVal['href'])						TinyMCE_AdvancedTheme._insertLink(returnVal['href'], returnVal['target'], returnVal['title'], returnVal['onclick'], returnVal['style_class']);				} else {					tinyMCE.openWindow(template, {href : href, target : target, title : title, onclick : onclick, action : action, className : style_class, inline : "yes"});				}				return true;			case "mceImage":				var src = "", alt = "", border = "", hspace = "", vspace = "", width = "", height = "", align = "";				var title = "", onmouseover = "", onmouseout = "", action = "insert";				var img = tinyMCE.imgElement;				var inst = tinyMCE.getInstanceById(editor_id);				if (tinyMCE.selectedElement != null && tinyMCE.selectedElement.nodeName.toLowerCase() == "img") {					img = tinyMCE.selectedElement;					tinyMCE.imgElement = img;				}				if (img) {					// Is it a internal MCE visual aid image, then skip this one.					if (tinyMCE.getAttrib(img, 'name').indexOf('mce_') == 0)						return true;					src = tinyMCE.getAttrib(img, 'src');					alt = tinyMCE.getAttrib(img, 'alt');					// Try polling out the title					if (alt == "")						alt = tinyMCE.getAttrib(img, 'title');					// Fix width/height attributes if the styles is specified					if (tinyMCE.isGecko) {						var w = img.style.width;						if (w != null && w != "")							img.setAttribute("width", w);						var h = img.style.height;						if (h != null && h != "")							img.setAttribute("height", h);					}					border = tinyMCE.getAttrib(img, 'border');					hspace = tinyMCE.getAttrib(img, 'hspace');					vspace = tinyMCE.getAttrib(img, 'vspace');					width = tinyMCE.getAttrib(img, 'width');					height = tinyMCE.getAttrib(img, 'height');					align = tinyMCE.getAttrib(img, 'align');					onmouseover = tinyMCE.getAttrib(img, 'onmouseover');					onmouseout = tinyMCE.getAttrib(img, 'onmouseout');					title = tinyMCE.getAttrib(img, 'title');					// Is realy specified?					if (tinyMCE.isMSIE) {						width = img.attributes['width'].specified ? width : "";						height = img.attributes['height'].specified ? height : "";					}					//onmouseover = tinyMCE.getImageSrc(tinyMCE.cleanupEventStr(onmouseover));					//onmouseout = tinyMCE.getImageSrc(tinyMCE.cleanupEventStr(onmouseout));					src = eval(tinyMCE.settings['urlconverter_callback'] + "(src, img, true);");					// Use mce_src if defined					mceRealSrc = tinyMCE.getAttrib(img, 'mce_src');					if (mceRealSrc != "") {						src = mceRealSrc;						if (tinyMCE.getParam('convert_urls'))							src = eval(tinyMCE.settings['urlconverter_callback'] + "(src, img, true);");					}					//if (onmouseover != "")					//	onmouseover = eval(tinyMCE.settings['urlconverter_callback'] + "(onmouseover, img, true);");					//if (onmouseout != "")					//	onmouseout = eval(tinyMCE.settings['urlconverter_callback'] + "(onmouseout, img, true);");					action = "update";				}				var template = new Array();				template['file'] = 'image.htm?src={$src}';				template['width'] = 355;				template['height'] = 265 + (tinyMCE.isMSIE ? 25 : 0);				// Language specific width and height addons				template['width'] += tinyMCE.getLang('lang_insert_image_delta_width', 0);				template['height'] += tinyMCE.getLang('lang_insert_image_delta_height', 0);				if (inst.settings['insertimage_callback']) {					var returnVal = eval(inst.settings['insertimage_callback'] + "(src, alt, border, hspace, vspace, width, height, align, title, onmouseover, onmouseout, action);");					if (returnVal && returnVal['src'])						TinyMCE_AdvancedTheme._insertImage(returnVal['src'], returnVal['alt'], returnVal['border'], returnVal['hspace'], returnVal['vspace'], returnVal['width'], returnVal['height'], returnVal['align'], returnVal['title'], returnVal['onmouseover'], returnVal['onmouseout']);				} else					tinyMCE.openWindow(template, {src : src, alt : alt, border : border, hspace : hspace, vspace : vspace, width : width, height : height, align : align, title : title, onmouseover : onmouseover, onmouseout : onmouseout, action : action, inline : "yes"});				return true;			case "forecolor":				var fcp = new TinyMCE_Layer(editor_id + '_fcPreview', false), p, img, elm;				TinyMCE_AdvancedTheme._hideMenus(editor_id);				if (!fcp.exists()) {					fcp.create('div', 'mceColorPreview', document.getElementById(editor_id + '_toolbar'));					elm = fcp.getElement();					elm._editor_id = editor_id;					elm._command = "forecolor";					elm._switchId = editor_id + "_forecolor";					tinyMCE.addEvent(elm, 'click', TinyMCE_AdvancedTheme._handleMenuEvent);					tinyMCE.addEvent(elm, 'mouseover', TinyMCE_AdvancedTheme._handleMenuEvent);					tinyMCE.addEvent(elm, 'mouseout', TinyMCE_AdvancedTheme._handleMenuEvent);				}				img = tinyMCE.selectNodes(document.getElementById(editor_id + "_forecolor"), function(n) {return n.nodeName == "IMG";})[0];				p = tinyMCE.getAbsPosition(img, document.getElementById(editor_id + '_toolbar'));				fcp.moveTo(p.absLeft, p.absTop);				fcp.getElement().style.backgroundColor = value != null ? value : tinyMCE.getInstanceById(editor_id).foreColor;				fcp.show();				return false;			case "forecolorMenu":				TinyMCE_AdvancedTheme._hideMenus(editor_id);				// Create color layer				var ml = new TinyMCE_Layer(editor_id + '_fcMenu');				if (!ml.exists())					ml.create('div', 'mceMenu', document.body, TinyMCE_AdvancedTheme._getColorHTML(editor_id, 'theme_advanced_text_colors', 'forecolor'));				tinyMCE.switchClass(editor_id + '_forecolor', 'mceMenuButtonFocus');				ml.moveRelativeTo(document.getElementById(editor_id + "_forecolor"), 'bl');				ml.moveBy(tinyMCE.isMSIE && !tinyMCE.isOpera ? -1 : 1, -1);				if (tinyMCE.isOpera)					ml.moveBy(0, -2);				ml.show();			return true;			case "HiliteColor":				var bcp = new TinyMCE_Layer(editor_id + '_bcPreview', false), p, img;				TinyMCE_AdvancedTheme._hideMenus(editor_id);				if (!bcp.exists()) {					bcp.create('div', 'mceColorPreview', document.getElementById(editor_id + '_toolbar'));					elm = bcp.getElement();					elm._editor_id = editor_id;					elm._command = "HiliteColor";					elm._switchId = editor_id + "_backcolor";					tinyMCE.addEvent(elm, 'click', TinyMCE_AdvancedTheme._handleMenuEvent);					tinyMCE.addEvent(elm, 'mouseover', TinyMCE_AdvancedTheme._handleMenuEvent);					tinyMCE.addEvent(elm, 'mouseout', TinyMCE_AdvancedTheme._handleMenuEvent);				}				img = tinyMCE.selectNodes(document.getElementById(editor_id + "_backcolor"), function(n) {return n.nodeName == "IMG";})[0];				p = tinyMCE.getAbsPosition(img, document.getElementById(editor_id + '_toolbar'));				bcp.moveTo(p.absLeft, p.absTop);				bcp.getElement().style.backgroundColor = value != null ? value : tinyMCE.getInstanceById(editor_id).backColor;				bcp.show();				return false;			case "HiliteColorMenu":				TinyMCE_AdvancedTheme._hideMenus(editor_id);				// Create color layer				var ml = new TinyMCE_Layer(editor_id + '_bcMenu');				if (!ml.exists())					ml.create('div', 'mceMenu', document.body, TinyMCE_AdvancedTheme._getColorHTML(editor_id, 'theme_advanced_background_colors', 'HiliteColor'));				tinyMCE.switchClass(editor_id + '_backcolor', 'mceMenuButtonFocus');				ml.moveRelativeTo(document.getElementById(editor_id + "_backcolor"), 'bl');				ml.moveBy(tinyMCE.isMSIE && !tinyMCE.isOpera ? -1 : 1, -1);				if (tinyMCE.isOpera)					ml.moveBy(0, -2);				ml.show();			return true;			case "mceColorPicker":				if (user_interface) {					var template = new Array();					var inputColor = value['document'].getElementById(value['element_id']).value;					template['file'] = 'color_picker.htm';					template['width'] = 220;					template['height'] = 190;					template['close_previous'] = "no";					template['width'] += tinyMCE.getLang('lang_theme_advanced_colorpicker_delta_width', 0);					template['height'] += tinyMCE.getLang('lang_theme_advanced_colorpicker_delta_height', 0);					if (typeof(value['store_selection']) == "undefined")						value['store_selection'] = true;					tinyMCE.lastColorPickerValue = value;					tinyMCE.openWindow(template, {editor_id : editor_id, mce_store_selection : value['store_selection'], inline : "yes", command : "mceColorPicker", input_color : inputColor});				} else {					var savedVal = tinyMCE.lastColorPickerValue;					var elm = savedVal['document'].getElementById(savedVal['element_id']);					elm.value = value;					if (elm.onchange != null && elm.onchange != '')						eval('elm.onchange();');				}			return true;			case "mceCodeEditor":				var template = new Array();				template['file'] = 'source_editor.htm';				template['width'] = parseInt(tinyMCE.getParam("theme_advanced_source_editor_width", 720));				template['height'] = parseInt(tinyMCE.getParam("theme_advanced_source_editor_height", 580));				tinyMCE.openWindow(template, {editor_id : editor_id, resizable : "yes", scrollbars : "no", inline : "yes"});				return true;			case "mceCharMap":				var template = new Array();				template['file'] = 'charmap.htm';				template['width'] = 550 + (tinyMCE.isOpera ? 40 : 0);				template['height'] = 250;				template['width'] += tinyMCE.getLang('lang_theme_advanced_charmap_delta_width', 0);				template['height'] += tinyMCE.getLang('lang_theme_advanced_charmap_delta_height', 0);				tinyMCE.openWindow(template, {editor_id : editor_id, inline : "yes"});				return true;			case "mceInsertAnchor":				var template = new Array();				template['file'] = 'anchor.htm';				template['width'] = 320;				template['height'] = 90 + (tinyMCE.isNS7 ? 30 : 0);				template['width'] += tinyMCE.getLang('lang_theme_advanced_anchor_delta_width', 0);				template['height'] += tinyMCE.getLang('lang_theme_advanced_anchor_delta_height', 0);				tinyMCE.openWindow(template, {editor_id : editor_id, inline : "yes"});				return true;			case "mceNewDocument":				if (confirm(tinyMCE.getLang('lang_newdocument')))					tinyMCE.execInstanceCommand(editor_id, 'mceSetContent', false, ' ');				return true;		}		return false;	},
4999	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/4999/dbda3aabaa1fc3c68cb19ba910d1f9b3462d7eff/editor_template.js/clean/wp-includes/js/tinymce/themes/advanced/editor_template.js