document.click = check;
function check(e)
{
var obj = document.getElementById('calendar_widget');
if (obj != 'null')
{
if (e.target.id != 'show_calender')
obj.style.display='none';
}
}
Error is in Internet Explorer: e.target.id is undefined.