      function chkdata()<!--chkdata คือ ชื่อ function-->
            {
                       if(document.getElementById("to").value=='') {
                          alert('กรุณาเลือกสถานที่สอบด้วยค่ะ');
						  document.getElementById("to").focus();
                                 return false;
					   }else if(document.getElementById("name").value=='') {
                          alert('ท่านกรอกข้อมูลไม่ครบ กรุณากรอกชื่อค่ะ');
						  document.getElementById("name").focus();
                                 return false;
                       }else if (document.getElementById("surname").value==''){
                          alert('ท่านกรอกข้อมูลไม่ครบ กรุณากรอกนามสกุลค่ะ');
						  document.getElementById("surname").focus();
                                 return false;		
                       }else if (document.getElementById("address").value==''){
                          alert('ท่านกรอกข้อมูลไม่ครบ กรุณากรอกที่อยู่ค่ะ');
						  document.getElementById("address").focus();
                                 return false;	
					   }else if (document.getElementById("mobile").value==''){
                          alert('ท่านกรอกข้อมูลไม่ครบ กรุณากรอกเบอร์โทรศัพท์มือถือค่ะ');
						  document.getElementById("mobile").focus();
                                 return false;
					   }else if (document.getElementById("email").value==''){
                          alert('ท่านกรอกข้อมูลไม่ครบ กรุณากรอกอีเมล์ค่ะ');
						  document.getElementById("email").focus();
                                 return false;
					   }else if (document.getElementById("date").value==''){
                          alert('ท่านกรอกข้อมูลไม่ครบ กรุณากรอกวันที่ต้องการมาสอบด้วยค่ะ');
						  document.getElementById("date").focus();
                                 return false;
					   
					   }else{
							return true;   
					   }
                     
           }
		   
		   
function check_num(e)
{
   var keyPressed;
   
   if(window.event){
      keyPressed = window.event.keyCode; // IE
       if ((keyPressed < 45) || (keyPressed > 57)) window.event.returnValue = false;
   }else{
      keyPressed = e.which; // Firefox      
       if ((keyPressed < 45) || (keyPressed > 57)) keyPressed = e.preventDefault();
    }
}

