window.frameElement is not part of the DOM standard; it's "DOM Level
0" (non-DOM DHTML). It's browser behavior, not something the DOM can
comment on or direct. You're more likeliy to get useful advice from a
browser-scripting discussion.
One thought: According to websearch, .frameElement returns null if the
window is top-level, which will certainly produce access errors.
Good luck...
______________________________________
"... Three things see no end: A loop with exit code done wrong,
A semaphore untested, And the change that comes along. ..."
-- "Threes" Rev 1.1 - Duane Elms / Leslie Fish
(http://www.ovff.org/pegasus/songs/threes-rev-11.html)