layer on top in javascript

JavaScript
document.getElementById('yourdivid').style.zIndex = incremented_up_var;
Source

Also in JavaScript: