function ajax_comment_box(fb_user){
									if(fb_user > 10){
														document.getElementById("box_commenti").innerHTML = '<h3>Commenta</h3><div style="float:left;padding:6px;"><fb:profile-pic uid="'+ fb_user +'" facebook-logo="true" linked="false" size="square"></fb:profile-pic></div><div style="float:left"><textarea name="comment_body" cols="45" rows="10" id="comment_body"></textarea></div><div style="float:left;clear:left;width:120px;cursor:pointer;"><div onClick="post_comment(response);" class="ui-state-default ui-corner-all">Invia Commento</div></div>';
													}
									}
									
////////////////////
///fb_post comment
function post_on_fb(){
var body_general;
var user_message_prompt = 'Condividi con i tuoi amici questo commento';
var user_message		= '';
var comment_data = {"comment_line":''+ comment_line +'', "comment_body":''+ comment_body +'', "body":'Here is text for the sample body.', "fullbody":'Here is the sample body text for a full story.', "images":[{'src':'http://www.agridali.com/agriturismi/images/home-page-agriturismo.png', 'href':''+ story_link +''}]};

FB.Connect.showFeedDialog('108680503609', comment_data, null, body_general, null, FB.RequireConnect.require, FB.RequireConnect.promptConnect, user_message_prompt, user_message); 

};

///////////////////////////////////
function manage_comment_response(data){
								if(data.comment_response[0].action == 1){
																	document.getElementById("box_commenti").innerHTML = '<div class="ui-state-highlight">Il tuo commento &egrave; stato inviato!</div>';
																	post_on_fb();																		}
								};


									

									
function post_comment(response){
							comment_body = document.getElementById("comment_body").value;
							if(comment_body == ''){alert('Il commento &egrave; vuoto!');return;};
							$.post("ajax/post_comment.php", {
										post_packet: post_packet, comment_body: comment_body,
												},
			function(data){
							data = eval('(' + data + ')');
							manage_comment_response(data);
							})
	  						};		
