<!--//--><![CDATA[//><!--
var globals = new Array();
var i, count;
globals['max_categoryofstudy'] = 5;
globals['max_levelofstudy'] = 5;
globals['max_locationofstudy'] = 5;
globals['max_careerchoice'] = 5;

function validate(obj) {
	var tmp;
	count = 0;
	for (i=1; i<=globals['max_categoryofstudy'] && count==0; i++) {
		if ($('#coursecategory'+i)[0].selectedIndex>0)
			count++;
	}
	if (count==0) {
		$.jGrowl("Please rank your intended category of study.");
		tmp = 'coursecategory1';
	}
	if ($('input[name=level]:checked').length<1) {
		$.jGrowl("Please select your intended level of study.");
		if (!tmp)
			tmp = 'level_1';
	}
	count = 0;
	for (i=1; i<=globals['max_locationofstudy'] && count==0; i++) {
		if ($('#location'+i)[0].selectedIndex>0)
			count++;
	}
	if (count==0) {
		$.jGrowl("Please rank your intended location of study.");
		if (!tmp)
			tmp = 'location1';
	}
	if ($('#admission_yyyy')[0].selectedIndex==0) {
		$.jGrowl("Please enter your intended commencement date.");
		if (!tmp)
			tmp = 'admission_yyyy'
	}
	count = 0;
	for (i=1; i<=globals['max_careerchoice'] && count==0; i++) {
		if ($('#career'+i)[0].selectedIndex>0)
			count++;
	}
	if (count==0) {
		$.jGrowl("Please rank your intended career choice.");
		if (!tmp)
			tmp = 'career1';
	}
	if (tmp) {
		$('#'+tmp).focus();
		return false;
	}
	obj.submit();
	return true;
}
//--><!]]>