	var IE5=(document.getElementById && document.all)? true : false;
	var W3C=(document.getElementById)? true: false;
	var currIDb=null, currIDs=null, xoff=0, yoff=0; zctr=0; totz=0;

	function trackmouse(evt)
	{
		if((currIDb!=null) && (currIDs!=null))
		{
			var x=(IE5)? event.clientX+document.body.scrollLeft : evt.pageX;
			var y=(IE5)? event.clientY+document.body.scrollTop : evt.pageY;
					currIDb.style.left=x+xoff+'px';
					currIDs.style.left=x+xoff+10+'px';
					currIDb.style.top=y+yoff+'px';
					currIDs.style.top=y+yoff+10+'px';
			return false;
		}
	}

	function stopdrag()
	{
		currIDb=null;
		currIDs=null;
		NS6bugfix();
	}

	function grab_id(evt)
	{
		xoff=parseInt(this.IDb.style.left)-((IE5)? event.clientX+document.body.scrollLeft : evt.pageX);
		yoff=parseInt(this.IDb.style.top)-((IE5)? event.clientY+document.body.scrollTop : evt.pageY);
		currIDb=this.IDb;
		currIDs=this.IDs;
	}

	function NS6bugfix()
	{
		if(!IE5)
		{
			self.resizeBy(0,1);
			self.resizeBy(0,-1);
		}
	}

	function incrzindex()
	{
		zctr=zctr+2;
		this.subb.style.zIndex=zctr;
		this.subs.style.zIndex=zctr-1;
	}
	
	//¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á //·¹ÀÌ¾î ÆË¾÷ ¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á
	function ADDPopup(id, width, height, x , y , isdraggable, CTime )
	{
		// Á¦¸ñ /htmlÅÂ±× °¡Á®¿À±â
		var AD_Title	= eval("document.all.ADDTitle_"+id+".value");
		var AD_Tag		= eval("document.all.ADDTag_"+id+".value");

		height	= height + 0;

		//½Ã°£¼³Á¤
		if (CTime != '0') setTimeout('document.getElementById(\''+id+'_s\').style.display=\'none\'; document.getElementById(\''+id+'_b\').style.display=\'none\';return false', CTime*1000); 

		if(W3C)
		{
			zctr+=2;
			totz=zctr;
			var txt='';
			
			txt+='<div id="'+id+'_s" style="position:absolute; left:'+x+'px; top:'+y+'px; width:'+width+'px; height:'+height+'px; filter:alpha(opacity=50); visibility:visible" style="z-index:9999999;"> </div>';
			txt+='<div id="'+id+'_b" style="position:absolute; left:'+x+'px; top:'+y+'px; width:'+(width+4)+'px; overflow:hidden; height:'+(height+18)+'px; visibility:visible" align="center" valign="top" style="z-index:9999999;">';
			txt+='<div id="'+id+'_ov" width:'+width+'px; style="padding:0px;margin-top:2px;" align="center" valign="middle" style="z-index:9999999;">'+AD_Tag+'</div>';
			txt+='<div style="width:'+width+'px; height:16px; padding:0px; border:1px;" style="z-index:9999999;"><table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td><div id="'+id+'_h" style="height:14px; cursor:move;" style="z-index:9999999;">&nbsp;</div></td><td align="right" width="40"><a onmousedown="document.getElementById(\''+id+'_s\').style.display=\'none\'; document.getElementById(\''+id+'_b\').style.display=\'none\';return false" style="cursor:hand;"><img src=\'http://pic.facedream.co.kr/facedream_20080215/images/common/Layer_x.png\'></a></td></tr></table></div></div>';

			document.write(txt);
			this.IDh=document.getElementById(id+'_h');
			this.IDh.IDb=document.getElementById(id+'_b');
			this.IDh.IDs=document.getElementById(id+'_s');
			this.IDh.IDb.subs=this.IDh.IDs;
			this.IDh.IDb.subb=this.IDh.IDb;
			this.IDh.IDb.IDov=document.getElementById(id+'_ov');
			
			if(IE5)
			{
				this.IDh.IDb.IDov.style.width=width;
				this.IDh.IDb.IDov.style.height=height;
				//this.IDh.IDb.IDov.style.scrollbarBaseColor=boxcolor;
				this.IDh.IDb.IDov.style.overflow="hidden";
			}
			else
			{
				this.IDh.IDs.style.MozOpacity=.5;
			}
			
			this.IDh.IDb.onmousedown=incrzindex;
			
			if(isdraggable)
			{
				this.IDh.onmousedown=grab_id;
				this.IDh.onmouseup=stopdrag;
			}
		}
	}
	//¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á ·¹ÀÌ¾î ÆË¾÷// ¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á
	

	//¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á //ÇÃ·¹½Ã ÆË¾÷ ¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á
	function ADDFlashPopup(id, width, height, x , y , isdraggable, CTime, FlashNm )
	{
		//ÇÃ·¹½Ã ÆÄÀÏ¸í
		var AD_FlashURL = "http://facedream.co.kr/facedream_flash/"+FlashNm;

		var AD_FullTag   = "<OBJECT classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0' WIDTH='"+width+"' HEIGHT='"+height+"'>"
		AD_FullTag		+= "<PARAM NAME='movie' VALUE='"+AD_FlashURL+"'>";
		AD_FullTag		+= "<PARAM NAME='quality' VALUE=high>"
		AD_FullTag		+= "<PARAM NAME='AllowScriptAccess' value=always>";

		AD_FullTag		+= "<PARAM NAME='scale' VALUE=noborder>";
		AD_FullTag		+= "<PARAM NAME='menu' VALUE=false>";
		AD_FullTag		+= "<PARAM NAME='wmode' VALUE=transparent>";
		AD_FullTag		+= "<EMBED src='"+AD_FlashURL+"' quality='high' WIDTH='"+width+"' HEIGHT='"+height+"' TYPE='application/x-shockwave-flash' PLUGINSPAGE='http://www.macromedia.com/go/getflashplayer' wmode='transparent'></EMBED>";
		AD_FullTag		+= "</OBJECT>";

		height	= height + 0;

		var cancelWidth = width / 2.5;

		//½Ã°£¼³Á¤
		if (CTime != '0') setTimeout('document.getElementById(\''+id+'_s\').style.display=\'none\'; document.getElementById(\''+id+'_b\').style.display=\'none\';return false', CTime*1000); 

		if(W3C)
		{
			zctr+=2;
			totz=zctr;
			var txt='';

			var canceltxt='<div style="position:relative; z-index:999999999;"><div style="position:absolute; top:-18; left:'+cancelWidth+'; z-index:999999999;"><a onmousedown="document.getElementById(\''+id+'_s\').style.display=\'none\'; document.getElementById(\''+id+'_b\').style.display=\'none\';return false" style="cursor:hand;"><img src="http://images.facedream.co.kr/facedream_20080215/images/item/x3.gif"></a></div></div>';
			
			txt+='<div id="'+id+'_s" style="position:absolute; left:'+x+'px; top:'+y+'px; width:'+width+'px; height:'+height+'px; filter:alpha(opacity=50); visibility:visible" style="z-index:9999999;"> </div>';
			txt+='<div id="'+id+'_b" style="position:absolute; left:'+x+'px; top:'+y+'px; width:'+(width+4)+'px; overflow:hidden; height:'+(height+18)+'px; visibility:visible" align="center" valign="top" style="z-index:9999999;">';
			txt+='<div id="'+id+'_h" style="width:'+width+'px; height:16px; padding:0px; border:1px;" style="z-index:9999999;"><div id="'+id+'_ov" width:'+width+'px; style="padding:0px;margin-top:2px;" align="center" valign="middle" style="z-index:9999999;">'+AD_FullTag+'</div>'+canceltxt+'</div></div>';
			
			document.write(txt);
			this.IDh=document.getElementById(id+'_h');
			this.IDh.IDb=document.getElementById(id+'_b');
			this.IDh.IDs=document.getElementById(id+'_s');
			this.IDh.IDb.subs=this.IDh.IDs;
			this.IDh.IDb.subb=this.IDh.IDb;
			this.IDh.IDb.IDov=document.getElementById(id+'_ov');
			
			if(IE5)
			{
				this.IDh.IDb.IDov.style.width=width;
				this.IDh.IDb.IDov.style.height=height;
				//this.IDh.IDb.IDov.style.scrollbarBaseColor=boxcolor;
				this.IDh.IDb.IDov.style.overflow="hidden";
			}
			else
			{
				this.IDh.IDs.style.MozOpacity=.5;
			}
			
			this.IDh.IDb.onmousedown=incrzindex;
			
			if(isdraggable)
			{
				this.IDh.onmousedown=grab_id;
				this.IDh.onmouseup=stopdrag;
			}
		}
	}
	//¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á ÇÃ·¹½Ã ÆË¾÷// ¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á¡á

	if(W3C)document.onmousemove=trackmouse;
	if(!IE5 && W3C)window.onload=NS6bugfix;