Thanks Ali, that works well. Would you mind explaining your code a bit.
From what I can understand the function argument 'evt' is set by the element that is clicked. You then set the variable srcElem to either the element srcElement or target depending on whether the browser is IE or other.
While srcElement is not a DIV (could be an input) it is set to the parent of the clicked element. Why 'while' and not 'if' here?
If srcElem is a DIV then display id.