	/*========================================================================
	++ HABYEditor V.66							++
	++									++
	++	HABYEditor´Â ´©±¸³ª »ç¿ëÇÒ ¼ö ÀÖ´Â À§ÁöÀ¨ ¿¡µðÅÍÀÔ´Ï´Ù.		++
	++									++
	++	¼öÁ¤ ¹èÆ÷½Ã, »ó¾÷ÀûÀÎ ¿ëµµ·Î »ç¿ë½Ã¿¡.. ÇÊÈ÷.. ²¿~~¿Á~~		++
	++	¸ÕÀú Á¦ÀÛÀÚÀÇ µ¿ÀÇ¸¦ ¾òÀ¸¼Å¾ß ÇÏ¸ç..				++
	++	»ó¾÷ÀûÀÎ ÇÁ·Î±×·¥¿¡ »ðÀÔÈÄ ¹èÆ÷´Â ±ÝÁöÇÕ´Ï´Ù.			++
	++									++
	++	** ¿À·ù·Î ÀÎÇÑ Ã¥ÀÓÀº »ç¿ëÀÚ¿¡°Ô ÀÖ½À´Ï´Ù.**			++
	++									++
	++				hayaroby@hayaroby.pe.kr			++
	++				demagpogy@edunet4u.net(¹®ÀÇ)		++
	++									++		 
	++	Copyright 2000-2006 hayaroby All Rights Reserved.		++
	========================================================================*/

	var oBasePath = (document.getElementsByTagName("SCRIPT")["HABYEditor"].src) ? document.getElementsByTagName("SCRIPT")["HABYEditor"].src : null;

	if(oBasePath) oBasePath = oBasePath.substring(0, oBasePath.lastIndexOf("/"))

	var onEditor = (oBasePath) ? true : false;

	function LoadScript(thisUrl)
	{
		document.write('<script language="javascript" src="'+ oBasePath + thisUrl +'"><\/script>');
	}

	LoadScript("/class/menulang.js.class");
	LoadScript("/class/setconfig.js.class");
	LoadScript("/class/settoolbar.js.class");
	LoadScript("/class/setbutton.js.class");
	LoadScript("/class/plugin.js.class");
	LoadScript("/class/setevent.js.class");
	LoadScript("/class/createpopup.js.class");
	LoadScript("/class/tablemaker.js.class");
	LoadScript("/class/absoluteposition.js.class");

	/* 
	++ ¿¡µðÅÍ »ý¼º ++
	*/
	var HABYeditor = function (editorObjId, userConfig)
	{
		/* ¿¡µðÅÍ ºê¶ó¿ìÁ® È£È¯¼º °Ë»ç */
		if(!onEditor || !IsCompatible())
		{
			return;
		}

		/* ¿¡µðÅÍ °³Ã¼ ÀÔ·Â °Ë»ç */
		if(!editorObjId || editorObjId.length == 0 || typeof editorObjId != 'string')
		{
			return;
		}

		var editorObj  = GetElementById(editorObjId);          /* »ç¿ë ¿¡µðÅÍ °³Ã¼      */

		if(!editorObj)
		{
			return;
		}

		var activeEditor = this;

		this.editorObjId = editorObjId;

		/* ¿¡µðÅÍ °³Ã¼ Å×±× °Ë»ç */
		if(editorObj.tagName != "TEXTAREA")
		{
			return;
		}

		this.oForm = null;

		if(editorObj.parentNode)
		{
			var tmpForm = editorObj.parentNode;

			while(tmpForm)
			{
				if(tmpForm.tagName == "FORM")
				{
					this.oForm = tmpForm;
					break;
				}

				tmpForm = tmpForm.parentNode;
			}
		}

		this.editorObj = editorObj;
		editorObj.cfg  = new HABYconfig(this.editorObjId, userConfig);       /* ¿¡µðÅÍ È¯°æ ¼³Á¤      */
		this.config    = editorObj.cfg;

		/* ¿øº» Textarea ¼û±è */
		this.editorObj.style.display = "none";

		/* ±âº» ½ºÅ¸ÀÏ ½ÃÆ® */
		var defaultStyle  = document.createElement('LINK');
		defaultStyle.rel  = 'stylesheet';
		defaultStyle.href = this.config.StylePath + this.config.MainStyle;

		/* À§ÁöÀ¨ ¿¡µðÅÍ */
		this.editorHtm = document.createElement("IFRAME");
		this.editorHtm.id           = this.editorObjId + "_htmEditor";
		this.editorHtm.className    = "EditorArea";
		this.editorHtm.frameBorder  = "0";

		/* ÅØ½ºÆ® ¿¡µðÅÍ */
		this.editorTxt = document.createElement("TEXTAREA");
		this.editorTxt.id            = this.editorObjId + "_txtEditor";
		this.editorTxt.className     = "EditorArea";
		this.editorTxt.style.display = "none";

		/* ¿¡µðÅÍ TABLE */
		this.editorTable = document.createElement("TABLE");
		this.editorTable.setAttribute("border", "0");
		this.editorTable.setAttribute("cellPadding", "0");
		this.editorTable.setAttribute("cellSpacing", "0");
		this.editorTable.id                    = this.editorObjId + "_editorTable";
		this.editorTable.className             = "EditorMain";
		this.editorTable.style.width           = this.config.Width + "px";
		this.editorTable.style.height          = this.config.Height + "px";
		this.editorTable.style.zIndex          = this.config.BoxIndex;

			/* ¿¡µðÅÍ TOOLBAR */
			this.editorToolbars = this.editorTable.insertRow(-1).insertCell(-1);
			this.editorToolbars.id            = this.editorObjId + "_mnuToolbar";
			this.editorToolbars.unselectable  = 'on';
			this.editorToolbars.style.width   = "100%";
			this.editorToolbars.ondragstart   = function () { return false; };
			this.editorToolbars.onselectstart = function () { return false; };
			this.editorToolbars.oncontextmenu = function () { return false; };

			/* ¿¡µðÅÍ AREA */
			this.insertEditor = this.editorTable.insertRow(-1).insertCell(-1);
			this.insertEditor.id           = this.editorObjId + "_tableEditor";
			this.insertEditor.style.width  = "100%";
			this.insertEditor.style.height = "100%";
			this.insertEditor.unselectable = 'on';

			/* ¿¡µðÅÍ AREA »ý¼º */
			this.insertEditor.appendChild(this.editorHtm);
			this.insertEditor.appendChild(this.editorTxt);

			/* ¿¡µðÅÍ STATEBAR */
			this.editorStatebar = this.editorTable.insertRow(-1).insertCell(-1);
			this.editorStatebar.id = this.editorObjId + "_StateBar";
			this.editorStatebar.setAttribute("align", "center");
			this.editorStatebar.style.width   = "100%";
			this.editorStatebar.style.height  = (isOpera) ? "28px" : "20px";
			this.editorStatebar.unselectable  = 'on';
			this.editorStatebar.ondragstart   = function () { return false; };
			this.editorStatebar.onselectstart = function () { return false; };
			this.editorStatebar.oncontextmenu = function () { return false; };

			this.editorStateInfo = this.editorStatebar.appendChild(document.createElement("SPAN"));
			this.editorStateInfo.style.cssFloat   = "left";
			this.editorStateInfo.style.styleFloat = "left";
			this.editorStateInfo.innerHTML        = "Loding......";

			this.editorStateVersion = this.editorStatebar.appendChild(document.createElement("SPAN"));
			this.editorStateVersion.style.cssFloat   = "right";
			this.editorStateVersion.style.styleFloat = "right";
			this.editorStateVersion.innerHTML        = ".";

		/* ¿¡µðÅÍ »ðÀÔ ÇÏ±â */
		this.editorObj.parentNode.insertBefore(defaultStyle, this.editorObj);
		this.editorObj.parentNode.insertBefore(this.editorTable, this.editorObj);

		if(this.oForm)
		{
			if(!this.oForm["HabyMediaIds"])
			{
				this.upMediaId = document.createElement('INPUT');
				this.upMediaId.setAttribute("id", "HabyMediaIds");
				this.upMediaId.setAttribute("name", "HabyMediaIds");
				this.upMediaId.setAttribute("type", "hidden");

				this.oForm.appendChild(this.upMediaId);
			}
			else
			{
				this.upMediaId = this.oForm["HabyMediaIds"];
			}
		}

		/* ±âº» Header */
		this.defaultHeader  = "<html>\n";
		this.defaultHeader += "<head>\n";
		this.defaultHeader += "<link rel=\"stylesheet\" href=\"" + this.config.StylePath + this.config.MainStyle + "\">\n";
		this.defaultHeader += "<body style=\"margin: 3px;\">";
		this.defaultHeader += "" + (this.editorObj.value) ? this.editorObj.value : '' + "";
		this.defaultHeader += "</body>\n";
		this.defaultHeader += "</html>\n";

		/* À§ÁöÀ¨ ¿¡µðÅÍ Doc */
		this.editorDoc  = this.editorHtm.contentWindow.document;

		this.editorDoc.open();
		this.editorDoc.write(this.defaultHeader);
		this.editorDoc.close();

		/* ¿¡µðÅÍ TOOLBAR »ý¼º */
		this.Toolbar = new HABYToolbar(activeEditor);
		this.MakeToolbars();

		/* ¿¡µðÅÍ »ý¼º */
		this.EditorStart();
	}

        HABYeditor.prototype.EditorStart = function ()
	{
		var activeEditor = this;

		if(!this.editorDoc.body)
		{
			setTimeout(function() { activeEditor.EditorStart(); }, 50);
			return;
		}

		if(isMSIE)	/* IE      */
		{
			this.editorDoc.body.contentEditable = true;
		}
		else		/* Firefox */
		{
			this.editorDoc.designMode = 'on';
		}

		/* EMBED ==> IMG º¯È¯ */
		GetEMBEDtoIMG(this.editorDoc, this.config.IconsPath);

		this.config.Rqueues[0] = this.editorDoc.body.innerHTML;

		/* ¸Þ´º ¹öÆ° ºñÈ°¼º */
		this.UpdateToolbar();

		/* À§ÁöÀ¨ ¿¡µðÅÍ ÀÌº¥Æ® Çîµé·¯ ¼³Á¤ */
		this.EventHandlers();

		setTimeout(function () { activeEditor.editorStateInfo.innerHTML = "¿Ï·á"; }, 0);
	}

	/* 
	++ ¿¡µðÅÍ ¸Þ´º »ý¼º ++
	*/
        HABYeditor.prototype.MakeToolbars = function ()
	{
		var activeEditor = this;

		var allWidth = 0;
		var fullLine = false;
		var cntItem  = 1;

		var oToolbarTable = this.editorToolbars.appendChild(document.createElement("TABLE"));
		oToolbarTable.setAttribute("border", "0");
		oToolbarTable.setAttribute("cellPadding", "0");
		oToolbarTable.setAttribute("cellSpacing", "1");

		var oToolbarRow = oToolbarTable.insertRow(-1);
		oToolbarRow.style.backgroundImage = "url('" + this.config.IconsPath + "/menubar_bg.gif')";

		for(var i = 0; i < this.config.MenuButton.length; i++)
		{
			var btnObj = this.config.MenuButton[i];

			if(i == 0)
			{
				allWidth = (24 * (btnObj.length));
			}

			cntItem = ( i < (this.config.MenuButton.length - 1) ) ? (this.config.MenuButton[i + 1].length) : 1;

			allWidth += (24 * cntItem) + 10;
			fullLine  = (parseInt(this.editorTable.style.width) - 10 > parseInt(allWidth) && this.config.MenuButton[i + 1] != "newLine") ? false : true; 
			allWidth  = (fullLine || btnObj == "newLine") ? 0 : allWidth;

			if(btnObj != "newLine")
			{
				for(var j = 0; j < btnObj.length; j++)
				{
					var btnItem = btnObj[j];
					var btnName = (MenuList[btnItem]) ? MenuList[btnItem][0] : "";
					var btnInfo = (MenuList[btnItem]) ? MenuList[btnItem][1] : "";

					allWidth += (btnItem == "FontSize") ? 60 : (btnItem == "FontName") ? 120 : (btnItem == "FontFormat") ? 80 : 0;

					if(j == 0)
					{
						var oSpace = new Image();

						oSpace.src          = this.config.IconsPath + "/menubar_sp.gif";
						oSpace.className    = "defaultButton";
						oSpace.style.cursor = "default";

						oToolbarRow.insertCell(-1).appendChild(oSpace);
					}
					
					if(!this.Toolbar.Item[btnItem] || this.Toolbar.Item[btnItem].innerHTML == "") /* IE Bug */
					{
						this.Toolbar.Item[btnItem] = this.Toolbar.Set(activeEditor, btnItem, btnName, btnInfo);
					}

					oToolbarRow.insertCell(-1).appendChild(this.Toolbar.Get(btnItem));
				}
			}

			if(fullLine)
			{
				oToolbarTable = this.editorToolbars.appendChild(document.createElement("TABLE"));
				oToolbarTable.setAttribute("border", "0");
				oToolbarTable.setAttribute("cellPadding", "0");
				oToolbarTable.setAttribute("cellSpacing", "1");

				oToolbarRow = oToolbarTable.insertRow(-1);
				oToolbarRow.style.backgroundImage = "url('" + this.config.IconsPath + "/menubar_bg.gif')";
			}
		}
	}

	/* 
	++ ¿¡µðÅÍ ÆùÆ® »ý¼º ++
	*/
        HABYeditor.prototype.ShowFontList = function (thisObj, Action)
	{
		if(document.getElementById(this.editorObjId + "_cmd" + Action) && document.getElementById(this.editorObjId + "_cmd" + Action).disabled)
		{
			return;
		}

		var activeEditor = this;

		if(this.PopupMenu)
		{
			this.PopupMenu.Hide();
		}

		var fontObj = (Action == "FontSize") ? this.config.FontSize : (Action == "FontName") ? this.config.FontName : this.config.FontFormat;

		var menuW   = (Action == "FontSize") ? 75 : (Action == "FontName") ? 135 : 95;

		menuW = (isMSIE) ? menuW : menuW - 6;

		this.PopupMenu = new CreatePopup();

		this.PopupMenuDiv = this.PopupMenu.Doc.createElement("DIV");
		this.PopupMenuDiv.unselectable          = "on";
		this.PopupMenuDiv.id                    = this.editorObjId + "_lstFontItem";
		this.PopupMenuDiv.style.width           = menuW + "px";
		this.PopupMenuDiv.style.height          = "140px";
		this.PopupMenuDiv.className             = "EditorPopup";
		this.PopupMenuDiv.ondragstart           = function () { return false; };
		this.PopupMenuDiv.onselectstart         = function () { return false; };
		this.PopupMenuDiv.oncontextmenu         = function () { return false; };

		for(var i = 0; i < fontObj.length; i++)
		{
			var fontItem = fontObj[i];
			var fontName = (FontList[fontItem]) ? FontList[fontItem] : fontItem;
	
			this.FontItem(Action, fontItem, fontName);
		}

		this.PopupMenu.Body.appendChild(this.PopupMenuDiv);

		if(isMSIE)	/* IE      */
		{
			var menuY = thisObj.offsetHeight;

			this.PopupMenu.Panel.document.createStyleSheet(this.config.StylePath + this.config.MainStyle);
			this.PopupMenu.Show(0, menuY, menuW, 140, thisObj);
		}
		else		/* FireFox */
		{
			var menuX = PopupPosition(thisObj, 1);
			var menuY = PopupPosition(thisObj, 0) + thisObj.offsetHeight;

			this.PopupMenu.Show(menuX, menuY, menuW, 140);

			document.body.appendChild(this.PopupMenu.Panel);
		}
	}

        HABYeditor.prototype.FontItem = function (Action, thisItem, thisName)
	{
		var activeEditor = this;

		if(Action == "FontFormat")
		{
			Action   = "FormatBlock";
			thisItem = "<" + thisItem + ">";
		}

		var PopupMenuTable = this.PopupMenuDiv.appendChild(this.PopupMenu.Doc.createElement("TABLE"));
		PopupMenuTable.setAttribute("border", "0");
		PopupMenuTable.setAttribute("cellPadding", "0");
		PopupMenuTable.setAttribute("cellSpacing", "0");
		PopupMenuTable.unselectable = "on";
		PopupMenuTable.style.width  = "100%";
		PopupMenuTable.style.height = "20px";
		PopupMenuTable.style.border = "none";
		PopupMenuTable.style.cursor = "pointer";
		PopupMenuTable.onmouseover  = function() { this.style.backgroundColor = "#316ac5"; };
		PopupMenuTable.onmouseout   = function() { this.style.backgroundColor = "#ffffff"; };
		PopupMenuTable.onclick      = function() { activeEditor.CommandAction(Action, thisItem); activeEditor.PopupMenu.Hide(); };

		var PopupMenuItem = PopupMenuTable.insertRow(-1).insertCell(-1);
		PopupMenuItem.setAttribute("align", "center");
		PopupMenuItem.unselectable = "on";
		PopupMenuItem.innerHTML    = thisName;
	}

	/* 
	++ ¿¡µðÅÍ »ö ¼±ÅÃ ¼³Á¤ ++
	*/
        HABYeditor.prototype.ShowSelectColor = function (thisObj, Action)
	{
		if(document.getElementById(this.editorObjId + "_cmd" + Action) && document.getElementById(this.editorObjId + "_cmd" + Action).disabled)
		{
			return;
		}

		var activeEditor = this;

		if(this.PopupMenu)
		{
			this.PopupMenu.Hide();
		}

		var colorObj = this.config.BasicColor["Default"];
		var colorAct = Action;

		if(Action == "BackColor")
		{
			 colorAct = (isMSIE) ? Action : "Hilitecolor";
		}

		var existColor = GetHexColor(this.editorDoc.queryCommandValue(colorAct));

		this.PopupMenu = new CreatePopup();

		this.PopupMenuDiv = this.PopupMenu.Doc.createElement("DIV");
		this.PopupMenuDiv.setAttribute("align", "center");
		this.PopupMenuDiv.unselectable          = "on";
		this.PopupMenuDiv.id                    = this.editorObjId + "_lstColorItem";
		this.PopupMenuDiv.style.width           = "160px";
		this.PopupMenuDiv.style.padding         = "2 2 2 2";
		this.PopupMenuDiv.style.border          = "#666666 1px solid";
		this.PopupMenuDiv.style.backgroundColor = "#f9f8f7";
		this.PopupMenuDiv.style.position        = "absolute";
		this.PopupMenuDiv.ondragstart           = function () { return false; };
		this.PopupMenuDiv.onselectstart         = function () { return false; };
		this.PopupMenuDiv.oncontextmenu         = function () { return false; };

			var basicTable = this.PopupMenuDiv.appendChild(this.PopupMenu.Doc.createElement("TABLE"));
			basicTable.setAttribute("border", "0");
			basicTable.setAttribute("cellPadding", "0");
			basicTable.setAttribute("cellSpacing", "0");
			basicTable.unselectable = "on";
			basicTable.style.width  = "152px";
			basicTable.style.height = "20px";
			basicTable.className    = "defaultSelectColor";
			basicTable.onmouseover  = function() { this.className = "overSelectColor"; };
			basicTable.onmouseout   = function() { this.className = "defaultSelectColor"; };
			basicTable.onclick      = function() { activeEditor.CommandAction(Action, existColor); activeEditor.PopupMenu.Hide(); };

			var basicColor    = basicTable.insertRow(-1);
			var basicColorImg = basicColor.insertCell(-1);
			basicColorImg.setAttribute("align", "center");
			basicColorImg.unselectable = "on";
			basicColorImg.style.width  = "19px";
			basicColorImg.style.height = "20px";
			basicColorImg.innerHTML    = "<img src=\"" + this.config.IconsPath + "colorline12.gif\" width=\"12\" height=\"12\" align=\"absmiddle\" style=\"background-color:#" + existColor + ";\">";

			var basicColorTxt = basicColor.insertCell(-1);
			basicColorTxt.setAttribute("align", "center");
			basicColorTxt.unselectable = "on";
			basicColorTxt.style.width  = "133px";
			basicColorTxt.style.height = "20px";
			basicColorTxt.innerHTML    = "±âº» »ö";

			var colorTable = this.PopupMenuDiv.appendChild(this.PopupMenu.Doc.createElement("TABLE"));
			colorTable.setAttribute("border", "0");
			colorTable.setAttribute("align", "center");
			colorTable.setAttribute("cellPadding", "0");
			colorTable.setAttribute("cellSpacing", "0");
			colorTable.unselectable = "on";
			colorTable.style.width  = "152px";

			for(var i = 0; i < colorObj.length; i++)
			{
				var selectColor  = colorTable.insertRow(-1);

				for(var j = 0; j < colorObj[0].length; j++)
				{
					this.ColorItem(selectColor, String(Action), String(colorObj[i][j]), i);
				}
			}

			var moreTable = this.PopupMenuDiv.appendChild(this.PopupMenu.Doc.createElement("TABLE"));
			moreTable.setAttribute("border", "0");
			moreTable.setAttribute("cellPadding", "0");
			moreTable.setAttribute("cellSpacing", "0");
			moreTable.unselectable = "on";
			moreTable.style.width  = "152px";
			moreTable.style.height = "20px";
			moreTable.className    = "defaultSelectColor";
			moreTable.onmouseover  = function() { this.className = "overSelectColor"; };
			moreTable.onmouseout   = function() { this.className = "defaultSelectColor"; };
			moreTable.onclick      = function() { activeEditor.CommandAction(Action, ""); activeEditor.PopupMenu.Hide(); };

			var moreColor = moreTable.insertRow(-1).insertCell(-1);
			moreColor.setAttribute("align", "center");
			moreColor.unselectable = "on";
			moreColor.style.width  = "152px";
			moreColor.style.height = "20px";
			moreColor.innerHTML    = "´Ù¸¥ »ö..";

		this.PopupMenu.Body.appendChild(this.PopupMenuDiv);

		if(isMSIE)	/* IE      */
		{
			var menuY = thisObj.offsetHeight;

			this.PopupMenu.Panel.document.createStyleSheet(this.config.StylePath + this.config.MainStyle);

			this.PopupMenu.Show(0, menuY, 160, 150, thisObj);
		}
		else		/* FireFox */
		{
			var menuX = PopupPosition(thisObj, 1);
			var menuY = PopupPosition(thisObj, 0) + thisObj.offsetHeight;

			this.PopupMenu.Show(menuX, menuY);

			document.body.appendChild(this.PopupMenu.Panel);
		}
	}

        HABYeditor.prototype.ColorItem = function (parentElement, Action, thisItem, thisNum)
	{
		var activeEditor = this;

		var selectColorItem = parentElement.insertCell(-1);
		selectColorItem.setAttribute("align", "center");
		selectColorItem.unselectable = "on";
		selectColorItem.style.height = "20px";
		selectColorItem.className    = "defaultSelectColor";
		selectColorItem.onmouseover  = function() { this.className = "overSelectColor"; };
		selectColorItem.onmouseout   = function() { this.className = "defaultSelectColor"; };
		selectColorItem.onclick      = function() { activeEditor.CommandAction(Action, thisItem); activeEditor.PopupMenu.Hide(); };
		selectColorItem.innerHTML    = "<img src=\"" + this.config.IconsPath + "colorline12.gif\" width=\"12\" height=\"12\" align=\"absmiddle\" style=\"background-color:#" + thisItem + ";\">";
	}


	/* 
	++ ¿¡µðÅÍ Å×ÀÌºí ¸Þ´º ++
	*/
        HABYeditor.prototype.ShowTableSet = function (thisObj, Action)
	{
		if(document.getElementById(this.editorObjId + "_cmd" + Action) && document.getElementById(this.editorObjId + "_cmd" + Action).disabled)
		{
			return;
		}

		var activeEditor = this;
		var selectObj    = this.GetSelectedElement();

		if(this.PopupMenu)
		{
			this.PopupMenu.Hide();
		}

		this.PopupMenu = new CreatePopup();

		this.PopupMenuDiv = this.PopupMenu.Doc.createElement("DIV");
		this.PopupMenuDiv.setAttribute("align", "center");
		this.PopupMenuDiv.unselectable          = "on";
		this.PopupMenuDiv.id                    = this.editorObjId + "_lstPopupMenu";
		this.PopupMenuDiv.style.width           = "120px";
		this.PopupMenuDiv.style.padding         = "1 1 1 1";
		this.PopupMenuDiv.style.border          = "#555555 1px solid";
		this.PopupMenuDiv.style.backgroundImage = "url('" + this.config.IconsPath + "/cmenu_bar.gif')";
		this.PopupMenuDiv.ondragstart           = function () { return false; };
		this.PopupMenuDiv.onselectstart         = function () { return false; };
		this.PopupMenuDiv.oncontextmenu         = function () { return false; };

		if(selectObj.tagName != "TABLE")
		{
			this.ContextMenuItem("InsertTable", "Ç¥ ¸¸µé±â", true, false, false, true, false, false, true);
		}

		if((this.GetExistTag("TABLE") || selectObj.tagName == "TABLE"))
		{
			if((this.GetExistTag("TD") || selectObj.tagName == "TD"))
			{
				this.ContextMenuItem("", "", null, null, true, false, false, false, true);
				this.ContextMenuItem("SetCell", "Cell .. ", null, true, false, true, false, true, false);
				this.ContextMenuItem("", "", null, null, true, false, false, false, true);
				this.ContextMenuItem("SetRow", "Row .. ", null, true, false, true, false, true, false);
				this.ContextMenuItem("", "", null, null, true, false, false, false, true);
				this.ContextMenuItem("SetColumn", "Column ..", null, true, false, true, false, true, false);
				this.ContextMenuItem("", "", null, null, true, false, false, false, true);
			}

			this.ContextMenuItem("DeleteTable", "Ç¥ »èÁ¦", null, true, false, true, false, false, true);
			this.ContextMenuItem("ModifyTable", "Ç¥ ¼Ó¼º", true, true, false, true, false, false, true);
		}

		this.PopupMenu.Body.appendChild(this.PopupMenuDiv);

		if(isMSIE)	/* IE      */
		{
			this.PopupMenu.Panel.document.createStyleSheet(this.config.StylePath + this.config.MainStyle);

			this.PopupMenu.Load(0, 0, 0, 0);

			var menuY = thisObj.offsetHeight;
			var menuW = this.PopupMenuDiv.offsetWidth;
			var menuH = this.PopupMenuDiv.offsetHeight;

			this.PopupMenu.Show(0, menuY, menuW, menuH, thisObj);
		}
		else		/* FireFox */
		{
			var menuX = PopupPosition(thisObj, 1);
			var menuY = PopupPosition(thisObj, 0) + thisObj.offsetHeight;

			this.PopupMenu.Show(menuX, menuY);

			document.body.appendChild(this.PopupMenu.Panel);
		}
	}

	/* 
	++ ¿¡µðÅÍ ÆË¾÷ ¸Þ´º »ý¼º ++
	*/
        HABYeditor.prototype.ShowContextMenu = function (e)
	{
		var activeEditor = this;
		var selectObj    = this.GetSelectedElement();

		this.PopupMenu = new CreatePopup();

		this.PopupMenuDiv = this.PopupMenu.Doc.createElement("DIV");
		this.PopupMenuDiv.setAttribute("align", "center");
		this.PopupMenuDiv.unselectable          = "on";
		this.PopupMenuDiv.id                    = this.editorObjId + "_lstPopupMenu";
		this.PopupMenuDiv.style.width           = "120px";
		this.PopupMenuDiv.style.padding         = "1 1 1 1";
		this.PopupMenuDiv.style.border          = "#555555 1px solid";
		this.PopupMenuDiv.style.backgroundImage = "url('" + this.config.IconsPath + "/cmenu_bar.gif')";
		this.PopupMenuDiv.ondragstart           = function () { return false; };
		this.PopupMenuDiv.onselectstart         = function () { return false; };
		this.PopupMenuDiv.oncontextmenu         = function () { return false; };

		for(var i = 0; i < this.config.ContextMenu.length; i++)
		{
			var menuObj  = this.config.ContextMenu[i];
			var menuLine = false;

			for(var j = 0; j < menuObj.length; j++)
			{
				if(this.editorDoc.queryCommandEnabled(menuObj[j]) && i > 0)
				{
					menuLine = true;
					break;
				}
			}

			if(menuLine)
			{
				this.ContextMenuItem("", "", null, null, true, false, false, false, true);
			}

			for(var j = 0; j < menuObj.length; j++)
			{
				var menuItem   = menuObj[j];
				var menuName   = (ContextMenu[menuItem]) ? ContextMenu[menuItem] : menuItem;

				var enableItem = this.editorDoc.queryCommandEnabled(menuItem);

				if(!isMSIE)	/* FireFox */
				{
					if(!this.GetExistTag("A") && selectObj.tagName != "A" && menuItem == "UnLink")
					{
						enableItem = false;
					}
				}

				if(enableItem || i == 0)
				{
					if(selectObj)
					{
						if((this.GetExistTag("IMG") || selectObj.tagName == "IMG")&& menuName == "±×¸² »ðÀÔ")
						{
							menuName = "±×¸² ¼Ó¼º";
						}
						if((this.GetExistTag("A") || selectObj.tagName == "A") && menuName == "¸µÅ© »ðÀÔ")
						{
							menuName = "¸µÅ© ¼Ó¼º";
						}
					}

					this.ContextMenuItem(String(menuItem), String(menuName), true, null, false, enableItem, false, false, true);
				}
			}
		}

		if((this.GetExistTag("TABLE") || selectObj.tagName == "TABLE"))
		{
			if((this.GetExistTag("TD") || selectObj.tagName == "TD"))
			{
				this.ContextMenuItem("", "", null, null, true, false, false, false, true);
				this.ContextMenuItem("SetCell", "Cell .. ", null, true, false, true, false, true, false);
				this.ContextMenuItem("", "", null, null, true, false, false, false, true);
				this.ContextMenuItem("SetRow", "Row .. ", null, true, false, true, false, true, false);
				this.ContextMenuItem("", "", null, null, true, false, false, false, true);
				this.ContextMenuItem("SetColumn", "Column ..", null, true, false, true, false, true, false);
			}

			this.ContextMenuItem("", "", null, null, true, false, false, false, true);
			this.ContextMenuItem("DeleteTable", "Ç¥ »èÁ¦", null, true, false, true, false, false, true);
			this.ContextMenuItem("ModifyTable", "Ç¥ ¼Ó¼º", true, true, false, true, false, false, true);
		}


		this.PopupMenu.Body.appendChild(this.PopupMenuDiv);

		if(isMSIE)	/* IE      */
		{
			var menuX = this.menuX = this.editorHtm.contentWindow.event.screenX;
			var menuY = this.menuY = this.editorHtm.contentWindow.event.screenY;

			this.PopupMenu.Panel.document.createStyleSheet(this.config.StylePath + this.config.MainStyle);

			this.PopupMenu.Load(menuX, menuY)

			var menuW = this.PopupMenuDiv.offsetWidth;
			var menuH = this.PopupMenuDiv.offsetHeight;

			this.PopupMenu.Show(menuX, menuY, menuW, menuH);
		}
		else		/* FireFox */
		{
			var screenW = parseInt(document.body.clientWidth);
			var screenH = parseInt(document.body.clientHeight);

			var menuX   = parseInt(e.clientX + PopupPosition(this.editorHtm, 1));
			var menuY   = parseInt(e.clientY + PopupPosition(this.editorHtm, 0));

			this.PopupMenu.Load(0, 0);

			document.body.appendChild(this.PopupMenu.Panel);

			var menuW   = parseInt(this.PopupMenuDiv.offsetWidth);
			var menuH   = parseInt(this.PopupMenuDiv.offsetHeight);

			if(screenW < menuX + menuW)
			{
				menuX = screenW - menuW;
			}
			if(screenH < menuY + menuH)
			{
				menuY = screenH - menuH;
			}

			this.PopupMenu.Show(menuX, menuY);
		}
	}

	/* 
	++ ¿¡µðÅÍ ÆË¾÷ ÇÏÀ§¸Þ´º »ý¼º ++
	*/
        HABYeditor.prototype.ShowContextSubMenu = function (thisObj, thisIndex)
	{
		var activeEditor = this;

		if(isMSIE)	/* IE      */
		{
			this.PopupSubMenu = new CreatePopup(this.PopupMenu.Panel);

			var activeDoc     = this.PopupSubMenu.Doc;
		}
		else		/* FireFox */
		{
			if(this.PopupSubMenuDiv)
			{
				this.PopupSubMenuDiv.style.display = "none";

				this.PopupSubMenuDiv = null;
			}

			var activeDoc = this.PopupMenu.Doc;
		}

		this.PopupSubMenuDiv = activeDoc.createElement("DIV");
		this.PopupSubMenuDiv.setAttribute("align", "center");
		this.PopupSubMenuDiv.unselectable          = "on";
		this.PopupSubMenuDiv.id                    = this.editorObjId + "_lstPopupSubMenu";
		this.PopupSubMenuDiv.style.width           = "120px";
		this.PopupSubMenuDiv.style.padding         = "1 1 1 1";
		this.PopupSubMenuDiv.style.border          = "#555555 1px solid";
		this.PopupSubMenuDiv.style.backgroundImage = "url('" + this.config.IconsPath + "/cmenu_bar.gif')";
		this.PopupSubMenuDiv.style.display         = "none";
		this.PopupSubMenuDiv.style.position        = "absolute";
		this.PopupSubMenuDiv.ondragstart           = function () { return false; };
		this.PopupSubMenuDiv.onselectstart         = function () { return false; };
		this.PopupSubMenuDiv.oncontextmenu         = function () { return false; };

		var smenuObj = this.config.SubContextMenu[thisIndex];

		for(var i = 0; i < smenuObj.length; i++)
		{
			var smenuItem = smenuObj[i];
			var smenuName = (ContextMenu[smenuItem]) ? ContextMenu[smenuItem] : smenuItem;

			if(smenuItem == "")
			{
				this.ContextMenuItem("", "", null, null, true, false, true, false, false);
			}
			else
			{
				this.ContextMenuItem(String(smenuItem), String(smenuName), true, null, false, true, true, false, false);
			}
		}

		var menuX = parseInt(this.PopupMenu.Doc.getElementById(thisObj).offsetLeft) + 117;
		var menuY = parseInt(this.PopupMenu.Doc.getElementById(thisObj).offsetTop);

		if(isMSIE)	/* IE      */
		{
			this.PopupSubMenuDiv.style.display = "";

			this.PopupSubMenu.Body.appendChild(this.PopupSubMenuDiv);

			this.PopupSubMenu.Panel.document.createStyleSheet(this.config.StylePath + this.config.MainStyle);

			this.PopupSubMenu.Load(117, 0, 0, 0, this.PopupMenu.Doc.getElementById(thisObj))

			var menuW = this.PopupSubMenuDiv.offsetWidth;
			var menuH = this.PopupSubMenuDiv.offsetHeight;

			this.PopupSubMenu.Show(117, 0, menuW, menuH, this.PopupMenu.Doc.getElementById(thisObj));
		}
		else		/* FireFox */
		{
			var screenW = parseInt(document.body.clientWidth);
			var screenH = parseInt(document.body.clientHeight);

			this.PopupSubMenuDiv.style.opacity = 0;
			this.PopupSubMenuDiv.style.left    = "0px";
			this.PopupSubMenuDiv.style.top     = "0px";
			this.PopupSubMenuDiv.style.display = "";

			this.PopupMenuDiv.appendChild(this.PopupSubMenuDiv);

			var mainX   = parseInt(this.PopupMenu.Panel.style.left);
			var mainY   = parseInt(this.PopupMenu.Panel.style.top);

			var menuW   = parseInt(this.PopupSubMenuDiv.offsetWidth);
			var menuH   = parseInt(this.PopupSubMenuDiv.offsetHeight);

			if(screenW < mainX + menuX + menuW)
			{
				menuX -= (mainX + menuX + menuW - screenW);
			}

			if(screenH < mainY + menuY + menuH)
			{
				menuY -= (mainY + menuY + menuH - screenH);
			}

			this.PopupSubMenuDiv.style.left    = menuX + "px";
			this.PopupSubMenuDiv.style.top     = menuY + "px";
			this.PopupSubMenuDiv.style.opacity = 1;
		}
	}

	/* 
	++ ¿¡µðÅÍ ÆË¾÷ ¸Þ´º ¾ÆÀÌÅÛ »ý¼º ++
	*/
        HABYeditor.prototype.ContextMenuItem = function (thisItem, thisName, thisIcon, thisOption, thisLine, enableItem, thisSubMenu, thisArrow, thisSubHide)
	{
		var activeEditor = this;

		var innerCss     = (enableItem) ? ""                 : "offPopupMenu";
		var overCss      = (enableItem) ? "overPopupMenu"    : "";
		var outCss       = (enableItem) ? "defaultPopupMenu" : "";
		var itemIcon     = (thisIcon)   ? thisItem           : "sp";
		var tableHeight  = (thisLine)   ? "3px"              : "22px";
		var oTime        = (isMSIE)     ? 0                  : 0;

		if(thisLine)
		{
			var innerImage = "<img src=\"" + this.config.IconsPath + "cmenu_sp.gif\" width=\"27\" height=\"3\" border=\"0\" align=\"absmiddle\">";
			var innerName  = "<img src=\"" + this.config.IconsPath + "cmenu_line.gif\" width=\"84\" height=\"3\" border=\"0\" align=\"absmiddle\">";
		}
		else
		{
			var innerImage = "<img id=\"" + this.editorObjId + "_icon" + thisItem + "\" src=\"" + this.config.IconsPath + itemIcon.toLowerCase() + ".gif\" align=\"absmiddle\" style=\"width: 21px; height: 20px; border: none;\" class=\"" + innerCss + "\">";
			var innerName  = "<span style=\"font-size: 9pt; font-family: tahoma, ±¼¸²; padding-left: 10px;\" class=\"" + innerCss + "\">" + thisName+ "</span>";
		}

		var innerArrow = (thisArrow) ? "<img src=\"" + this.config.IconsPath + "arrowright.gif\" align=\"absmiddle\" style=\"width: 5px; height: 20px; border: none;\">" : "";

		if(isMSIE && thisSubMenu)
		{
			var activeDoc = this.PopupSubMenu.Doc;
		}
		else
		{
			var activeDoc = this.PopupMenu.Doc;
		}

		var PopupMenuTable = activeDoc.createElement("TABLE");
		PopupMenuTable.setAttribute("border", "0");
		PopupMenuTable.setAttribute("align", "center");
		PopupMenuTable.setAttribute("cellPadding", "0");
		PopupMenuTable.setAttribute("cellSpacing", "0");
		PopupMenuTable.id           = this.editorObjId + "_cmitem" + thisItem;
		PopupMenuTable.unselectable = "on";
		PopupMenuTable.style.height = tableHeight;
		PopupMenuTable.classname    = outCss;
		PopupMenuTable.onmouseover  = function (e) {
			thisPopup = true;

			var activeObj = this;

			this.className = overCss;

			switch(thisItem)
			{
				case "SetCell" 		: setTimeout( function () { activeEditor.ShowContextSubMenu(activeObj.id, 0); }, oTime ); break;
				case "SetRow" 		: setTimeout( function () { activeEditor.ShowContextSubMenu(activeObj.id, 1); }, oTime ); break;
				case "SetColumn"	: setTimeout( function () { activeEditor.ShowContextSubMenu(activeObj.id, 2); }, oTime ); break;
			}
		};

		PopupMenuTable.onmouseout   = function (e) {
			thisPopup = false;

			this.className = outCss;

			if(thisSubHide)
			{
				if(isMSIE)	/* IE      */
				{
					if(activeEditor.PopupSubMenu)
					{
						activeEditor.PopupSubMenu.Hide();
					}
				}
				else		/* FireFox */
				{
					if(activeEditor.PopupSubMenuDiv)
					{
						activeEditor.PopupSubMenuDiv.style.display = "none";

						activeEditor.PopupSubMenuDiv = null;
					}
				}
			}
		};

		PopupMenuTable.onclick      = function (e) {
			var activeObj = this;

			switch(thisItem)
			{
				case "SetCell" 		: setTimeout( function () { activeEditor.ShowContextSubMenu(activeObj.id, 0); }, oTime ); break;
				case "SetRow" 		: setTimeout( function () { activeEditor.ShowContextSubMenu(activeObj.id, 1); }, oTime ); break;
				case "SetColumn"	: setTimeout( function () { activeEditor.ShowContextSubMenu(activeObj.id, 2); }, oTime ); break;
				default			: activeEditor.CommandAction(thisItem, thisOption); activeEditor.PopupMenu.Hide();  break;
			}
		};

		var PopupMenuItem    = PopupMenuTable.insertRow(-1);
		var PopupMenuItemImg = PopupMenuItem.insertCell(-1);
		PopupMenuItemImg.setAttribute("align", "center");
		PopupMenuItemImg.unselectable = "on";
		PopupMenuItemImg.style.width  = "28px";
		PopupMenuItemImg.innerHTML    = innerImage;

		var PopupMenuItemTxt = PopupMenuItem.insertCell(-1);
		PopupMenuItemTxt.setAttribute("align", "left");
		PopupMenuItemTxt.unselectable = "on";
		PopupMenuItemTxt.style.width  = "90px";
		PopupMenuItemTxt.innerHTML    = innerName;

		var PopupMenuItemSub = PopupMenuItem.insertCell(-1);
		PopupMenuItemSub.setAttribute("align", "left");
		PopupMenuItemSub.unselectable = "on";
		PopupMenuItemSub.style.width  = "10px";
		PopupMenuItemSub.innerHTML    = innerArrow;

		if(thisSubMenu)
		{
			this.PopupSubMenuDiv.appendChild(PopupMenuTable);
		}
		else
		{
			this.PopupMenuDiv.appendChild(PopupMenuTable);
		}
		
	}

	/*
	++ Html ³»¿ë »ðÀÔ ++
	*/
        HABYeditor.prototype.InsertHtml = function (Html, Delete)
	{
		if(this.GetSelectedType() == "Control")
		{
			if(Delete == 1)
			{
				this.editorDoc.selection.clear();
			}
		}

		EditorFocus(this.editorHtm, this.editorTxt, this.config.HtmlMode);

		var selectObj = this.GetSelectedElement();

		selectObj.pasteHTML(Html);
		selectObj.select();
	}


	/*
	++ ¿¡µðÅÍ ÀÌº¥Æ® Çîµé·¯ ++
	*/
        HABYeditor.prototype.EventHandlers = function ()
	{
		var activeEditor = this;

		var onKeyUp = function (e)
		{
			activeEditor.config.IsActive = true;

			if(activeEditor.config.HtmlMode == true)
			{
			 	activeEditor.EventAction(e);
			}
		}

		var onKeyDown = function (e)
		{
			if(activeEditor.PopupMenu)
			{
				activeEditor.PopupMenu.Hide();
			}
		}

		var onKeyPress = function (e)
		{
			if(isMSIE && activeEditor.config.ReplaceEnter)
			{ 
				var isAlt    = activeEditor.editorHtm.contentWindow.event.altKey;
				var isCtrl   = activeEditor.editorHtm.contentWindow.event.ctrlKey;
				var isShift  = activeEditor.editorHtm.contentWindow.event.shiftKey;
				var isOList  = activeEditor.editorDoc.queryCommandState("InsertOrderedList");
				var isUList  = activeEditor.editorDoc.queryCommandState("InsertUnorderedList");

				var eKeyCode = activeEditor.editorHtm.contentWindow.event.keyCode;
	
				if(eKeyCode == 13 && !isAlt && !isCtrl && !isShift && !isOList && !isUList)
				{ 
					activeEditor.InsertHtml("<BR>", 0);
					activeEditor.InsertHtml("<NOBR>", 0);

					return false;
				}
			}
		}

		var onMouseUp = function (e)
		{
			activeEditor.config.IsActive = true;

			if(activeEditor.config.HtmlMode == true)
			{
				activeEditor.UpdateToolbar();
			}
		}

		var onblur = function (e)
		{
			activeEditor.RecordValue("Update");

			activeEditor.config.IsActive = false;
		}

		var onFocus = function (e)
		{
			activeEditor.config.IsActive = true;

			if(!isMSIE && activeEditor.PopupMenu)	/* FireFox */
			{
				activeEditor.PopupMenu.GeckoHide();
			}
		}

		var onClick = function (e)
		{
			activeEditor.RecordValue("Update");

			if(!isMSIE && activeEditor.PopupMenu)	/* FireFox */
			{
				activeEditor.PopupMenu.GeckoHide();
			}
		}

		var onContextMenu = function (e)
		{
			if(activeEditor.config.HtmlMode == true)
			{
				if(activeEditor.PopupMenu)
				{
					activeEditor.PopupMenu.Hide();
				}

				EditorFocus(activeEditor.editorHtm, activeEditor.editorTxt, activeEditor.config.HtmlMode);

				activeEditor.ShowContextMenu(e);

				if(isMSIE)	/* IE      */
				{
					return false;
				}
				else		/* FireFox */
				{
					e.preventDefault();
				}
			}
		}

		AddEventListener(document, "click", onClick);
		AddEventListener(this.editorTxt, "keyup", onKeyUp);
		AddEventListener(this.editorTxt, "keydown", onKeyDown);
		AddEventListener(this.editorTxt, "mouseup", onMouseUp);
		AddEventListener(this.editorDoc, "keyup", onKeyUp);
		AddEventListener(this.editorDoc, "keydown", onKeyDown);
		AddEventListener(this.editorDoc, "keypress", onKeyPress);
		AddEventListener(this.editorDoc, "mouseup", onMouseUp);
		AddEventListener(this.editorDoc, "contextmenu", onContextMenu);
		AddEventListener(this.editorDoc, "blur", onblur);
		AddEventListener(this.editorDoc, "focus", onFocus);

		if(isMSIE) /* IE      */
		{
			AddEventListener(this.editorHtm, "blur", onblur);
			AddEventListener(this.editorHtm, "focus", onFocus);
		}

		if(!isMSIE && this.oForm)
		{
			AddEventListener(this.oForm, "submit", onClick);
		}
	}


	/*
	++ ¼±ÅÃ Å¸ÀÔ ++
	*/
        HABYeditor.prototype.GetSelectedType = function ()
	{
		if(isMSIE)	/* IE      */
		{
			return this.editorDoc.selection.type;
		}
		else 		/* FireFox */
		{
			var selectType = "Text";

			try
			{
				var selectObj = this.editorHtm.contentWindow.getSelection();
			}
			catch(e)
			{
				return selectType;
			}

			if(selectObj && selectObj.rangeCount == 1)
			{
				var selectRange = selectObj.getRangeAt(0);

				if (selectRange.startContainer == selectRange.endContainer && (selectRange.endOffset - selectRange.startOffset) == 1 && selectRange.startContainer.nodeType != Node.TEXT_NODE )
					selectType = "Control";
			}

			return selectType;
		}
	}


	/*
	++ ³ëµå ¼±ÅÃ ++
	*/
        HABYeditor.prototype.SelectNode = function (thisNode)
	{
		EditorFocus(this.editorHtm, this.editorTxt, this.config.HtmlMode);

		if(isMSIE)
		{
			this.editorDoc.selection.empty() ;

			try
			{
				var selectObj = this.editorDoc.body.createControlRange();
				selectObj.addElement(thisNode);
			}
			catch(e)
			{
				var selectObj = this.editorDoc.selection.createRange();
				selectObj.moveToElementText(thisNode);
			}

			selectObj.select() ;
		}
		else
		{
			var selectNode = this.editorDoc.createRange();
			selectNode.selectNode(thisNode);

			var selectObj = this.editorHtm.contentWindow.getSelection();
			selectObj.removeAllRanges();
			selectObj.addRange(selectNode);
		}

		this.UpdateStatebar();
	}


	/*
	++ ¼±ÅÃ ±¸¼º Á¤·Ä ++
	*/
        HABYeditor.prototype.GetSelectedElement = function ()
	{
		if(isMSIE)	/* IE      */
		{
			var selectObj =  this.editorDoc.selection.createRange();

			if(this.GetSelectedType() == "Control")
			{
				if(selectObj.item)
				{
					return selectObj.item(0);
				}
			}
			else
			{
				return selectObj;
			}

		}
		else 		/* FireFox */
		{
			var selectObj = this.editorHtm.contentWindow.getSelection();

			if(this.GetSelectedType() == "Control")
			{
				return selectObj.anchorNode.childNodes[selectObj.anchorOffset];
			}
			else
			{
				return selectObj;
			}
		}
	}


	/*
	++ ¼±ÅÃ Å×±× °Ë»ç ++
	*/
        HABYeditor.prototype.GetExistTag = function (tagName, tagReverse)
	{
		var selectObj = null, selectTag = null, chkTag = null;

		if(isMSIE)	/* IE      */
		{
			selectObj = this.editorDoc.selection.createRange();

			if(selectObj)
			{
				if(this.GetSelectedType() == "Control")
				{
					for(var i = 0; i < selectObj.length; i++ )
					{
						if(selectObj(i).parentNode)
						{
							selectTag = selectObj(i).parentNode;
							break;
						}
					}
				}
				else
				{
					selectTag = selectObj.parentElement();
				}
			}
		}
		else 		/* FireFox */
		{
			if(this.editorHtm.contentWindow.getSelection())
			{
				selectObj = this.editorHtm.contentWindow.getSelection().getRangeAt(0);
			}

			if(selectObj)
			{
				selectTag = selectObj.commonAncestorContainer;

				if(!selectTag.collapsed && selectTag.startContainer == selectTag.endContainer && selectTag.startOffset - selectTag.endOffset <= 1 && selectTag.startContainer.hasChildNodes())
				{
					selectTag = selectObj.startContainer.childNodes[selectObj.startOffset];
				}
			}
		}

		if(tagReverse && this.GetSelectedElement().tagName && this.GetSelectedElement().tagName != "HTML" && this.GetSelectedElement().tagName != "NOBR")
		{
			this.UseTags.push(this.GetSelectedElement());
		}

		while(selectTag)
		{
			if(tagReverse && selectTag.tagName && selectTag.tagName != "HTML" && selectTag.tagName != "NOBR")
			{
				this.UseTags.push(selectTag);
			}

			if(selectTag.tagName == tagName)
			{
				chkTag = selectTag;
				break;
			}

			selectTag = selectTag.parentNode;
		}

		return chkTag;
	}

	/*
	++ ¼Ò½º º¸±â ++
	*/
        HABYeditor.prototype.SourceView = function ()
	{
		var activeEditor = this;

		this.DisabledButton(this.config.HtmlMode);

		if(this.config.HtmlMode == true)
		{
			var sourceHtml = GetIMGtoEMBED(this.editorDoc, this.config.IconsPath).replace(/<NOBR><\/NOBR>/g, "");

			if(isMSIE)	/* IE      */
			{
				if(this.config.EnableXHTML == true) sourceHtml = GetSourceCode(sourceHtml.replace(/\r\n/g, ""));
			}

			var tmpContent = sourceHtml.toLowerCase().replace(/(^\s*)|(\s*$)/g,'');

			if(tmpContent == "<br>" || tmpContent == "<div></div>" || tmpContent == "<p>&nbsp;</p>" || tmpContent == "<div>&nbsp;</div>")
			{
				sourceHtml = "";
			}

			this.editorTxt.value = sourceHtml;

			this.editorHtm.style.display = "none";
			this.editorTxt.style.display = "";

			this.config.HtmlMode = false;
		}
		else
		{
			var sourceText = this.editorTxt.value;

			this.editorDoc.body.innerHTML = sourceText;

			GetEMBEDtoIMG(this.editorDoc, this.config.IconsPath);

			this.editorHtm.style.display = "";
			this.editorTxt.style.display = "none";

			this.config.HtmlMode = true;
		}

		setTimeout(function() { EditorFocus(activeEditor.editorHtm, activeEditor.editorTxt, activeEditor.config.HtmlMode); }, 0);
	}


	/*
	++ ¹Ì¸® º¸±â ++
	*/
        HABYeditor.prototype.PreView = function ()
	{
		var screenWidth  = screen.width * 0.7;
		var screenHeight = screen.height * 0.7;
		var screenLeft   = (screen.width - screenWidth) / 2
		var screenTop    = 15;

		var winPopup = window.open("", "view", "left=" + screenLeft + ",top=" + screenTop + ",width=" + screenWidth + ",height=" + screenHeight + ",toolbar=yes,menubar=yes,status=yes,scrollbars=yes,resizable=yes");

		var viewSource;
		var viewPad;

		if(this.config.HtmlMode == true)
		{
			viewSource = GetIMGtoEMBED(this.editorDoc, this.config.IconsPath).replace(/<NOBR><\/NOBR>/g, "");

			if(isMSIE)	/* IE      */
			{
				if(this.config.EnableXHTML == true) viewSource = GetSourceCode(viewSource.replace(/\r\n/g, ""));
			}

			viewSource = viewSource;
		}
		else
		{
			viewSource = this.editorTxt.value;
		}

		viewPad  = "<html>\n";
		viewPad += "<head>\n";
		viewPad += "<meta content=\"HABYEditor 0.5\" name=\"generator\">\n";
		viewPad += "<title>¹Ì¸®º¸±â</title>\n";
		viewPad += "<link rel=\"stylesheet\" href=\"" + this.config.StylePath + this.config.MainStyle + "\">\n";
		viewPad += "</head>\n";
		viewPad += "<body>\n";
		viewPad += "" + viewSource + "\n";
		viewPad += "</body>\n";
		viewPad += "</html>\n";
	
		winPopup.document.write(viewPad);
		winPopup.document.close();

		winPopup.focus();
	}


	/*
	++ FullScreen º¸±â ++
	*/
        HABYeditor.prototype.FullScreen = function ()
	{
		this.editorToolbars.innerHTML = "";

		if(this.config.FullScreen)
		{
			this.editorTable.style.position = "";
			this.editorTable.style.left     = 0;
			this.editorTable.style.top      = 0;
			this.editorTable.style.width    = this.config.Width;
			this.editorTable.style.height   = this.config.Height;

			this.config.FullScreen          = false;

			this.MakeToolbars();
		}
		else
		{
			this.editorTable.style.position = "absolute";
			this.editorTable.style.left     = 0;
			this.editorTable.style.top      = 0;
			this.editorTable.style.width    = document.body.clientWidth;
			this.editorTable.style.height   = document.body.clientHeight;

			this.MakeToolbars();

			this.config.FullScreen          = true;
		}

		this.DisabledButton(!this.config.HtmlMode);
		this.UpdateToolbar();

		EditorFocus(this.editorHtm, this.editorTxt, this.config.HtmlMode);
	}

	/*
	++ ¸Þ´º ¹öÆ° È°¼ºº¯°æ ++
	*/
        HABYeditor.prototype.DisabledButton = function (Disabled)
	{
		for(i = 0; i < this.config.DisableButton.length; i++)
		{
			if(document.getElementById(this.editorObjId + "_cmd" + this.config.DisableButton[i]))
			{
				var buttonObj = document.getElementById(this.editorObjId + "_cmd" + this.config.DisableButton[i]);

				buttonObj.className = (Disabled) ? "offButton" : "defaultButton";
				buttonObj.disabled  = Disabled;

				if(document.getElementById(this.editorObjId + "_input" + this.config.DisableButton[i]))
				{
					document.getElementById(this.editorObjId + "_input" + this.config.DisableButton[i]).className = (Disabled) ? "offButtonInput" : "defaultButtonInput";
				}
			}
		}
	}

	/*
	++ ¸Þ´º ¹öÆ° ¾÷µ¥ÀÌÆ® ++
	*/
        HABYeditor.prototype.UpdateToolbar = function (Action)
	{
		if(Action)
		{
			if(InArrayString(this.config.EnableButton, Action) > -1)
			{
				var UpTools = [Action];
			}
			else
			{
				var UpTools = ["Undo", "Redo"];
			}
		}
		else
		{
			var UpTools = this.config.EnableButton;
		}

		for(var i = 0; i < UpTools.length; i++)
		{
			if(this.config.HtmlMode == true)
			{
				if(UpTools[i] == "FontName" || UpTools[i] == "FontSize" || UpTools[i] == "FontFormat")
				{
					var buttonObj  = document.getElementById(this.editorObjId + "_input" + UpTools[i]);
				}
				else
				{
					var buttonObj  = document.getElementById(this.editorObjId + "_cmd" + UpTools[i]);
				}

				if(buttonObj)
				{
					if(UpTools[i] == "FullScreen")
					{
						if(this.config.FullScreen)
						{
							if(buttonObj.className != "onButton") buttonObj.className = "onButton";
						}
						else
						{
							if(buttonObj.className != "defaultButton") buttonObj.className = "defaultButton";
						}
					}
					else if(UpTools[i] == "Undo" || UpTools[i] == "Redo")
					{
						if(UpTools[i] == "Undo")
						{
							if(this.config.RqueueIndex > 0)
							{
								buttonObj.disabled = false;

								if(buttonObj.className != "defaultButton") buttonObj.className = "defaultButton";
							}
							else
							{
								buttonObj.disabled = true;

								if(buttonObj.className != "offButton") buttonObj.className = "offButton";
							}
						}
						else
						{
							if(this.config.RqueueIndex < (this.config.Rqueues.length - 1))
							{
								buttonObj.disabled = false;

								if(buttonObj.className != "defaultButton") buttonObj.className = "defaultButton";
							}
							else
							{
								buttonObj.disabled = true;

								if(buttonObj.className != "offButton") buttonObj.className = "offButton";
							}
						}
					}
					else if(UpTools[i] == "Absolute")
					{
						if(this.GetSelectedType() == "Control")
						{
							buttonObj.disabled = false;

							if(buttonObj.className != "defaultButton") buttonObj.className = "defaultButton";
						}
						else
						{
							buttonObj.disabled = true;

							if(buttonObj.className != "offButton") buttonObj.className = "offButton";
						}
					}
					else if(UpTools[i] == "Forward" || UpTools[i] == "Backward")
					{

						if(this.GetSelectedType() == "Control" && this.GetSelectedElement().style.position == "absolute")
						{
							buttonObj.disabled = false;

							if(buttonObj.className != "defaultButton") buttonObj.className = "defaultButton";
						}
						else
						{
							buttonObj.disabled = true;

							if(buttonObj.className != "offButton") buttonObj.className = "offButton";
						}
					}
					else if(UpTools[i] == "FontName" || UpTools[i] == "FontSize" || UpTools[i] == "FontFormat")
					{
						var fontObj = (UpTools[i] == "FontSize") ? this.config.FontSize : (UpTools[i] == "FontName") ? this.config.FontName : this.config.FontFormat;

						try
						{
							var fontVAL = this.editorDoc.queryCommandValue(UpTools[i]);
						}
						catch(e)
						{
							var fontVAL = null;
						}

						if(fontVAL == null && UpTools[i] != "FontFormat")
						{
							buttonObj.value = (UpTools[i] == "FontSize") ? "Size" : (UpTools[i] == "FontName") ? "Font" : "Format";
						}
						else
						{
							var onValue = "";
							var onFound = false;

							for(j = 0; j < fontObj.length; j++)
							{
								if(UpTools[i] == "FontName")
								{
									if(fontObj[j].toLowerCase() == fontVAL.toLowerCase())
									{
										onValue = (FontList[fontObj[j]]) ? FontList[fontObj[j]] : fontObj[j];;
										onFound = true;
										break;
									}
								}
								else if(UpTools[i] == "FontFormat")
								{
									if(this.GetExistTag(fontObj[j].toUpperCase()))
									{
										onValue = (FontList[fontObj[j]]) ? FontList[fontObj[j]] : fontObj[j];;
										onFound = true;
										break;
									}
								}
								else
								{
									if(fontVAL == fontObj[j])
									{
										onValue = (FontList[fontObj[j]]) ? FontList[fontObj[j]] : fontObj[j];
										onFound = true;
										break;
									}
								}
							}

							if(onFound)
							{
								buttonObj.value = onValue;
							}
							else
							{
								buttonObj.value = (UpTools[i] == "FontSize") ? "Size" : (UpTools[i] == "FontName") ? "Font" : "Format";
							}
						}
					}
					else if(UpTools[i] == "ForeColor" || UpTools[i] == "BackColor")
					{
						if(document.getElementById(this.editorObjId + "_clr" + UpTools[i]))
						{
							var colorObj = document.getElementById(this.editorObjId + "_clr" + UpTools[i]);
							var colorAct = UpTools[i];

							if(UpTools[i] == "BackColor")
							{
								colorAct = (isMSIE) ? UpTools[i] : "Hilitecolor";
							}

							try
							{
								var existColor = GetHexColor(this.editorDoc.queryCommandValue(colorAct));
							}
							catch(e)
							{
								if(colorAct == "ForeColor")
									var existColor = "000000";
								else
									var existColor = "ffffff";
							}

							if(existColor) colorObj.style.backgroundColor = "#" + existColor;
						}
					}
					else
					{
						try
						{
							var btnState = this.editorDoc.queryCommandState(UpTools[i]);
						}
						catch(e)
						{
							var btnState = false;
						}

						try
						{
							var btnEnable  = this.editorDoc.queryCommandEnabled(UpTools[i]);
						}
						catch(e)
						{
							var btnEnable = false;
						}

						if(Action == UpTools[i])
						{
							btnEnable = true;
						}

						if(btnEnable)
						{
							buttonObj.disabled = false;

							if(buttonObj.className != "defaultButton") buttonObj.className = "defaultButton";
						}
						else
						{
							buttonObj.disabled = true;

							if(buttonObj.className != "offButton") buttonObj.className = "offButton";
						}

						if(btnState)
						{
							if(isOpera && (InArrayString(["Cut", "Copy", "Paste", "UnLink"], UpTools[i]) == -1))
							{
								if(buttonObj.className != "onButton") buttonObj.className = "onButton";
							}
							else
							{
								if(btnEnable && buttonObj.className != "onButton") buttonObj.className = "onButton";
							}
						}
						else
						{
							if(btnEnable && buttonObj.className != "defaultButton") buttonObj.className = "defaultButton";
						}
					}
				}
			}
			else
			{
				var btnSource = document.getElementById(this.editorObjId + "_cmdSourceView");
				var btnScreen = document.getElementById(this.editorObjId + "_cmdFullScreen");

				if(btnSource.className != "onButton") btnSource.className = "onButton";

				if(this.config.FullScreen)
				{
					if(btnScreen.className != "onButton") btnScreen.className = "onButton";
				}
				else
				{
					if(btnScreen.className != "defaultButton") btnScreen.className = "defaultButton";
				}
			}

		}

		if(this.config.IsActive)
		{
			if(this.config.HtmlMode == true && this.GetSelectedElement())
			{
				this.UpdateStatebar();
			}
		}
	}

	/*
	++ »óÅÂ¹Ù ¾÷µ¥ÀÌÆ® ++
	*/
        HABYeditor.prototype.UpdateStatebar = function ()
	{
		var activeEditor = this;

		this.UseTags = new Array();

		this.GetExistTag("BODY", true);

		var reverseTags = this.UseTags.reverse();

		this.editorStateInfo.innerHTML = "&nbsp;<font style=\"font-size: 9px; font-family: tahoma;\">HTML Tags : </font>";

		for(var i = 0; i < reverseTags.length; i++)
		{
			var thisAct       = this.editorStateInfo.appendChild(document.createElement("A"));

			thisAct.node      = reverseTags[i];
			thisAct.className = "UseTag";
			thisAct.onclick   = function() { activeEditor.SelectNode(this.node); return false; };

			if(reverseTags[i].tagName == "IMG" && reverseTags[i].getAttribute("ismedia"))
			{
				if(reverseTags[i].getAttribute("type").indexOf("x-mplayer") > -1)
				{
					var txtTag = "EMBED.Media";
				}
				else
				{
					var txtTag = "EMBED.Flash";
				}
			}
			else
			{
				var txtTag = reverseTags[i].tagName;
			}

			thisAct.appendChild(document.createTextNode(txtTag));

			if( i < (reverseTags.length - 1) )
			{
				this.editorStateInfo.appendChild(document.createTextNode(" " + String.fromCharCode(0xbb) + " "));
			}
		}
	}

	/*
	++ ÀÌº¥Æ® ¸í·É ½ÇÇà ++
	*/
        HABYeditor.prototype.EventAction = function (e)
	{
		var activeEditor     = this;

		if(isMSIE)	/* IE      */
		{
			var eKeyCode  = this.editorHtm.contentWindow.event.keyCode;
		}
		else		/* FireFox */
		{
			var eKeyCode = e.keyCode;
		}

		switch(eKeyCode)
		{
			case 13 :
			case 8  :
			case 46 : InsertRqueue(activeEditor);
			case 37 :
			case 38 :
			case 39 :
			case 40 : this.UpdateToolbar();	break;
		}
	}

	/*
	++ ³»¿ë °¡Á®¿À±â ++
	*/
        HABYeditor.prototype.GetValue = function ()
	{
		var activeEditor = this;

		var nowContent, tmpContent;

		if(this.config.RecordValue != "")
		{
			if(this.config.RecordValue == "start")
			{
				if(this.config.HtmlMode == true)
				{
					nowContent = this.editorDoc.body.innerHTML.replace(/<NOBR><\/NOBR>/g, "");
				}
				else
				{		
					nowContent = this.editorTxt.value;
				}

				tmpContent = nowContent.toLowerCase().replace(/(^\s*)|(\s*$)/g, "");

				if(tmpContent == "" || tmpContent == "<br>" || tmpContent == "<div></div>" || tmpContent == "<p>&nbsp;</p>" || tmpContent == "<div>&nbsp;</div>")
				{
					if(this.editorObj.value.replace(/(^\s*)|(\s*$)/g, ""))
					{
						this.editorDoc.body.innerHTML = this.editorObj.value;
					}
				}
			}
			else
			{
				if(this.config.HtmlMode == true)
				{
					this.editorDoc.body.innerHTML = this.config.RecordValue;
				}
				else
				{		
					this.editorTxt.value = this.config.RecordValue;
				}
			}

		}
	}

	/*
	++ ³»¿ë ±â·Ï ++
	*/
        HABYeditor.prototype.RecordValue = function (Action)
	{
		var activeEditor = this;

		var nowContent, tmpContent;

		if(this.config.HtmlMode == true)
		{
			nowContent = GetIMGtoEMBED(this.editorDoc, this.config.IconsPath).replace(/<NOBR><\/NOBR>/g, "");

			if(isMSIE && this.config.EnableXHTML == true) nowContent = GetSourceCode(nowContent.replace(/\r\n/g, ""));
		}
		else
		{		
			nowContent = this.editorTxt.value;
		}

		tmpContent = nowContent.toLowerCase().replace(/(^\s*)|(\s*$)/g, "");

		if(tmpContent == "" || tmpContent == "<br>" || tmpContent == "<div></div>" || tmpContent == "<p>&nbsp;</p>" || tmpContent == "<div>&nbsp;</div>")
		{
			nowContent = "";
		}

		if(Action == "Record")
		{
			this.config.RecordValue = nowContent;
		}
		else
		{
			this.editorObj.value = nowContent;

			var mediaIndex = new Array();
			var upMedia    = this.editorDoc.getElementsByName("Haby_Upload");

			if(upMedia)
			{
				for(var i = 0; i < upMedia.length; i++)
				{
					if(upMedia[i].getAttribute("Haby_Upload_Id"))
					{
						mediaIndex.push("'" + upMedia[i].getAttribute("Haby_Upload_Id") + "'")
					}
				}
			}

			if(this.oForm)
			{
				this.upMediaId.setAttribute("value", mediaIndex);
			}
		}
	}

	/*
	++ ¿¡µðÅÍ ¸í·É ½ÇÇà ++;
	*/
        HABYeditor.prototype.CommandAction = function (Action, Option)
	{
		var activeEditor = this;

		if(document.getElementById(this.editorObjId + "_cmd" + Action) && document.getElementById(this.editorObjId + "_cmd" + Action).disabled)
		{
			return;
		}

		EditorFocus(this.editorHtm, this.editorTxt, this.config.HtmlMode);

		if(Action == "SourceView")
		{
			this.SourceView();
		}
		else if(Action == "Preview")
		{
			this.PreView();
		}
		else if(Action == "FullScreen")
		{
			this.FullScreen();
		}
		else if(Action == "New")
		{
			if(this.config.HtmlMode == true)
			{
				this.editorDoc.body.innerHTML = "";
			}
			else
			{
				this.editorTXT.value = "";
			}

			this.editorObjId.value = "";
		}
		else if(Action == "Record")
		{
			this.RecordValue(Action);
		}
		else if(Action == "GetValue")
		{
			this.GetValue();
		}
		else
		{
			if(this.config.HtmlMode == true)
			{
				if(isGecko)
				{
					this.editorDoc.execCommand("useCSS", false, true);
				}

				if(Action == "Delete")
				{
					this.editorDoc.execCommand(Action, false, Option);
				}
				else if(Action == "Undo")
				{
					--this.config.RqueueIndex;

					if(this.config.RqueueIndex > -1)
					{
						this.editorDoc.body.innerHTML = this.config.Rqueues[this.config.RqueueIndex];
					}
				}
				else if(Action == "Redo")
				{
					++this.config.RqueueIndex;

					if(this.config.RqueueIndex <= this.config.Rqueues.length - 1)
					{
						this.editorDoc.body.innerHTML = this.config.Rqueues[this.config.RqueueIndex];
					}
				}
				else if(Action == "FontName" || Action == "FontSize")
				{
					if(!Option || Option == null)
					{
						return false;
					}

					this.editorDoc.execCommand(Action, false, Option);
				}
				else if(InArrayString(["InsertImage", "InsertFlash", "InsertMedia"], Action) > -1)
				{
					activeEditor.Action = Action;

					var addImage = ShowDialog(this.config.DialogPath + "insertmedia.htm?tb=" + this.config.BoardId + "&action=" + Action + "&icon=" + this.config.IconsPath +"&lang=" + this.config.ServerLanguage + "", activeEditor, "insertimage", 490, 340, "&id=" + this.editorObjId + "", "dialogWidth: 490px; dialogHeight: 390px; resizable: no; help: no; status: no; scroll: no;");

					if(isMSIE && addImage)
					{
						this.InsertHtml(addImage, 1);
					}
				}
				else if(Action == "InsertTable" || Action == "ModifyTable")
				{
					activeEditor.TableSetup = Option;

					var addTable = ShowDialog(this.config.DialogPath + "tablemaker.htm", activeEditor, "tablemaker", 420, 150, "?id=" + this.editorObjId + "&option=" + Option + "", "dialogWidth: 420px; dialogHeight: 170px; resizable: no; help: no; status: no; scroll: no;");

					if(isMSIE && addTable)	/* IE      */
					{
						this.InsertHtml(addTable, 1);
					}
				}
				else if(Action == "DeleteTable")
				{
					var oTable = (this.GetSelectedElement().tagName == "TABLE") ? this.GetSelectedElement() : this.GetExistTag("TABLE");

					if(oTable)
					{
						if(isMSIE)
						{
							oTable.removeNode(true);
						}
						else
						{
							oTable.parentNode.removeChild(oTable);
						}
					}
				}
				else if(InArrayString(["InsertCell", "DeleteCell", "SplitCellCol", "SplitCellRow", "MergeCellCol", "MergeCellRow", "InsertRow", "DeleteRow", "InsertColumn", "DeleteColumn"], Action) > -1)
				{
					var oTable = (this.GetSelectedElement().tagName == "TABLE") ? this.GetSelectedElement() : this.GetExistTag("TD");

					TableMaker(Action, oTable)
				}
				else if(Action == "InsertChars")
				{
					var addChars = ShowDialog(this.config.DialogPath + "insertchars.htm", activeEditor, "insertchars", 550, 500, "?id=" + this.editorObjId + "", "dialogWidth: 550px; dialogHeight: 520px; resizable: no; help: no; status: no; scroll: no;");

					if(isMSIE && addChars)	/* IE      */
					{
						this.InsertHtml(addChars, 1);
					}
				}
				else if(Action == "Absolute")
				{
					AbsolutePosition(this.editorDoc, this.GetSelectedType(), this.GetSelectedElement());

					if(isMSIE)
					{
						this.editorDoc.execCommand("2D-Position",false, true);
					}
				}
				else if(Action == "Forward" || Action == "Backward")
				{
					if(this.GetSelectedType() == "Control" && this.GetSelectedElement().style.position == "absolute")
					{
						this.GetSelectedElement().style.zIndex = (Action == "Forward") ? ++this.config.PlusIndex : --this.config.MinusIndex;
					}
				}
				else if(Action ==  'CreateLink')
				{
					var addLink = ShowDialog(this.config.DialogPath + "insertlink.htm", activeEditor, "createtable", 500, 125, "?id=" + this.editorObjId + "", "dialogWidth: 510px; dialogHeight: 150px; resizable: no; help: no; status: no; scroll: no;");

					if(isMSIE && addLink)	/* IE      */
					{
						this.InsertHtml(addLink, 1);
					}
				}
				else if(Action == "ForeColor" || Action == "BackColor")
				{
					if(Action == "BackColor")
					{
						 Action = (isMSIE) ? Action : "Hilitecolor";
					}

					var existColor  = GetHexColor(this.editorDoc.queryCommandValue(Action));
					var changeColor = Option;

					if(!changeColor)
					{
						activeEditor.Action     = Action;
						activeEditor.ExistColor = existColor;

						changeColor = ShowDialog(this.config.DialogPath + "selectcolor.htm", activeEditor, "selectcolor", 510, 320, "?id=" + this.editorObjId + "&action=" + Action + "&color=" + existColor + "", "dialogWidth: 510px; dialogHeight: 350px; resizable: no; help: no; status: no; scroll: no;");

						if(isMSIE && changeColor)
						{
							if(changeColor.substring(0, 1) != "#") changeColor = "#" + changeColor;

							this.editorDoc.execCommand(Action, false, changeColor);
						}
					}
					else
					{
						if(changeColor.substring(0, 1) != "#") changeColor = "#" + changeColor;

						this.editorDoc.execCommand(Action, false, changeColor);
					}
				}
				else
				{
					try
					{
						this.editorDoc.execCommand(Action, false, Option);
					}
					catch(e)
					{
						/* HABYEditor */
					}
				}

				if(Action != "Undo" && Action != "Redo")
				{
					InsertRqueue(activeEditor);
				}
			}
		}

		setTimeout(function() { activeEditor.UpdateToolbar(); }, 0);
	}

	/*
	++ Toolbar ¸¶¿ì½º OVER/OUT ++
	*/
        HABYeditor.prototype.EditMouseOver = function (Obj, Css, Action, PopMenu)
	{
		thisPopup  = PopMenu;

		var activeEditor = this;
		var objCmd       = Obj.id.split("_");

		if(this.config.IsActive)
		{
			if(this.config.HtmlMode && !Obj.disabled)
			{
				Obj.className = Css;
			}
			else
			{
				if(objCmd[1] == "cmdSourceView" || objCmd[1] == "cmdPreview" || objCmd[1] == "cmdFullScreen" || objCmd[1] == "cmdRecord" || objCmd[1] == "cmdGetValue")
					Obj.className = Css;
			}

			if(Action == "Out" && !Obj.disabled)
			{

				if(this.config.HtmlMode || (this.config.HtmlMode == false && ((objCmd[1] == "cmdSourceView")) || (this.config.FullScreen && objCmd[1] == "cmdFullScreen")))
				{
					this.UpdateToolbar(objCmd[1].substring(3));
				}
			}
		}
		else
		{
			if(this.config.HtmlMode && !Obj.disabled && Action == "Out")
			{
				Obj.className = Css;
			}
		}
	}


