// ±Ý¾× Ç¥½Ã ÇÔ¼ö
function CurrencyFormat(strvalue)
{
	strreturn = "";
	ip = strvalue.length % 3
	if(ip == 0) ip = 3;

	for(i=0;i<strvalue.length;i++){
		strreturn = strreturn + strvalue.substring(i, i+1);
		if(ip == 1 && i < strvalue.length-1){
			strreturn = strreturn + ",";
		}
		ip--;
		if(ip <= 0){
			ip = 3;
		}
	}

	return strreturn;
}

// ÄÞ¸¶°¡ ÀÖ´Â ±Ý¾×¿¡¼­ ÄÞ¸¶¸¦ Á¦°ÅÇÑ´Ù.
function CurrencyValue(strvalue)
{
	strreturn = "";
	for(i=0;i<strvalue.length;i++){
		if(strvalue.substring(i, i+1) != ","){
			strreturn = strreturn + strvalue.substring(i, i+1);
		}
	}

	return strreturn;
}

// »ç¾÷ÀÚ¹øÈ£ À¯È¿¼º Ã¼Å©

function checkBusinessNum(strvalue)
{
	return;
	temp_total=0;
	keycode="137137135";
	for(i=0;i<=8;i++) {
	temp_total=temp_total+eval(strvalue.substring(i,i+1))*eval(keycode.substring(i,i+1))
	}
	temp_total = temp_total +((eval(strvalue.substring(8, 9))*5)/10);
	temp_mod = temp_total % 1;
	temp_total = temp_total - temp_mod;
	temp_mod = temp_total % 10;
	if(temp_mod != 0){
		temp_mod = 10 - temp_mod;
	}
	if(temp_mod == eval(strvalue.substring(9, 10)))
		return true;
	else
		return false;
}

// ¹ýÀÎ¹øÈ£ À¯È¿¼º Ã¼Å©
function checkBusinessNum2(strvalue)
{
	if(strvalue.length == 13)
		return true;
	else
		return false;
}

// ÁÖ¹Î¹øÈ£ À¯È¿¼º Ã¼Å©
function checkJumin(strvalue) {
	temp_total=0
	keycode="234567892345"
	for(i=0;i<=11;i++) {
	temp_total=temp_total+eval(strvalue.substring(i,i+1))*eval(keycode.substring(i,i+1))
	}
	temp_total = 11 - (temp_total%11)
	if( (strvalue%10)==(temp_total%10) ) 
		return true
	else
		return false
}

// ¾ÆÀÌµð À¯È¿¼º Ã¼Å©
// Ã¹ÀÚ´Â ¿µ¹®ÀÌ¾î¾ß ÇÑ´Ù.
function checkID(strings){
    for(i=0;i<strings.length;i++) {
        c = strings.charAt(i);
		if((i == 0)&&(c < 'a' || c > 'z')){
			return false;
		}
        if((c < '0' || c > '9')&&(c < 'a' || c > 'z')){
           return(false);
        }
    }

    return(true);
} 

// ¾ÏÈ£¿¡ ¿µ¾î¿Í ¼ýÀÚ¸¸ °¡´ÉÇÏ°Ô..
function checkPW(strings){
   for(i=0;i<strings.length;i++) {
        c = strings.charAt(i);
        if((c < '0' || c > '9')&&(c < 'a' || c > 'z')&&(c < 'A' || c > 'Z')){
           return(false);
        }
    }

    return(true);
} 

// °ø¶õ Ã¼Å© ÇÔ¼ö
function checkNull(strvalue) {
	str_name = 0
	for(i=0;i<strvalue.length;i++)	{
		if(strvalue.substring(i,i+1) != ' ')
		{
			str_name = str_name + 1;
		}
	}

	if(str_name==0) {
		return false;
	}
	else {
		return true;
	}
}

// ¼ýÀÚ Ã¼Å© ÇÔ¼ö
function checkNumber(strvalue) {
	str_name=0
	all_char="0123456789"

	for(i=0;i<strvalue.length;i++) {
		if(all_char.indexOf(strvalue.substring(i,i+1))==-1) 
		{
			str_name=1
		}
	}
	
	if(str_name==0)
	return true;
	else
	return false;
}

// Æ¯¼ö¹®ÀÚ Ã¼Å© ÇÔ¼ö
function checkChar(strvalue) {
	str_name=0
	all_char="0123456789abcdefghijklmnopqrstuvwxyz"

	for(i=0;i<strvalue.length;i++) {
		if(all_char.indexOf(strvalue.substring(i,i+1))==-1) 
		{
			str_name=1
		}
	}
	
	if(str_name==0)
	return true;
	else
	return false;
}

function checkEmail(strvalue) 
{
	if(strvalue.indexOf("@") + "" != "-1" && strvalue.indexOf(".") + "" != "-1") 
		return true;
    else 
		return false;
}


