CSS:
.show { display: block; } .hide { display: none; }
JavaScript:
window.onload = function() { var $ = function(id) { return document.getElementById(id); }; $("fixAdHead").onmouseover = function() { $("fixAdBody").className = "show"; $("closeBtn").className = "show"; }; $("closeBtn").onclick = function() { $("fixAdBody").className = "hide"; $("closeBtn").className = "hide"; }; };