
loadReport = function(id){

	//$('#sessionFrame').attr('src','/reports/LoadReport/id/'+id);

	$('#ajaxReports').load('/reports/LoadReport/id/'+id, 
				function(response, status, xhr) {
				  if (status == "error") {
				    var msg = "Sorry but there was an error: ";
				    $('#ajaxReports').html(msg + xhr.status + " " + xhr.statusText);
				  }
				else{
					$('#searchResults').load(window.location.href+'/state/results');
					$('#searchResults').html('updating on load');
					
					}			  
			})
			

	}


updateReport = function(id){

	$('#ajaxReports').load('/reports/LoadReport', 
				function(response, status, xhr) {
				  if (status == "error") {
				    var msg = "Sorry but there was an error: ";
				    $('#ajaxReports').html(msg + xhr.status + " " + xhr.statusText);
				  }
				else
					$('#reportStatus').load('/reports/LoadReport');

				  
				  
			})
			

	}
