function confirmBudgetRM(form, item) {

	if (confirm('Are you sure you want to remove this budget item?')) {
		form.remove_id.value = item;
		form.submit();
	}
	else {
		return false;
	}
}

function sortTimeline(form, item) {
	var pos = item.options[item.options.selectedIndex].text;
	form.action = form.action + "?sort=" + item.name + "&pos=" + pos;
	form.submit();
}

function cannotSort(item, defaultIndex) {
	item.options.selectedIndex = defaultIndex;
	alert('This operation is not permitted until you have saved this new entry.');
}

function goHelp(hdoc) {
	var dest = '/learngrant/mylg/help.php?sub=' + hdoc;
	var hwin = window.open(dest,'helpwin','width=396,height=480,resizable=yes,location=no,status=no,scrollbars=yes','replace=true');
	hwin.focus();

}

function checkDI(form) {
	if (form.dean_approval.checked) {
		if (form.copyright_agree.checked && form.contribution_agree.checked) {
			form.submit();
		}
		else {
			alert('You must agree to statements above the submit button before we can process your application.');	
		}
	}
	else {
		alert('Please remember, you must discuss this project with your VP of Academic Affairs prior to submitting this application.  If you have already done so, check the box above the submit button.');
		return false;
	}
	
}