css force div to front code example
Example: css how to dynamically put div in front of another
document.getElementById('yourdivid').style.zIndex = incremented_up_var;
document.getElementById('yourdivid').style.zIndex = incremented_up_var;