// donation.js
// Order Form processing code

function checkEmail(email)
{
	if(email.length > 0){
		if (email.indexOf(' ') >= 0)
			alert("Email addresses cannot have spaces in them!")
		else if ((email.indexOf('@') == -1) || (email.indexOf('.') == -1))
			alert("A valid email address must have an '@' and a '.' in it!")
		}
	}

function checkrequired(which){
	var pass=true
	var ThisForm = document.forms[0]

	if (document.images){
		for (i=0;i<which.length;i++){
			var tempobj=which.elements[i]
			if (tempobj.name.substring(0,7)=="request"){
				if (((tempobj.type=="text"||tempobj.type=="textarea")&&tempobj.value=='') || (tempobj.type.toString().charAt(0)=="s"&&tempobj.selectedIndex==-1)){
					pass=false
					break
					}
				}
			}
		}
	if (!pass){
		alert("All required fields are not filled in. Please complete them and submit again!")
		return false
		}
	else {
		return true; /*f(this);*/
		}
	}

function f(frm) {

/* * (1) replace the character strings below by the ones generated for your * address by the encoder (without using the challenge option) * (2) replace 'recipient' by the name of the field containing your email address * (3) insert the URL of your mailing program in the 'action' attribute * e.g. action="http://www.example.com/cgi-bin/mailer" This script and encoder is found at http://w2.syronex.com/jmr/safemailto/  */

	var v2="XXXH3TTTEKEETFA6CFR2WG";
	var v7=unescape("4%3D%3A%29%5D%3B%3A6%24%27%29%20%20%06/U%205%7CP%3E%3D");
	var v5=v2.length;
	var v1="";
	for(var v4=0;v4<v5;v4++){v1+=String.fromCharCode( v2.charCodeAt(v4)^v7.charCodeAt(v4));}frm.recipient.value=v1;
	return true;
	}
