
function ConfirmDeletePosition(title) {
	var agree = confirm("Are you sure you want to delete the position\n"+ title + "?");
	if (agree)
		return true ;
	else
		return false ;
}


function ConfirmDeleteEquipment(title) {
	var agree = confirm("Are you sure you want to delete the equipment\n"+ title + "?");
	if (agree)
		return true ;
	else
		return false ;
}


function UpdateDate(controlToUpdate) {
	var date = new Date();
	var month = date.getMonth() + 1;
	var day = date.getDate();
	var year = date.getFullYear();
	
	var hour = date.getHours();
	var minutes = date.getMinutes();
	var seconds = date.getSeconds();
	var am_pm;
	
	// If the minutes is less than 10, add a 0 infront
	if(minutes < 10) {
		minutes = "0" + minutes;
	}
	
	// Since the time is created in military time,
	// if the time is greater than 12 then deduct 12 to
	// get the regular time
	if(hour > 12) {
		hour = hour - 12;
		am_pm = "PM";
	}
	else {
		am_pm = "AM";
	}
	
	controlToUpdate.value = month + "/" + day + "/" + year + " " + hour + ":" + minutes + ":" + seconds + " " + am_pm;
}
