Такое окно?
<div class="postbody">Lorem ipsum dolor sit amet <a id="a1" href="#">всплывающее окно</a>, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</div>
<script>
window.onload = function(){
function clientWidth(){ // Ширина окна просмотра
return document.compatMode=='CSS1Compat' && !window.opera ? document.documentElement.clientWidth : document.body.clientWidth;
}
function clientHeight(){ // Высота окна просмотра
return document.compatMode=='CSS1Compat' && !window.opera ? document.documentElement.clientHeight : document.body.clientHeight;
}
document.getElementById('a1').onclick = function(){
if ( !document.getElementById('okno1') )
{ var okno = document.createElement('div'),
oknoWidth = 350,
oknoHeight = 100;
okno.id = 'okno1';
okno.style.position = 'fixed';
okno.style.left = (clientWidth() - oknoWidth) / 2 + 'px';
okno.style.top = (clientHeight() - oknoHeight) / 2 + 'px';
okno.style.width = oknoWidth + 'px';
okno.style.height = oknoHeight + 'px';
okno.style.zIndex = '999';
okno.style.boxSizing = 'border-box';
okno.style.padding = '10px';
okno.style.borderRadius = '7px';
okno.style.background = 'rgba(237, 255, 238, 0.9)';
okno.style.boxShadow = '0 0 10px rgba(0, 0, 0, 0.5)';
okno.innerHTML = '<div onclick="this.parentNode.parentNode.removeChild(this.parentNode)" title="Закрыть" '
+'style="position: absolute; top: 0; right: 8px; cursor: pointer; '
+'font: 28px/1 Arial; color: red;">×</div>'
+'<div style="text-align: center;">Всплывающее окно</div>';
document.body.appendChild(okno);
}
return false;
};
};
</script>