order = {};

order.send = function()
 {
  var d = document.f;
  
  var s = new String();
  s = d.email.value;
  if (s.length < 2) { alert('Please fill in your email adress'); d.email.focus(); return}
  if (s.indexOf('@') == -1 ) { alert('Please fill in a real email adress');d.email.focus(); return}         
  if (s.indexOf('.') == -1 ) { alert('Please fill in a real email adress');d.email.focus(); return}    
         
  s = d.name.value;
  if (s.length < 2) { alert('Please fill in your name'); d.name.focus(); return}       
         
  s = d.phone.value;
  if (s.length < 5) { alert('Please fill in your phone number'); d.phone.focus(); return} 

  d.cardno.value = d.card_no1.value + '.' + 
                   d.card_no2.value + '.' +
                   d.card_no3.value + '.' + 
                   d.card_no4.value;  
                          
  if (d.paymethod[2].checked)
   {
    if ((d.d1.value == '') || (d.d2.value == '')) 
     {
      alert('exp. date is not set'); d.d1.focus(); return;
     }
   }
                          
  d.expdate.value = d.d1.value + '.' + d.d2.value;  
  document.f.submit();
 } 
