document.title = '::: Á¦½ÃÄ«Å°Ä£ :::';

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='';  
	return ''; 
}

var ran = Math.floor(Math.random()*100000000);

/* ÇÃ·¡½Ã¸¦ html¿¡ Ç¥½ÃÇÏ±â À§ÇÑ js */
/* ÀÎ¼ö : swfÆÄÀÏ¸í(string),°íÀ¯id(string),wmode°ª(string),°¡·Î(int),¼¼·Î(int),ÇöÀç¸Þ´ºÀ§Ä¡°ª(int) */
function flashWrite(fn,idv,wm,w,h,val) {
  var strFlashValue = "" +
  "<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width='"+w+"' height='"+h+"' id='"+idv+"' name='"+idv+"' align='top'> " +
  "<param name='allowScriptAccess' value='always' /> " +
  "<param name='movie' value='"+fn+"&rand=" + ran + "' /> " +
  "<param name='quality' value='high' /> " +
  "<param name='wmode' value='"+wm+"' /> " +
  "<embed src='"+fn+"' quality='high' bgcolor='#ffffff' width='"+w+"' height='"+h+"' name='"+idv+"' id='"+idv+"' name='"+idv+"' align='top' wmode='"+wm+"' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' /> " +
  "</object> " ;

  document.write (strFlashValue);
}



// Flash Àü¿ë È£ÃâÇÔ¼ö id_name : ID¶Ç´ÂName °ª, swf_name : ¼îÅ©¿þÀÌºêÆÄÀÏ °æ·Î(ÀÌ¸§,GET°ªÆ÷ÇÔ), wdith: ³ÐÀÌ°ª, height: ³ôÀÌ°ª 
function swf_func(id_name,swf_name,width,height){ 
document.writeln("<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='/asset/flash/swflash.cab#version=8,0,0,0' width='"+width+"' height='"+height+"' id='"+id_name+"' align='TL'>");
document.writeln("<param name='allowScriptAccess' value='always'>");
document.writeln("<param name='movie' value='"+swf_name+"'>");
document.writeln("<param name='quality' value='high'>");
document.writeln("<param name='bgcolor' value='#ffffff'>");
document.writeln("<param name='wmode' Value='Transparent'>");
document.writeln("<EMBED src='"+swf_name+"' width='"+width+"' height='"+height+"' type='application/x-shockwave-flash' wmode='transparent'></EMBED>");
document.writeln("</object>");
}


//µ¿¿µ»ó Àü¿ë È£ÃâÇÔ¼ö
function mov_func(id,name,width,height){
document.writeln("<OBJECT classid='clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95' width='"+width+"' height='"+height+"' id='"+id+"'>");
document.writeln("<PARAM NAME='Filename' VALUE='" +name +"'>");
document.writeln("<PARAM NAME='Showcontrols' VALUE='false'>");
document.writeln("<PARAM NAME='Autostart' VALUE='false'>");
document.writeln("<PARAM NAME='uimode' VALUE='false'>");
document.writeln("<PARAM NAME='Volume' VALUE='-1000'>");
document.writeln("<EMBED src='"+ name +"' width='" + width + "' height='" + (Number(height)+60)  + "' id='" + id + "' autostart='0' controller='0' volume='-1000'></EMBED>");
document.writeln("</OBJECT>");
}

// ÀÌ¹ÌÁö ÀÚµ¿ Ãà¼Ò(°Ô½ÃÆÇ ³ÐÀÌ¿¡ ¸ÂÃã)
function imageChange(imgSize) {
	for(i = 0;i < document.images.length; i++){
		if(document.images[i].id == "userIMAGE"){
			if(document.images[i].width > imgSize){
				document.images[i].height = document.images[i].height / (document.images[i].width / imgSize);
				document.images[i].width = imgSize;
			}
		}
	}
}

//ÇÑ±ÛÀÎÁö °Ë»ç
function Check_onlyKorean(str){
	for ( var i=0; i < str.length; i++ ) {
		if ( str.charCodeAt(i) < 0xAC00 || str.charCodeAt(i) > 0xD7A3){
			if (( str.charCodeAt(i) < 12593 || str.charCodeAt(i) > 12643 ) && ( str.charCodeAt(i) != 32)) {
				return true;
			}
		}
	}	
	return false;
}

//±â´É : ÆË¾÷Ã¢À» È­¸é Áß¾Ó¿¡ ¶ç¿ì´Â ÇÔ¼ö
//»ç¿ë¹ý : openPopup('auth_write.asp','auth',667,500,'scrollbars=yes,width=667,height=500')
function openPopup( url, name, width, height, features) {
    var left= ( screen.width   - width ) / 2;
    var top = ( screen.height   - height ) / 2;
    return window.open(url, name, features + ',left=' + left + ', top=' + top);
}

/*
±â´É : ÇÊµå¿¡ ¼ýÀÚ¸¸ ÀÔ·ÂÇÒ¼ö ÀÖ´Â ÇÔ¼ö 
»ç¿ë¹ý : onkeyup="onlyNumber(this);"
*/
 
function onlyNumber(el) {
  el.value = el.value.replace(/\D/g,'');
}

//¹®ÀÚ¿­ÀÇ °ø¹éÁ¦°Å (¾çÃø)
function Trim( str ) {
		
	var resultStr = "";
		
	resultStr = TrimLeft(str);
	resultStr = TrimRight(resultStr);
	
	return resultStr;
}

//¹®ÀÚ¿­ÀÇ °ø¹éÁ¦°Å (ÁÂÃø)
function TrimLeft( str ) {
	var resultStr = "";
	var i = len = 0;	
	if (str+"" == "undefined" || str == null) return null;	
	str += "";
	
	if (str.length == 0) resultStr = "";
	else {	
		len = str.length;					
  		while ((i <= len) && (str.charAt(i) == " "))i++;   	
  		resultStr = str.substring(i, len);
  	}

  	return resultStr;
} 

//¹®ÀÚ¿­ÀÇ °ø¹éÁ¦°Å (¿ìÃø)
function TrimRight( str ) {
	var resultStr = "";
	var i = 0;	
	
	if (str+"" == "undefined" || str == null) return null;
	str += "";
		
	if (str.length == 0) resultStr = "";
	else {
  		i = str.length - 1;
  		while ((i >= 0) && (str.charAt(i) == " "))
 			i--;
	  		resultStr = str.substring(0, i + 1);
	  	}
	  	
	  	return resultStr;  	
}

/*
±â´É : ÇÊµå¿¡ ¼ýÀÚ¸¸ ÀÔ·ÂÇÒ¼ö ÀÖ´Â ÇÔ¼ö 
»ç¿ë¹ý : onkeyup="onlyNumber(this);"
*/
 
function onlyNumber(el) {
  el.value = el.value.replace(/\D/g,'');
}

/*
±â´É : °øÅë Input Box Blank CheckÇÔ¼ö
»ç¿ë¹ý1 : setInputAlert(form1.field, fieldName);
*/
function setInputAlert(field, fieldName) {	
	if(Trim(field.value) == "") {
		alert(fieldName +" ÀÔ·ÂÇØÁÖ¼¼¿ä.");
		field.focus();
		return false;
	}else{
		return true;
	}
}

/*
±â´É : °øÅë Select Box Blank CheckÇÔ¼ö
»ç¿ë¹ý1 : setSelectAlert(form1.field, fieldName);
*/
function setSelectAlert(field, fieldName) {	
	if(Trim(field.value) == "") {
		alert(fieldName +" ¼±ÅÃÇØÁÖ¼¼¿ä.");		
		field.focus();
		return false;
	}else{
		return true;
	}
}

/*
±â´É : °øÅë Check Box Blank CheckÇÔ¼ö
»ç¿ë¹ý1 : setCheckAlert(form1.field, fieldName);
*/
function setCheckAlert(field, fieldName) {	
	var temp = 0;
	for(i = 0; i < field.length; i++){
		if(field[i].checked == true){
			temp = temp + 1;
		}
	}
	
	if(temp == 0){
		alert(fieldName+" ¼±ÅÃÇØÁÖ¼¼¿ä.");
		return false;
	}else{
		return true;
	}
}

/*
±â´É : ÆË¾÷¸®»çÀÌÁî
»ç¿ë¹ý1 : popresize()
*/
function popresize(){
	scrollheight = parseInt(document.body.scrollHeight);
	scrollwidth	 = parseInt(document.body.scrollWidth);

	clientheight = parseInt(document.body.clientHeight);
	clientwidth = parseInt(document.body.clientWidth);

	height = scrollheight - clientheight
	width = scrollwidth - clientwidth	
	
	this.resizeBy(width,height);
}


function goLoginProcess(d,p) {
	var f = document.logFrm;
	f.user_id.value = d;
	f.user_pwd.value = p;
	f.submit();
}

function goPage(s) {
	var f = document.frm;
	f.pageseq.value = s;
	f.submit();
}

function goList() {
	var f = document.frm;
	f.submit();
}


function getIpin(){
	window.open("/membership/ipin.asp","ipn","width=453,height=531");
}


function moveNext(obj,num,next) {
	//alert(obj.value.length)
	if(obj.value.length == num) {
		document.frm[next].focus();
	}
}


// ·Î±×ÀÎ ÆË¾÷
function popMSG(val) {
	//if(pageWhere == "/index.asp") {
		topPx = (document.documentElement.scrollTop + 200) + "px";
		leftPx = 360;
	//} else {
	//	topPx = (document.documentElement.scrollTop - 100) + "px";
	//	leftPx = 260;
	//}
	
	document.getElementById("msg").innerHTML = val;
	document.getElementById("pop_msg").style.display = "block";
	document.getElementById("pop_msg").style.top = topPx;
	document.getElementById("pop_msg").style.left = leftPx;

	var w = document.documentElement.scrollWidth;
	var h = document.documentElement.scrollHeight;

	document.getElementById("backDim").style.width = w+"px";
	document.getElementById("backDim").style.height = h+"px";
}
function msgHide() {
	document.getElementById("pop_msg").style.display = "none";

	document.getElementById("backDim").style.width = "0px";
	document.getElementById("backDim").style.height = "0px";
}




// ÀÏ¹Ý ÆË¾÷ (ÀÌµ¿¹öÆ°)
var goUrl="/";
function popMSGalert(val,gurl) {
	goUrl = gurl;

	topPx = (document.documentElement.scrollTop + 200) + "px";
	leftPx = 360;

	document.getElementById("msg_alert").innerHTML = val;
	document.getElementById("pop_msg_alert").style.display = "block";
	document.getElementById("pop_msg_alert").style.top = topPx;
	document.getElementById("pop_msg_alert").style.left = leftPx;
}
function msgHidealert() {
	document.getElementById("pop_msg_alert").style.display = "none";
	window.location.href = goUrl;
}



// ÀÏ¹Ý ÆË¾÷ (ÀÌµ¿¹öÆ° ¾ø½¿)
function popMSGmsg(val) {
	topPx = (document.documentElement.scrollTop + 200) + "px";
	leftPx = 360;

	document.getElementById("msg_msg").innerHTML = val;
	document.getElementById("pop_msg_msg").style.display = "block";
	document.getElementById("pop_msg_msg").style.top = topPx;
	document.getElementById("pop_msg_msg").style.left = leftPx;
}
function msgHidemsg() {
	document.getElementById("pop_msg_msg").style.display = "none";

	document.getElementById("backDim").style.width = "0px";
	document.getElementById("backDim").style.height = "0px";
}




// ¾ÆÀÌµðÃ£±â Ãâ·Â ÆË¾÷ (ÀÌµ¿¹öÆ° ¾ø½¿)
function popMSGID(val) {
	topPx = (document.documentElement.scrollTop + 200) + "px";
	leftPx = 360;

	document.getElementById("msg_id").innerHTML = val;
	document.getElementById("pop_msg_id").style.display = "block";
	document.getElementById("pop_msg_id").style.top = topPx;
	document.getElementById("pop_msg_id").style.left = leftPx;
}
function msgHideid() {
	document.getElementById("pop_msg_id").style.display = "none";

	document.getElementById("backDim").style.width = "0px";
	document.getElementById("backDim").style.height = "0px";
}




function popMSGalertBig(val,gurl) {
	goUrl = gurl;

	topPx = (document.documentElement.scrollTop + 200) + "px";
	leftPx = 360;

	document.getElementById("msg_alert_big").innerHTML = val;
	document.getElementById("pop_msg_alert_big").style.display = "block";
	document.getElementById("pop_msg_alert_big").style.top = topPx;
	document.getElementById("pop_msg_alert_big").style.left = leftPx;

	var w = document.documentElement.scrollWidth;
	var h = document.documentElement.scrollHeight;

	document.getElementById("backDim").style.width = w+"px";
	document.getElementById("backDim").style.height = h+"px";
}
function msgHidealertBig() {
	document.getElementById("pop_msg_alert_big").style.display = "none";
	try{
		if(goUrl != "" && goUrl != undefined) {
			window.location.href = goUrl;
		}
	}catch (e){ }

	document.getElementById("backDim").style.width = "0px";
	document.getElementById("backDim").style.height = "0px";

}





function popMSGlog(val) {
	//if(pageWhere == "/index.asp") {
		topPx = (document.documentElement.scrollTop + 200) + "px";
		leftPx = 360;
	//} else {
	//	topPx = (document.documentElement.scrollTop - 100) + "px";
	//	leftPx = 260;
	//}

	document.getElementById("msg_log").innerHTML = val;
	document.getElementById("pop_msg_log").style.display = "block";
	document.getElementById("pop_msg_log").style.top = topPx;
	document.getElementById("pop_msg_log").style.left = leftPx;

	var w = document.documentElement.scrollWidth;
	var h = document.documentElement.scrollHeight;

	document.getElementById("backDim").style.width = w+"px";
	document.getElementById("backDim").style.height = h+"px";
}





// ºñÈ¸¿ø»óÅÂ¿¡¼­ ·Î±×ÀÎ ÇÊ¿äÇÑ ÆäÀÌÁö Á¢±Ù½Ã
function askLogin() {
	popMSG("·Î±×ÀÎÀÌ ÇÊ¿äÇÑ ÆäÀÌÁöÀÔ´Ï´Ù");
}



// ·Î±×ÀÎ »óÅÂ¿¡¼­ È¸¿øÁ¤º¸¼öÁ¤ ÆäÀÌÁö Á¢±Ù½Ã
function confirmPW() {
	document.frm3.user_pwd.value = "";

	topPx = (document.documentElement.scrollTop + 200) + "px";
	leftPx = 360;

	document.getElementById("pop_pwd").style.display = "block";
	document.getElementById("pop_pwd").style.top = topPx;
	document.getElementById("pop_pwd").style.left = leftPx;

	var w = document.documentElement.scrollWidth;
	var h = document.documentElement.scrollHeight;

	document.getElementById("backDim").style.width = w+"px";
	document.getElementById("backDim").style.height = h+"px";

	document.frm3.user_pwd.focus();
}
function msgHidePW() {
	document.getElementById("pop_pwd").style.display = "none";

	document.getElementById("backDim").style.width = "0px";
	document.getElementById("backDim").style.height = "0px";

}



// ÀÓ½Ã ºñ¹Ð¹øÈ£ º¯°æ
function popChangePwd() {
	document.frm4.tmp_pwd.value = "";
	document.frm4.user_pwd.value = "";
	document.frm4.user_pwd2.value = "";

	topPx = (document.documentElement.scrollTop + 200) + "px";
	leftPx = 360;

	document.getElementById("pop_chgpwd").style.display = "block";
	document.getElementById("pop_chgpwd").style.top = topPx;
	document.getElementById("pop_chgpwd").style.left = leftPx;

	var w = document.documentElement.scrollWidth;
	var h = document.documentElement.scrollHeight;

	document.getElementById("backDim").style.width = w+"px";
	document.getElementById("backDim").style.height = h+"px";

	document.frm3.user_pwd.focus();
}
function msgHideChgpwd1() {
	document.getElementById("pop_chgpwd").style.display = "none";

	document.getElementById("backDim").style.width = "0px";
	document.getElementById("backDim").style.height = "0px";

}
function msgHideChgpwd2() {
	window.location.href = "/";

}
function chkValue4() {
	var f = document.frm4;

	if(f.tmp_pwd.value == "") {
		alert("ÀÓ½Ã ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇÏ¼¼¿ä");
		f.tmp_pwd.focus();
		return false;
	}
	if(f.user_pwd.value == "") {
		alert("½Å±Ô ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇÏ¼¼¿ä");
		f.user_pwd.focus();
		return false;
	}
	if(f.user_pwd2.value == "") {
		alert("ºñ¹Ð¹øÈ£ È®ÀÎÀ» ÀÔ·ÂÇÏ¼¼¿ä");
		f.user_pwd2.focus();
		return false;
	}
	if(f.user_pwd.value != f.user_pwd2.value) {
		alert("½Å±Ôºñ¹Ð¹øÈ£¿Í ºñ¹Ð¹øÈ£È®ÀÎÀÌ ÀÏÄ¡ÇÏÁö ¾Ê½À´Ï´Ù");
		return false;
	}

	return true;
}