var Alpha = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
var Digit = '1234567890'
var Span = '_-';

//??????
var chTlen = document.URL.length;
var chDlen = document.domain.length;
chDlen = chDlen+16;
var chmUrl = document.URL.substring(chDlen,chTlen);//cafe ==> www? (30)
var chUrl = document.URL.substring(chDlen,(chDlen+chmUrl.indexOf('.')));
//????###########################################################################################

//????
function Tcheck(target, astr, lmin, lmax, name){
	var i
  	var t = target.value

	if (t.length < lmin || t.length > lmax){
  		if (lmin == lmax) alert( + lmin + "?(Byte)? " + name + "? ??????.");
		else alert(+ lmin + ' ~ ' + lmax + "?(Byte)? " + name + "? ??????.");
    	target.focus()
    	return true
	}
	if (astr.length > 1){
  		for (i=0; i<t.length; i++){
    		if(astr.indexOf(t.substring(i,i+1))<0){
      			alert(name + "? ??? ? ?? ??? ???????.");
				target.focus()
        		return true
        	}
      	}
  	}
  	return;
}

//????II
function TcheckII(target, astr, lmin, lmax, name){
	var i
  	var t = target.value
  	var vCheckI  = 0;
	var vCheckII = 0;

	if (t.length < lmin || t.length > lmax){
  		if (lmin == lmax) alert( + lmin + "?(Byte)? " + name + "? ??????.");
		else alert(+ lmin + ' ~ ' + lmax + "?(Byte)? " + name + "? ??????.");
    	target.focus()
    	return true
	}
	if (astr.length > 1){
  		for (i=0; i<t.length; i++){
    		if(astr.indexOf(t.substring(i,i+1))<0){
      			alert(name + "? ??? ? ?? ??? ???????.");
				target.focus()
        		return true
        	}
        	else{
        		if(Alpha.indexOf(t.substring(i,i+1))<0) vCheckI = 1;
	     		if(Digit.indexOf(t.substring(i,i+1))<0) vCheckII = 1;
        	}
      	}

      	if((vCheckI+vCheckII) != 2){
	  		alert(name + "? ??? ?? ???? ??? ???");
	        target.focus()
        	return true;
	  	}
  	}
  	return;
}

//?????
function radioCheck(f){
	var rcnt = 0;
	for(var i=0; i<f.length; i++){
		if(f[i].checked==true)
			rcnt++;
	}
	return rcnt;
}

function regno_OnkeyUp(f){
	if(f.jumin1.value.length == 6)
			f.jumin2.focus();
}

function pwd_OnkeyUp(f){
	if(f.jumin2.value.length == 7)
	{
			f.pwd_.value = f.jumin2.value;
			f.pwd_.focus();
	}
}


//????
function trim(s){
	s = s.replace(/^\s*/,'').replace(/\s*$/, '');
	return s;
}


//????###########################################################################################


//????????###################################################################################

function CheckSSnum(FORM){
  var ID1 = FORM.jumin1;
  var ID2 = FORM.jumin2;
  var YY = ID1.value.substring(0,2);
  var MM = ID1.value.substring(2,4);
  var DD = ID1.value.substring(4,6);

  var chk = 0;

  if(ID1.value == ""){
    alert("\n??????? ??? ???");
    ID1.focus();
    return false;
  }

  if(ID2.value == ""){
    alert("\n??????? ??? ???");
    ID2.focus();
    return false;
  }

  if (ID1.value.length != 6){
    alert("\n??? ??????? ??? ???");
    ID1.focus();
    return false;
  }

  if (ID2.value.length !=7){
    alert("\n??? ??????? ??? ???");
    ID2.focus();
    return false;
  }

  if (YY < 19 || MM > 12 || DD > 31){
    alert("\n??? ??????? ??? ???");
    ID1.focus();
    return false;
  }

  // ??
  for (var i=0; i <= 5; i++){
    chk = chk + ((i%8 + 2) * parseInt(ID1.value.substring(i,i+1)));
  }

  for (var i=6; i <= 11; i++){
    chk = chk + ((i%8 + 2) * parseInt(ID2.value.substring(i-6, i-5)));
  }

  chk = 11 - (chk % 11);
  chk = chk % 10;

  if (chk != ID2.value.substring(6,7)){
    alert("\n???? ?? ?????? ???.");
    ID1.focus();
    return false;
  }
  return true;
}
//????????###################################################################################


//??????#######################################################################################

function check_name(myhost) {
	xposition = 0;	yposition = 0;


	if(document.check_form.agrees[0].checked == false )
	{
		alert("??? ?? ??? ?? ??? ???");
		document.check_form.agrees[0].focus();
		return false;
	}
	/*
	else if(document.check_form.agree[0].checked == false )
	{
		alert("???? ?????  ?? ??? ???");
		document.check_form.agrees[0].focus();
		return false;
	}
*/

/*
	if(document.check_form.agree.value != "1")
	{
		alert("???? ????? ?? ??? ??? ??? ");
		return false;
	}

*/


	if(document.check_form.go_agree_n[0].checked == false )
	{
		alert("???? ????? ?? ??? ???");
		document.check_form.go_agree_n[0].focus();
		return false;
	}


	else if( document.check_form.name.value == "" ){
		alert("??? ???????");
		document.check_form.name.focus();
		return false;
	}
	else if( CheckSSnum (document.check_form) == false ){
		return false;
	}
	else if( CheckSSnum (document.check_form) == true ){
		if ( parseInt(navigator.appVersion) >= 4 ){
			xposition = (screen.width - 380) / 2;
			yposition = (screen.height - 255) / 2;
		}
		else{
			xposition = 200;
			yposition = 100;
		}
		//???? ????
		document.check_form.ok_url.value="https://"+myhost+"/servlet/join.FDs_r_e";
		document.check_form.service_no.value="003001";
		//document.check_form.ok_url.value="http://"+myhost+"/servlet/join.FDs_r_e";
		winObj = window.open("", "result", "toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,width=380,height=255,top="+yposition+",left="+xposition+"")

		if(!winObj)
			alert("???? ??? ????\n\n?? ??? ???? ???");
		else
			winObj.focus();

		//document.check_form.submit();
		return true;
	}
}

function idnno_OnkeyUp(){
	if(document.check_form.jumin1.value.length == 6)
			document.check_form.jumin2.focus();
}

function idnno2_OnkeyUp(){
	if(document.check_form.jumin2.value.length == 7)
	{
		document.check_form.pwd_.value = document.check_form.jumin2.value;
	}

}



//????? ???????? ??
function go_okUrl() {
	opener.location.href="/servlet/join.FDs_r?url=s";
	self.close();
}


//???? ??? ???? ???? ??
function go_bkUrl() {
	opener.location.href="http://"+document.domain+"/servlet/join.FDs_r";
	self.close();
}

//??????#######################################################################################


//??????#######################################################################################

function valid_check(f){
	//?????
	if(Tcheck(f.mem_id, Alpha + Digit, 4, 15, "?? ID"))
  		return false;

	//??? ?? ??
	if(f.idchk.value != 'OK' ){
		alert("??? ????? ?? ???.!!");
		f.mem_id.focus();
		return false;
	}

	//??????
	if(TcheckII(f.mem_pwd, Alpha + Digit, 6, 12, "????"))
  		return false;

  	if(f.mem_pwd.value == f.mem_id.value){
  		alert('????? ???? ????.');
  		f.mem_pwd.focus();
  		return false;
  	}

  	if(TcheckII(f.mem_pwd_re, Alpha + Digit, 6, 12, "??????"))
  		return false;

  	if(f.mem_pwd.value != f.mem_pwd_re.value){
  		alert('????? ???? ???.');
  		f.mem_pwd_re.focus();
  		return false;
  	}

  	if(f.pwd_q.value.length < 1 ){
		alert("???? ????? ???? ???.!!");
		f.pwd_q.focus();
		return false;
	}

	if(f.pwd_a.value.length < 1 ){
		alert("???? ???? ???? ???.!!");
		f.pwd_a.focus();
		return false;
	}

	if(f.reg_no.value.length < 13){
		alert("????? ???? ??? ???");
		f.reg_no.focus();
		return false;
	}

	if(Tcheck(f.reg_no, Digit, 13, 13, "????"))
  		return false;

	//??
	if(f.b_y.value.length < 1 ){
		alert("??? ???? ???.!!");
		f.b_y.focus();
		return false;
	}

	if(f.b_m.value.length < 1 ){
		alert("??? ???? ???.!!");
		f.b_m.focus();
		return false;
	}

	if(f.b_d.value.length < 1 ){
		alert("??? ???? ???.!!");
		f.b_d.focus();
		return false;
	}

	f.b_yyyymmdd.value = f.b_y.value+f.b_m.value+f.b_d.value;

	//???
	if(f.email.value.length < 1 ){
		alert("???? ???? ???.!!");
		f.email.focus();
		return false;
	}

	if(f.email2.value.length < 1 ){
		alert("???? ???? ???.!!");
		f.email2.focus();
		return false;
	}

	//??
	if(Tcheck(f.zip1,Digit, 3, 3, "????"))
	  	return false;

	if(Tcheck(f.zip2,Digit, 3, 3, "????"))
	  	return false;

	if(f.addr1_.value.length < 1 ){
		alert("??? ???? ???.!!");
		return false;
	}

	if(f.addr2_.value.length < 1 ){
		alert("????? ???? ???.!!");
		f.addr1_.focus();
		return false;
	}

	//????
	if(Tcheck(document.form.tel2_,Digit, 3, 4, "????"))
	  	return false;

	if(Tcheck(document.form.tel3_,Digit, 4, 4, "????"))
	  	return false;

	//???
	if(Tcheck(document.form.hp2_,Digit, 3, 4, "?????"))
	  	return false;

	if(Tcheck(document.form.hp3_,Digit, 4, 4, "?????"))
	  	return false;


	//?????
	if(f.regKind.value == "s"){

		if(f.office_.value == ""){
			alert('???? ?? ???!');
			f.office_.focus();
			return false;
		}

		if(f.addr1_s.value != ""){
			if(f.addr2_s.value == ""){
				alert('??? ????? ?? ???!');
				f.addr2_s.focus();
				return false;
			}
		}

		if(f.addr2_s.value != ""){
			if(f.addr1_s.value == ""){
				alert('??? ??? ?? ???!');
				f.addr1_s.focus();
				return false;
			}
		}


	}

	//??????======
	//?????
	if(f.w_y.value != "" || f.w_m.value != "" || f.w_d.value != ""){

		if(Tcheck(f.w_y,Digit, 4, 4, "???"))
			return false;

		if(f.w_m.value.length < 1 ){
			alert("???? ???? ???.!!");
			f.w_m.focus();
			return false;
		}

		if(f.w_d.value.length < 1 ){
			alert("???? ???? ???.!!");
			f.w_d.focus();
			return false;
		}

		if(f.wed_yn[1].checked == true){
			alert('???? ?? ?????. ???? ?? ? ???');
			f.wed_yn[0].focus();
			return false;
		}

		f.w_yyyymmdd.value = f.w_y.value+f.w_m.value+f.w_d.value;
	}


}

//??? ??
function emailSelect(){
	var email2;
	email2 = document.form.emailChoice.value;
	document.form.email2.value = email2;
}

//????
function openPopZip(iname){
	var pUrl = "/servlet/join.FDs_s_a?iname_="+iname;
	window.open(pUrl,'ZipCheckPopUp','status=no,scrollbars=yes,resizable=no, width=470, height=300');
}

//??? ?? ??
function openPopId(){
	var memid = document.form.mem_id.value;
	if(memid == ""){
		alert('???? ??? ???!');
		document.form.mem_id.focus();
		return;
	}

	var pUrl = "/servlet/join.FDs_s_i?mem_id="+memid;

	window.open(pUrl,'IdCheckPopUp','status=no,scrollbars=no,resizable=no, width=450, height=300');
}


//??????#######################################################################################


//?????#########################################################################################

function valid_check_login1(f){//?? ???
	if (Tcheck(f.userid1, Alpha + Digit + Span, 4, 15, "?? ID")){
  		return false;
	}
	else{
		if (f.password1.value.length > 0){
			if (f.dueSSL.value != null && f.dueSSL.checked )
			{
				if (f.duegoto.value != null && f.duegoto.value.length >= 5)
					f.action = unescape(f.duegoto.value);
				else
				{
					f.action = "https://"+document.domain+f.action;
				}
			}

			f.submit();
		}
		else{
			alert("????? ?????");
			f.password1.focus();
			return false;
		}
	}
}

//?????#########################################################################################

//?? ??##########################################################################################

function valid_check_leave(f){
	var l_cnt = 0;
	var reason_txt;

	for(var i=0; i<f.reason_c.length; i++){
		if(f.reason_c[i].checked == true){
			if(l_cnt==0)
				reason_txt = f.reason_c[i].value;
			else
				reason_txt = reason_txt +","+ f.reason_c[i].value;
			l_cnt++;
		}
	}

	if(l_cnt == 0){
		alert('????? ?? ? ???!');
		f.reason_c[0].focus();
		return false;
	}

	f.reason_.value = reason_txt;

	if(f.detail_.value == ""){
		alert('?? ??? ?????');
		f.detail_.focus();
		return false;
	}
}

//?? ??##########################################################################################


//?? ????/??? ??###########################################################################

function nameCheck(){
	var f = document.check_form;

	if( f.name.value == "" ){
		alert("??? ???????");
		f.name.focus();
		return;
	}
	else if( CheckSSnum(f) == false ){
		return;
	}
	else if( CheckSSnum(f) == true ){
		f.submit();
	}
}


function info_check(kind){
	var f = document.scpass;
	if(f.id.value == ""){
		alert('???? ?? ? ???');
		f.id.focus();
		return;
	}

	if(f.name.value == ""){
		alert('??? ?? ? ???');
		f.name.focus();
		return;
	}

	if(Tcheck(f.jumin1,Digit, 6, 6, "????"))
  		return;

	if(Tcheck(f.jumin2,Digit, 7, 7, "????"))
  		return;

	if(kind == 1)
		f.action = "/servlet/member.FDs_q";
	else if(kind == 2)
		f.action = "/servlet/member.FDs_m";

	f.submit();
}

function q_check(f){
	if(f.que.value == ""){
		alert('??? ??? ???');
		f.que.focus();
		return false;
	}
	else if(f.ans.value == ""){
		alert('??? ?? ? ???');
		f.ans.focus();
		return false;
	}
}

function pass_check(){
	var f = document.form;
	if(f.id.value == ""){
		alert('???? ?? ? ???');
		f.id.focus();
		return;
	}

	if(Tcheck(f.jumin2,Digit, 7, 7, "????"))
  		return;

  	if(Tcheck(f.pass,Alpha + Digit, 4, 12, "????"))
  		return;

  	if(Tcheck(f.pass1,Alpha + Digit, 4, 12, "??????"))
  		return;

	if(f.pass.value != f.pass1.value){
  		alert('????? ???? ???.');
  		f.pass1.focus();
  		return;
  	}

	f.action = "/servlet/member.FDm_u_x";
	f.submit();
}

function idnno1_OnkeyUp(){
	if(document.scpass.jumin1.value.length == 6)
			document.scpass.jumin2.focus();
}

//?? ????/??? ??###########################################################################


//?? ??###########################################################################################

//??????
function sfrm_check(f){
	if(f.sval.value == ""){
		alert('?? ?? ???? ?? ???!');
		f.sval.focus();
		return false;
	}
}

//??????
function dfrm_check(f){
	//if(radioCheck(f.shape_) == 0 && radioCheck(f.look_) == 0 && radioCheck(f.color_) == 0){
	if(radioCheck(f.shape_) == 0 && radioCheck(f.color_) == 0){
		alert('???? ??? ?? ????! ');
		return false;
	}
}

//?????? ?????
function p_popup(n,k){
	var url_ = "/servlet/prd.FDs_r_p?pr_no="+n+"&k="+k;
	window.open(url_,'product','width=560,height=330 top=100,left=100,scrollbars=no');
}

//?????? DIV??
function set_list_disp(f){
	if (  f.chklist.value == ' ' ){
		dislist.style.display = 'none';
		disinfo.style.display = 'block';
	}
}


function change_div(val){
	if(val == 2){
		document.all["image_prd1"].src= "/image/prd/sub_27_60.gif";
		document.all["image_prd2"].src= "/image/prd/sub_27_61_o.gif";
		document.all["div1"].style.display = "none";
		document.all["div2"].style.display = "";
		document.all["pro_iframe"].src = "/servlet/prd.FDs_r_if?cat_cl=1&de_cl=??";
	}
	else{
		document.all["image_prd1"].src= "/image/prd/sub_27_60_o.gif";
		document.all["image_prd2"].src= "/image/prd/sub_27_61.gif";
		document.all["div1"].style.display = "";
		document.all["div2"].style.display = "none";
		document.all["pro_iframe"].src = "/servlet/prd.FDs_r_if?cat_cl=1&eff_cl=57&cd_image=????";
	}
}

function change_div2(val){
	if(val == 2){
		document.all["image_prd1"].src= "/image/prd/sub_27_60.gif";
		document.all["image_prd2"].src= "/image/prd/sub_27_61_o.gif";
		document.all["div1"].style.display = "none";
		document.all["div2"].style.display = "";
		document.all["pro_iframe"].src = "/servlet/prd.FDs_r_if?cat_cl=2&de_cl=??";
	}
	else{
		document.all["image_prd1"].src= "/image/prd/sub_27_60_o.gif";
		document.all["image_prd2"].src= "/image/prd/sub_27_61.gif";
		document.all["div1"].style.display = "";
		document.all["div2"].style.display = "none";
		document.all["pro_iframe"].src = "/servlet/prd.FDs_r_if?cat_cl=2&eff_cl=58&cd_image=????";
	}
}



function change_div3(val){
	if(val == 2){
		document.all["image_prd1"].src= "/image/prd/sub_27_60.gif";
		document.all["image_prd2"].src= "/image/prd/sub_27_61_o.gif";
		document.all["div1"].style.display = "none";
		document.all["div2"].style.display = "";
		document.all["pro_iframe"].src = "/servlet/prd.FDs_r_if_a_new?cat_cl=1&de_cl=??";
	}
	else{
		document.all["image_prd1"].src= "/image/prd/sub_27_60_o.gif";
		document.all["image_prd2"].src= "/image/prd/sub_27_61.gif";
		document.all["div1"].style.display = "";
		document.all["div2"].style.display = "none";
		document.all["pro_iframe"].src = "/servlet/prd.FDs_r_if_a_new?cat_cl=1&eff_cl=57&cd_image=????";
	}
}


function change_div4(val){
	if(val == 2){
		document.all["image_prd1"].src= "/image/prd/sub_27_60.gif";
		document.all["image_prd2"].src= "/image/prd/sub_27_61_o.gif";
		document.all["div1"].style.display = "none";
		document.all["div2"].style.display = "";
		document.all["pro_iframe"].src = "/servlet/prd.FDs_r_if_a_new?cat_cl=2&de_cl=??";
	}
	else{
		document.all["image_prd1"].src= "/image/prd/sub_27_60_o.gif";
		document.all["image_prd2"].src= "/image/prd/sub_27_61.gif";
		document.all["div1"].style.display = "";
		document.all["div2"].style.display = "none";
		document.all["pro_iframe"].src = "/servlet/prd.FDs_r_if_a_new?cat_cl=2&eff_cl=58&cd_image=????";
	}
}





//?? ??###########################################################################################


//?? ??###########################################################################################

function p_c_file_popup(tname){
	var f = document.forms.bfrm;
	tname = "id_"+tname+"_attach";
	window.open('/servlet/cus.FDs_f_a?tname='+tname,'_file','width=320,height=200,top=300,left=300');
}

function chkFrm(kind){
	var f = document.bfrm;
	var chkFrmValue = false;

	if(f.name_.value == "" || f.tel_.value == "" || f.email_.value == ""){
		alert('??? ????. ????????\n ??? ????? ?? ?? ? ???');
		location.href="/servlet/join.FDs_u";
		return;
	}

	//if(f.urgent_.value == ""){
	//	alert('?????? ?? ???!');
	//	f.urgent_.focus();
	//	return;
	//}

	if(f.title_.value == ""){
		alert('??? ??? ???');
		f.title_.focus();
		return;
	}

	if (f.content_.value == ""){
		alert('??? ??? ???.');
		f.content_.focus();
		return;
	}

	chkFrmValue = true;
	if ( chkFrmValue ){
		if ( f.attachfiles.value != "" ||  f.attachsizes.value != ""){
			f.attachfileyn.value="y";
		}
		//check attached files
		if ( f.attachsizesum.value == 0 ){
			f.attachyn.value = "n";
		}

		if(kind == "proposal")
			f.action = "/servlet/cus.FDm_c_p_x";
		else if(kind == "claim")
			f.action = "/servlet/cus.FDm_d_p_x";
		else if(kind == "update")
			f.action = "/servlet/cus.FDm_d_m_x";
		else if(kind == "update_p")
			f.action = "/servlet/cus.FDm_p_m_x";
		else{
			alert('??? ?? ????.');
			return;
		}

		document.all.sbtn.style.visibility = "hidden";
		f.submit();
	}
}


function chkFrmRea(){
	var f = document.bfrm;
	var chkFrmValue = false;

	if(f.name_.value == "" || f.tel_.value == "" || f.email_.value == ""){
		alert('??? ????. ????????\n ??? ????? ?? ?? ? ???');
		location.href="/servlet/join.FDs_u";
		return;
	}

	if(f.title_.value == ""){
		alert('????? ??? ???');
		f.title_.focus();
		return;
	}

	chkFrmValue = true;
	if ( chkFrmValue ){
		if ( f.attachfiles.value != "" ||  f.attachsizes.value != ""){
			f.attachfileyn.value="y";
		}
		//check attached files
		if ( f.attachsizesum.value == 0 ){
			f.attachyn.value = "n";
		}

		f.action = "/servlet/cus.FDm_d_s_x";
		document.all.sbtn.style.visibility = "hidden";
		f.submit();
	}
}


function chkFrmRea_m(){
	var f = document.bfrm;
	var chkFrmValue = false;

	if(f.name_.value == "" || f.tel_.value == "" || f.email_.value == ""){
		alert('??? ????. ????????\n ??? ????? ?? ?? ? ???');
		location.href="/servlet/join.FDs_u";
		return;
	}

	if(f.title_.value == ""){
		alert('????? ??? ???');
		f.title_.focus();
		return;
	}

	chkFrmValue = true;
	if ( chkFrmValue ){
		if ( f.attachfiles.value != "" ||  f.attachsizes.value != ""){
			f.attachfileyn.value="y";
		}
		//check attached files
		if ( f.attachsizesum.value == 0 ){
			f.attachyn.value = "n";
		}


		f.action = "/servlet/cus.FDs_p_s_m_x";
		document.all.sbtn.style.visibility = "hidden";
		f.submit();
	}
}








function goDelClaim(n,p,s){
	ans = confirm("?????????");
	if(ans == true)
 		document.location.href="/servlet/cus.FDm_d_d_x?a_no="+n+"&page="+p+"&start="+s;
 	else
 		return;
}


function goDelProposal(n,p,s,c){
	ans = confirm("?????????");
	if(ans == true)
 		document.location.href="/servlet/cus.FDm_p_d_x?a_no="+n+"&page="+p+"&start="+s+"&c="+c;
 	else
 		return;
}


function goDelResearch(n,p,s,c){
	ans = confirm("?????????");
	if(ans == true)
 		document.location.href="/servlet/cus.FDm_p_s_d_x?a_no="+n+"&page="+p+"&start="+s+"&c="+c;
 	else
 		return;
}




//?? ??###########################################################################################



//??################################################################################################
//??????
function check_popup(cf_value,cf_vname,cf_form,cf_gubun){
	var form=document.CafeFrm;
	var Url;

	if ( cf_vname == "cf_id" ){
		if ( form.cf_id.value == "" ){
			alert('?? ???? ?? ? ???') ;
			form.cf_id.focus();
			return;
		}
	}
	else if ( cf_vname == "cf_name" ){
		if ( form.cf_name.value == "" ){
			alert('?? ??? ?? ? ???') ;
			form.cf_name.focus();
			return;
		}
	}

	Url ="/servlet/comm.FDs_c_p?cf_value="+cf_value+"&cf_vname="+cf_vname+"&cf_form="+cf_form+"&cf_gubun="+cf_gubun;
	window.open(Url,'ment','width=320,height=183,top=100,left=100');
}

//????
function goCafeCreate(f){

	if ( f.dupCheck.value == "" ){
		alert('?? ??? ?? ?? ????!');
		f.cf_id.focus();
		return false;
	}
	if ( f.cf_id.value == "" ){
		alert('?? ???? ?? ? ???!');
		f.cf_id.focus();
		return false;
	}
	if (Tcheck(f.cf_id,Alpha, 4, 15, "?? ???")){
  		return false;
	}

	if ( f.cf_name.value == "" ){
		alert('?? ??? ?? ? ???!');
		f.cf_name.focus();
		return false;
	}
	if ( f.ct_no.value == "0" ){
		alert('?? ??? ?? ? ???!');
		f.ct_no.focus();
		return false;
	}
	if ( f.cf_intro.value == "" ){
		alert('?? ?? ?? ? ???!');
		f.cf_intro.focus();
		return false;
	}
	if ( f.cf_intro.length > 200 ){
		alert('?? ?? ?? 200? ??? ? ???!');
		f.cf_intro.focus();
		return false;
	}
	if ( f.cf_join_type[0].checked == false && f.cf_join_type[1].checked == false){
		alert('?? ????? ?? ? ???!');
		f.cf_join_type[0].focus();
		return false;
	}

	var cf_key_cnt = 0;
	for(i=0; i<f.cf_key.length; i++){
		if(f.cf_key[i].value != ""){
			if(cf_key_cnt == 0)
				f.search_key.value = f.cf_key[i].value;
			else
				f.search_key.value = f.search_key.value +"$;"+f.cf_key[i].value;
			cf_key_cnt++;
		}
	}

	if(cf_key_cnt == 0){
		alert('?? ???? ?? ? ???!');
		f.cf_key[0].focus();
		return false;
	}
}

//??????
function scf_check(f){
	if(f.ct_no.value == "0" && f.cf_name.value == ""){
		alert('?? ??? ?????? ???? ?? ???!');
		f.cf_name.focus();
		return false;
	}
}


//??################################################################################################


//????############################################################################################

//?????? ?????
function img_popup(ipath){
	if(ipath =="")
		return;

	var url_ = "/servlet/spc.FDs_e_v_p?ipath="+ipath;
	if(ipath == null)
		return;
	window.open(url_,'img_popup','width=560,height=330 top=100,left=100,scrollbars=no');
}


function img_popup_1(ipath){
	if(ipath =="")
		return;

	var url_ = "/servlet/spc.FDs_e_v_p1?ipath="+ipath;
	if(ipath == null)
		return;
	window.open(url_,'img_popup','width=400,height=700 top=100,left=100,scrollbars=yes');
}


function img_popup_2(ipath){
	if(ipath =="")
		return;

	var url_ = "/servlet/spc.FDs_e_v_p2?ipath="+ipath;
	if(ipath == null)
		return;
	window.open(url_,'img_popup','width=700,height=400 top=100,left=100,scrollbars=yes');
}





function img_popup2(serial_,ed_no,seq){
	if(serial_ == "" || ed_no =="" || seq =="")
		return;

	var url_ = "/servlet/spc.FDs_e_p?serial_="+serial_+"&ed_no="+ed_no+"&seq="+seq;
	if(serial_ == null || ed_no == null || seq == null)
		return;

	window.open(url_,'img_popup','width=560,height=330 top=100,left=100,scrollbars=yes');
}


function spc_valid_check(f){
	if(f.name_.value == "" ){
		alert("??? ???? ???.!!");
		f.name_.focus();
		return false;
	}

	if(f.office_.value.length < 1 ){
		alert("???? ???? ???.!!");
		f.office_.focus();
		return false;
	}

	if(f.tel_.value.length < 1 ){
		alert("????? ???? ???.!!");
		f.tel_.focus();
		return false;
	}

	//???
	if(f.email_.value.length < 1 ){
		alert("???? ???? ???.!!");
		f.email_.focus();
		return false;
	}

	//??
	if(Tcheck(f.zip1,Digit, 3, 3, "????"))
	  	return false;

	if(Tcheck(f.zip2,Digit, 3, 3, "????"))
	  	return false;

	if(f.addr1_.value.length < 1 ){
		alert("??? ???? ???.!!");
		return false;
	}

	if(f.addr2_.value.length < 1 ){
		alert("????? ???? ???.!!");
		f.addr1_.focus();
		return false;
	}

	if(f.etc_.value.length < 1 ){
		alert("????? ???? ???? ???.!!");
		f.etc_.focus();
		return false;
	}

	f.post_.value=f.zip1.value+f.zip2.value;
}


function set_ebro(pn,cpn){

	var sImg = null;
	var oImg = "/image/spc/a_btn"+cpn+"_o.gif"

	for(i=1; i<=pn; i++){
		sImg = "/image/spc/a_btn"+i+".gif"
		if(i==cpn)
			document.all["aprno"+i].src = oImg;
		else
			document.all["aprno"+i].src = sImg;
	}

/*
	document.all["bprno"].src= "/image/spc/pr_img_eprno2_"+pr_no+".gif";
	document.all["cprno"].src= "/image/spc/pr_img_eprno2_"+pr_no+".gif";
*/

}


//????############################################################################################


//??????############################################################################################

function Ptf_View(pkind,p_no,pseq,gase){
	var vUrl
	if ( pkind == 1 ){
		vUrl = "/servlet/brd.ad.FDs_ad_v?pr_no="+p_no+"&pseq="+pseq;
		window.open(vUrl,'VodPopUp','status=no,scrollbars=no,resizable=no, width=625, height=339');
	}else{
		vUrl = "/servlet/brd.ad.FDs_ad_p?pr_no="+p_no+"&pseq="+pseq+"&gase="+gase;
		if(gase == 1)
			window.open(vUrl,'PrintPopUp','status=no,scrollbars=no,resizable=no, width=625, height=449');
		else
			window.open(vUrl,'PrintPopUp','status=no,scrollbars=no,resizable=no, width=625, height=350');
	}
}


function set_ad_list(val){
	f=document.adlistmain;
	if(val == 2){
		document.all["adImg2"].src= "/image/pr/main_title03_bt02o.gif";
		document.all["adImg1"].src= "/image/pr/main_title03_bt01.gif";
		document.all["divad1"].style.display = "none";
		document.all["divad2"].style.display = "";
		document.all["divy1"].style.display = "none";
		document.all["divy2"].style.display = "";
	}
	else{
		document.all["adImg2"].src= "/image/pr/main_title03_bt02.gif";
		document.all["adImg1"].src= "/image/pr/main_title03_bt01o.gif";
		document.all["divad1"].style.display = "";
		document.all["divad2"].style.display = "none";
		document.all["divy1"].style.display = "";
		document.all["divy2"].style.display = "none";
	}
}

//??????############################################################################################


//?? ??############################################################################################

//??????
function rct_check(f){
	//??????
	if( CheckSSnum(f) == false ){
		return false;
	}




	// ?? ??
  	if(f.name_.value==""){
  		alert('??? ??? ???');
  		f.name_.focus();
  		return false;
  	}

	//??????
	if(Tcheck(f.pwd_, Alpha + Digit, 4, 12, "????"))
  		return false;


  	if(f.jumin2.value != f.pwd_.value){
  		alert('????? ???? ???? ???? ???.');
  		f.pwd_.focus();
  		return false;
  	}

/*
  	if(Tcheck(f.pwd_r, Alpha + Digit, 4, 12, "????"))
  		return false;



  	if(f.pwd_.value != f.pwd_r.value){
  		alert('????? ???? ???.');
  		f.pwd_.focus();
  		return false;
  	}
*/


  	//?????
  	if(f.eml_1.value=="" ){
  		alert('???? ???? ??? ???');
  		f.eml_1.focus();
  		return false;
  	}
  	if(f.eml_2.value==""){
  		alert('???? ???? ??? ???');
  		f.eml_2.focus();
  		return false;
  	}






}


//?????
function rct_login_check(f){
	//??????
	if( CheckSSnum(f) == false ){
		return false;
	}

	//??????
	if(Tcheck(f.pwd_, Alpha + Digit, 4, 12, "????"))
  		return false;

  	f.reg_no.value = f.jumin1.value+f.jumin2.value;
}
//?? ??############################################################################################


// ??? ??
 function dispFlash (_src, _width, _height, _id, _align, _bgcolor1, _bgcolor2, _isTrans)
 {
  if ( _id == null ) _id = "";
  if ( _align == null ) _align = "";
  if ( _bgcolor1 == null ) _bgcolor1 = "#FFFFFF";
  if ( _bgcolor2 == null ) _bgcolor2 = "#FFFFFF";
  if ( _isTrans == null ) _isTrans = "n";
  document.write("<OBJECT classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0' ");
  document.write(" WIDTH='"+_width+"' HEIGHT='"+_height+"' id='"+_id+"' ALIGN='"+_align+"'>");
  document.write(" <PARAM NAME=movie VALUE='"+_src+"'> ");
  document.write(" <PARAM NAME=quality VALUE=high> ");
  document.write(" <PARAM NAME=bgcolor VALUE='"+_bgcolor1+"'> ");
  if ( _isTrans == "y" )
   document.write(" <PARAM NAME=wmode VALUE=transparent>");
  document.write(" <EMBED src='"+_src+"' quality=high bgcolor='"+_bgcolor2+"'  WIDTH='"+_width+"' HEIGHT='"+_height+"' NAME='"+_id+"' ALIGN='"+_align+"'");
  document.write("  TYPE='application/x-shockwave-flash' PLUGINSPAGE='https://www.macromedia.com/go/getflashplayer'>");
  document.write(" </EMBED>");
  document.write("</OBJECT>");
 }

