// JavaScript Document

function prayerJoin() {
  //Element.hide(hide);
  //Element.show(show);
  $('#prayerChoice').hide("fast");
  $('#prayerForm').show("fast");
}
function prayerDone() {
  $('#prayerForm').hide("fast");
  $('#prayerChoice').show("fast");
}

function moveIt(hideIt,showIt) {

	var h = hideIt;
	var s = showIt;

	$(h).hide ("fast");
	$(s).show ("fast");
}



function showContact () {
   $('#formBoxContactb').hide();  
   $('#formBoxContact').show("fast");      
}
function processContact() {
 // get the form values
 var name = $('#uName').val();
 var email = $('#uEmail').val();
 var phone = $('#uPhone').val();
 var text = $('#uText').val();

 $.ajax({
   type: "POST",
   url: "processEmail.php",
   data: "op=contact&uName="+name+"&uEmail="+email+"&uPhone="+phone+"&uText="+encodeURI(text),
   success: function(resp){
     // we have the response
     document.getElementById('formBoxContactb').innerHTML = resp;
     
     $('#formBoxContact').hide("fast");
     $('#formBoxContactb').show();

     //alert("Server said:\n '" + resp + "'");
   },
   error: function(e){
     alert('Error: ' + e);
   }
 });
}
