function validateMinAmt(minAmt) {	var f = document.forms[0];	var giftRadio='';	for (var i = 0; i < f.GiftAmount.length; i++) {		if(f.GiftAmount[i].checked) {			giftRadio = f.GiftAmount[i].value;		}	}	if (giftRadio == "Other") {		var othAmt = parseInt(f.OtherAmount.value);		if (othAmt < minAmt) {			alert("The minimum donation amount we are able to accept on this page is $" + minAmt + ".");			return false;		}	}		return true;}function validEappealfields(radioVal) {	var docFrm = document.forms[0];	fld2 = docFrm.OtherAmount;		if (radioVal == "Other" && fld2.value == ""){		alert("Please indicate the amount of your gift.");		return false;	} else if (radioVal != "Other" && fld2.value != ""){		alert("Please make your gift by selecting a pre-determined amount or filling in the Other Amount field, but not both.");		return false;	} else if (radioVal == "Other" && isNaN(parseInt(fld2.value))){		alert("Please enter a numeric donation amount.");		return false;	} else {		return true;	}	}/*eSub2 is built to use a split betweeen pledge and single gift donations.  */function eSub2(){		for (var i = 0; i < document.forms[0].GiftAmount.length; i++) {		if(document.forms[0].GiftAmount[i].checked) {			giftRadio = document.forms[0].GiftAmount[i].value;		}	}//	alert ('giftRadio = ' + giftRadio);	if (validEappealfields(giftRadio)){//		alert('validEappealfields returned true');		var tmpPath = (location.href.indexOf("/test/") < 0 ? "/worldvision" : "/test") + "/e-Gift.nsf/GiftCC?OpenForm";		//tmpPath +="&num="+document.forms[0].GiftNum.value;		var giftNum = "&num="+document.forms[0].GiftNum.value;		var splitAmt = document.forms[0].splitAmt.value;		var amt = '';		if (giftRadio == 'Other') {			amt = document.forms[0].OtherAmount.value;			giftNum = "&num="+document.forms[0].GiftNum2.value;			}		else if(giftRadio >= splitAmt){			amt = giftRadio;			giftNum = "&num="+document.forms[0].GiftNum2.value;			}		else {			amt = giftRadio; 			}		tmpPath += giftNum + "&amt=" + amt;//		alert (tmpPath);					//tmpPath += "&amt="+amt;		var cmp = document.forms[0].DVcode.value;//		alert(cmp);				if (cmp != '' && cmp != 'undefined') {			tmpPath += '&campaign=' + cmp;			}//		alert(tmpPath); 		window.location.href = tmpPath;	}	else {//		alert('validEappealfields returned false');		document.forms[0].OtherAmount.focus;	}}function eSub(){	var f = document.forms[0];	var giftRadio;	for (var i = 0; i < f.GiftAmount.length; i++) {		if(f.GiftAmount[i].checked) {			giftRadio = f.GiftAmount[i].value;		}	}	if (validEappealfields(giftRadio)){		var tmpPath = (location.href.indexOf("/test/") < 0 ? "/worldvision" : "/test") + "/e-Gift.nsf/GiftCC?OpenForm";		tmpPath +="&num=" + f.GiftNum.value;		var amt = '';		if (giftRadio == 'Other') {			amt = f.OtherAmount.value;		} else {			amt = giftRadio;		}		tmpPath += "&amt="+amt;		var cmp = f.DVcode.value;				if (cmp != '' && cmp != 'undefined') {			tmpPath += '&campaign=' + cmp;		}		window.location.href = tmpPath;	}	else {		document.forms[0].OtherAmount.focus;	}}function eSubV8(giftAmt){	var f = document.forms[0];	var giftRadio;	if(giftAmt) {		giftRadio = giftAmt;	} else {		for (var i = 0; i < f.GiftAmount.length; i++) {			if(f.GiftAmount[i].checked) {				giftRadio = f.GiftAmount[i].value;			}		}	}	if (giftAmt || validEappealfields(giftRadio)){		var tmpPath = (location.href.indexOf("/test/") < 0 ? "/worldvision" : "/test") + "/e-Gift.nsf/check-out?OpenForm";		tmpPath +="&num=" + f.GiftNum.value;		var amt = '';		if (giftRadio == 'Other') {			amt = f.OtherAmount.value;		} else {			amt = giftRadio;		}		tmpPath += "&amt="+amt;		var cmp = f.DVcode.value;				if (cmp != '' && cmp != 'undefined') {			tmpPath += '&campaign=' + cmp;		}		window.location.href = tmpPath;	}	else {		document.forms[0].OtherAmount.focus;	}}