
function chkFields()
{

// check donor info and one donor amount
	if (document.mainform.c_donorname.value == "")
	{
		alert
		("Please enter the donor name.");
		document.mainform.c_donorname.focus();
		return false;
	}		
	
if (document.mainform.c_donoraddress.value == "")
	{
		alert
		("Please enter the donor address.");
		document.mainform.c_donoraddress.focus();
		return false;
	}
	
if (document.mainform.c_donorcity.value == "")
	{
		alert
		("Please enter the donor city.");
		document.mainform.c_donorcity.focus();
		return false;
	}
	
	c_donorstateChoice = document.mainform.c_donorstate.selectedIndex 
		if (document.mainform.c_donorstate.options[c_donorstateChoice].value == "")
	{
		alert
		("Please select the donor your state.");
		document.mainform.c_donorstate.focus();
		return false;
	}
	
if (document.mainform.c_donorzip.value == "")
	{
		alert
		("Please enter the donor zip code.");
		document.mainform.c_donorzip.focus();
		return false;
	}

if (document.mainform.c_donorphone.value == "")
	{
		alert
		("Please enter the donor phone number.");
		document.mainform.c_donorphone.focus();
		return false;
	}	
	
// donation amount radio button choice 
typeOption = -1
		for (i=0; i<document.mainform.gift01amt.length; i++)
	{
			if (document.mainform.gift01amt[i].checked)
				typeOption = i
	}
		
		if (typeOption == -1)

	{
		alert("Please select at least one donation amount. If you \n" +
"are entering an Other amount please click the Other button\n" +
"and enter the amount in the Other field.");
		document.mainform.gift01amt[0].focus();
		return false;
	}
	
// if OTHER selected as an amount, input for that cannot be blank 
if (document.mainform.gift01amt[3].checked && document.mainform.gift01otherspec.value == "")
		{
		alert
		("You chose Other amount. Please specify a donation amount in the Other field.\n" +
"Use only numbers and a decimal point, no dollar signs.");
		document.mainform.gift01amt[0].focus();
		return false;
	}
	
// If OTHER amount field  in GIFT 1 is not blank, it must be other amount and that radio must be checked

if (document.mainform.gift01otherspec.value != "" && document.mainform.gift01amt[0].checked)
	{
		alert
		("You have entered an amount in the Other field. Please confirm\n" +
"this by clicking the Other radio button. Otherwise, please\n" +
"choose an amount and delete the amount in the Other field.");
		document.mainform.gift01otherspec.focus();
		return false;
	}	
	
if (document.mainform.gift01otherspec.value != "" && document.mainform.gift01amt[1].checked)
	{
		alert
		("You have entered an amount in the Other field. Please confirm\n" +
"this by clicking the Other radio button. Otherwise, please\n" +
"choose an amount and delete the amount in the Other field.");
		document.mainform.gift01otherspec.focus();
		return false;
	}	
	
if (document.mainform.gift01otherspec.value != "" && document.mainform.gift01amt[2].checked)
	{
		alert
		("You have entered an amount in the Other field. Please confirm\n" +
"this by clicking the Other radio button. Otherwise, please\n" +
"choose an amount and delete the amount in the Other field.");
		document.mainform.gift01otherspec.focus();
		return false;
	}	
	

}
