function checkCal() {
	if(document.getElementById('calendarWrapper').style.zIndex < 60) {
		document.getElementById('calendarWrapper').style.zIndex = 60
	} else {
		setTimeout("document.getElementById('calendarWrapper').style.zIndex = 0;",250);
	}
}

function slide(elementId, headerElement)
{
   var element = document.getElementById(elementId);
   if(element.up == null || element.down)
   {
      animate(elementId, 0, 0, 400, 427, 250, checkCal());
      element.up = true;
      element.down = false;
   }
   else
   {
      animate(elementId, 0, 0, 0, 0, 250, checkCal());
      element.down = true;
      element.up = false;
   }
}