How to call javascript in main window from iframe?
window.parent.whatever
window.top.foo
for the top level window
window.parent.foo
for the direct parent