function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  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=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(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 popup(width,height,left,top,url,name)
{
	window.open(url,name,'height='+height+', width ='+width+',left='+left+',top='+top+', scrollbars=yes,resizable=no,menubar=no,toolbar=no,location=no,status=yes');
}
function popup_y(width,height,left,top,url,name)
{
	window.open(url,name,'height='+height+', width ='+width+',left='+left+',top='+top+', scrollbars=yes,resizable=no,menubar=no,toolbar=no,location=no,status=yes');
}
function popup_n(width,height,left,top,url,name)
{
	window.open(url,name,'height='+height+', width ='+width+',left='+left+',top='+top+', scrollbars=no,resizable=no,menubar=no,toolbar=no,location=no,status=no');
}
// »óÇ°Ã£±â
function p_check(frm)
{
	var re = /^\s+|\s+$/g;
	var search_text = frm.search_text.value.replace(re, '');
	
	if(search_text == "") {

		alert("°Ë»ö¾î¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä");
		frm.search_text.value = "";
		frm.search_text.focus();
	}
	else return true;
	return false;
}

function search_check(frm)
{
	if(frm.st_date.value == "") {

		alert("°Ë»ö ½ÃÀÛÀÏÀ» ÀÔ·ÂÇØÁÖ¼¼¿ä");
		frm.st_date.focus();
	}
	else if(frm.en_date.value == "") {

		alert("°Ë»ö Á¾·áÀÏÀ» ÀÔ·ÂÇØÁÖ¼¼¿ä");
		frm.en_date.focus();
	}
	else return true;
	return false;
}


/********\
* ½ºÅ©·Ñ *
\********/

var stmnLEFT = 990; // ¿ÞÂÊ ¿©¹é (¸Þ´º°¡ ¿ÞÂÊ¿¡¼­ 10ÇÈ¼¿ ¶³¾îÁø °÷¿¡ º¸¿©Áý´Ï´Ù) 
var stmnGAP1 = 176; // À§ÂÊ ¿©¹é (¸Þ´º°¡ À§¿¡¼­ 10ÇÈ¼¿ ¶³¾îÁø °÷¿¡ º¸¿©Áý´Ï´Ù) 
var stmnGAP2 = 176; // ½ºÅ©·Ñ½Ã ºê¶ó¿ìÀú À§ÂÊ°ú ¶³¾îÁö´Â °Å¸® 
var stmnBASE = 150; // ½ºÅ©·Ñ ½ÃÀÛÀ§Ä¡ 
var stmnActivateSpeed = 200; 
var stmnScrollSpeed = 10; 

var stmnTimer; 

function ReadCookie(name) 
{ 
var label = name + "="; 
var labelLen = label.length; 
var cLen = document.cookie.length; 
var i = 0; 

while (i < cLen) { 
                var j = i + labelLen; 

                if (document.cookie.substring(i, j) == label) { 
                                var cEnd = document.cookie.indexOf(";", j); 
                                if (cEnd == -1) cEnd = document.cookie.length; 

                                return unescape(document.cookie.substring(j, cEnd)); 
                } 

                i++; 
} 

return ""; 
} 

function SaveCookie(name, value, expire) 
{ 
var eDate = new Date(); 
eDate.setDate(eDate.getDate() + expire); 
document.cookie = name + "=" + value + "; expires=" +  eDate.toGMTString()+ "; path=/"; 
} 

function RefreshStaticMenu() 
{ 
var stmnStartPoint, stmnEndPoint, stmnRefreshTimer; 

stmnStartPoint = parseInt(STATICMENU.style.top, 10); 
stmnEndPoint = document.body.scrollTop + stmnGAP2; 
if (stmnEndPoint < stmnGAP1) stmnEndPoint = stmnGAP1; 

stmnRefreshTimer = stmnActivateSpeed; 

if ( stmnStartPoint != stmnEndPoint ) { 
                stmnScrollAmount = Math.ceil( Math.abs( stmnEndPoint - stmnStartPoint ) / 15 ); 
                STATICMENU.style.top = parseInt(STATICMENU.style.top, 10) + ( ( stmnEndPoint<stmnStartPoint ) ? -stmnScrollAmount : stmnScrollAmount ); 
                stmnRefreshTimer = stmnScrollSpeed; 
} 

stmnTimer = setTimeout ("RefreshStaticMenu();", stmnRefreshTimer); 
} 

function ToggleAnimate() 
{ 
if (ANIMATE.checked) { 
                clearTimeout(stmnTimer); 
                STATICMENU.style.top = stmnGAP1; 
                SaveCookie("ANIMATE", "true", 300); 
} 
else { 
                RefreshStaticMenu(); 
                SaveCookie("ANIMATE", "false", 300); 
} 
} 

function InitializeStaticMenu() 
{ 
STATICMENU.style.left = stmnLEFT; 

         if (ReadCookie("ANIMATE") == "false") { 
                ANIMATE.checked = false; 
                STATICMENU.style.top = document.body.scrollTop + stmnGAP1; 
                RefreshStaticMenu(); 
} 
else { 
                ANIMATE.checked = true; 
                STATICMENU.style.top = document.body.scrollTop + stmnBASE; 
} 
} 

// ¿À´Ãº»»óÇ° º¸ÀÌ°í ¼û±â±â
var ol_menu = '';
var ol_cell = '';
function toclick(listmenu,cellbar)
{
	if( ol_menu != listmenu ) {
		if( ol_menu !='' ) {
			ol_menu.style.display = 'none';
		}
		listmenu.style.display = 'none';
		ol_menu = listmenu;
		ol_cell = cellbar;

	}
	else if( ol_menu == listmenu ) {
		listmenu.style.display = 'block';
		ol_menu = '';
		ol_cell = '';
	}
}

//	¿ëµµº° ºê·£µåº° ¼±ÅÃÁ¤º¸
function cate_change(type)
{
	if(type == "1") {

		document.getElementById("cate1").style.display = '';
		document.getElementById("cate2").style.display = 'none';
		document.getElementById("img1").src = document.getElementById("img1").src3;
		document.getElementById("img2").src = document.getElementById("img2").src2;

		if (document.getElementById("cate3"))
		{
			document.getElementById("cate3").style.display = '';
			document.getElementById("cate4").style.display = 'block';
			document.getElementById("cate5").style.display = '';
			document.getElementById("cate6").style.display = 'none';
		}
	}
	else if(type == "2") {

		document.getElementById("cate1").style.display = 'none';
		document.getElementById("cate2").style.display = '';
		document.getElementById("img1").src = document.getElementById("img1").src2;
		document.getElementById("img2").src = document.getElementById("img2").src3;

		if (document.getElementById("cate3"))
		{
			document.getElementById("cate3").style.display = 'none';
			document.getElementById("cate4").style.display = 'block';
			document.getElementById("cate5").style.display = 'none';
			document.getElementById("cate6").style.display = '';
		}
	}
	else if(type == "3") {

		document.getElementById("cate3").style.display = '';
		document.getElementById("cate4").style.display = 'block';
		document.getElementById("cate5").style.display = '';
		document.getElementById("cate6").style.display = 'none';
	}
	else if(type == "4") {

		document.getElementById("cate3").style.display = 'none';
		document.getElementById("cate4").style.display = 'none';
		document.getElementById("cate5").style.display = 'none';
		document.getElementById("cate6").style.display = '';
	}
}

function showSun(src)
{
	var imgObj = new Image();
	imgObj.src = src;
	var wopt = "scrollbars=no,status=no,resizable=no";
	wopt += ",width=" + imgObj.width;
	wopt += ",height=" + imgObj.height;
	var wbody = "<head><title>¿À´ÃÀÇ ÅÂ¾ç</title>";
	wbody += "<script language='javascript'>";
	wbody += "function finalResize(){";
	wbody += "  var oBody=document.body;";
	wbody += "  var oImg=document.images[0];";
	wbody += "  var xdiff=oImg.width-oBody.clientWidth;";
	wbody += "  var ydiff=oImg.height-oBody.clientHeight;";
	wbody += "  window.resizeBy(xdiff,ydiff);";
	wbody += "}";
	wbody += "</"+"script>";
	wbody += "</head>";
	wbody += "<body onLoad='finalResize()' style='margin:0'>";
	wbody += "<a href='javascript:window.close()'><img src='" + src + "' border=0></a>";
	wbody += "</body>";
	winResult = window.open("about:blank","",wopt);
	winResult.document.open("text/html", "replace");
	winResult.document.write(wbody);
	winResult.document.close();
	return;
}

function agree()
{
	agreement = document.frm.agreement;
	provision = document.frm.provision;

	if(agreement[1].checked == true) {

		alert("ÀÌ¿ë¾à°ü¿¡ µ¿ÀÇÇÏ¿© ÁÖ¼¼¿ä.");
	}
	else if(provision[1].checked == true) {

		alert("°³ÀÎÁ¤º¸ Ãë±Þ¹æÄ§¿¡ µ¿ÀÇÇÏ¿© ÁÖ¼¼¿ä");
	}
	else location.href='/member.htm?mode=mem_join';
}