function calculate() {
  var a = document.wp.address1.value;
  var b = document.wp.address2.value;
  var c = document.wp.address3.value;
  var d = document.wp.address4.value;
  var e = document.wp.comma.value;
  var result = a + e + b + e + c + e + d;

  document.wp.address.value = result;
}


function clearText(thefield){
if (thefield.defaultValue==thefield.value)
thefield.value = ""
}

function focusWindow(){
                if (parseInt(navigator.appVersion.substring(0,1))>=3) { // 3.0 or greater.
                        this.window.focus()
                }
}

function wp_Validator(theForm)
{

    if (theForm.amount.value.length < 1)
  {
    alert("Please enter a Donation Amount");
    theForm.amount.focus();
    return (false);
  }
  
  if (theForm.name.value.length < 1)
  {
    alert("Please enter Card Holder Name");
    theForm.name.focus();
    return (false);
  }
    
  if (theForm.address1.value.length < 1)
  {
    alert("Please enter Card Holder Address");
    theForm.address1.focus();
    return (false);
  }

  if (theForm.postcode.value.length < 1)
  {
    alert("Please enter Postcode");
    theForm.postcode.focus();
    return (false);
  }

  if (theForm.country.value.length < 1)
  {
    alert("Please enter Country");
    theForm.country.focus();
    return (false);
  }
  
    if (theForm.email.value.length < 1)
  {
    alert("Please enter Email Address");
    theForm.email.focus();
    return (false);
  }
  
  if (theForm.email.value.indexOf("@")== -1)
  {
    alert("Sorry, your email address is not valid.  Please reenter it.");
    theForm.email.focus();
    return (false);
  }

  if (theForm.email.value.indexOf(".")== -1)
  {
    alert("Sorry, your email address is not valid.  Please reenter it.");
    theForm.email.focus();
    return (false);
  }

  if (theForm.email.value.indexOf(" ")!= -1)
  {
    alert("Please do not include any spaces in your email address.");
    theForm.email.focus();
    return (false);
  }

  if (theForm.email.value.length > 200)
  {
    alert("Please enter at most 200 characters in the \"Email Address\" field.");
    theForm.email.focus();
    return (false);
  }

  return (true);
}

message="This donation system was prepared for TEAMS by SecureGiving.co.uk";


    function click(e) {


        if (document.all) {


            if (event.button == 2) {
            alert(message);
            return false;
        }
    }


        if (document.layers) {


            if (e.which == 3) {
            alert(message);
            return false;
        }
    }
}


    if (document.layers) {
    document.captureEvents(Event.MOUSEDOWN);
}
document.onmousedown=click;