function pophelp()
{
alert ('On the reverse side of your credit card, in the signature area, there is an additional 3 digit security code, not part of the card number.  This number may be preceded by part or all of the card number.  Entering the number here is an additional check against fraud.  [OPTIONAL]');
return;
}

function checkemail(eaddr)
{
  if (eaddr == '') 
  {
  alert ('You have to enter your e-mail address')
  return -1;
  }
  if (eaddr.indexOf(" ") != -1) 
  {
  alert ('Your e-mail address should not contain spaces !')
  return -1;
  }
  if (eaddr.indexOf(",") != -1) 
  {
  alert ('Your e-mail address should not contain commas !')
  return -1;
  }
  if (eaddr.indexOf("'") != -1) 
  {
  alert ('Your e-mail address should not contain quotes !')
  return -1;
  }
  if (eaddr.indexOf('"') != -1) 
  {
  alert ('Your e-mail address should not contain quotes !')
  return -1;
  }
  if (eaddr.indexOf(".") == -1) 
  {
  alert ('Your e-mail address should contain at least one dot !')
  return -1;
  }
  if (eaddr.indexOf("@") == -1) 
  {
  alert ('Your e-mail address should contain the @ sign !')
  return -1;
  }
return 0;
}


function checkform() 
{
if (document.mainform.tname.value == '')
{
  if (document.mainform.coname.value == '') 
  {
  alert ('You have to enter your Company name')
  return;
  }
  if (document.mainform.name.value == '') 
  {
  alert ('You have to enter your Contact name')
  return;
  }
  if (document.mainform.address.value == '') 
  {
  alert ('You have to enter your address')
  return;
  }
  if (document.mainform.postcode.value == '') 
  {
  alert ('You have to enter your post/zip code')
  return;
  }
//  if (document.mainform.cardno.value == '') 
//  {
//  alert ('You have to enter your credit card number')
//  return;
//  }
//  if (document.mainform.expires.value == '') 
//  {
//  alert ('You have to enter your credit card expiry date')
//  return;
//  }


//  if (document.mainform.cardtype.value == 'Switch') 
//  {
//  if (document.mainform.issueno.value == '') 
//  {
//  alert ('You have to enter issue number for Switch Cards')
//  return;
//  }
//  }





  if (checkemail(document.mainform.email.value) != -1)
  {
 // alert ('ITS VALID')
  document.mainform.submit();
  }

}
else
{
    if (document.mainform.temail.value == '')
    {
    document.mainform.temail.value = document.mainform.email.value;
    }
//  newstr = document.mainform.tname.value.toUpperCase();
//  if (newstr.indexOf("NRO") == -1) 
//  {
//  alert ('Your Account Number is not valid')
//  return;
//  }
  if (checkemail(document.mainform.temail.value) != -1)
  {
//  alert ('ITS VALID')
  document.mainform.submit();
  }
}

}

function checkquotereqform() 
{

  if (document.mainform.name.value == '') 
  {
  alert ('You have to enter your name')
  return;
  }
  if (document.mainform.product.value == '') 
  {
  alert ('You have to enter details of a product/service or a note')
  return;
  }
  if (checkemail(document.mainform.email.value) != -1)
  {
  // alert ('ITS VALID')
  document.mainform.submit();
  }
}


function checkcatreqform() 
{

  if (document.mainform.name.value == '') 
  {
  alert ('You have to enter your name')
  return;
  }
  if (document.mainform.address.value == '') 
  {
  alert ('You have to enter your address')
  return;
  }
  if (document.mainform.postcode.value == '') 
  {
  alert ('You have to enter your post/zip code')
  return;
  }
  if (checkemail(document.mainform.email.value) != -1)
  {
  // alert ('ITS VALID')
  document.mainform.submit();
  }
}



