function addLoadEvent(func) { var oldonload = window.onload; if (typeof window.onload != 'function') { window.onload = func; } else { window.onload = function() { oldonload(); func(); } } } window.onload = function(){ var banner = document.getElementById('bottom_banner'); var pseudoBottom = 175; var i = 1; function animate(){ //alert(banner.offsetHeight); if(pseudoBottom > banner.offsetHeight){ banner.style.height = i + 'px'; i=i+2; //++pseudoBottom; interval = window.setTimeout(animate, 5); }else{ clearTimeout(interval) } } interval = window.setTimeout(animate, 2500); } function destroycatfish() /* catfish closer function */ { var catfish = document.getElementById('bottom_banner'); document.body.removeChild(catfish); /* clip catfish off the tree */ document.getElementsByTagName('html')[0].style.padding= '0'; /* reset the padding at the bottom */ return false; /* disable the link's 'linkiness' -- so it won't jump you up the top of the page */ } function closelink() /* attach the catfish closer function to the link */ { var closelink = document.getElementById('closeme'); /* find the 'close this' link */ closelink.onclick = destroycatfish; /* attach the destroy function to it's 'onclick' */ } addLoadEvent(function() { closelink(); });