  function valid(form){
  	var input;
  	var allinput=0;
  	var sum=0;
  	
  	/* Sets the user value if 'Other' is filled in */
    if (document.tithe.checkbox5.checked == true)
      document.tithe.checkbox5.value = document.tithe.textother.value;
  	
  	for (i=1; i<6; i++)
  	{
  		textBox = eval("document.tithe.text" + i);
  		
  		/* Only processes textboxes with an amount */
      if (!(textBox.value == ""))
  		{
  			/* Add the various amounts together */
        sum = parseFloat(sum) + parseFloat(textBox.value);
  			
        /* Format the output */
        box = eval("document.tithe.checkbox" + i);
  			input = box.value + " $" + textBox.value;
  	   			  
  		  /* Combine the output */		  
  		  if (i == 1)
  			   allinput = input;
  	   	else
  			   allinput = allinput + ", " + input;
  		}
  	}
  
    /* Save the output for paypal */
  	document.tithe.amount.value = sum;
  	document.tithe.item_name.value = allinput;
  }

  /* Displays the txt box corresponding to the check box
     if the check box is checked */
  function displayBox(box, txtNum) {
  	
  	textBox = eval("document.tithe.text" + txtNum);
  
    /* Decide whether or not to display the textbox */
  	if (box.checked == true)
  		textBox.disabled = false;
  	else
  	{
  		textBox.value = "";
  		textBox.disabled = true;
  		valid(this.form);
  	}
  }
