//function to check valid email address
function validateEmail(strEmail){
  validRegExp = /^[^@]+@[^@]+.[a-z]{2,}$/i;
   // search email text for regular exp matches
    if (strEmail.search(validRegExp) == -1) 
   {
	  alert('電子信箱 '+strEmail+' 不正確, 請再輸入一次');
      return false;
    } 
    return true; 
}

function validatePhoneNumber(strPhone)
{
   if (strPhone == "") return false;
   // Check for correct phone number
   rePhoneNumber = new RegExp(/^\([1-9]\d{2}\)\strPhone?\d{3}\-\d{4}$/);
 
   if (!rePhoneNumber.test(strPhone)) {
     alert("Phone Number Must Be Entered As: (408)123-4567");
     return false;
   }
   return true;
} 

function validateNumber(strAmount)
{
   if (strAmount == "") return false;
   // Check for correct number
   reAmount = new RegExp(/^\d+$/);
 
   if (!reAmount.test(strAmount)) {
     alert("請輸入正確的數量");
     return false;
   }
   return true;
} 


function makeArray(n){this.length=n;for(i=0;i<n;i++)this[i]="";}



function printMessage(){
         d=new Date();h=d.getHours();document.write(mes[h]);

                       }

function blank(){
	return("<html><body bgcolor=#ffffff></body></html>");
}






