// JavaScript Document
$(document).ready(function(){
	$('#sub_comm').click(function(){
		if($('#comment').val() == ''){
			ymPrompt.errorInfo({title:"错误提示",message:"请输入评论内容。。。"});
			return false;
		}
		var c_content = $('#comment').val();
		var m_id = $('#m_id').val();
		//alert(c_content);
		$.ajax({
			type	:	"POST",
			url		:	"comment_ajax.php",
			data	:	"name=comment&m_id="+m_id+"&c_content="+c_content,
			success	:	function(msg){
				
				if(msg == true){
					ymPrompt.succeedInfo({title:"成功提示",message:"评论发表成功",handler:function(){window.location.reload();}});	
				}
				if(msg == -1){
					ymPrompt.errorInfo({title:"错误提示",message:"对不起你还没有登录，请先登录"});
					return false;
				}
				
			}
		});
	});						   
});
