  function submit_register(theform) {  
       
        function IsNumericBLN(objField) {
	var blnNumeric = true
	
	// SCAN string for non-numeric characters.
	for (var i = 0; i < objField.value.length; i++) {
	
		var strDigit = objField.value.charAt(i)
	
		if (strDigit < "0" || strDigit > "9") {	//non-numeric character has been found.
			blnNumeric = false
			break
		}
	}		
	return blnNumeric	
       }

      function EMailValidBLN(objField) {        	
	if (objField.value.indexOf ('@', 0) == -1 || objField.value.indexOf ('.', 0) == -1) {	// address does not contain the "@" and "." characters.					  
		return false;      
	}	
	else {	// the address is acceptable.
		return true;      
	}   
      }
      
	   
	    if ((theform.S_url.value == "") || (theform.S_url.value.length < 15)) {
        document.getElementById('myspan').innerHTML="<font color=red>»çÀÌÆ® ÁÖ¼Ò¸¦ ÀÔ·ÂÇÏ¼¼¿ä.</font>";
        theform.S_url.focus();
        return;
        }

       if ((theform.S_name.value == "") || (theform.S_name.value.length < 4)) {
        document.getElementById('myspan').innerHTML="<font color=red>40ÀÚÀÌ³»ÀÇ »çÀÌÆ®³×ÀÓÀ» ÀÔ·ÂÇÏ¼¼¿ä.</font>";
        theform.S_name.focus();
        return;
        }		

		 if ((theform.S_comments.value == "") || (theform.S_comments.value.length < 20)) {
        document.getElementById('myspan').innerHTML="<font color=red>20ÀÚ ÀÌ»óÀÇ »çÀÌÆ® ¼³¸íÀ» ÀÔ·ÂÇÏ¼¼¿ä.</font>";
        theform.S_comments.focus();
        return;
        }

         if ((theform.passwd.value == "") || (theform.passwd.value.length < 5)) {
        document.getElementById('myspan').innerHTML="<font color=red>5ÀÚ ÀÌ»óÀÇ ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇÏ¼¼¿ä.</font>";
        theform.passwd.focus();
        return;
        }

        // VALIDATE email address.
        if (!EMailValidBLN(theform.S_email) || (theform.S_email.value.length < 9)) {
        document.getElementById('myspan').innerHTML="<font color=red>Á¤È®ÇÑ ÀÌ¸ÞÀÏ ¾ÆÀÌµð¸¦ ÀÔ·ÂÇÏ¼¼¿ä.</font>";  
        theform.S_email.focus();
        return;
        }

        if (typeof theform.S_country!="undefined" && theform.S_country.selectedIndex < 1) {
         document.getElementById('myspan').innerHTML="<font color=red>»çÀÌÆ®°¡ ¿î¿ëµÇ´Â ±¹°¡¸¦ ¼±ÅÃÇÏ¼¼¿ä.</font>";         
         theform.S_country.focus();
         return;
         }    
  

        if (theform.checkterms.checked == false){
        document.getElementById('myspan').innerHTML="<font color=red>»çÀÌÆ® µî·Ï¿¡ °üÇÑ ¾à°ü¿¡ µ¿ÀÇÇÏ½Ê´Ï±î?</font>"; 
        theform.checkterms.focus();
        return;
        }

        theform.action="sin.cfm?amode=add";
        theform.submit();   
}