function sendOff(){
   nmcheck = document.TheForm.name.value    
   if (nmcheck.length <1) {
      alert('Please enter your name.')
	  document.TheForm.name.focus()
      return false
   }       
   
   address1 = document.TheForm.address1.value    
   if (address1.length <1) {
      alert('Please enter your address.')	  	  
	  document.TheForm.address1.focus()
      return false
   }         
   
      city = document.TheForm.city.value    
   if (city.length <1) {
      alert('Please enter your city.')
	  document.TheForm.city.focus()	  	  
      return false
   }    
   
	  postcode = document.TheForm.postcode.value    
   if (postcode.length <1) {
      alert('Please enter your post code.')	  
	  document.TheForm.postcode.focus()	  
      return false
   }  
    country = document.TheForm.listCountry.value    
   if (country.length <1) {
      alert('Please select the country.')	  
	  document.TheForm.listCountry.focus()	  
      return false
   }           
   
   phonecheck = document.TheForm.phone.value    
   if (phonecheck.length <1) {
      alert('Please enter your phone number.')
	  document.TheForm.phone.focus()
      return false
   }     
   
	if(!func_is_telephone_number(phonecheck))
	{
		alert("Please enter valid telephone number");
		document.TheForm.phone.select()
		return false
	}

   if (document.TheForm.email.value  =="" )    
   {
   	alert('Please enter your email.')
	  document.TheForm.email.focus()
      return false
   }   
   
    if (!func_isEmail(document.TheForm.email.value )    )
   {
   	alert('Please enter valid email.')
	  document.TheForm.email.select()
      return false
   }   
   
  if (document.TheForm.pwd.value == "")
   {	
	alert('Please enter the password.')
	document.TheForm.pwd.focus()
	return false
	}
	
  if (document.TheForm.pwd.value != "")
   {
    if (document.TheForm.rpwd.value == "")
	  {	
		alert('Please retype password.')
		document.TheForm.rpwd.focus()
		return false
	}	
	 if (document.TheForm.pwd.value != document.TheForm.rpwd.value)
	  {	
		alert('Retyped password is not correct.')
		document.TheForm.rpwd.select()
		return false
		}
	}
	
	 address1 = document.TheForm.Daddress1.value    
   if (address1.length <1) {
      alert('Please enter your address.')	  	  
	  document.TheForm.Daddress1.focus()
      return false
   }         
   
      city = document.TheForm.Dcity.value    
   if (city.length <1) {
      alert('Please enter your city.')
	  document.TheForm.Dcity.focus()	  	  
      return false
   }    
   
	  postcode = document.TheForm.Dpostcode.value    
   if (postcode.length <1) {
      alert('Please enter your post code.')	  
	  document.TheForm.Dpostcode.focus()	  
      return false
   }  
    country = document.TheForm.listDCountry.value    
   if (country.length <1) {
      alert('Please select the country.')	  
	  document.TheForm.listDCountry.focus()	  
      return false
   }           
   
   phonecheck = document.TheForm.Dphone.value    
   if (phonecheck.length <1) {
      alert('Please enter your phone number.')
	  document.TheForm.Dphone.focus()
      return false
   }     
   
	if(!func_is_telephone_number(phonecheck))
	{
		alert("Please enter valid telephone number");
		document.TheForm.Dphone.select()
		return false
	}

	
	
	return true
}

function CopyAddress()
{
	var check = document.TheForm.check
	if (check.checked==true)
	{
		document.TheForm.Daddress1.value=document.TheForm.address1.value
		document.TheForm.Daddress2.value=document.TheForm.address2.value
		document.TheForm.Daddress3.value=document.TheForm.address3.value
		document.TheForm.Dphone.value= document.TheForm.phone.value
		 document.TheForm.Dcity.value= document.TheForm.city.value
		 document.TheForm.Dpostcode.value= document.TheForm.postcode.value
		 document.TheForm.listDCountry.value = document.TheForm.listCountry[document.TheForm.listCountry.selectedIndex].value;
	}
	else
	{
		document.TheForm.Daddress1.value=""
	document.TheForm.Daddress2.value=""
	document.TheForm.Daddress3.value=""
	document.TheForm.Dphone.value=""
	 document.TheForm.Dcity.value= ""
	 document.TheForm.Dpostcode.value= ""
	 document.TheForm.listDCountry.value = ""
	
	
	}
	return true
	}


