﻿  
  function checkForNumber (fieldValue){
  
    var numberCheck = isNaN(fieldValue);
    //var phone;
    var phone1;
    var phone2;
   var phone3;
    
    if (numberCheck == true) {
    window.alert ("Xin điền vào số điện thoại hay quí vị có thể chừa trống. Cám ơn! \n (Please enter a numeric value for your phone number or you can leave it empty.)");
    return false;
    }
   
   else if (document.forms[0].phone1.value.length < 3
    ||document.forms[0].phone2.value.length < 3
    || document.forms[0].phone3.value.length < 4) {
    
    /*
    else if ((document.forms[0].phone1.value.length < 3)
    ||(document.forms[0].phone2.value.length) < 3
    || (document.forms[0].phone3.value.length) < 4)) {
*/
    window.alert("Xin điền vào hết 10 số điện thoại hay quí vị có thể chừa trống. Cám ơn!\n(Please enter your complete 10-digit phone number or you can leave it empty.)");
   return false;
	}	
		
   /*
   else if (document.forms[0].phone.value.length < 10){
   
   window.alert("Please enter your complete 10-digit phone number or you can leave it empty!");
   return false;
   }
    */
    
  } 
