function formExpander(){
	var forexpander = $('#forexpander');
	var clickedel = $('#clickedel');
	var tempbox = $('#tempbox');
	forexpander.slideDown("fast");
	clickedel.css("display","none");
	tempbox.slideUp("fast");
	$('#liederchoiceboxl').css("min-height","870px");
}
function changeHeading(object){
	var imgs = $(object).find('img');
	var to_img = $('#headinfo1').find('img');
	$(to_img[0]).attr("src",imgs[0].src);
}

function voteMsg(data)
{
	$('#infoMessage').html('<p>'+data+'</p');
	$('#infoMessage').css("display","block");
	$('#infoMessage > p').css("display","block");
	$('#infoMessage').fadeOut(1500);
	$('#voting').hide();
	$('#voteup').attr('onclick','');
	$('#votedown').attr('onclick','');
}

function vote(how, cat_id, aff_id)
{
	if(how && cat_id && aff_id)
	{
		$.post('/vote.php', {"how":how, "cat_id":cat_id, "aff_id":aff_id}, function(data){
			voteMsg(data);
		});
	}

}

function show_user_comments(cat_id, aff_id, the_key)
{
	$.post('/user_comments_landing.php', {"cat_id":cat_id, "aff_id":aff_id}, function(data){
		showComments(data, aff_id, the_key)
	});
}

function showComments(data, aff_id, the_key)
{
	
	$('#popusercomments'+the_key).show();
	$('#popuser_in'+the_key+' > p').html(data);
}

function closeUserPop(the_key)
{
	$('#popusercomments'+the_key).hide();
}