$("#student_aten_retake").click(function(){

	var shift_id = $("#shift_id").val();

	var medium_id = $("#medium_id").val();
	var today_date = $("#att_date").val();	
	var operation="class_atd_create";
	var dataStr="operation="+operation+"&medium_id="+medium_id+"&today_date="+today_date;
		//alert('sdsds');
	//alert(dataStr);
	
		if(shift_id==""){
		alert("Select Shift Name");
		$('#shift_id').focus();
		return false;
	}
	else if(medium_id==""){
		alert("Select Medium Name");
		$('#medium_id').focus();
		return false;
	}		
	
	else{
	
	//var datastr="shift_id="+id;
	//alert(datastr);
	//$(".data_to_show_atd").load("module/attendance/student_atten_retake_ajex.php",datastr);
	
	$(".ajax_loader").show();
		$.ajax({
			type:"GET",
			url:"module/attendance/student_atten_retake_ajex.php",
			data:dataStr ,
			success:function(st){
				alert(st);
				$(".ajax_loader").hide();
				//$(".data_to_show_atd").load(st);

				//$('#first_part').remove();
				//$('#second_part').css("display","block");
			}
		}); 
		
		
	}
});



$("#class_atd_create").click(function(){
	
	var shift_id = $("#shift_id").val();
	var medium_id = $("#medium_id").val();
	var today_date = $("#att_date").val();
	var atd_session = $("#atd_session").val();
	var operation="class_atd_create";
	//alert(today_date);
	var dataStr="operation="+operation+"&medium_id="+medium_id+"&today_date="+today_date+"&atd_session="+atd_session;
	var dataStr1="medium_id="+medium_id+"&today_date="+today_date+"&atd_session="+atd_session;
	//alert(dataStr1);
	if(shift_id==""){
		alert("Select Shift Name");
		$('#shift_id').focus();
		return false;
	}
	else if(medium_id==""){
		alert("Select Medium Name");
		$('#medium_id').focus();
		return false;
	}		
	
	else{
		$.ajax({
			type:"post",
			url:"module/attendance/daily_attendance_class_status.php",
			data:dataStr ,
			success:function(st){
				//alert(st);
				$(".data_to_show_atd").load("module/attendance/daily_attendance_class_status_view.php",dataStr1);

				$('#first_part').remove();
				$('#second_part').css("display","block");
			}
		}); 
	}
});

// ============================================

function Attendanch_Sheet_Class(sc_id,atd_status_id,me_id,tdate,atd_session){
	var datastr_sc="section_id="+sc_id+"&medium_id="+me_id+"&atd_status_id="+atd_status_id+"&today_date="+tdate+"&atd_session="+atd_session;
	$(".data_to_show_atd").load("module/attendance/get_attendance_sheet_class.php",datastr_sc);
	
	$('#first_part').remove();
	$('#second_part').css("display","block");
}

function Edit_Attendanch_Sheet_Class(sc_id,atd_status_id,me_id,tdate,atd_session){
	var datastr_sc="section_id="+sc_id+"&medium_id="+me_id+"&atd_status_id="+atd_status_id+"&today_date="+tdate+"&atd_session="+atd_session;
	//alert(datastr_sc);
	$(".data_to_show_atd").load("module/attendance/edit_get_attendance_sheet_class.php",datastr_sc);
	
	$('#first_part').remove();
	$('#second_part').css("display","block");
}

// ============================================







// ================================
function call_medium(id){
	var datastr="shift_id="+id;
	$("#medium_id").load("module/settings/get_medium_list_for_form.php",datastr);
}




