var bodyRect = document.body.getBoundingClientRect();
var hiddenRect = document.querySelector('#hidden').getBoundingClientRect();
var overlay = document.querySelector('#overlay');
overlay.style.top=(hiddenRect.top - bodyRect.top) + 'px';
overlay.style.left=(hiddenRect.left - bodyRect.left) + 'px';