function populate_divs(data, div_name, title_name){
    len = data.length;
		$('#'+div_name).html('');
	if (len){
    	section_count += 1;
		$('#'+div_name).html('<h3>' + title_name + '</h3>');
		$('#'+div_name).append('<li>' + data[0] + '</li>');
		
	}
	for ( var i=1; i<6 && i < len; ++i ){
		$('#'+div_name).append('<li>' + data[i] + '</li>');
	}
	if (len > 6){
		$('#'+div_name).append('<a href="javascript:void(0)" onclick="toggle_div(\''+div_name+'_show_link\', \''+div_name+'_more\')" id=\''+div_name+'_show_link\'> + Show More</a>');
    	for ( var i=6; i<len; ++i ){
			$('#'+div_name+'_more').append('<li>' + data[i] + '</li>');
		}
		$('#'+div_name+'_more').append('<a href="javascript:void(0)" onclick="toggle_div(\''+div_name+'_show_link\', \''+div_name+'_more\')" id=\''+div_name+'_show_link\'> - Show Less</a>');
	}
	item_count += len;
	loaded_count += 1;

	if (loaded_count == 3){
		$.getJSON("calculate_score.php?item_count="+item_count+"&section_count="+section_count+"&high_alert_count="+high_alert_count, function(data){ 
			$('#fb_score_value').html(data);
			$('#fb_score_img').html('<img src="img/sc'+Math.round(data)+'.png" style="padding-bottom: 10px;"/>');
			$('#fb_score_tweet').html('<img src="img/space.gif" width="70" height="20"/> <img src="img/twitter_logo.png" align="middle"> <a href="http://twitter.com/home?status=My Privacy Score is '+data+', find out yours at http://profilewatch.org" title="" target="_blank">Tweet Your Score</a>');
			$('#spinner_div').html('');

		 });		
	}
}


