

	function upOver(postID)
	{
		$("#upicon"+postID).attr('src','images/green_arrow_up.png');
	}
	function upOut(postID)
	{
		$("#upicon"+postID).attr('src','images/green_arrow_up_trans.png');
	}
	function downOver(postID)
	{
		$("#downicon"+postID).attr('src','images/red_arrow_down.png');
	}
	function downOut(postID)
	{
		$("#downicon"+postID).attr('src','images/red_arrow_down_trans.png');
	}
	

	var votedisabled = false;
	function vote(postID, vote, newPost)
	{
		if (!votedisabled)
		{
			votedisabled = true;
			$.get("vote.php", { ID: postID , vote: vote },
				function(resp){
					setScore(postID,resp);
					updateInteraction(postID);
					votedisabled = false;
			});	
		
			pageTracker._trackEvent("Votes", "Vote", postID);
			
			if ( $("#post"+postID+"newicon") ) { $("#post"+postID+"newicon").fadeOut(1000); }
			
			if ( !newPost && moderationenabled && $("#approvalcontainer"+postID).length != 0 ) { showApprovalDiv(postID); }
		}
		
		//$.cookie("vote"+postID, vote, { expires: 9001 }); 
	}
	
	function showApprovalDiv(postID)
	{
		if ( $("#approvalcontainer"+postID) ) { animatedcollapse.show('approvalcontainer'+postID); }
	}
	
	
	function setScore(postID, score)
	{
		$("#score"+postID).animate( { opacity: 0 }, blinkSpeed);
		$("#score"+postID).html(score);
		$("#score"+postID).animate( { opacity: 100 }, blinkSpeed);
	}
	
	
	function updateInteraction(postID)
	{
		$.get("getinteractionhtml.php", { ID: postID },
  			function(resp){
				//$("#interaction"+postID).animate( { opacity: 0 }, 200);
				$("#interaction"+postID).html(resp);
				//$("#interaction"+postID).animate( { opacity: 100 }, 200);
  		});	
	}