function SubmitForm(poForm) {
	var oUniversity = poForm.lstUniversity;
	var oSubjectNumber = poForm.lstSubjectNumber;
	var oUID = document.getElementById('txtUID');
	var oPaymentType = poForm.lstPaymentType;

	if (oUniversity.selectedIndex == 0)
	{
		alert('Select your university.');
		oUniversity.focus();
	}  	
	else if (oSubjectNumber.selectedIndex == 0)
	{
		alert('Select your subject.');
		oSubjectNumber.focus();
	} 	
	else if (oUID.value == '')
	{
		alert('Enter your student number.');
		oUID.focus();
	}	
	else if (oPaymentType != null && oPaymentType.selectedIndex == 0)
	{		
		alert('Select your payment method.');
		oPaymentType.focus();
	} 	
	else
	{
		poForm.submit();
	}
}

function PopulateSubjects(plstSubjects, psUniversity) {

	// Clear out the list
	plstSubjects.length = 0;

	if (psUniversity == "UTS") {
		plstSubjects[plstSubjects.length] = new Option("Select subject", "0");
		plstSubjects[plstSubjects.length] = new Option("ABC22320", "ABC22320");
		plstSubjects[plstSubjects.length] = new Option("FCA21021", "FCA21021");
	}
}

function PopulateUniversities(plstUniversity) {

	// Clear out the list
	plstUniversity.length = 0;
	
	plstUniversity[plstUniversity.length] = new Option("Select university", "0");
	plstUniversity[plstUniversity.length] = new Option("University of Technology, Sydney", "UTS");
}