function call_medium(id){
	var datastr="shift_id="+id;
	$("#medium_id").load("module/settings/get_medium_list_for_form.php",datastr);
}
function call_class(id){
	var datastr="medium_id="+id;
	$("#class_id").load("module/settings/get_class_list_for_form.php",datastr);
}
function call_department(id){
	var datastr="class_id="+id;
	$("#department_id").load("module/settings/get_department_list_for_form.php",datastr);
}
function call_std_type(id){
		var datastr="department_id="+id;
	$("#student_type_id").load("module/settings/get_student_type_list_for_form.php",datastr);
}
function call_section(id){
		var datastr="student_type_id="+id;
	$("#section_id").load("module/settings/get_section_list_for_form.php",datastr);
}

function call_class_test(id,term){
		var datastr="sub_id="+id+"&term="+term;
		alert(datastr);
	$("#ct_id").load("module/ct/get_ct_name.php",datastr);
}

function call_ct_name(term_id){
	var department_id = $("#department_id").val();
	if(department_id==""){
		alert("Select Department Name");
		$('#department_id').focus();
		return false;
	}
	var datastr="term_id="+term_id+"&dept_id="+department_id;
	$("#ct_name").load("module/ct/get_ct_name_by_term.php",datastr);
}

function load_ct_report(){
	var shift_id = $("#shift_id").val();
	var medium_id = $("#medium_id").val();
	var class_id = $("#class_id").val();
	var department_id = $("#department_id").val();
	var student_type_id = $("#student_type_id").val();
	var section_id = $("#section_id").val();
	//var ct_date = encodeURIComponent($("#date").val());
	var exam_session = $("#exam_session").val();
	var exam_term = $("#exam_term").val();
	var ct_id = $("#ct_name").val();
	
	var datastr = "section_id="+section_id+"&session="+exam_session+"&exam_term="+exam_term+"&ct_id="+ct_id;
	$(".show_ct_report").load("module/ct/get_classtest_report.php",datastr);
}