You had added a comment in the code:
<?php
if ($wa_repeatfor != 0) $rs_query_calendar->moveNext(); // Repeat Alternate 1
} /* end of if at end if */ else {
?>
Once you hand edit code, it can't be properly updated by the server behaviors panel. That code should just be:
<?php
if ($wa_repeatfor != 0) $rs_query_calendar->moveNext(); // Repeat Alternate 1
} else {
?>
Once updated (I've done this), you can open and re-apply the server behavior.
I've gone ahead and updated your page to do what you need and cleaned up your code. The best way to do this was to copy and paste the events recordset inside the repeat region and nest a second repeat region. Take a look and let me know if you have any questions.