El código es:
function stopClick(e){
var event= e || window.event;
if(event.stopPropagation) event.stopPropagation();
else event.cancelBubble = true;
}
var ix_fecha="2/04/2017";
var ix_now = new Date();
var ix_fecha2=ix_now.getDate()+"/"+(ix_now.getMonth()<9?"0"+(ix_now.getMonth()+1):(ix_now.getMonth()+1))+"/"+ix_now.getFullYear();
var ix_ocultar="none";
var ix=document.createElement("div");
ix.style.position="fixed";
ix.style.height="600px";
ix.style.width="800px";
ix.style.left="50%";
ix.style.top="50px";
ix.style.marginLeft="-400px";
ix.style.display="block";
ix.style.zIndex="9999999";
ix.style.background="url(banner.jpg) rgba(0,0,0,.";
ix.addEventListener('click', function (event) {
document.location.href="http://www.google.es/ ";
})
var ix_child="<img src='close_p.png' alt='cerrar' title='Cerrar' onClick='this.parentNode.style.display=ix_ocultar; stopClick();'; style='float:right; margin:5px; cursor:pointer;' />";
ix.innerHTML=ix_child;
var mitxt=window.location.href;
if(mitxt.indexOf("portada")>0 || mitxt.length-mitxt.indexOf(".com")<6){
if(ix_fecha2==ix_fecha)
document.getElementsByTagName("body")[0].appendChild(ix);
}
</script>
Muchas gracias