// JavaScript Document
function changedpt(fac)	{
	var programtype = document.getElementById('programtype').value;
	var to_load = 'dpt';
	var sname = 'department_f';
	var faculty = fac;
	
ajax_loadContent('dpt_1','../myajax/ajax_inc.jsp?faculty=' + faculty + '&programtype=' +  programtype + '&to_load=' + to_load + '&sname=' + sname, '<SELECT class="form_field"><option>Loading content...</option></SELECT>'); 
	}
	
function changecourse(depart)	{
	var programtype = document.getElementById('programtype').value;
	var to_load = 'course';
	var sname = 'course_f';
	var faculty = document.getElementById('faculty_f').value;
	var department = depart;
	
ajax_loadContent('course_1','../myajax/ajax_inc.jsp?department=' + depart + '&programtype=' +  programtype + '&to_load=' + to_load + '&faculty=' + faculty + '&sname=' + sname, '<SELECT class="form_field"><option>Loading content...</option></SELECT>'); 
	}	
	
function changedpt_(fac)	{
	var programtype = document.getElementById('programtype').value;
	var to_load = 'dpt';
	var sname = 'department_s';
	var faculty = fac;
	
ajax_loadContent('dpt_2','../myajax/ajax_inc_.jsp?faculty=' + faculty + '&programtype=' +  programtype + '&to_load=' + to_load + '&sname=' + sname, '<SELECT class="form_field"><option>Loading content...</option></SELECT>'); 
	}
	
function changecourse_(depart)	{
	var programtype = document.getElementById('programtype').value;
	var to_load = 'course';
	var sname = 'course_s';
	var faculty = document.getElementById('faculty_s').value;
	var department = depart;
	
ajax_loadContent('course_2','../myajax/ajax_inc_.jsp?department=' + depart + '&programtype=' +  programtype + '&to_load=' + to_load + '&faculty=' + faculty + '&sname=' + sname, '<SELECT class="form_field"><option>Loading content...</option></SELECT>'); 
	}	
	
function doapply()	{
var surname = document.getElementById('surname').value;
var firstname = document.getElementById('firstname').value;
var othername = document.getElementById('othername').value;
var email = document.getElementById('email').value;var faculty_f = document.getElementById('faculty_f').value;
var faculty_s = document.getElementById('faculty_s').value;var department_f = document.getElementById('department_f').value;
var department_s = document.getElementById('department_s').value;var course_f = document.getElementById('course_f').value;
var course_s = document.getElementById('course_s').value;var programtype = document.getElementById('programtype').value;
var academicsession = document.getElementById('academicsession').value;ajax_loadContent('ad_error_div','../myajax/process-app.jsp?pinid=' + document.getElementById('pinid').value + '&surname=' + surname + '&firstname=' + firstname + '&othername=' + othername + '&email=' + email + '&programtype=' + programtype + '&academicsession=' + academicsession + '&faculty_f=' + faculty_f + '&faculty_s=' + faculty_s + '&department_f=' + department_f + '&department_s=' + department_s + '&course_f=' + course_f + '&course_s=' + course_s, 'Processing PIN, Pls wait...'); 	
}function formcontrol(action)	{
  objElems = document.applyform.elements;
  for(i=0;i<objElems.length;i++){
    objElems[i].disabled = action;
  }	
}