Get source from a names frame in safari

Hi All.

I need to get the source of a frame in safari.
I have tried:
set mySource to source of document 1
which works, but is not the source of the frame called mainFrame which is what I need to get to
What is the correct way to get the source from a named frame?

Cheers

Roy

Model: MacBook
AppleScript: 2.2.1
Browser: Safari 533.17.8
Operating System: Mac OS X (10.5)