function print_gwh(){
	var from_date = $("#from_date").val();
	var to_date = $("#to_date").val();
	var zone_id = $("#zone_id").val();
	var division_id = $("#division_id").val();
	var subdivision_id = $("#sub_division_id").val();
	var district_id = $("#district_id").val();
	var problem_type_id = $("#problem_type_id").val();
	var signal_strength_id = $("#signal_strength_id").val();
	
	/*if(zone_id!=""){
		var param="&from_date="+from_date+"&to_date="+to_date;
	} else if(division_id!=""){
		var param=+"&from_date="+from_date+"&to_date="+to_date;
	} else if(subdivision_id!=""){
		var param=+"&from_date="+from_date+"&to_date="+to_date;
	} else if(district_id!=""){
		var param="&from_date="+from_date+"&to_date="+to_date;
	} else if(problem_type_id!=""){
		var param=+"&from_date="+from_date+"&to_date="+to_date;
	} else if(signal_strength_id!=""){
		var param=+"&from_date="+from_date+"&to_date="+to_date;
	} else {*/
		var param="from_date="+from_date+"&to_date="+to_date+"&zone_id="+zone_id+
		"&division_id="+division_id+"&subdivision_id="+subdivision_id+
		"&district_id="+district_id+"&problem_type_id="+problem_type_id+
		"&signal_strength="+signal_strength_id;
//	} 
	alert(param);
	//window.open("module/ground_water/station_report_pdf_1.php?"+param+"");
	if ($("#historical_data_gwt").prop("checked")){
		window.open("module/ground_water/gw_report_pdf_1.php?"+param+"");
	} else if($("#historical_data_salinity").prop("checked")){
		window.open("module/ground_water/gw_report_pdf_2.php?"+param+"");
	} else if($("#historical_data_battery").prop("checked")){
		window.open("module/ground_water/gw_report_pdf_3.php?"+param+"");
	} else if($("#list_well_station_battery_problem").prop("checked")){
		window.open("module/ground_water/gw_report_pdf_4.php?"+param+"");
	} else if($("#list_well_station_sensor_logger_problem").prop("checked")){
		window.open("module/ground_water/gw_report_pdf_5.php?"+param+"");
	} else if($("#automatic_rtcw_data_availability").prop("checked")){
		window.open("module/ground_water/gw_report_pdf_6.php?"+param+"");
	} else if($("#daily_max_min_avg_wl").prop("checked")){
		window.open("module/ground_water/gw_report_pdf_7.php?"+param+"");
	} else if($("#monthly_max_min_avg_wl").prop("checked")){
		window.open("module/ground_water/gw_report_pdf_8.php?"+param+"");
	} else if($("#yearly_max_min_avg_wl").prop("checked")){
		window.open("module/ground_water/gw_report_pdf_9.php?"+param+"");
	} else {
		toastr.error("Undefined Parameter. Please Select At Least One Parameter");
	}
}

$('#problem_type_wise').change(function(){
	$("#problem_type_id").prop("disabled", false);
	$("#zone_id").prop("disabled", true);
	$("#division_id").prop("disabled", true);
	$("#sub_division_id").prop("disabled", true);
	$("#district_id").prop("disabled", true);
	$("#signal_strength_id").prop("disabled", true);
	//alert('welcome');
	$("#zone_id").val("");
	$("#division_id").val("");
	$("#sub_division_id").val("");
	$("#district_id").val("");
	$("#signal_strength_id").val("");
});

$('#signal_strength_wise').change(function(){
	$("#signal_strength_id").prop("disabled", false);
	$("#zone_id").prop("disabled", true);
	$("#division_id").prop("disabled", true);
	$("#sub_division_id").prop("disabled", true);
	$("#district_id").prop("disabled", true);
	$("#problem_type_id").prop("disabled", true);
	$("#zone_id").val("");
	$("#division_id").val("");
	$("#sub_division_id").val("");
	$("#district_id").val("");
	$("#problem_type_id").val("");
});

$('#zone_wise').change(function(){
	$("#zone_id").prop("disabled", false);
	$("#division_id").prop("disabled", true);
	$("#sub_division_id").prop("disabled", true);
	$("#district_id").prop("disabled", true);
	$("#problem_type_id").prop("disabled", true);
	$("#signal_strength_id").prop("disabled", true);
	$("#division_id").val("");
	$("#sub_division_id").val("");
	$("#district_id").val("");
	$("#problem_type_id").val("");
	$("#signal_strength_id").val("");
});

$('#division_wise').change(function(){
	$("#division_id").prop("disabled", false);
	$("#zone_id").prop("disabled", true);
	$("#sub_division_id").prop("disabled", true);
	$("#district_id").prop("disabled", true);
	$("#problem_type_id").prop("disabled", true);
	$("#signal_strength_id").prop("disabled", true);
	$("#zone_id").val("");
	$("#sub_division_id").val("");
	$("#district_id").val("");
	$("#problem_type_id").val("");
	$("#signal_strength_id").val("");
});

$('#sub_division_wise').change(function(){
	$("#sub_division_id").prop("disabled", false);
	$("#zone_id").prop("disabled", true);
	$("#division_id").prop("disabled", true);
	$("#district_id").prop("disabled", true);
	$("#problem_type_id").prop("disabled", true);
	$("#signal_strength_id").prop("disabled", true);
	$("#zone_id").val("");
	$("#division_id").val("");
	$("#district_id").val("");
	$("#problem_type_id").val("");
	$("#signal_strength_id").val("");
});

$('#district_wise').change(function(){
	$("#district_id").prop("disabled", false);
	$("#zone_id").prop("disabled", true);
	$("#division_id").prop("disabled", true);
	$("#sub_division_id").prop("disabled", true);
	$("#problem_type_id").prop("disabled", true);
	$("#signal_strength_id").prop("disabled", true);
	$("#zone_id").val("");
	$("#sub_division_id").val("");
	$("#division_id").val("");
	$("#problem_type_id").val("");
	$("#signal_strength_id").val("");
});


function load_station_form(){
	$("#station_form_data").load("module/ground_water/station_form.php");
}

function load_station_edit_form(id){
	var datastr = "id="+id;
	$("#edit_station_form_data").load("module/ground_water/station_edit_form.php",datastr);
}

function load_sub_div(sel_div_id){
	var form_type = "entry";
	var datastr = "form_type="+form_type+"&sel_div_id="+sel_div_id;
	//alert(datastr);
	$('#cover-spin').show();
	$.ajax({			
		url:"module/ground_water/load_sub_list_for_upazila.php",
		data:datastr,
		success:function(st){
			$('#cover-spin').hide();
			$('#sub_div_code_holder').html(st);
		}
	});
	
}



function e_load_sub_div(sel_div_id){
	var form_type = "edit";
	var datastr = "form_type="+form_type+"&sel_div_id="+sel_div_id;
	//alert(datastr);
	$('#cover-spin').show();
	$.ajax({			
		url:"module/ground_water/load_sub_list_for_upazila.php",
		data:datastr,
		success:function(st){
			$('#cover-spin').hide();
			$('#e_sub_div_code_holder').html(st);
		}
	});
	
}

function load_dist_list_by_sub_div(sel_sub_div_id){
	var form_type = "entry";
	var datastr = "form_type="+form_type+"&sel_sub_div_id="+sel_sub_div_id;
	$('#cover-spin').show();
	$.ajax({			
		url:"module/ground_water/load_dist_list_for_upazila.php",
		data:datastr,
		success:function(st){
			$('#cover-spin').hide();
			$('#sub_dist_code_holder').html(st);
		}
	});
}

function e_load_dist_list_by_sub_div(sel_sub_div_id){
	var form_type = "edit";
	var datastr = "form_type="+form_type+"&sel_sub_div_id="+sel_sub_div_id;
	$('#cover-spin').show();
	$.ajax({			
		url:"module/ground_water/load_dist_list_for_upazila.php",
		data:datastr,
		success:function(st){
			$('#cover-spin').hide();
			$('#e_sub_dist_code_holder').html(st);
		}
	});
}

function load_upz_list_by_dist(sel_dist_id){
	var form_type = "entry";
	var datastr = "form_type="+form_type+"&sel_dist_id="+sel_dist_id;
	$('#cover-spin').show();
	$.ajax({			
		url:"module/ground_water/load_upz_list_for_district.php",
		data:datastr,
		success:function(st){
			$('#cover-spin').hide();
			$('#upz_code_holder').html(st);
		}
	});
}



