$(document).ready(function(){

	$("input.contact_post").click(function(){
	page = 'contact.php';
	
	var post = $("input.contact_post").val();
	
	var contact_name = encodeURIComponent($("#contact_name").val());
	var contact_email = encodeURIComponent($("#contact_email").val());
	var message = encodeURIComponent($("#message").val());	
	var userCode = encodeURIComponent($("#userCode").val());	
	
	var dataString = '&contact_name='+ contact_name + '&contact_email='+ contact_email + '&message=' + message + '&userCode=' + userCode + '&post='+ post;

	$.ajax({ 
		type: "POST",
		url: "contact.php", 
		cache: false, 
		data: dataString,
		success:function(html){ 
			afficher(html);	
		},
		error:function(XMLHttpRequest, textStatus, errorThrows){
		}
	});
	return false; 
   });
   
});

function afficher(donnees){ $("#contact").empty(); $("#contact").append(donnees); }
