//input background change
function mm(o) { 
	o.style.background="#636F6B"; 
}

function doResize(){ 
	news.height = census.document.body.scrollHeight; 
	news.width = census.document.body.scrollWidth; 
}

// flashWrite(ÆÄÀÏ°æ·Î, °¡·Î, ¼¼·Î, ¾ÆÀÌµð, ¹è°æ»ö, º¯¼ö, À©µµ¿ì¸ðµå)
function flashWrite(url,w,h,id,bg,vars,win){
	// ÇÃ·¡½Ã ÄÚµå Á¤ÀÇ
	var flashStr=
	"<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,42,34' width='"+w+"' height='"+h+"' id='"+id+"' align='middle'>"+
	"<param name='allowScriptAccess' value='always' />"+
	"<param name='movie' value='"+url+"' />"+
	"<param name='FlashVars' value='"+vars+"' />"+
	"<param name='wmode' value='"+win+"' />"+
	"<param name='menu' value='false' />"+
	"<param name='quali' value='high' />"+
	"<param name='bgcolor' value='"+bg+"' />"+
	"<embed src'"+url+"' FlashVars='"+vars+"' wmode='"+win+"' menu='false' quality='high' bgcolor='"+bg+"' width='"+w+"' height='"+h+"' name='"+id+"' align='middle' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />"+
	"</object>";

	// ÇÃ·¡½Ã ÄÚµå Ãâ·Â
	document.write(flashStr);
}

/*
Braunston
±è½ÂÈ¯ ( myzizzy@braunston.co.kr )
Flash Activate JS code
*/
function GnxFlashActivate( strFlashUrl , n4Witdh , n4Height , strWmode , strId , strClassName , strFlashvar ){
	//width,height ¿©ºÎ & ¹­À½ (width,height°¡ ¾øÀ»¶§´Â 0 À¸·Î ¼±¾ð)
	if (n4Witdh != 0) {
		objSize_attribute = " width='"+ n4Witdh +"' height='"+ n4Height +"'";
	} else {
		objSize_attribute = "";
	}
	//id ¿©ºÎ (ID ¼¿·º·ºÅÍ°¡ ¾øÀ»°æ¿ì 0À¸·Î¼±¾ð)
	if (strId != 0) {
		objId_attribute = " id='" + strId + "'";
		objId_IE_attribute = " id='" + strId + "'";
	} else {
		objId_attribute = "";
		objId_IE_attribute = "";
	}
	//class ¿©ºÎ (class°¡ ¾øÀ»¶§´Â 0 À¸·Î ¼±¾ð)
	if (strClassName != 0) {
		className_attribute = " class='" + strClassName + "'";
	} else {
		className_attribute = "";
	}
	//wmode ¿©ºÎ (wmode°¡ ¾øÀ»¶§´Â 0 À¸·Î ¼±¾ð)
	if (strWmode != 0) {
		wmode_param = "<param name='wmode' value='" + strWmode + "' />";
		wmode_attribute = " wmode='" + strWmode + "'";
	} else {
		wmode_param = "";
		wmode_attribute = "";
	}
	//Flashvar ¿©ºÎ (wmode°¡ ¾øÀ»¶§´Â 0 À¸·Î ¼±¾ð)
	if (strFlashvar != 0) {
		Flashvar_param = "<param name='flashvars' value='" + strFlashvar + "' />";
		Flashvar_attribute = " Flashvars='" + strFlashvar + "'";
	} else {
		Flashvar_param = "";
		Flashvar_attribute = "";
	}
	document.writeln( "<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,42,34' " + objSize_attribute + objId_IE_attribute + className_attribute + ">" );
	document.writeln( "<param name='movie' value='"+ strFlashUrl +"' />" );
	document.writeln( "<param name='quality' value='high' />" );
	document.writeln( "<param name='menu' value='0' />" );
	document.writeln( "<param name='allowScriptAccess' value='always' />" );
	document.writeln( "<param name='scale' value='noscale' />" );
	document.writeln( "<param name='salign' value='t' />" );
	document.writeln( wmode_param );
	document.writeln( Flashvar_param );
	document.writeln( "<!-- Hixie method -->" );
	document.writeln( "<!--[if !IE]> <-->" );
	document.writeln( "<object type='application/x-shockwave-flash' allowScriptAccess='always'  data='"+ strFlashUrl +"'" + Flashvar_attribute + objSize_attribute + objId_attribute + wmode_attribute + className_attribute + "></object>" );
	document.writeln( "<!--> <![endif]-->" );
	document.writeln( "</object>" );
}

/* »ç¿ë¹ý
<script type="text/javascript" language="JavaScript">
// <![CDATA[
	GnxFlashActivate('./sub_nav.swf',890,175,'opaque','TopNavi','TopNavi','Flashvars');
// ]]>
</script>
*/


function GnxMovieActivate ( strMovieUrl , n4Width , n4Height , strId , n4AutoStart , n4ShowControls ) {
	//width,height ¿©ºÎ & ¹­À½ (width,height°¡ ¾øÀ»¶§´Â 0 À¸·Î ¼±¾ð)
	if (n4Width != 0) {
		if (n4ShowControls == 0) {
			Realn4Height = n4Height;	
		} else {
			Realn4Height = n4Height + 45;
		}
		objSize_attribute = " width='"+ n4Width +"' height='"+ Realn4Height +"'";
	} else {
		objSize_attribute = "";
	}
	//id ¿©ºÎ (ID ¼¿·ºÅÍ°¡ ¾øÀ»°æ¿ì 0À¸·Î ¼±¾ð ¹Ýµå½Ã ¼±¾ðµÇ¾î¾ßÇÔ)
	if (strId != 0) {
		objId_attribute = " id='" + strId + "'";
		objId_IE_attribute = " id='" + strId + "'";
	} else {
		objId_attribute = "";
		objId_IE_attribute = "";
	}

	//ShowControls ¿©ºÎ (ÄÁÆ®·ÑÈ­¸éÀ»°¡¸®°í ½ÍÀ»¶§´Â 0, º¸ÀÌ°í ½ÍÀ»¶§´Â 1)
	if (n4ShowControls == 0) {
		ShowControls_param = "<param name='showcontrols' value='false' />";
		ShowControls_attribute = " showcontrols='0'";
	} else if (n4ShowControls == 1){
		ShowControls_param = "<param name='showcontrols' value='true' />";
		ShowControls_attribute = " showcontrols='1'";
	}

	//AutoStart ¿©ºÎ (ÄÁÆ®·ÑÈ­¸éÀ»°¡¸®°í ½ÍÀ»¶§´Â 0, º¸ÀÌ°í ½ÍÀ»¶§´Â 1)
	if (n4AutoStart == 0) {
		AutoStart_param = "<param name='autostart' value='false' />";
		AutoStart_attribute = " autostart='0'";
	} else if (n4AutoStart == 1){
		AutoStart_param = "<param name='autostart' value='true' />";
		AutoStart_attribute = " autostart='1'";
	}

	document.writeln( "<object name='objWMPlayer' classid='CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95'" + objId_IE_attribute + objSize_attribute +" codebase='http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701'>");
	document.writeln( "	<param name='AudioStream' value='-1' />");
	document.writeln( "	<param name='AutoSize' value='false' />");
	document.writeln( "	<param name='AnimationAtStart' value='true' />");
	document.writeln( "	<param name='AllowChangeDisplaySize' value='true' />");
	document.writeln( "	<param name='BufferingTime' value='5' />");
	document.writeln( "	<param name='Enabled' value='true' />");
	document.writeln( "	<param name='EnableContextMenu' value='true' />");
	document.writeln( "	<param name='EnableTracker' value='true' />");
	document.writeln( "	<param name='PlayCount' value='1' />");
	document.writeln( "	<param name='Rate' value='1' />");

	document.writeln( "	<param name='ShowCaptioning' value='false' /> <!-- ÀÚ¸· -->");
	document.writeln( "	<param name='ShowAudioControls' value='true' /> <!-- º¼·ýÁ¶Àý -->");
	document.writeln( "	<param name='ShowDisplay' value='false' /> <!-- ¹Ìµð¾îÁ¤º¸ -->");
	document.writeln( "	<param name='ShowPositionControls' value='true' /> <!-- Forward,Rewind -->");
	document.writeln( "	<param name='ShowStatusBar' value='false' /> <!-- »óÅÂ¹Ù -->");
	document.writeln( "	<param name='ShowTracker' value='true' /> <!-- Å½»ö¹Ù -->");
	
	document.writeln( "	<param name='Mute' value='false' />");
	document.writeln( AutoStart_param );
	document.writeln( ShowControls_param );
	document.writeln( "	<param name='FileName' value='" + strMovieUrl + "'>");

	document.writeln( "	<!-- Hixie method -->");
	document.writeln( "	<!--[if !IE]> <-->");
	document.writeln( "		<object id='objWMPlayer' name='objWMPlayer' type='application/x-mplayer2' pluginspage='http://www.microsoft.com/Windows/MediaPlayer/' data='" + strMovieUrl + "' " + objSize_attribute + objId_attribute + AutoStart_attribute + ShowControls_attribute + ">");
	document.writeln( "	<!--> <![endif]-->");

	document.writeln( "</object>");

}

/* »ç¿ë¹ý
<script type="text/javascript" language="JavaScript">
// <![CDATA[
	GnxFlashActivate('./sub_nav.swf',890,175,'opaque','TopNavi','TopNavi','Flashvars');
// ]]>
</script>
*/


function GnxMovieActivate ( strMovieUrl , n4Width , n4Height , strId , n4AutoStart , n4ShowControls ) {
	//width,height ¿©ºÎ & ¹­À½ (width,height°¡ ¾øÀ»¶§´Â 0 À¸·Î ¼±¾ð)
	if (n4Width != 0) {
		if (n4ShowControls == 0) {
			Realn4Height = n4Height;	
		} else {
			Realn4Height = n4Height + 45;
		}
		objSize_attribute = " width='"+ n4Width +"' height='"+ Realn4Height +"'";
	} else {
		objSize_attribute = "";
	}
	//id ¿©ºÎ (ID ¼¿·ºÅÍ°¡ ¾øÀ»°æ¿ì 0À¸·Î ¼±¾ð ¹Ýµå½Ã ¼±¾ðµÇ¾î¾ßÇÔ)
	if (strId != 0) {
		objId_attribute = " id='" + strId + "'";
		objId_IE_attribute = " id='" + strId + "'";
	} else {
		objId_attribute = "";
		objId_IE_attribute = "";
	}

	//ShowControls ¿©ºÎ (ÄÁÆ®·ÑÈ­¸éÀ»°¡¸®°í ½ÍÀ»¶§´Â 0, º¸ÀÌ°í ½ÍÀ»¶§´Â 1)
	if (n4ShowControls == 0) {
		ShowControls_param = "<param name='showcontrols' value='false' />";
		ShowControls_attribute = " showcontrols='0'";
	} else if (n4ShowControls == 1){
		ShowControls_param = "<param name='showcontrols' value='true' />";
		ShowControls_attribute = " showcontrols='1'";
	}

	//AutoStart ¿©ºÎ (ÄÁÆ®·ÑÈ­¸éÀ»°¡¸®°í ½ÍÀ»¶§´Â 0, º¸ÀÌ°í ½ÍÀ»¶§´Â 1)
	if (n4AutoStart == 0) {
		AutoStart_param = "<param name='autostart' value='false' />";
		AutoStart_attribute = " autostart='0'";
	} else if (n4AutoStart == 1){
		AutoStart_param = "<param name='autostart' value='true' />";
		AutoStart_attribute = " autostart='1'";
	}

	document.writeln( "<object name='objWMPlayer' classid='CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95'" + objId_IE_attribute + objSize_attribute +" codebase='http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701'>");
	document.writeln( "	<param name='AudioStream' value='-1' />");
	document.writeln( "	<param name='AutoSize' value='false' />");
	document.writeln( "	<param name='AnimationAtStart' value='true' />");
	document.writeln( "	<param name='AllowChangeDisplaySize' value='true' />");
	document.writeln( "	<param name='BufferingTime' value='5' />");
	document.writeln( "	<param name='Enabled' value='true' />");
	document.writeln( "	<param name='EnableContextMenu' value='true' />");
	document.writeln( "	<param name='EnableTracker' value='true' />");
	document.writeln( "	<param name='PlayCount' value='1' />");
	document.writeln( "	<param name='Rate' value='1' />");

	document.writeln( "	<param name='ShowCaptioning' value='false' /> <!-- ÀÚ¸· -->");
	document.writeln( "	<param name='ShowAudioControls' value='true' /> <!-- º¼·ýÁ¶Àý -->");
	document.writeln( "	<param name='ShowDisplay' value='false' /> <!-- ¹Ìµð¾îÁ¤º¸ -->");
	document.writeln( "	<param name='ShowPositionControls' value='true' /> <!-- Forward,Rewind -->");
	document.writeln( "	<param name='ShowStatusBar' value='false' /> <!-- »óÅÂ¹Ù -->");
	document.writeln( "	<param name='ShowTracker' value='true' /> <!-- Å½»ö¹Ù -->");
	
	document.writeln( "	<param name='Mute' value='false' />");
	document.writeln( AutoStart_param );
	document.writeln( ShowControls_param );
	document.writeln( "	<param name='FileName' value='" + strMovieUrl + "'>");

	document.writeln( "	<!-- Hixie method -->");
	document.writeln( "	<!--[if !IE]> <-->");
	document.writeln( "		<object id='objWMPlayer' name='objWMPlayer' type='application/x-mplayer2' pluginspage='http://www.microsoft.com/Windows/MediaPlayer/' data='" + strMovieUrl + "' " + objSize_attribute + objId_attribute + AutoStart_attribute + ShowControls_attribute + ">");
	document.writeln( "	<!--> <![endif]-->");

	document.writeln( "</object>");

}

/* »ç¿ë¹ý
<script type="text/javascript" language="JavaScript">
// <![CDATA[
	GnxMovieActivate ( 'http://party.paran.com/hp/wmv/[MV]20050511_Side-B_JustDoIt(500k).wmv' , 320 , 240 , 'movie01' , 1 , 1 )
// ]]>
</script>
*/

	// ÇÏ´Ü ¸Þ´º¿¡¼­ »ç¿ë
	// ÇÊÅÍ Àû¿ë ÇÔ¼ö
	function trans(id,after){
	eval('document.getElementById("'+id+'").filters.blendTrans.stop();');
	eval('document.getElementById("'+id+'").filters.blendTrans.Apply();');
	eval('document.getElementById("'+id+'").src="'+after+'";');
	eval('document.getElementById("'+id+'").filters.blendTrans.Play();');
	}
	function Find_Obj(n, d) {
	  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
		d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
	  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
	  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=Find_Obj(n,d.layers[i].document);
	  if(!x && document.getElementById) x=document.getElementById(n); return x;
	}
	// ºÎ¸Þ´º ·¹ÀÌ¾î ¼û±è/º¸ÀÌ±â ÇÔ¼ö
	function Show_Hide() {
	  var i,p,v,obj,args=Show_Hide.arguments;
	  for (i=0; i<(args.length-2); i+=3) if ((obj=Find_Obj(args[i]))!=null) { v=args[i+2];
		if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
		obj.visibility=v; }
	}
	// ÇÏ´Ü¸Þ´º¿¡¼­ »ç¿ëÇÔ. -- ¿©±â±îÁö

	function setCookie(name, value){
		var expire_date = new Date();
		expire_date.setDate(expire_date.getDate() + 100);
		expire_date.setHours(0,0,0,0);

		var cookieStr = name + "=" + escape(value) + ";ages = -1";
		cookieStr += "; expires=" + expire_date.toGMTString() +"; path=/; domain=" + document.location.hostname + ";";
		document.cookie = cookieStr;
	}

	function getCookieVal(offset){
		var endstr = document.cookie.indexOf(";", offset);
		if (endstr == -1)
		endstr = document.cookie.length;
		return unescape(document.cookie.substring(offset, endstr));
	}
	// ÇØ´ç ÄíÅ° º¯¼ö¿¡ ÇØ´çÇÏ´Â °ªÀ» getCookieVal¸¦ ÅëÇØ¼­ ¸®ÅÏÇÑ´Ù.

	function getCookie(sName){
		var aCookie = document.cookie.split("; ");
		for (var i=0; i < aCookie.length; i++){
			var aCrumb = aCookie[i].split("=");
			if (sName == aCrumb[0]){
				return unescape(aCrumb[1]);
			}
		}
		return null;
		/*
		var arg = name + "=";
		var alen = arg.length;
		var clen = document.cookie.length;
		var i = 0;

		while( i < clen) {
			var j = i + alen;
			if (document.cookie.substring(i,j) == arg)
			return getCookieVal(j);
			i = document.cookie.indexOf(" ", i) + 1;
			if (i==0) break;
		}
		return null;
		*/
	}

	function errMsg(thisfield, msg) {
		alert (msg);
		thisfield.focus();
	}

	function createForm(fName, fMethod, fAction, fTarget){
		var objForm = document.createElement("form");
		objForm.name=fName;
		objForm.method=fMethod;
		objForm.action=fAction;
		objForm.target=fTarget;
		return objForm;
	}

	function addHidden(objF, iptName, iptValue){
		var objInput = document.createElement("input");
		var isIE  = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;
		if (objF.iptName == undefined){
			objInput.type = "hidden";
			objInput.id = iptName;
			objInput.name = iptName;
			objInput.value = iptValue;
			if (isIE == true){
				objF.insertBefore(objInput);
			}else{
				objF.appendChild(objInput);
			}
		}else{
			objF.iptName.value = iptValue;
		}
		return objF;
	}

	function addSelectOpt(objSel, txtValue, txtName){
		var objSelect = document.getElementById(objSel);
		var newOption = document.createElement("OPTION");
		newOption.value = txtValue;
		newOption.text = unescape(txtName);
		//objSelect.options[objSelect.options.length] = newOption;
		objSelect.options.add(newOption);
	}

	function resetSelectOpt(objSel, txtValue){
		var objSelect = document.getElementById(objSel);
		for(var i = objSelect.length -1 ; i > 0; i--){
			//if( i > 0){
			//	objSelect.remove(i);
			//}
			if(objSelect.options[i].value != ""){
				objSelect.remove(i);
			}
		}//end for
	}

	function blockMouse(e){
		if(isIE == false){
			if(e.which == 2 || e.which == 3) return false;
		}else{
			if (window.event.button==2 || window.event.button==3) return false;
		}
	}

	function blockKeyCode() { 
		try {
			//BackSpace Key : event.keyCode==8
			var keyValue = window.event.keyCode;
			if(keyValue == 38 || keyValue == 40 || keyValue == 44 || keyValue == 112 || keyValue ==17 || keyValue == 18 || keyValue == 25 || keyValue == 122 || (window.event.ctrlKey==true && (keyValue==78 || keyValue==82))){ // keyValue == 78 ||
				window.event.keyCode = 0; 
				window.event.cancelBubble = true; 
				window.event.returnValue = false; 
			} 
		} catch(e) {}
	}

	function goMemberLogin(){
		var rUrl = top.document.location.href;
		if (rUrl.lastIndexOf("#") > 0){
			rUrl = rUrl.substring(0,rUrl.lastIndexOf("#"));
		}
		rUrl = escape(rUrl);
		if (confirm('·Î±×ÀÎ ÇÑ ÈÄ¿¡ ÀÌ¿ëÇØÁÖ¼¼¿ä.') == true){
			//top.document.location.href = '/member/member_login.asp?url='+escape(rUrl);
			top.frmLogin.userLoginID.focus();
		}else{
			//history.back();
			top.document.location.href = '/';
			return false;
		}
	}

	function goHistoryBackLogin(){
		var rUrl = top.document.location.href;
		if (rUrl.lastIndexOf("#") > 0){
			rUrl = rUrl.substring(0,rUrl.lastIndexOf("#"));
		}
		rUrl = escape(rUrl);
		if (confirm('·Î±×ÀÎ ÇÑ ÈÄ¿¡ ÀÌ¿ëÇØÁÖ¼¼¿ä.') == true){			
			history.back();			
		}else{
			//history.back();
			top.document.location.href = '/';
			return false;
		}
	}

	function goMemberNic(){
		var rUrl = top.document.location.href;
		if (rUrl.lastIndexOf("#") > 0){
			rUrl = rUrl.substring(0,rUrl.lastIndexOf("#"));
		}
		rUrl = escape(rUrl);
		if (confirm('´Ð³×ÀÓÀÌ ÇÊ¿äÇÑ ¼­ºñ½º ÀÔ´Ï´Ù.\n\n´Ð³×ÀÓ ¼³Á¤ ÆäÀÌÁö·Î ÀÌµ¿ÇÏ½Ã°Ú½À´Ï±î?') == true){
			top.document.location.href = '/member/member_nickname.asp?url='+escape(rUrl);
		}else{
			//history.back();
			top.document.location.href = '/';
			return false;
		}
	}

	function copytxt(txt){ 
		//document.rssfrm.submit();
	    window.clipboardData.setData("text", txt); 
		alert("RSS°¡ º¹»çµÇ¾ú½À´Ï´Ù. ÀÌÁ¦ RSS¸®´õ ÇÁ·Î±×·¥¿¡ ÀÔ·ÂÇÏ¼¼¿ä.")
	} 

	function fromFlashDateSet(intA, intB){
	}


	function visibleEventLayerForJS(swfUrl, swfWidth, swfHeight){
		var objTmp = document.createElement("span");
		objTmp.id = "tmpLayerForJS";
		objTmp.style.visibility = "hidden";
		objTmp.style.display = "none";
		document.body.appendChild(objTmp); 
		var strFlash = "";
		var objLayer = document.getElementById("tmpLayerForJS");
		strFlash += '<object id="objPangsFlash" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,42,34" width="' + swfWidth + '" height="' + swfHeight + '" align="middle">';
		strFlash += '<param name="allowScriptAccess" value="always" />';
		strFlash += '<param name="movie" value="' + swfUrl + '" />';
		strFlash += '<param name="quality" value="high" />';
		strFlash += '<param name="bgcolor" value="#ffffff" />';
		strFlash += '<param name="menu" value="0" />';
		strFlash += '<param name="WMode" value="Transparent">';
		strFlash += '<embed name="objPangsFlash" src="' + swfUrl + '" quality="high" WMode="Transparent" bgcolor="#ffffff" width="' + swfWidth + '" height="' + swfHeight + '" align="middle" allowScriptAccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';
		strFlash += '</object>';
		objLayer.innerHTML = strFlash;

		objLayer.style.zindex = "100";
		objLayer.style.position = "absolute";
		if (document.body.clientWidth > 1040){
			objLayer.style.left= (document.body.clientWidth-1040)/2 + 200;
		}else{
			objLayer.style.left="200";
		}
		objLayer.style.top="70";
		objLayer.style.width=swfWidth;
		objLayer.style.height=swfHeight;

		objLayer.style.visibility="visible";
		objLayer.style.display="block";
	}

	function hiddenEvnetLayerForJS(){
		var objLayer = document.getElementById("tmpLayerForJS");
		if (objLayer != undefined){
			objLayer.style.width="0";
			objLayer.style.height="0";
			objLayer.style.visibility="hidden";
			objLayer.style.display="none";
		}
	}

	// ±è½ÂÈ¯ Ãß°¡
	function emptyNick() {
		var url = escape(document.location.href.toString());
		if (url.toLowerCase().indexOf('center_policynew_02.asp') > 0){
		}else{
		window.document.location = '/center/center_policynew_02.asp?url='+url ;
		}
	}

	function gotoFirstPage(){
		top.document.location.href='/';
	}

	function gotoPlayMovie(){
		document.location.href='/pds/pds_movieplay_list.asp';
	}

	function gotoLoginPage(){
		var curPath = document.location.pathname;
		var curSearch = document.location.search;
		var curUrl = curPath+curSearch;
		curUrl = curUrl.replace(/#/gi,'');
		document.location.href='/member/member_login.asp?url='+escape(curUrl);
	}

	function gotoWemade(){
		window.open('http://www.wemade.com','_new','');
	}

	function viewNoticeWin(){
		//(goURL,"full","resizable=0,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=auto,screenX=0,screenY=0,left=0,top=0,fullscreen=1");
		winNotice=window.open('/pop/road01.htm','roadMap','width='+window.screen.width+'px,height='+window.screen.height+'px,status=no,toolbar=no,menubar=no,location=no,scrollbars=yes');
		if( winNotice != 'undefined' ){
			winNotice.focus();
		}else{
			alert('ÆË¾÷Â÷´ÜÀ» ÇØÁ¦ÇØ ÁÖ½Ã±â ¹Ù¶ø´Ï´Ù.');
		}
	}
	
	// ¶óµð¿À ¹öÆ° Ã¼Å©
	function getRadioChecked(objName){
		var objLength = objName.length;
		var rtnValue = null;
		for(var i = 0; i < objLength; i++){
			if(objName[i].checked == true){
				rtnValue = true;
				break;
			}
		}
		return rtnValue;
	}

	//2006-11-24 : add - pang
	function reloadThisPage(){
		//document.location.reload();
		var curPath = document.location.pathname;
		var curSearch = document.location.search;
		var curUrl = curPath+curSearch;
		curUrl = curUrl.replace(/#/gi,'');
		document.location.href=curUrl;
	}

	function setWindowResize(){
		document.body.style.overflow='hidden';
		var clintAgent = navigator.userAgent;
		var w = document.body.scrollWidth;
		var h = document.body.scrollHeight;
		if ( clintAgent.indexOf("MSIE") != -1 ){
			// IE
			window.resizeBy(w-document.documentElement.clientWidth, h-document.documentElement.clientHeight);
		}else{
			window.resizeBy(w-window.innerWidth, h-window.innerHeight);
		}
	}

	function getNoUrl(){
		alert('º» ¼­ºñ½º´Â CBT ¼­ºñ½º ¶§ºÎÅÍ ÀÌ¿ëÀÌ °¡´ÉÇÕ´Ï´Ù. \n\n°¨»çÇÕ´Ï´Ù.');
	}

	function getNowUrl(){
		var host = document.location.hostname;
		var port = document.location.port;
		var path = document.location.pathname;
		var search = document.location.search;
		if (port.length < 3 && port == "80"){
			window.clipboardData.setData('text', 'http://'+host+path+search);
		}else{
			window.clipboardData.setData('text', 'http://'+host+':'+port+path+search);
		}
		alert('URLÁÖ¼Ò°¡ º¹»çµÇ¾ú½À´Ï´Ù.');
	}

	/*
		Function Name	: getOpenerUrl() 
		Writtern By     : neosky7
		Parameter Info	: None
		Return Info     : None
		Description     : ÆË¾÷ÆäÀÌÁö¿¡¼­ ºÎ¸ðÃ¢ Url °¡Á®¿À±â
	*/
	function getOpenerUrl(){
		var host = opener.document.location.hostname;
		var port = opener.document.location.port;
		var path = opener.document.location.pathname;
		var search = opener.document.location.search;
		if (port.length < 3 && port == "80"){
			window.clipboardData.setData('text', 'http://'+host+path+search);
		}else{
			window.clipboardData.setData('text', 'http://'+host+':'+port+path+search);
		}
		alert('URLÁÖ¼Ò°¡ º¹»çµÇ¾ú½À´Ï´Ù.');
	}

	// ³»¿ë ÇÁ¸°Æ® ÇÏ±â
	function viewPrintWin(){
		var strPos = ',left='+(screenWidth-6600)/2+',top=100';
		winPrintView = window.open('/other/print_page.asp', 'printWindow','width=680,height=600,scrollbars=yes'+strPos);
	}

	function setPng24(obj) {
		obj.width=obj.height=1;
		obj.className=obj.className.replace(/\bpng24\b/i,'');
		obj.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+ obj.src +"',sizingMethod='image');"
		obj.src="http://wemade-image.gscdn.com/null.gif";
		return null;
	}

	var tmpImgSrcOverOut = '';
	function chgMOverOutImg(objImg){
		if (objImg != undefined){
			if (tmpImgSrcOverOut == '' && objImg.src.substring(objImg.src.lastIndexOf('/')).indexOf('on.gif') == -1){
				tmpImgSrcOverOut = objImg.src;
				objImg.src = objImg.src.replace(/.gif/gi, 'on.gif');
			}else if(tmpImgSrcOverOut.length > 4 && objImg.src.substring(objImg.src.lastIndexOf('/')).indexOf('on.gif') > 1){
				objImg.src = tmpImgSrcOverOut;
				tmpImgSrcOverOut = '';
			}
		}
	}

	//Family LInk
	function familyinfo_on(id){
		var infoview = document.getElementById("familyLink");
		infoview.style.display = "block";
	}
	function familyinfo_off(){
		var infoview = document.getElementById("familyLink");
		infoview.style.display = "none";
	}

	function popwindow(pop,width,height){
		var url = pop;  
		var wd = width;
		var he = height;
		nWin = window.open(url,"newWin","toolbar=0,menubar=0,scrollbars=no,resizable=no,width=" + wd +",height=" + he + ";");
		if (nWin != undefined){
			nWin.focus();
		}else{
			alert('ÆË¾÷ Â÷´ÜÀ» ÇØÁ¦ÇØ ÁÖ½Ã°í ´Ù½Ã ½ÃµµÇØ ÁÖ¼¼¿ä.');
		}
	}
	
	// ¹è³Ê ·Î±× ÀúÀå¿ë È£Ãâ (·Î´õ¿ë)
	function setBannerLog(encSeq, encSSeq, strTarget, strLinkUrl, arrDepth){
		var folder = "";
		var frm = document.frmPageLog;
		if (frm !=undefined) {
			document.getElementById('intBmsSeq').value = encSSeq;
			document.getElementById('intBltSeq').value = encSeq;
			saveCurBannerLog();
		}

		if (strTarget == 'blank'){
			winBannerLoc = window.open('about:blank', 'winBanner','');
			if (winBannerLoc != undefined){
				winBannerLoc.location.href = strLinkUrl; return;
			}
			location.reload(); return;
		}else{
			if (strLinkUrl != '#'){
				location.href = strLinkUrl; return;
			}
		}
	}
	
	//¹è³Ê ·Î±× ÀúÀå¿ë È£Ãâ(by smalldevil  2007-12-17)
	function saveCurBannerLogAfter(myAjax) {}
	function saveCurBannerLog(){
		var strParams = ''; var arrBannerLog = document.getElementsByName('txtPageLogVal');
		for (var i = 0; i < arrBannerLog.length ; i++ ){if (arrBannerLog[i] != undefined){if (i > 0) strParams += '&';strParams += arrBannerLog[i].id + '=' + arrBannerLog[i].value;}}
		var myAjax = new net.ContentLoader('/sitelib/act_banner_log.asp', saveCurBannerLogAfter, null, 'POST', strParams);
	}
	
	// ¹è³Ê ·Î±× ÀúÀå¿ë È£Ãâ
	function insBannerLog(encSeq, url){
		var str_Url =  '/sitelib/act_bannerlog.asp?s=' + encSeq + '&url=' + url;
		var myAjax = new net.ContentLoader(str_Url,goBannerReflash, null, "POST", '');
	}
	
	// ¹è³Ê ¸®ÇÃ·¡½Ã
	function goBannerReflash(){
	}	

	// ¹öÆ° Å¬¸¯ ºñÈ°¼ºÈ­
	function bluring(){
		if(event.srcElement.tagName=="A"||event.srcElement.tagName=="IMG") 
			document.body.focus();
	}

	function showLayer(id) {
		document.getElementById(id).style.display = "block";
		return true;
	}

	function hideLayer(id) {
		document.getElementById(id).style.display = "none";
		if(id == "view_layer"){
			setCookie('evtLayer_071224', 100, 1);
		}
		return true;
	}

	document.onfocusin=bluring;

	var sndFlag = false;
	var screenWidth = screen.availwidth;
	var screenHeight = screen.availheight;
	var isIE  = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;    // true if Internet Explorer

    // The right way to add load events. By Simon Willison
	function addLoadEvent(func,param) {
		var oldonload = window.onload;
		if (typeof window.onload != 'function') {
			window.onload = func;
		}else{
			window.onload = function() {
				oldonload();
				func();
			}
		}
	}

    /*¹öµðºê·£µåÈ¨ÇÇÀÏ°æ¿ì nParam = ºó¹®ÀÚ¿­*/
	function goHompy(sUsrId, nParam, sGoUrl) 
	{
		var objHompyWin;
		var nScWidth, nScHeight;
		var nLeft, nHeight;
		var sDomain;

		nScWidth	= screen.width
		nScHeight	= screen.height
		
		nLeft	= (nScWidth <= 1000) ? 10 : parseInt((nScWidth - 1000) / 2);
		nHeight	= (nScHeight <= 620) ? 10 : parseInt((nScHeight - 620) / 2);

		if(sGoUrl == null) sGoUrl = "";

		if(nParam == null || nParam == "") //ºê·£µåÈ¨ÇÇÀÏ°æ¿ì
			sDomain = "http://www.brand.buddybuddy.co.kr";
		else //ÀÏ¹ÝÈ¸¿øÈ¨ÇÇÀÏ°æ¿ì
			sDomain = "http://www" + nParam + ".hompy.buddybuddy.co.kr";

		var sUrl = sDomain + "/home/Hompy.asp?UID=" + sUsrId + "&URL=" + escape(sGoUrl);
		objHompyWin = window.open(sUrl, 'Hompy', 'resizable=no,scrollbars=no,left=' + nLeft + ',top=' + nHeight + ',width=1000,height=620');
		if(objHompyWin)
		{
			objHompyWin.focus();
		}
	}

	

	function moveMenu(intType){
		switch(intType){
			case "3":
				location.href="/schedule/fox_schedule.asp";	
				return false;
			default :
				location.href="/main/main.asp";	
				return false;	
		}
	}

		
	function onkeylengthMax(obj,maxlength)
	{
	   var li_byte     = 0;	   
	   li_byte = document.getElementById(obj).value.bytes();

	   if(li_byte > maxlength)
	   {
		  alert((maxlength/2) + "±ÛÀÚ ÀÌ³»·Î ÀÔ·ÂÇØÁÖ¼¼¿ä."); 			 
		  document.getElementById(obj).value = document.getElementById(obj).value.cut_strlen(maxlength);
		  return false;
	   }
	}

	
	function openWinAgree(){
		window.open('/popup/pop_agree_parent.asp', 'agree_no', 'width=450,height=610,toolbar=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no')
	}

	function openWinEmailNo(){
		window.open('/popup/pop_mail.asp', 'email_no', 'width=450,height=530,toolbar=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no')
	}



	//Fun Point °¡Á®¿À±â
	function getFunPointRoom(){
		var strParams = "";
		var str_Url =  "/sitelib/get_fun_point.asp";
		var myAjax = new net.ContentLoader(str_Url, setFunPointRoom, null, "POST", strParams);
	}
	function setFunPointRoom(){
		if(this.req.readyState == 4) {
			if(this.req.status == 200) {
				document.getElementById("disFunPoint").innerHTML = this.req.responseText;
			}
		}
	}


	function getFunMyPointRoom(){
		var strParams = "";
		var str_Url =  "/sitelib/get_fun_mypoint.asp";
		var myAjax = new net.ContentLoader(str_Url, setFunMyPointRoom, null, "POST", strParams);
	}
	function setFunMyPointRoom(){
		if(this.req.readyState == 4) {
			if(this.req.status == 200) {
				document.getElementById("disFunMyPoint").innerHTML = this.req.responseText;
			}
		}
	}


//Fun My ToTo °¡Á®¿À±â 
	function getFunMyToToRoom(){
		var strParams = "";
		var str_Url =  "/sitelib/get_fun_mytoto.asp";
		var myAjax = new net.ContentLoader(str_Url, setFunMyTotoRoom, null, "POST", strParams);
	}
	function setFunMyTotoRoom(){
		if(this.req.readyState == 4) {
			if(this.req.status == 200) {
				document.getElementById("disFunMyToto").innerHTML = this.req.responseText;
			}
		}
	}