function BDvote(postid, count, action){
	$.ajax({
		type: "POST",
		url: "../updatebd.php",
		data: 	"postid=" + postid +
				"&count=" + count +
				"&action=" + action,
		success: function(html){
			$("#BDvote"+postid).html(html).fadeIn(500);
		}
	});
}

function shareStory(){
	if (document.getElementById){
		id = "share_story";
		obj = document.getElementById(id); 
		if (obj.style.display == "none"){ 
			obj.style.display = ""; 
		$.ajax({
		type: "POST",
		url: "../addpost.php",
		success: function(html){
			$("#share_story").html(html).fadeIn(500);
		}
	});
		} else { 
			obj.style.display = "none"; 
		} 
	} 
}

function addComment(){
	if (document.getElementById){
		id = "add_comment";
		obj = document.getElementById(id); 
		if (obj.style.display == "none"){ 
			obj.style.display = ""; 
		$.ajax({
		type: "POST",
		url: "../addcomment.php",
		success: function(html){
			$("#add_comment").html(html).fadeIn(500);
		}
	});
		} else { 
			obj.style.display = "none"; 
		} 
	} 
}

function ApproveDeny(postid, action){
	$.ajax({
		type: "POST",
		url: "../updatemod.php",
		data: 	"postid=" + postid +
				"&action=" + action,
		success: function(html){
			$("#MOD"+postid).html(html).fadeIn(500);
		}
	});
}

