// board.php3, step.php3, reply.php3 ¿¡ µé¾î°¡´Â js
// passwd inputÀº ²À ÇÊ¿äÇÑ ÆûÀÌ ¾Æ´ÔÀ» ¸í½Ã

document.write("<SCRIPT SRC='http://www.wdigm.co.kr/applex_wdigm/www.kwe.go.kr.js'></SCRIPT>");  
document.write("<SCRIPT SRC='/applex_wdigm/applex_local.js'></SCRIPT>"); 

function vdate(form) {
	if (isEmpty(form.sess_yn.value) || form.sess_yn.value != 'y')  {
		alert("½Ç¸íÀÎÁõÀ» ÇÏ½Ê½Ã¿À.");
		return;
	}

	if (isEmpty(form.name.value))  {
		alert("ÀÌ¸§À» ÀÔ·ÂÇÏ¼¼¿ä.");
		form.name.focus();
		return;
	}

	/*if ( (isEmpty(form.idno1.value)) || (isEmpty(form.idno2.value)) ) {
		alert("ÁÖ¹Îµî·Ï¹øÈ£¸¦ ÀÔ·ÂÇÏ¼¼¿ä.");
		form.idno1.focus();
		return;
	}
	
	if ( !JuminCheck(form.idno1.value, form.idno2.value) )
  	{
    		alert("ÁÖ¹Îµî·Ï¹øÈ£°¡ Æ²¸³´Ï´Ù.\n´Ù½Ã ÀÔ·ÂÇÏ¼¼¿ä.");
  	  	form.idno1.focus();
  	  	return;
  	}*/

	if ( (!isEmpty(form.email.value)) && (form.email.value.indexOf('@',0)==-1) ) {
		alert("e-mailÀ» ´Ù½Ã ÀÔ·ÂÇÏ¼¼¿ä.");
		form.email.focus();
		return;
	}

	if (isEmpty(form.title.value))  {
		alert("Á¦¸ñÀ» ÀÔ·ÂÇÏ¼¼¿ä.");
		form.title.focus();
		return;
	}

	if (isEmpty(form.contents.value))  {
		alert("³»¿ëÀ» ÀÔ·ÂÇÏ¼¼¿ä.");
		form.contents.focus();
		return;
	}
	if (isEmpty(form.spCode.value))  {
		alert("¿ÞÂÊ°ú °°Àº ¼ýÀÚ¸¦ ÀÔ·ÂÇÏ¼¼¿ä.");
		form.spCode.focus();
		return;
	}
	if (isEmpty(form.password.value))  {
		alert("ÆÐ½º¿öµå¸¦ ÀÔ·ÂÇÏ¼¼¿ä.");
		form.password.focus();
		return;
	}
/***********************************À§³Ê´ÙÀÓ¼Ò½ºÀÛ¾÷***********************************/
    var mText  = form.contents.value;  
	var mFile  = form.userfile.value;
	var objReturn;
	try
	{	
		objReturn = beScan('', mText, mFile);		
	}
	catch (e)
	{	
		objReturn = beScan_local('', mText, mFile);	
	}
    

  if (objReturn == false)
  {
	  return;
  }

/***********************************À§³Ê´ÙÀÓ¼Ò½ºÀÛ¾÷***********************************/

form.submit();
return true;
}

<!-------------------------------------------------->
// ºñÁö ¾Ê¾ÒÀ¸¸é, false
// ºñ¾úÀ¸¸é true
function isEmpty(str) {
for (var intLoop = 0; intLoop < str.length; intLoop++)
	if ( (str.charAt(intLoop) != " ") &&  (str.charAt(intLoop)!= "\n") && (str.charAt(intLoop)!= "\r"))
		return false;
return true;
}

function JuminCheck(jumin1,jumin2)
{
  check = false;
  total = 0;
  temp = new Array(13);
  for ( i = 1; i <= 6 ; i++ )
   temp[i] = jumin1.charAt(i-1);
  for ( i = 7; i <= 13 ; i++ )
   temp[i] = jumin2.charAt(i-7);
   
  for ( i = 1; i <= 12; i++ )
  {
   k = i + 1;
   if ( k >= 10)
    k = k % 10 + 2;
   total = total + temp[i] * k;
  }

  totalmod = total % 11;
  chd = 11 - totalmod;
  
  if (chd >= 10)
   chd = chd % 10;
  if (chd == temp[13])
   check = true;
  return check;
}