/* This is the function that the sitewide contact form uses to submit 
the form to sendcontact.inc.php. Uses jquery.js	*/
function doSidebarContactSubmit() {
	if ($("#email").val() != "" && $("#message").val() != "") {
		$.post("/2009/wp-content/themes/GreenRecyclingNetwork/sendcontact.inc.php",{
			email: $("#email").val(),
			message: $("#message").val()
		},function(results) { 
			$("#sidebar-contact-results").html(results);
		});
	} else {
		$("#sidebar-contact-results").html("Please fill in all the required fields.");
	}
}
function doHomepageContactSubmit() {
	if ($("#email2").val() != "" && $("#message2").val() != "") {
		$.post("/2009/wp-content/themes/GreenRecyclingNetwork/sendcontact.inc.php",{
			email: $("#email2").val(),
			message: $("#message2").val()
		},function(results) { 
			$("#homepage-contact-results").html(results);
		});
	} else {
		$("#homepage-contact-results").html("Please fill in all the required fields.");
	}
}
/* not in use
function successStyle(theID) {
	$(theID).removeClass("error");
	$(theID).addClass("success");
}
function errorStyle(theID) {
	$(theID).removeClass("success");
	$(theID).addClass("error");
}
*/

