Try this Code
<script type="text/javascript">
function toggleImageBtn(elemID) {
var pnl = document.getElementById(elemID);
if (pnl.style.display == 'block' || pnl.style.display == '')
pnl.style.display = 'none';
else
pnl.style.display = 'block';
return;
}
</script>
<asp:imagebutton runat="Server" id="ImageButton1" onclientclick="toggleImageBtn('hiddenIntervals')" imageurl="~/images/time.png" alternatetext="" enableviewstate="False" causesvalidation="false" xmlns:asp="#unknown" />