//=============================================================================
function userLivreOrFormEnvoi(){
	url="php/ajx/ajx.user.livreor.form.envoi.php5";
	data={nom:$("#livreornom").attr("value"),
	      ville:$("#livreorville").attr("value"),
		  commentaire:$("#livreorcommentaire").val(),
		  captcha:$("#livreorcaptcha").attr("value")};
	$.post(url,
	       data,
  		   function(json){
				 		if(json.result>0){
							spmbClose("livreorform");
							spmbOpenInfo("livreforminfo",json.msg);
						}
						else{
							spmbOpenError("livreformerror",json.msg);
						}
				 },
		   	 "json");
}
//=============================================================================
function userLivreOrForm(){
	html='<table>'
		+'	<tr>'
		+'		<td>Nom et Prénom</td>'
		+'		<td><input type="text" id="livreornom" style="width:400px"/></td>'
		+'	</tr>'
		+'	<tr>'
		+'		<td>Ville</td>'
		+'		<td><input type="text" id="livreorville" style="width:400px"/></td>'
		+'	</tr>'
		+'	<tr>'
		+'		<td>Commentaire</td>'
		+'		<td><textarea id="livreorcommentaire" style="height:200px;width:400px"></textarea></td>'
		+'	</tr>'
		+'	<tr>'
		+'		<td><img src="php/ctl/ctl.usergetcaptcha.php5?d=livreor&r='+parseFloat(Math.random())+'" alt="captcha"/></td>'
		+'		<td><input type="text" id="livreorcaptcha" style="width:400px"/></td>'
		+'	</tr>'
		+'	<tr>'
		+'		<td colspan="2"><input id="livreorenvoi" style="width:100%" type="button" value="Envoyer" onclick="userLivreOrFormEnvoi();" /></td>'
		+'	</tr>'
	    +'</table>'
	spmbOpen("livreorform","Livre d'Or",html);
	$("#livreornomprenom").focus().select();
}
//=============================================================================

