
$classsubject = $_POST["classsubject"];
$section = $_POST["section"];
$timetable = $_POST["timetable"];
$classperiod = $_POST["classperiod"];
$termm = $_POST["termm"];
$schedule = $_POST["schedule"];


if(!classsubject && !section && !timetable && !classperiod && !termm && !schedule  || fperiod=='' || tperiod=='' ){
				alert("Please Choose Table to Update");
				document.Setup.action = 'Form_Periods.php';
			}
		else{
		
		document.Setup.action = 'Form_Periods_Actions.php?actionmode=updateyear&fromperiod=.fperiod.&toperiod='.tperiod;
		
		

function SubmitRecord(indx){
	var x = document.transfer;
	var verror = 0;
	//var chckArray = new Array();;
	//$("input[name=tempname]:checked").each(function(){ chckArray.push($(this).val()); })
	
	if(indx==1) {
		var vmainmode='submitFamily';
		if(document.getElementById("fromfamilycode").value==''){
			alert("From Family is Empty!");
			verror = 1;
		} else if(document.getElementById("tofamilycode").value==''){
			alert("To Family is Empty!");
			verror = 1;
		}
	}
	else if(indx==2) {
		var vmainmode='submitCharge';	
		if(document.getElementById("fromcharge").value==''){
			alert("From Charge is Empty!");
			verror = 1;
		} else if(document.getElementById("tocharge").value==''){
			alert("To Charge is Empty!");
			verror = 1;
		}else if(document.getElementById("b2").checked && document.getElementById("familycode").value==''){
			alert("No Family was selected!");
			verror = 1;
		}else if(document.getElementById("b3").checked && document.getElementById("studentcode").value==''){
			alert("No Student was selected!");
			verror = 1;
		}
	}
	if( verror == 0){
	x.action = 'form_transfer_action.php?mainmode='+vmainmode;
	x.submit();
	}
}