	function alditor_PlayNow(obj, w, h, url)
	{
		try
		{
			if (url)
			{	var el = obj;
				var sURL = url;
				var sID = url;
			} else {
				var el = obj.previousSibling;
				while (el.tagName!="A")
				el = el.previousSibling;
				var sURL = el.href;
				var sID = el.href;
			}
			var sExt = sID.substring(sID.lastIndexOf("."));
			var sComp = sExt.toUpperCase();

			if (document.getElementById(sID)==null)
			{
				var embedHolder = document.createElement("div");
				var embed = document.createElement("EMBED");
				if (w) { embed.width = w;	}
				if (h) 	{ embed.height = h;	}
				if (sComp==".SWF")
				{
					embed.quality = "high";
					embed.wmode = "transparent";
				} else {
					embed.autostart = true;
				}
				embed.className = 'nopatch';
				embed.id = sID;
				embed.src = sURL;
				embedHolder.appendChild(embed);
				el.parentNode.insertBefore(embedHolder,el);
			} else {
				document.getElementById(sID).parentNode.parentNode.removeChild(document.getElementById(sID).parentNode);
			}
		}
		catch(e){}
	}

	function alditor_ShowHide(obj)
	{
		try
		{
			var targetDiv = document.getElementById(obj.id + 'sh');
			if (targetDiv.className == 'showhideDiv') {
				obj.title = obj.innerHTML;
			}
			obj.innerHTML = (targetDiv.className == 'showhideDiv')? '°¡¸®±â' : obj.title ;
			targetDiv.className = (targetDiv.className == 'showhideDiv')? 'showhideDivShow' : 'showhideDiv' ;
		}
		catch(e) {}
	}

	function previewSyntax(id, noline)
	{
		var sourceDiv = document.getElementById(id);
		if (!noline)
		{
			if (document.selection)
			{
				var source = sourceDiv.getElementsByTagName('OL')[0].innerText;
			} else {
				var source = sourceDiv.getElementsByTagName('OL')[0].textContent;
			}
		} else
		{
			var source = sourceDiv.lastChild.nodeValue;
		}
		var content = "\
			<html>\
				<head>\
				<title> ¹Ì ¸® º¸ ±â </title>\
				<meta http-equiv=content-type content=text/html;charset=euc-kr>\
					<style>body { font-size:9pt;}</style>\
				</head>\
				<body scroll='auto'>\
				<font color='#ff9900'>- ÄÚµå³»¿ë</font><br>\
				<HR WIDTH=100% COLOR='#ff6600'>\
				<textarea style='width:99%;height:99%'>" + source + "</textarea><br><br>\
				<font color='#ff9900'>- ÄÚµå½ÇÇà</font><br>\
				<HR WIDTH=100% COLOR='#ff6600'>\
				" + source + "\
				</body>\
			</html>";
		var wnd = window.open('', '_blank', 'width=750, height=400, location=0, resizable=1, menubar=0, scrollbars=1');
		wnd.document.write(content);
		wnd.document.close();
	}

	function copySyntax(id, noline)
	{
		var sourceDiv = document.getElementById(id);
		if (!noline)
		{
			if (document.selection)
			{
				var source = sourceDiv.getElementsByTagName('OL')[0].innerText;
			} else {
				var source = sourceDiv.getElementsByTagName('OL')[0].textContent;
			}
		} else
		{
			var source = sourceDiv.lastChild.nodeValue;
		}
		if (document.selection)
		{
			bResult = window.clipboardData.setData("Text",source);
			if (bResult) alert('Å¬¸³º¸µå¿¡ ÀúÀåµÇ¾ú½À´Ï´Ù.');
		} else {
			source = encodeforFlash(source);
			var flashcopier = 'flashcopier';
			if(!document.getElementById(flashcopier)) {
				var divholder = document.createElement('div');
				divholder.id = flashcopier;
				document.body.appendChild(divholder);
			}
			document.getElementById(flashcopier).innerHTML = '';
			var divinfo = '<embed src="/alditor/images/_clipboard.swf" FlashVars="clipboard='+source+'" width="1" height="1" type="application/x-shockwave-flash"></embed>';
			document.getElementById(flashcopier).innerHTML = divinfo;
			alert('Å¬¸³º¸µå¿¡ ÀúÀåµÇ¾ú½À´Ï´Ù.');
		}
	}

	function encodeforFlash(str)
	{
		var SAFECHARS = "0123456789" +
						"ABCDEFGHIJKLMNOPQRSTUVWXYZ" +
						"abcdefghijklmnopqrstuvwxyz" +
						"-_.!~*'()";
		var HEX = "0123456789ABCDEF";

		var plaintext = str;
		var encoded = "";
		for (var i = 0; i < plaintext.length; i++ ) {
			var ch = plaintext.charAt(i);
			if (ch == " ") {
				encoded += "+";
			} else if (SAFECHARS.indexOf(ch) != -1) {
				encoded += ch;
			} else {
				var charCode = ch.charCodeAt(0);
				if (charCode > 255) {
					encoded += ch; //ÇÑ±ÛÀº Åë°ú
				} else {
					encoded += "%";
					encoded += HEX.charAt((charCode >> 4) & 0xF);
					encoded += HEX.charAt(charCode & 0xF);
				}
			}
		} // for

		return encoded;
	};