function f_EmailCheck(target) {
    var t = target.value
    if ( emptyField(target) ) {
    	alert('ÀÌ¸ÞÀÏÁÖ¼Ò¸¦ ÀÔ·ÂÇÏ¼¼¿ä');
		target.select();
		target.focus();
    	return false;
    }
    if (t != '') {
	var Alpha = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
	var Digit = '1234567890'
	var Symbol='_-'
	var check = '@.' + Alpha + Digit + Symbol
	for (i=0; i < t.length; i++){
	    if(check.indexOf(t.substring(i,i+1)) < 0) {
    		alert('ÀÌ¸ÞÀÏÀÌ Á¤È®ÇÏÁö ¾Ê½À´Ï´Ù.');
    		return false;
    		target.select();
    		target.focus();
	    }
	}

	var check = '@'
	var a = 0
	for (i=0; i < t.length; i++) {
	    if(check.indexOf(t.substring(i,i+1)) >= 0) {
		a = 1
	    }
	}

	var check = '.'
	var b = 0
	for (i=0; i < t.length; i++) {
	    if(check.indexOf(t.substring(i,i+1)) >= 0) {
		b = 1
	    }
	}
	if (a == 1) {
	    if (b == 1) {
	    } else {
		alert('ÀÌ¸ÞÀÏÀÌ Á¤È®ÇÏÁö ¾Ê½À´Ï´Ù.');
		target.select();
		target.focus();
		return false;
	    }
	} else {
	    alert('ÀÌ¸ÞÀÏÀÌ Á¤È®ÇÏÁö ¾Ê½À´Ï´Ù.');
	    target.select();
	    target.focus();
	    return false;
	}
    }
    return true;
}

function targetCheck(target, cmt, astr, lmin, lmax) {
    var i;
    var t=target.value.replace(/^(\s+)|(\s+)$/g, '');
    if (t.length < lmin || t.length > lmax) {
        if (lmin == lmax) alert(cmt + '´Â(Àº) ' + lmin + ' ÀÚ ÀÌ¾î¾ß ÇÕ´Ï´Ù.');
        else alert(cmt + '´Â(Àº) ' + lmin + ' ~ ' + lmax + ' ÀÚ ÀÌ³»·Î ÀÔ·ÂÇÏ¼Å¾ß ÇÕ´Ï´Ù.');
        target.select();
        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(cmt + '¿¡ Çã¿ëÇÒ ¼ö ¾ø´Â ¹®ÀÚ°¡ ÀÔ·ÂµÇ¾ú½À´Ï´Ù.');
                target.select();
                target.focus();
                return true;
            }
        }
    }
    return false;
}
function targetCheck2(target, cmt, cmt2, astr, lmin, lmax) {
    var i;
    var t=target.value.replace(/^(\s+)|(\s+)$/g, '');
    if ( lmin == 0 && lmax == 0 ){
        if( t.length == 0 ){
            alert(cmt + ' ÀÔ·ÂÇÏ¼¼¿ä.');
            target.select();
            target.focus();
            return true;
        }
    }else if (t.length < lmin || t.length > lmax) {
        if (lmin == lmax) {
            alert(cmt + ' ' + lmin + ' ÀÚ ÀÌ¾î¾ß ÇÕ´Ï´Ù');
        }else if ( lmin == 1 ){
            alert(cmt + ' ' + lmax + ' ÀÚ ÀÌ³»·Î ÀÔ·ÂÇÏ¼Å¾ß ÇÕ´Ï´Ù');
        }else {
            alert(cmt + ' ' + lmin + ' ~ ' + lmax + ' ÀÚ ÀÌ³»·Î ÀÔ·ÂÇÏ¼Å¾ß ÇÕ´Ï´Ù');
        }
        target.select();
        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(cmt2 + '¿¡ Çã¿ëÇÒ ¼ö ¾ø´Â ¹®ÀÚ°¡ ÀÔ·ÂµÇ¾ú½À´Ï´Ù');
                target.select();
                target.focus();
                return true;
            }
        }
    }
    return false;
}
function emptyField(textObj) {
    if(textObj.value.length == 0) return true;
    for(var i=0; i<textObj.value.length; ++i) {
	var ch = textObj.value.charAt(i);
	if(ch != ' ' && ch != '\t') return false;
    }
    return true;
}