function validateInvoicePayment()
{
  if(document.theForm.os0.value=="" )
  {
    alert("Please specify the invoice number");
    document.theForm.os0.focus();
    return false;

  }
  if(document.theForm.amount.value=="" )
  {
    alert("Please specify the invoice amount including taxes.");
    document.theForm.amount.focus();
    return false;

  }

  var amount = parseFloat(document.theForm.amount.value);
  var fee=amount * 0.04;
  var total=amount + fee;

  document.theForm.item_name.value="Invoice Payment $" + amount.toFixed(2)  + " + 4% processing fee. ($"+ fee.toFixed(2) + ")";
  
  document.theForm.amount.value = total.toFixed(2);

}

function validateInput()
{
  
  if(document.theForm.contactName.value=="" )
  {
    alert("Please specify a contact name");
    document.theForm.contactName.focus();
    return false;
    
  }

  if(document.theForm.email.value=="") 
  {
    alert("Please specify an a return email address");
    document.theForm.email.focus();    
    return false;
  }
 
  if(document.theForm.email.value.indexOf("@")<=0) 
  {
    alert("Please specify a valid email address");
    document.theForm.email.focus();    
    return false;
  }

  if(document.theForm.info.value=="" )
  {
    alert("Please specify additional information");
    document.theForm.info.focus();
    return false;
    
  }



  return true;
  
  

}

function validatePurchaseInput()
{
  
  if(document.theForm.package.value=="" )
  {
    alert("Please specify a hosting package");
    document.theForm.package.focus();
    return false;
    
  }

  if(document.theForm.contactName.value=="" )
  {
    alert("Please specify a contact name");
    document.theForm.contactName.focus();
    return false;
    
  }

  if(document.theForm.address.value=="" )
  {
    alert("Please specify an address");
    document.theForm.address.focus();
    return false;
    
  }

  if(document.theForm.state.value=="" )
  {
    alert("Please specify a province/state");
    document.theForm.state.focus();
    return false;
    
  }

  if(document.theForm.postalcode.value=="" )
  {
    alert("Please specify a postal code/zip");
    document.theForm.postalcode.focus();
    return false;
    
  }
  
  if(document.theForm.country.value=="" )
  {
    alert("Please specify a country");
    document.theForm.country.focus();
    return false;
    
  }
  
  if(document.theForm.phone.value=="" )
  {
    alert("Please specify a phone number");
    document.theForm.phone.focus();
    return false;
    
  }
  
  if(document.theForm.email.value=="") 
  {
    alert("Please specify an a return email address");
    document.theForm.email.focus();    
    return false;
  }
 
  if(document.theForm.email.value.indexOf("@")<=0) 
  {
    alert("Please specify a valid email address");
    document.theForm.email.focus();    
    return false;
  }

  if(document.theForm.domain.value=="" )
  {
    alert("Please specify a domain name");
    document.theForm.domain.focus();
    return false;
    
  }
  
  if(document.theForm.domain_extension.value=="" )
  {
    alert("Please specify a domain extension");
    document.theForm.domain_extension.focus();
    return false;
    
  }

  if(document.theForm.domain_status.value=="" )
  {
    alert("Please specify the status of your domain name");
    document.theForm.domain_status.focus();
    return false;
    
  }

  if(document.theForm.agreement.checked==false )
  {
    alert("Please read and agree to the terms of service.");
    document.theForm.agreement.focus();
    return false;
    
  }


  return true;
  
  

}
