var ShowCalendar = function (object) { $(object+'div').innerHTML = ''; $(object+'div').style.display = 'block'; new Ajax.Updater(object+'div', "/include/calendar.php?object="+object, { method: 'get', evalScripts: true, onFailure: function(t) { return false; } }); } var CloseCalendar = function (object) { $(object+'div').style.display = 'none'; } var ShowCalendarDate = function (object, year, month) { $(object+'div').innerHTML = ''; $(object+'div').style.display = 'block'; new Ajax.Updater(object+'div', "/include/calendar.php?object="+object+"&year="+year+"&month="+month, { method: 'get', evalScripts: true, onFailure: function(t) { return false; } }); } document.onclick = function (e) { e = e || window.event; var element = e.target || e.srcElement; if (element.className !== "calendarArea") { if ($('dateTodiv')) { $('dateTodiv').style.display = 'none'; } if ($('dateFromdiv')) { $('dateFromdiv').style.display = 'none'; } } };