// These are standard scripts for graphical event calendar

<!--

//
// this variable must be set to the appropriate dirname depending upon use - membersonly or pub
//
var AccessDirName = 'pub';

function showCal( viewType, year, month, dayOfMonth ) {
  document.showCalForm.calView.value=viewType;
  document.showCalForm.calYr.value=year;
  document.showCalForm.calMon.value=month;
  document.showCalForm.calDay.value=dayOfMonth;
  document.showCalForm.action = '/olc/' + AccessDirName + '/EMR/geventcal/showCalendarView.jsp';
  document.showCalForm.submit(); 
  
}


function showEvent( itmId, authInd ) {
  // Production Note: change links to eventcal.cgi if client does not have Events Management
  if( authInd )
    location.href='/olc/membersonly/EMR/events/event_order.cgi?tmpl=events&event='+itmId;
    // location.href='/olc/membersonly/EMR/eventcal/eventcal.cgi?FNC=fullpagedisplay__Aeventlistings_html___' + 'EMR' + '___' + itmId;
  else
    location.href='/olc/pub/EMR/events/event_order.cgi?tmpl=events&event='+itmId; 
    // location.href='/olc/pub/EMR/eventcal/eventcal.cgi?FNC=fullpagedisplay__Aeventlistings_html___' + 'EMR' + '___' + itmId;
}

function showEventEB( itmId, authInd ) {
  if( authInd )
    location.href='/olc/membersonly/EMR/event/showEventForm.jsp?form_id='+itmId;
  else
    location.href='/olc/pub/EMR/event/showEventForm.jsp?form_id='+itmId; }

function showCalendarNonEvent( itmId, itmStartHr, itmStartMin ) 
{
  document.showCalendarNonEventForm.itmId.value=itmId;
  document.showCalendarNonEventForm.itmStartHr.value=itmStartHr;
  document.showCalendarNonEventForm.itmStartMin.value=itmStartMin;
  document.showCalendarNonEventForm.submit(); 
}

// admin only use?
function removeItem() {
  if( !document.modifyItemForm.confirmRemoveItem.checked ) {
    var confirmNeededWin = window.open( "/olc/admin/EMR/geventcal/showConfirmNeeded.jsp","confirmNeededWin","width=400,height=250,toolbar=no,status=no,resizable=yes,scrollbars=yes,directories=no,menubar=no" );
    return; }
  
  document.removeItemForm.submit(); 
}

// -->


