Yes it is possible. In your frameset, where you define your frames, you must ensure to give those frames unique names.
That way you can refer to those frames by their names, for example:
<frame src="file1.html" name="frame1">
<frame src="file2.html" name="frame2">
So basically file1.html might have a function in it called functionName(). The window.top... line could be called in file2.html, so it's calling functionName() in file1.html.
Now the important thing to note is that all files in all frames must exist on the same server/domain. You can't load up Google in one of your frames and try to call its functions as you will get an Access Denied error. If you get that right now trying to make your site work, then ensure that each file is on the same domain and if your links are not relative but absolute, that your links have the same domain reference (ie. be consistent: only use IP addresses or domain names, don't mix and match because that will give you some grief!)
Hope that helps,