// JavaScript Document
var d=document;

function filter_reports(category_id) {
		$.ajax({
		   type: "GET",
		   url: "ajax_process/filter_communitis.php",
		   data: 'doajax=true&category_id='+category_id,
		   error: function (XMLHttpRequest, textStatus, errorThrown) {
alert(textStatus+''+errorThrown);
				  // typically only one of textStatus or errorThrown 
				  // will have info
				  this; // the options for this ajax request
				},
		   success: function(text){
			 d.getElementById('w_project').innerHTML = text;
			 //update_full_project_name(d.getElementById('f_project_id').value);
		   }
		 });

	
}//end function

function update_full_project_name(project_id) {

		$.ajax({
		   type: "GET",
		   url: "ajax_process/update_project_name.php",
		   data: 'doajax=true&project_id='+project_id,
		   error: function (XMLHttpRequest, textStatus, errorThrown) {
				  // typically only one of textStatus or errorThrown 
				  // will have info
				  this; // the options for this ajax request
				},
		   success: function(text){
			 d.getElementById('project_full_name').innerHTML = text;
		   }
		 });

	
}//end function
function search_for_author(value) {

	if (value != '') {

		$.ajax({
		   type: "GET",
		   url: "ajax_process/author_search_2.php",
		   data: 'doajax=true&keyvalue='+value,
		   success: function(text){
			 d.getElementById('search_results_content').innerHTML = text;
			 
			 if (text != "") {
			  d.getElementById('search_results').style.display = "block";
			 } else {
			  d.getElementById('search_results').style.display = "none";
			 }//end if
		   }
		 });

	} else {
		d.getElementById('search_results').style.display = "none";
	}//end if
	
}//end function