
function $(id) {
	return document.getElementById(id);	
}

function goDelete(msg, CurrentLink){
	if (confirm(msg) == true) {
		window.location = CurrentLink;
	}
	else {
		return false;
	}
}; 

  function goValidate(){
    //$('colCal_EventBody').value = $('divCal_EventBody').value;
    if (Date.parse($('colCal_EventDate').value) == "") {
      alert("Your must enter an EVENT DATE");
      return false;
	  $('colCal_EventDate').focus();
    }
    if ($('colCal_EventTitle').value == "" ) {
      alert("You must enter an EVENT TITLE");
      return false;
    }
    if ($('colCal_EventBody').value == "" ) {
      alert("You must enter an EVENT DESCRIPTION");
      return false;
    }
    if ($('colCal_EventAllDay').checked == "") {
      StartTime = $('colCal_EventDate').value + " " + $('colCal_EventStartTime').value
      EndTime = $('colCal_EventDate').value + " " + $('colCal_EventEndTime').value
      StartTime = new Date(StartTime)
      EndTime = new Date(EndTime)
      if (Date.parse(StartTime) > Date.parse(EndTime)) {
        alert("You END TIME cannot be before you START TIME");
       return false;
       }
    }

	return true;
  }
  function checkedAllDay(){
   if ($('colCal_EventAllDay').checked == true || $('colCal_EventTimeUnknown').checked == true	) {
    $('colCal_EventStartTime').disabled=true;
    $('colCal_EventEndTime').disabled=true;
   }
   else {
    $('colCal_EventStartTime').disabled=false;
    $('colCal_EventEndTime').disabled=false;
   }
  }
