//Show recommendations div. Used by submissionview.php.

function recommendationsProcess(submission_id) {
	
	new Ajax.Request('/submissionrecommendations_process.php',
	{
		parameters: { token: global_token, submission_id: submission_id },
		requestHeaders: {Accept: 'application/json'},
		onSuccess: function(transport){
			var response = transport.responseText || "{'error':'no response'}";
			
			var jsondata = response.evalJSON(true);
			if (jsondata.success=='yes') {
				//open the div to show the response
				document.getElementById('recommendations').innerHTML = jsondata.results ;
			} 
		},
	});
}
