Ура! Решил!
<script>
window.onload = function(){
var el1 = document.getElementById('el1');
var el2 = document.getElementById('el2');
el1.onmousedown = function(ev) {
if(ev.target.id != 'el2')
console.log('el1');
}
el2.onmousedown = function() {
console.log('el2');
}
}
</script>
<body>
<div id="el1" style="position: absolute; top: 100px; left: 100px; width: 150px; height: 350px; border: 1px solid red;">
<div id="el2" style="position: absolute; top: 50px; left: 50px; width: 50px; height: 50px; border: 1px solid green;"></div>
</div>
</body>