var getId = document.getElementById;

String.prototype.trim = function(){
  return this.replace(/(^\s*)|(\s*$)/gi, "");
}
//파일 확장자 추출
function getExtends(imgObj){
		var pathpoint = imgObj.lastIndexOf('.');
		var filepoint = imgObj.substring(pathpoint+1, imgObj.length);
		var filetype = filepoint.toLowerCase();
		return filetype;
}
function selectBoxValueSet(divId, spanId, hiddenId, value, value2){
	document.getElementById(spanId).innerHTML = value;
	document.getElementById(hiddenId).value = value2;
	document.getElementById(divId).style.display = "none";
}

function selectBoxValueSet2(divId, spanId, hiddenId, value){
	document.getElementById(spanId).innerHTML = value;
	document.getElementById(hiddenId).value = value;
	document.getElementById(divId).style.display = "none";
}

function sel(obj, value){
	obj.style.background=value;
}

function noneFix(id){
	document.getElementById(id).style.display = 'none';
}

function inlineFix(id){
	document.getElementById(id).style.display = '';
}

function Go_Home()
{
	location.href = "/main.html";//domain_svc;
}

function GoFlashMenuUrl(M)
{
	switch (M)
	{
		case 1:
			location.href = "/gallery/main.html";
			break;
		case 2:
			location.href = "/sketch/main.html";
			break;
		case 3:
			location.href = "/diary/main.html";
			break;
		case 4:
			location.href = "/contest/main.html";
			break;
		case 5:
			location.href = "/event/main.html";
			break;
		case 6:
			location.href = "/board/notice.html";
			break;
		case 7:
			location.href = "/board/poll.html";
			break;
		case 8:
			location.href = "/member/join.html";
			break;
		case 9:
			location.href = "/member/edit.html";
			break;
		case 10:
			location.href = "/board/faq.html";
			break;
	}
}

function Login()
{
	fn_winopen_center("/member/login.html", "_blank", 350, 300, "no");
}

function pass_search()
{
	//fn_winopen_center("/member/pass_search.html", "_blank", 350, 300, "no");
	location.href = "/member/pass_search.html";
}

function id_search()
{
	//fn_winopen_center("/member/id_search.html", "_blank", 400, 248, "no");
	location.href = "/member/id_search.html";
}

function login_check()
{
	var preUrl;		//이동 하기 전 URL
	var nextUrl;	//이동 요청할 최종 URL 

	if (document.getElementById("user_id").value == "")
	{
		alert("아이디를 입력해 주세요.");
		document.getElementById("user_id").focus();
		return false;
	}
	else if (document.getElementById("user_pwd").value == "")
	{
		alert("비밀번호를 입력해 주세요.");
		document.getElementById("user_pwd").focus();
		return false;
	}
	else
	{	
		preUrl = opener.document.referrer;
		nextUrl = opener.document.URL;

		if ("<%=DOMAIN_SVC%>" == "http://www.starhwabo.com")
			document.getElementById("login").action = "https://www.starhwabo.com/member/login_proc.html";
		else
			document.getElementById("login").action = "/member/login_proc.html";

		document.getElementById("login").submit();
	}
}

function Member_Join()
{
	location.href = "/member/join.html";
}

function Go_Contest_Profile(ck_idx)
{
	//나도스타함콘테스트 종료 시 안내 팝업 띄우고 프로필 등록하지 못 함(프로필 미등록된 경우)
	if (Profile_RegCheck == 0)
	{
		Except_Popup();
	}
	else	{
		if (ck_idx > 0)
		{
			location.href = "/contest/profile_reg.html";
		}
		else
			Login();
	}
}

function Except_Popup()
{
	var ret_msg = "나도스타 콘테스트 1기 선발이 종료되었습니다.<br>다가오는 2기 선발에 도전해주세요.<br>감사합니다.";
	fn_winopen_center("/popup/pop_chk_error.html?ret_msg=" + escape("나도스타 콘테스트 1기 선발이 종료되었습니다.<br>다가오는 2기 선발에 도전해주세요.<br>감사합니다."), "_blank", 350, 218, "no");
}

function Member_Edit()
{
	fn_winopen_center("/member/login_retry.html", "_blank", 350, 300, "no");
}

function Logout()
{
	location.href = "/member/logout.html";
}

// 영어만 입력받기 (대소문자)
// 나머지 글자 무시
function nr_eng(this_s, type)
{
	temp_value = this_s.value.toString();
	regexp = '';
	repexp = '';

	switch(type){
		case 'small':regexp = /[^a-z]/g;break;
		case 'big':regexp = /[^A-Z]/g;break;
		case 'all':regexp = /[^a-z]/i;break;
		default :regexp = /[^a-z]/i;break;
	}

	temp_value = temp_value.replace(regexp,repexp);
	this_s.value = temp_value;
}

// 자기 자신의 URL 가져오기
function getUrlAddress()
{
	var pageUrl = document.location; 

	pageUrl = new String(pageUrl);
	//alert(pageUrl);
	return pageUrl.substring(0,pageUrl.lastIndexOf("/"));
}

function runObj(string)
{
	if(string != undefined) {
		document.write(string);
	}
}

//숫자만 입력 
//check_num은 Object 
function numCheck(check_num){
	var inText = check_num.value;
	var ret;

	for (var i=0; i<inText.length; i++) {
		ret = inText.charCodeAt(i);

		if (ret < 45 || ret > 57)	{
			alert("숫자로만 기입하여 주시기 바랍니다.");
			check_num.value = "";
			check_num.focus();
			return false;
		} // if 문
	}
}

function numCheck2(event){
	if (event.keyCode < 45 || event.keyCode > 57) {
		event.returnValue = false;
		return false;
	}
}

//값체크 (공백이 입력된 경우도 체크됨)
function isNullbyValue(val){
  if(val.match(/\S/)==null) return true;
  else return false;
}

//View Count 업데이트 또는 온라인폴 투표 정보 요청
function UpdateRequest(url, params) {
	//alert(url + "_" + params);
	sendRequest(url, params, UpdateCallBack, "POST", true);
}

//업데이트 콜백
function UpdateCallBack() {
	var ret_msg, result;

	if (httpRequest.readyState == 4) {
		//alert(httpRequest.status);
		if (httpRequest.status == 200) {
			//alert(httpRequest.responseText);
			result = httpRequest.responseText.split("#");
			//alert(result[0]);
			if (result[1] == "0000")	{
				location.href = result[0];
			}
			else	{
				ret_msg = result[2];
				//alert(ret_msg);
				fn_winopen_center("/popup/pop_chk_error.html?ret_msg=" + escape(ret_msg), "_blank", 350, 218, "no");
				//파폭에서는 escape 하지 않아도 한글 깨지지 않음!!!
			}
		}
		else if (httpRequest.status == 204)	{//alert('페이지 에러입니다.다시한번 시도해주세요.');
			ret_msg = "페이지 에러입니다.다시한번 시도해주세요.";

			fn_winopen_center("/popup/pop_chk_error.html?ret_msg=" + escape(ret_msg), "_blank", 350, 218, "no");
		}
	}
}

// 가운데로 새창 띄어주기
function fn_winopen_center(url,target,w,h,scroll)
{
	var win= null;
	var winl = (document.documentElement.clientWidth/2) - (w/2);
	var wint = (document.documentElement.clientHeight/2) - (h/2);

	var settings  ='height='+h+',';
		settings +='width='+w+',';
		settings +='top='+wint+',';
		settings +='left='+winl+',';
		settings +='scrollbars='+scroll+',';
		settings +='menubar=no,toolbar=no,location=no,resizable=no,status=no,directories=no';
	win=window.open(url,target,settings);
	win.focus();
	/*팝업창 속성들
		toolbar : 도구모음 표시할지 여부 - yes/no 
		location : 주소 표시줄의 표시 여부 - yes/no 
		status : 상태바 표시 여부 - yes/no 
		menubar : 메뉴 표시줄의 표시 여부 - yes/no 
		scrollbars : 스크롤바 표시 여부 - yes/no 
		directories : 디렉토리바의 표시 여부 - yes/no 
		resizable : 창 크기 조절 가능 여부 - yes/no 
		height 창 : 높이 - 픽셀단위 
		width : 창 너비 - 픽셀단위
		※ 창속성을 아무것도 지정안할 경우는 디폴트로 모두 yes 이지만 하나라도 지정할 경우는 나머지는 모두 no 입니다.
	*/
}
// 팝업창 리사이즈
function fn_popWindowReSize(pop_width,pop_height)
{
	try
	{
		if (navigator.appName != "Microsoft Internet Explorer")
			fn_win_resize(pop_width+5, pop_height+63);
		else
			window.resizeBy(pop_width - document.body.clientWidth, (pop_height+15) - document.body.clientHeight);
		
		window.focus();
	}
	catch(e)
	{
		fn_win_resize(pop_width, pop_height+15);
		window.focus();
	}
}

function Send_AuthSms()
{
	if (document.getElementById("mdn2").value == "" && document.getElementById("mdn3").value == "")	{
		alert("휴대폰번호를 입력하세요.");
		document.getElementById("mdn2").focus();
	}
	else if (document.getElementById("mdn3").value != "" && document.getElementById("mdn2").value == "")	{
		alert("휴대폰번호를 입력하세요.");
		document.getElementById("mdn2").focus();
	}
	else if (document.getElementById("mdn2").value != "" && document.getElementById("mdn3").value == "")	{
		alert("휴대폰번호를 입력하세요.");
		document.getElementById("mdn3").focus();
	}
	else if (document.getElementById("mdn2").value.length < 3)
	{
		alert("휴대폰번호가 올바르지 않습니다. 다시 입력하세요.");
		document.getElementById("mdn2").focus();
	}
	else if (document.getElementById("mdn3").value.length != 4)
	{
		alert("휴대폰번호가 올바르지 않습니다. 다시 입력하세요.");
		document.getElementById("mdn3").focus();
	}
	else{
		if (document.getElementById("tc").value == "S")
		{
			document.getElementById("dataform").charset = "euc-kr";
			//document.charset = "euc-kr";
			document.getElementById("dataform").action = "/common/file/auth_sms_skt.html";
			document.getElementById("dataform").target = "hiddenframe";
			document.getElementById("dataform").submit();
		}
		else
			SMSRequest(document.getElementById("tc").value, document.getElementById("mdn1").value, document.getElementById("mdn2").value, document.getElementById("mdn3").value, document.getElementById("ctype").value);
	}
}

//SMS 인증 발송 및 콜백 발송 정보 요청(SKT 이외의 이통사 인증번호 발송 시)
function SMSRequest(tc, mdn1, mdn2, mdn3, ctype) {
	var url = "/common/file/auth_sms_etc.html"; 
	var params = "tc=" + tc + "&mdn1=" + mdn1 + "&mdn2=" + mdn2 + "&mdn3=" + mdn3+ "&ctype=" + ctype;
	sendRequest(url, params, SMSCallBack, "POST", true);
}

//SMS 인증 발송 및 콜백 발송 정보 콜백(SKT 이외의 이통사 인증번호 발송 시)
function SMSCallBack() {
	var ret_msg, result;

	if (httpRequest.readyState == 4) {
		if (httpRequest.status == 200){
			result = httpRequest.responseText.split("#");

			if (result[0] == "0")	{
				document.getElementById("phone_input").style.display = "none";
				document.getElementById("auth_input").style.display = "block";
				document.getElementById("mdn").value = document.getElementById("mdn1").value + document.getElementById("mdn2").value + document.getElementById("mdn3").value;
				document.getElementById("auth_num").focus();
			}
			else	{
				ret_msg = result[1];
				if (result[0] == "E900"){
					alert('이미 사용중인 휴대폰번호입니다.');
				}else{
					fn_winopen_center("/popup/pop_chk_error.html?ret_msg=" + escape(ret_msg), "_blank", 350, 218, "no");
				}
				ErrorPhoneReset();
			}
		}
		else if (httpRequest.status == 204)	{//데이터가 존재하지 않을 경우
			alert('페이지 에러입니다.다시한번 시도해주세요.');
			ErrorPhoneReset();
		}
	}
}

function ErrorPhoneReset(){
	document.getElementById("tc").value = "S";
	document.getElementById("tc_key").innerHTML = "SKT";
	document.getElementById("mdn_key").innerHTML = "010";
	document.getElementById("mdn1").value = "010";
	document.getElementById("mdn2").value = "";
	document.getElementById("mdn3").value = "";
	document.getElementById("phone_input").style.display = "block";
	document.getElementById("auth_input").style.display = "none";
	document.getElementById("auth_num").value = "";
}

//인증번호 확인 요청
function AuthNum_Check()
{
	var url = "/common/file/auth_sms_check.html"; 
	var tc = document.getElementById("tc").value;
	var mdn1 = document.getElementById("mdn1").value;
	var mdn2 = document.getElementById("mdn2").value;
	var mdn3 = document.getElementById("mdn3").value;
	var mdn = document.getElementById("mdn").value;
	var auth_num = document.getElementById("auth_num").value;
	var ctype = document.getElementById("ctype").value;
	var params = "tc=" + tc + "&mdn1=" + mdn1 + "&mdn2=" + mdn2 + "&mdn3=" + mdn3 + "&mdn=" + mdn + "&auth_num=" + auth_num + "&ctype=" + ctype;
	
	sendRequest(url, params, SMSAuthCallBack, "POST", true);
}

//SMS 인증번호 확인 정보 콜백
function SMSAuthCallBack() {
	var ret_msg, result;

	if (httpRequest.readyState == 4) {
		if (httpRequest.status == 200){
			result = httpRequest.responseText.split("#");

			if (result[0] == "0")	{
				document.getElementById("auth_ret").value = 1;
				document.getElementById("auth_num").value = "";

				alert(result[1]);
				
				document.getElementById("phone_input").style.display = "block";
				document.getElementById("auth_input").style.display = "none";
			}
			else	{
				ret_msg = result[1];
				
				fn_winopen_center("/popup/pop_chk_error.html?ret_msg=" + escape(ret_msg), "_blank", 350, 218, "no");
			}
		}
		else if (httpRequest.status == 204)	{alert('페이지 에러입니다.다시한번 시도해주세요.');	}//데이터가 존재하지 않을 경우
	}
}

//SKT 콜백 SMS 발송 요청
function Go_CallbackSMS(flag)
{
	if (document.getElementById("auth_num").value == "")	{
		alert("인증번호를 입력하세요.");
		document.getElementById("auth_num").focus();
	}
	else	{
		//document.dataform.charset = "euc-kr";
		document.charset = "euc-kr";
		if (flag == 1)
			document.getElementById("dataform").target = "hiddenframe";
		
			document.getElementById("dataform").action = "/common/file/callback.html";
			document.getElementById("dataform").submit();
		/*}
		else	{
			document.getElementById("dataform").action = "/common/file/callback.html?flag=" + flag;
			document.getElementById("dataform").submit();
		}*/

		document.getElementById("phone_input").style.display = "block";
		document.getElementById("auth_input").style.display = "none";
		document.getElementById("mdn_key").innerHTML = '010';
		document.getElementById("mdn1").value = "010";
		document.getElementById("mdn2").value = "";
		document.getElementById("mdn3").value = "";
		document.getElementById("auth_num").value = "";
	}
}

function hideView(id){
	if (document.getElementById(id).innerHTML.trim() == "" ){
		return;
	}else{	
		if (document.getElementById(id).style.display == "inline"){
			document.getElementById(id).style.display = "none";
		}else {
			document.getElementById(id).style.display = "inline";
		}
	}
}

//UL/LI 셀렉트 박스 초기화
//파라메터 셀렉박스 ID, 히든값 ID, 노출 SPAN ID
function selectReset(select_id, value_id, span_id){
	document.getElementById(select_id).style.display = "none";
	document.getElementById(select_id).innerHTML = "";
	document.getElementById(span_id).innerHTML = "선택";
	document.getElementById(value_id).value = "";
}

function selectContestOverlap(openId){
	var selArray = new Array("year_select","month_select","day_select","blood_select")
	for (var i=0;i<4;i++){
		if (selArray[i] != openId)	{
			document.getElementById(selArray[i]).style.display = "none";
		}else{
			document.getElementById(selArray[i]).style.display = "inline";
		}
	}
}

//셀렉트 박스 날짜 자동 셋팅
//파라메터 년,월,일 ID
//월 onchange 이벤트에 스크립트 위치
function change_month(yearId, monthId, dayId){
	var year = document.getElementById(yearId).value;
	var month = document.getElementById(monthId).value;	
	var day_no;

	if(year % 4 == 0 && year % 100 != 0 || year % 400 == 0)		tempday = 29;
	else														tempday = 28;
	
	if(month==1 || month==3 || month==5 || month==7 || month ==8 || month==10 || month ==12)	day_no = 31;
	else if(month ==2)																			day_no = tempday;
	else																						day_no = 30;	
	
	document.getElementById(dayId).innerHTML = "";
	
	for(var i=0;i<day_no;i++){
		day_value = i+1;
		document.getElementById(dayId).innerHTML += "<li onclick=\"selectBoxValueSet2('day_select', 'day_span', 'day_value','"+ Right("0"+day_value,2) +"')\" onmouseover=\"sel(this,'#e7e7e7')\" onmouseout=\"sel(this,'')\">"+ Right("0"+day_value,2) + "</li>";;
	}
}

function EnterDown(objFn)
{
	var keyValue = event.keyCode;

	if ( keyValue==13 ) 
	{
		eval(objFn);
	}
}

function setHiddenFrame(){
	document.write("<iframe name='wallpaper' id='wallpaper' src='about:blank' width='0' height='0' scrolling='no' frameborder='0'></iframe>");
}

//mamxlength 체크 (textarea 용)
function maxlengthCheck(obj){
	var mlength=obj.getAttribute? parseInt(obj.getAttribute("maxlength")) : ""
	if (calculateBytes(obj.value) > mlength){
		obj.value=obj.value.substring(0,mlength);
		alert('최대 작성 글자수 '+mlength+' Byte 를 초과하였습니다.');
	}
}


String.prototype.byte = function() { 
	var cnt = 0; 
	for (var i = 0; i < this.length; i++) { 
		if (this.charCodeAt(i) > 127) 	cnt += 2; 
		else							cnt++; 
	} 
	return cnt; 
} 

function byteMaxCheck(vn_maxlength, vn_str)
{
	var vn_sumlength=0;
	var vn_restr='';
	for(var i= 0;i < vn_str.length; i++)
	{
	if( escape(vn_str.charAt(i)).length > 3 ) { vn_length = 2; }
	else if (vn_str.charAt(i) == '<' || vn_str.charAt(i) == '>') { vn_length = 4; }
	else { vn_length = 1 ; }
	if ( vn_maxlength < (vn_sumlength + vn_length) ) { break; }
	vn_sumlength += vn_length;
	vn_restr += vn_str.charAt(i);
	}
	return (vn_restr);
}

function Left(str, n){
	if (n <= 0)							return "";
	else if (n > String(str).length)	return str;
	else								return String(str).substring(0,n);
}

function Right(str, n){
	if (n <= 0)							return "";
	else if (n > String(str).length)	return str;
	else {								var iLen = String(str).length;	return String(str).substring(iLen, iLen - n);}
}

function calculateBytes(szValue){
	var tcount = 0;
	var tmpStr = new String(szValue);
	var temp = tmpStr.length;
	var onechar;

	for ( k=0; k<temp; k++ ){
		onechar = tmpStr.charAt(k);
		if (escape(onechar).length > 4)		tcount += 2;
		else								tcount += 1;
	}
	return tcount;
}

function resizePopup(wid, hei) {
	var h=0;
	if (navigator.userAgent.indexOf("SV1") > 0){  h=14; } 
	else if(navigator.userAgent.indexOf("MSIE 7")>0) { h=45; }
	else if(navigator.userAgent.indexOf("Gecko")>0 && navigator.userAgent.indexOf("Firefox") <= 0 && navigator.userAgent.indexOf("Netscape") <= 0 ){ h=22; } 
	else if(navigator.userAgent.indexOf("Firefox") >0 ){  h=18; } 
	else if(navigator.userAgent.indexOf("Netscape") >0 ){ h=-2; }
	else { h=0;} 
	window.resizeTo(wid,hei+h);
}

function CheckMsg_Byte(name, str, limit)
{
	var str_byte;

	str_byte = get_bytes(str, 0);

	if (str_byte > limit)
	{
		alert(limit + " byte 이하만 입력가능합니다.");
		CutChar(name, limit);
	}
}

//	초과된 문자 삭제 함수
function CutChar(name, limit) {
	var str,msg;
	var len=0;
	var temp;
	var count;
	
	count = 0;
	 
	msg = name.value;
	str = new String(msg);
	len = str.length;

	for(k=0 ; k<len ; k++) {
		temp = str.charAt(k);
		
		if(escape(temp).length > 4) {
			count += 2;
		}
		else if(temp != '\n') {
			count++;
		}
		else
			count++;

		if(count > limit) {
			str = str.substring(0,k);
			break;
		}
	}
	name.value = str;

	CheckMsg_Byte(str);
}

function get_bytes(str, type)
{
	str = "" + str;
	var n;
	var len = str.length;
	var bytes = 0;
	
	for (var i = 0 ; i < len ; i++)
	{
		n = str.charCodeAt(i);
		bytes += (n < 0 || n > 127) ? 2 : 1;
	}

	return bytes;
}

function MakeFlashString(add,width,height,flashvar){
	html = '';
	html += '<object type="application/x-shockwave-flash" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,115,0" id="param" width="'+width+'" height="'+height+'">';
	html += '<param name="movie" value="' + add + '">';
	html += '<param name="wmode" value="transparent">'; //transparent / opaque
	html += '<param name="SCALE" value="exactfit">';
	html += '<param name="allowFullScreen" value="true">';
	html += '<param name="FlashVars" value="' + flashvar + '">';
	html += '<embed src="' + add + '" width="' + width + '" height="' + height + '" FlashVars="' + flashvar + '" quality="high" bgcolor="#000000" name="movie" align="middle" play="true" loop="false" wmode="transparent" quality="high" allowScriptAccess="always" allowFullScreen="true" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer"><\/embed>';
	html += '<\/object>';
	
	document.write(html);
}

function auto_fit_size() {
    window.resizeTo(100, 100);
    var thisX = parseInt(document.body.scrollWidth);
    var thisY = parseInt(document.body.scrollHeight);
    var maxThisX = screen.width - 50;
    var maxThisY = screen.height - 50;
    var marginY = 0;
    //alert(thisX + "===" + thisY);
    //alert("임시 브라우저 확인 : " + navigator.userAgent);
    // 브라우저별 높이 조절. (표준 창 하에서 조절해 주십시오.)
    if (navigator.userAgent.indexOf("MSIE 6") > 0) marginY = 58;        // IE 6.x
    else if(navigator.userAgent.indexOf("MSIE 7") > 0) marginY = 80;    // IE 7.x
    else if(navigator.userAgent.indexOf("Firefox") > 0) marginY = 85;   // FF
    else if(navigator.userAgent.indexOf("Opera") > 0) marginY = 30;     // Opera
    else if(navigator.userAgent.indexOf("Netscape") > 0) marginY = -2;  // Netscape

    if (thisX > maxThisX) {
        window.document.body.scroll = "yes";
        thisX = maxThisX;
    }
    if (thisY > maxThisY - marginY) {
        window.document.body.scroll = "yes";
        thisX += 19;
        thisY = maxThisY - marginY;
    }

    window.resizeTo(thisX+10, thisY+marginY);
}

function NextMdn(event,elem)
{
	//if (event.keyCode == 13) Send_AuthSms();
	if (event.keyCode < 45 || event.keyCode > 57) {
		event.returnValue = false;
		return false;
	}

	event.returnValue = true; 

	/*if (navigator.userAgent.indexOf("Firefox") > 0)
	{*/
		if (document.getElementById("mdn2").value.length == 4) {
			document.getElementById("mdn3").focus();
			event.returnValue = false; 
			return false;
		}
	/*}
	else
	{
		if (document.getElementById("mdn2").value.length == 4) {
		//if ((document.getElementById("mdn2").value.length + 1) == 4) {		//keypress만 줬을 때
		//	document.getElementById("mdn2").value = document.getElementById("mdn2").value + String.fromCharCode(event.keyCode);
			document.getElementById("mdn3").focus();
			event.returnValue = false; 
			return false;
		}
	}*/
}

function chkPass(value)
{
	var chk1 = /^[a-zA-Z0-9-!@#$^&*():]{8,10}$/;
	var chk2 = /[a-z]/i;	//적어도 한개의 a-z 확인
	var chk3 = /[A-Z]/i;	//적어도 한개의 A-Z 확인
	var chk4 = /\d/;		//적어도 한개의 0-9 확인
	var chk5 = /[!@#$^&*():]/i;		//적어도 하나의 특문 입력 확인
  
	 if( (!chk1.test(value)) || (!chk2.test(value)) || (!chk3.test(value)) || (!chk4.test(value)) || (!chk5.test(value)) ){
		 return false;
	 }
	 return true;
}

function Kara_Event()
{
	fn_winopen_center("/event/kara_pass.html", "_blank", 350, 300, "no");
}