<!--//--><![CDATA[//><!--
function validate(obj) {
	obj.submit();
	return true;
}

function changeStartNum(startnum, obj) {
	if (startnum<0)
		startnum = 0;
	obj.startnum.value = startnum;
	obj.submit();
	return true;
}

function changeSortOrder(oldKey, newKey, formID) {
	var obj = document.getElementById(formID);
	if (oldKey==newKey)
		newKey = newKey + " DESC";
	obj.order.value = newKey;
	obj.submit();
	return true;
}

function viewCourse(eid, formID) {
	var obj = document.getElementById(formID);
	obj.eid.value = eid;
	obj.submit();
	return true;
}

function courseInterest(cid) {
	if (cid==null || cid<0)
		return false;
	$('#indicateInterestField').val(cid);
	$.ajax({
		type:"POST",
		url:"/ops/jsSearchCourse.php",
		async:false,
		data:$("#searchCourseForm").serialize(),
		success: function(cid) {
			if (cid>0)
				$.jGrowl('Interest indicated. The university/education provider will now have access to your contact information and also know you indicated an interest in them for the course.');
			else
				$.jGrowl('Update of interest failed!\nPlease try again!');
		}
	});
	$('#indicateInterestField').val(0);
	return false;
}
//--><!]]>