	function chkdata()
            {
						if(document.getElementById("name").value==''){
                          alert('ยังไม่ได้กรอกชื่อค่ะ');
						  document.getElementById("name").focus();
                                 return false;
                       } if (document.getElementById("tel").value==''){
                          alert('ยังไม่ได้กรอกเบอร์โทรศัพท์ค่ะ');
						  document.getElementById("tel").focus();
                                 return false;	
					   } if (document.getElementById("email").value==''){
                          alert('ยังไม่ได้กรอก E-mail ค่ะ');
						  document.getElementById("email").focus();
                                 return false;
			} if(document.getElementById("email").value != ""){
			  if(document.getElementById("email").value == "" || document.getElementById("email").value.indexOf ('@',0) == -1 || document.getElementById("email").value.indexOf ('.',0) == -1)
{
alert("รูปแบบอีเมล์ไม่ถูกต้องค่ะ รูปแบบที่ถูกต้องคือ xxx@hotmail.com")
document.getElementById("email").focus();
return false; }
                       } if (document.getElementById("payment_bank").value=='0'){
                          alert('ยังไม่ได้เลือกธนาคารที่ชำระค่าบริการค่ะ');
						  document.getElementById("payment_bank").focus();
                                 return false;	
					   } if (document.getElementById("bank").value=='0'){
                          alert('ยังไม่ได้เลือกธนาคารที่ (ใช้) ชำระค่าบริการค่ะ');
						  document.getElementById("bank").focus();
                                 return false;	
					   } if (document.getElementById("date1").value==''){
                          alert('ยังไม่ได้เลือกวันที่ชำระค่ะ');
						  document.getElementById("date1").focus();
                                 return false;	
					   } if (document.getElementById("paytime01").value==''){
                          alert('ยังไม่ได้กรอกเวลาที่ชำระค่ะ');
						  document.getElementById("paytime01").focus();
                                 return false;	
					   } if (document.getElementById("paytime02").value==''){
                          alert('ยังไม่ได้กรอกเวลาที่ชำระค่ะ');
						  document.getElementById("paytime02").focus();
                                 return false;	
					   } if (document.getElementById("total").value==''){
                          alert('ยังไม่ได้กรอกจำนวนเงินค่ะ');
						  document.getElementById("total").focus();
                                 return false;	
					   } if (document.getElementById("code").value==''){
                          alert('ยังไม่ได้กรอกรหัส Verify Code ค่ะ');
						  document.getElementById("code").focus();
                                 return false;	
					   }
           }		   
		   
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();
    }
}
