function review(str,id){
var layer = id+"_layer";

var con = document.all(layer).innerHTML;
if(document.all(id).innerHTML == con){
con ='';
}
document.all(id).innerHTML=con;
return true;
}


function enterkey_login(str) 
 {
 if (event.keyCode ==13)
    {
    w_login();
    }
 }
function input_age(str){
var tem = str.value;
toyear = new Date();
var sub_tem=tem.substr(0,2);
sub_tem = eval(sub_tem);
if(sub_tem > 35) sub_tem = sub_tem + 1900;
else { sub_tem = sub_tem + 2000;}

var result = toyear.getFullYear() - sub_tem ;

//alert (sub_tem);
//alert (toyear.getFullYear());
//alert (result);
str.form.age.value = result;
return true;
}

function day_sel(str1,str2,str3){

var vy = str1.value;
var vm = str2.value;

	var ny;
	var nm;
	var nd; 

var root = str3;
for(i=0;i<=30;i++){
var t = i +1;
ch_date = new Date(vy, vm - 1, t)
ny = ch_date.getYear();
nm = ch_date.getMonth() + 1;
nd = ch_date.getDate();

if (ny < 2000) ny = ny + 1900;


if (ny == vy & nm == vm & nd == t){
root.options[i].text = t;
root.options[i].value = t;
if (i == 0){
root.options[i].selected = true;
}
}
else {
root.options[i].text = "";
root.options[i].value = "";
}
var j = i;
}

}

function che_day(str){
if(str.value == ""){

	for(h=0; h<=30; h++){
		if(str.options[h].value != ""){
		str.options[h].selected = true;
		}
	}

}
}

function only_day(str){
	for(h=0; h<=30; h++){
		if(h == "24"){
		str.options[h].selected = true;
		}
	}


}


function put_postno1(No1, No2, add1, add2)
{
var root = document.join;
	root.addr1.value = add1;
	root.addr2.value = add2;
	root.zip1.value = No1;
	root.zip2.value = No2;
			root.addr2.focus();
}

function id_check(root){
if(!root.value){
alert(root.title + ' ÀÔ·ÂÇØÁÖ¼¼¿ä');
root.focus();
return false;
}
Pop_open('../member/id_enter.html?checkid='+root.value,'id_serch');
return;
}
function Pop_open(str,name){
var Wo = window.open(str,name,'width=10,height=10,scrollbars=yes');
Wo.focus();
return;
}
function che_value(str){
	var revalue = 0;
	for(i=0;i<str.length;i++){
		if(str[i].checked == true){
			revalue = str[i].value;
		}

	}
	return revalue;
	
}



function IF_ch1(str1,str2,str3,message){
	if(!root) var root = document.forms[0];
	
	if(!str1.title) str1.title = str1.name;
	if(!message) message = str1.title + "À»(¸¦) ¿Ã¹Ù¸£°Ô ÀÔ·ÂÇÏ¼¼¿ä";
	if(str1.value||str2.value||str3.value){
		if(!str1.value||!str2.value||!str3.value){
			alert(message);
			str1.focus();
			return false;
		}
	}
return true;
}

function IF_ch2(str1,str2,message){
if(str1.value){
	var ch_num = 0;
	if(!root) var root = document.forms[0];
	//alert(str2.value + "ddd" + str2[0].value);	
	if(!str2.title) str2.title = str2.name;
	if(!message) message = str2.title + "À»(¸¦) ¿Ã¹Ù¸£°Ô ÀÔ·ÂÇÏ¼¼¿ä";
		for(i=0;i<str2.length;i++){
			if(str2[i].checked == true){
				ch_num = 1;
			}
		}
	
	if(!ch_num) {
	alert(message);
	str2[0].focus();
	return false;
	}
}
return true;
}


function put_idck(ID,root){
	if(!root) var root = document.forms[0];

	root.u_id.value = ID
	root.pass.focus();
		
}

function idcheck(root){
	if(!root) var root = document.forms[0];

if(root.u_id.value=='')
	{
	alert("ID¸¦ ÀÔ·ÂÇÏ½Ã±â ¹Ù¶ø´Ï´Ù");
	root.u_id.focus();
	}
else
	{
	window.open("id_serch.html?checkid="+root.u_id.value, "Checkid", "width=390, height=280,menubar=no,toolbar=no,location=no")
	}
}

function checkresno(root){
	if(!root) var root = document.forms[0];
	//if(!root) global root;

	var pin1 = root.jumin1.value
	var pin2 = root.jumin2.value
		if (!pin1 || !pin2)
		{
		return false;
		}
	var a1 = pin1.substring(0,1)
	var a2 = pin1.substring(1,2)
	var a3 = pin1.substring(2,3)
	var a4 = pin1.substring(3,4)
	var a5 = pin1.substring(4,5)
	var a6 = pin1.substring(5,6)
	var check_digit = a1*2+a2*3+a3*4+a4*5+a5*6+a6*7
	var b1 = pin2.substring(0,1)
	var b2 = pin2.substring(1,2)
	var b3 = pin2.substring(2,3)
	var b4 = pin2.substring(3,4)
	var b5 = pin2.substring(4,5)
	var b6 = pin2.substring(5,6)
	var b7 = pin2.substring(6,7)
	var check_digit = check_digit+b1*8+b2*9+b3*2+b4*3+b5*4+b6*5
	check_digit = check_digit%11
	check_digit = 11 - check_digit
	check_digit = check_digit%10
	if (check_digit == b7)return true;
	else return false;
}


function che(str,name,root){
	if(!root) var root = document.forms[0];

	var r_name = eval((navigator.appName == 'Netscape') ? root+'.'+name : 'document.all.'+name);
	var num= r_name.length;
		for(i = 0; i < num; ++i) {
			if (r_name[i].value == str) {
				r_name[i].checked = true;
				}
			}
	if(!str) {
	r_name[0].checked=true;
	}
}


function sel(str,name,root){
	if(!root) var root = document.forms[0];

	var r_name = eval((navigator.appName == 'Netscape') ? root+'.'+name : 'document.all.'+name);
	var num= r_name.options.length;
		for(i = 0; i < num; ++i) {
			if (r_name.options[i].value == str) {
				r_name.options[i].selected = true;
				}
			}
	if(!str) {
	r_name.options[0].selected=true;
	}	
}

function put_postno1(No1, No2, add1, add2 ,root){
if(!root) var root = document.forms[0];
		root.addr1.value = add1
		root.addr2.value = add2
		root.zip1.value = No1
		root.zip2.value = No2
		root.addr2.focus();
}


function len_limit(str,num,exp,root){
if(!root) var root = document.forms[0].name;
	var sub_str = eval((navigator.appName == 'Netscape') ? root+'.'+str : 'document.all.'+str);
	num = eval(num);
		if(sub_str.value.length < 1 || sub_str.value.length > num){
			alert(exp+ " " + num + "ÀÚ ÀÌÇÏ·Î ÀÔ·ÂÇÏ¼Å¾ß ÇÕ´Ï´Ù.");
			sub_str.value="";
			sub_str.focus();
			return false;
			}
		else {
			return num;
			}
}

function che_email(root){
if(!root) var root = document.forms[0];
	var etmp = root.email;
	
	var hg;
	hg = 0;
		for (i = 0; i < etmp.value.length; i++) {
			if (etmp.value.charAt(i) == "@"){
				hg = hg + 1;
			}
		}

	if (hg > 1 || hg < 1) {
		alert("À¯È¿ÇÑ ÀüÀÚ¿ìÆíÀ» ÀÔ·ÂÇÏ¼¼¿ä");
		etmp.value ="";
		etmp.focus();
		return false;
	}

	for (i = 0; i < etmp.value.length; i++) {
		if (etmp.value.charAt(i) >= '0' && etmp.value.charAt(i) <= '9')
		continue;
		else if (etmp.value.charAt(i) >= 'a' && etmp.value.charAt(i) <= 'z')
		continue;
		else if (etmp.value.charAt(i) >= 'A' && etmp.value.charAt(i) <= 'Z')
		continue;
		else if (etmp.value.charAt(i) == '_' || etmp.value.charAt(i) == '-' || etmp.value.charAt(i) == '.' || etmp.value.charAt(i) == '@' )
		continue;
		else {
			alert("À¯È¿ÇÑ ÀüÀÚ¿ìÆíÀ» ÀÔ·ÂÇÏ¼¼¿ä");
			etmp.value ="";
			etmp.focus();
		return false;
		}
	}


	var emailchk;
	emailchk = 0;
	if (etmp.value !=""){
		for (var j=0; j < etmp.value.length ; j++ ) {
			var ch= etmp.value.substring(j,j+1)
				if (ch == "@" | ch== "." ) {
					emailchk = emailchk + 1;
				}
		}
		if (emailchk < 2 ) {
		alert("À¯È¿ÇÑ ÀüÀÚ¿ìÆí¸¦ ÀÔ·ÂÇÏ¼¼¿ä!");
		etmp.focus(); 
		return false;
		}
	}
return true;
}



function str_check(str,ext,root){


if(!root) var root = document.forms[0].name;
	var sub_str = eval((navigator.appName == 'Netscape') ? root+'.'+str : 'document.all.'+str);
	var tmp = sub_str.value;

for (i = 0; i < tmp.length; i++) {

if (tmp.charAt(i) >= '0' && tmp.charAt(i) <= '9')
continue;
else if (tmp.charAt(i) >= 'a' && tmp.charAt(i) <= 'z')
continue;
else if (tmp.charAt(i) >= 'A' && tmp.charAt(i) <= 'Z')
continue;
else if (tmp.charAt(i) == '_' || tmp.charAt(i) == '-')
continue;
else {
alert(ext+"¿¡´Â ¿µ¹®ÀÚ, ¼ýÀÚ, ±âÈ£ '-' , '_'  ¸¸ »ç¿ëÇÏ½Ç ¼ö ÀÖ½À´Ï´Ù.");
sub_str.focus();
return false;
}
}


if (tmp.charAt(0) == '_' || tmp.charAt(0) == '-') {
alert("'_'¿Í '-'´Â "+ext+"ÀÇ Ã¹±ÛÀÚ·Î »ç¿ëÇÏ½Ç ¼ö ¾ø½À´Ï´Ù.");
sub_str.focus();
return false;
} 

if (tmp.charAt(0) >= '0' && tmp.charAt(0) <= '9') {
alert("¼ýÀÚ´Â "+ext+"ÀÇ Ã¹±ÛÀÚ·Î »ç¿ëÇÏ½Ç ¼ö ¾ø½À´Ï´Ù.");
sub_str.focus();
return false;
} 



return true;


}

function str_check2(str,ext,root){
if(!root) var root = document.forms[0].name;
	var sub_str = eval((navigator.appName == 'Netscape') ? root+'.'+str : 'document.all.'+str);
	var tmp = sub_str.value;

for (i = 0; i < tmp.length; i++) {
	if (tmp.charAt(i) >= '0' && tmp.charAt(i) <= '9'){
		alert(ext+"¿¡´Â ¿µ¹®ÀÚ, ¼ýÀÚ, ±âÈ£ '-' , '_'  ¸¦ »ç¿ëÇÏ½Ç ¼ö ÀÖ½À´Ï´Ù.");
		sub_str.focus();
		return false;}
	else if (tmp.charAt(i) >= 'a' && tmp.charAt(i) <= 'z'){
		alert(ext+"¿¡´Â ¿µ¹®ÀÚ, ¼ýÀÚ, ±âÈ£ '-' , '_'  ¸¦ »ç¿ëÇÏ½Ç ¼ö ÀÖ½À´Ï´Ù.");
		sub_str.focus();
		return false;}
	else if (tmp.charAt(i) >= 'A' && tmp.charAt(i) <= 'Z'){
		alert(ext+"¿¡´Â ¿µ¹®ÀÚ, ¼ýÀÚ, ±âÈ£ '-' , '_'  ¸¦ »ç¿ëÇÏ½Ç ¼ö ÀÖ½À´Ï´Ù.");
		sub_str.focus();
		return false;}
	else if (tmp.charAt(i) == '_' || tmp.charAt(i) == '-'){
		alert(ext+"¿¡´Â ¿µ¹®ÀÚ, ¼ýÀÚ, ±âÈ£ '-' , '_'  ¸¦ »ç¿ëÇÏ½Ç ¼ö ÀÖ½À´Ï´Ù.");
		sub_str.focus();	
		return false;}
	else {
		continue;
		}
}

return true;
}









































































































































































































