function Add_Comma(Name){
var src;
var i;
var factor;
var su;
var SpaceSize = 0;
factor = Name.length % 3;
su = (Name.length - factor) / 3;
src = Name.substring(0,factor);
for(i=0; i < su ; i++) {
if((factor == 0) && (i == 0)) { // "XXX" 인경우
src += Name.substring(factor+(3*i), factor+3+(3*i));
} else {
src += "," ;
src += Name.substring(factor+(3*i), factor+3+(3*i));
}
}
Name = src;
return Name;
}
function trim(str){
var reg = /\s+/g;
return str.replace(reg,'');
}
// 컴마(",") 자동 삭제
function Del_Comma(Name){
var x, ch;
var i=0;
var newVal="";
for(x = 0; x < Name.length ; x++){
ch= Name.substring(x,x+1);
if( ch != ",") newVal += ch;
}
Name = newVal;
return Name;
}
function Add_Comma2(Name){
var src;
var i;
var factor;
var su;
var SpaceSize = 0;
factor = Name.value.length % 3;
su = (Name.value.length - factor) / 3;
src = Name.value.substring(0,factor);
for(i=0; i < su ; i++) {
if((factor == 0) && (i == 0)) { // "XXX" 인경우
src += Name.value.substring(factor+(3*i), factor+3+(3*i));
} else {
src += "," ;
src += Name.value.substring(factor+(3*i), factor+3+(3*i));
}
}
Name.value = src;
return true;
}
// 컴마(",") 자동 삭제
function Del_Comma2(Name){
var x, ch;
var i=0;
var newVal="";
for(x = 0; x < Name.value.length ; x++){
ch= Name.value.substring(x,x+1);
if( ch != ",") newVal += ch;
}
Name.value = newVal;
return true;
}
function Explode(sepa,str) {
var Aid = new Array();
j = "";
x = 0;
for (i = 0 ; i < str.length ; i ++){
id2 = str.charAt(i);
if (id2 == sepa) {
Aid[x] = j;
x++;
j = "";
} else {
if (id2 != "") j += id2;
}
}
Aid[x] = j;
return Aid;
}