function handleDeptChange(form_name) {
	document.getElementById("sectionArea").innerHTML="";
	dept=document.submitNonMajorNew.dept.value;
	url = "dropdownfill.php?fill=ind&dept="+dept;
	sendRequest(url,"indexArea");
	getValues(0);
}

function handleIndexChange(form_name) {
	dept=document.submitNonMajorNew.dept.value;
	ind=document.submitNonMajorNew.ind.value;
	url = "dropdownfill.php?fill=section&dept="+dept+"&ind="+ind;
	sendRequest(url,"sectionArea");
	getValues(0);
}

function getValues(i) {
	if (i>10) {
		console.innerHTML="I'm sorry, but there is a problem getting the course listings. Please try again later.";
	}
	else {
		ready = getReadyState();
		if (ready) {
			result=getResults();
			console.innerHTML=result;
		}
		else {
			i++;
			command = "getValues("+i+")";
			setTimeout(command,500);	
		}
	}
}
