
function confirmDeletion() {
	var agree=confirm("Are you sure you want to delete the selected item?");
	if (agree) {
		return true ;
	} else {
		return false ;
	}
}

function checkStartEndDates(sDate, eDate, splitVariable) {
	var myStartDate = new Date;
	var myEndDate = new Date;
	curStartDate = document.getElementById(sDate).value;
	curEndDate = document.getElementById(eDate).value;

	if (curStartDate != "") {
		var mySplitCurStartDate = curStartDate.split(splitVariable);
		myStartDate.setDate(mySplitCurStartDate[0]);
		myStartDate.setMonth(mySplitCurStartDate[1] - 1);
		myStartDate.setFullYear(mySplitCurStartDate[2]);
	} else {
		alert("The start date cannot be empty.  Please fix this field and try again.");
		return false;
	}

	if (curEndDate != "") {
		var mySplitCurEndDate = curEndDate.split(splitVariable);
		myEndDate.setDate(mySplitCurEndDate[0]);
		myEndDate.setMonth(mySplitCurEndDate[1] - 1);
		myEndDate.setFullYear(mySplitCurEndDate[2]);
	} else {
		alert("The ending date cannot be empty.  Please fix this field and try again.");
		return false;
	}
	
	if (myStartDate > myEndDate) {
		alert("The end date cannot be before the start date.  Please correct this and try again.");
		return false;
	}
}

