 function load_first_part(){
//alert('hello');	 
      $("#first_part").load("module/fees/admission_fee_info_table.php");  
}

function load_medium_for_std_ad(shift){
	var datastr="shift_id="+shift;
	$("#medium_id_std_ad").load("module/fees/get_medium_list_for_new_ad.php",datastr);
}

function load_class(medium_name){
	//alert(medium_name);
	var shift_id = $("#std_ad_shift_id").val();
	var datastr="medium_name="+medium_name+"&shift_id="+shift_id;
	//alert(datastr);
	
	$("#class_ids").load("module/fees/get_class_list_for_std_ad.php",datastr);
	$("#dept_name").load("module/fees/get_dept_list_for_std_ad.php",datastr);
}

function load_dept(class_id){
	//alert(class_id);
	var shift_id = $("#std_ad_shift_id").val();
	var medium = $("#medium_id_std_ad").val();
	var datastr="class_id="+class_id+"&medium="+medium+"&shift_id="+shift_id;
	$("#dept_id").load("module/fees/get_dept_list_for_std_ad.php",datastr);
}



function save_admission_info(){
	//alert('hello');
	var fee_head = $("#fee_head_std_ad").val();
	var amount = $("#fee_amount_std_ad").val();
	var medium_id = $("#medium_id_std_ad").val();
	var class_ids = $("#class_ids").val();
	var session = $("#session").val();
	//var dept_name = $("#dept_name").val();
	var operation = "save_fee_info";
	var datastr ="fee_head="+fee_head+"&amount="+amount+"&medium_id="+medium_id+"&class_ids="+class_ids+"&session="+session+"&operation="+operation;
	alert(datastr);
	if(fee_head==""){
			alert("Enter Fee Head Name");
			$('#fee_head_std_ad').focus();
			return false;
		}
		else if(amount==""){
			alert("Enter amount");
			$('#fee_amount_std_ad').focus();
			return false;
		}
		else if(medium_id==""){
			alert("Select medium ");
			$('#medium_id_std_ad').focus();
			return false;
		}
		
		else if(class_ids==""){
			alert("Select class");
			$('#class_ids').focus();
			return false;
		}
		
		else{
			$.ajax({
				type:"post",
				url:"module/fees/get_std_admission_info.php",
				data:datastr,
				success:function(st){
					//alert('Save Successful');
					$("#first_part").load("module/fees/admission_fee_info_table.php",datastr);  
					
				}
			});
		}
}


function edit_admission_fee(id){
	var fee_id = id;
	//alert(fee_id);
	var datastr="fee_id="+fee_id;
	$("#edit_std_admission_info").load("module/fees/edit_std_ad_info.php",datastr);
}


function edit_std_admission_info(){
	//alert('hello');
	var fee_id = $("#fee_id").val();
	var edit_fee_amount = $("#edit_fee_amount_std_ad").val();
	var edit_class_ids = $("#edit_class_ids").val();
	var fee_status = $("#fee_head_status_edit").val();
	var update_department = $("#update_dept").val();
	var operation = "edit_fee";
	
	var datastr = "fee_id="+fee_id+"&edit_fee_amount="+edit_fee_amount+"&edit_class_ids="+edit_class_ids+"&fee_status="+fee_status+"&update_department="+update_department+"&operation="+operation;
	//alert(datastr);
	$.ajax({
				type:"post",
				url:"module/fees/get_std_admission_info.php",data:datastr,success:function(st){
					//alert(st);
					//$('#admission_info_table').css("display","none");
					$("#first_part").load("module/fees/admission_fee_info_table.php",datastr);
				}
	});
	
}


function delete_data(id){
	
	//alert(id);
	var operation='delete_ad_fee_info';
	var datastr="id="+id+"&operation="+operation;
	//alert(datastr);
	  if (confirm("Are you sure want to delete Fee Head?"))
	  {
		 $.ajax({
				type:"post",
				url:"module/fees/get_std_admission_info.php",
				data:datastr ,
				success:function(st){
					// alert(st);
				$("#first_part").load("module/fees/admission_fee_info_table.php",datastr);
				}
				
			}); 		
	  }
}


function show_create_fee_form(){
	
	$("#admission_fee_info").load("module/fees/create_std_ad_fee_info.php");
}


