//Sends the registration form after it has been validated using sendEmail.php			
	function sendEmail(mes,fr,to,rpTo, div, rootValue){
	mess="&message="+mes+"&from="+fr+"&to="+to+"&replyTo="+rpTo+"&";
	//fetchData('sendEmail.php',mess,div,rootValue);
	jQuery.ajax({
   	type: "POST",
  	url: rootValue+"/sendEmail.php",
   	data: mess,
   	success: function(msg){
	alert("Thank You for contacting us. A representative will contact you shortly to assist you.");
	jQuery("#hidden").animate({height: "0px"}, {queue:false, duration: 1700, easing: 'easeOutBounce'});
     

   }
 });
	
}
	function sendingEmail(rootValue,form){
	fromEmail= form.name.value + "<"+form.email.value+">"; 
	toEmail="kla@call4pchelp.com"; 
	replyEmail =form.email.value; 
	
	messageEmail ="<p>Personal Info: </p>"; 
	messageEmail += "<p>"+form.name.value+" left a message."; 
	messageEmail += "<p>Phone Number: "+form.phone.value+"</p>"; 
	messageEmail += "<p>Email: "+form.email.value+"</p>"; 
	messageEmail += "<p>Message: "+form.message.value+"</p>"; 
	div = "mailmsg" //required 
	sendEmail(messageEmail, fromEmail,toEmail,replyEmail, div,rootValue);
	

	}
