document.onclick = function (event) { if ( ((event = event || window.event).target || event.srcElement).tagName.toUpperCase() == "A" ) return false; };