Setting a value of an iframe in the parent
The simplest would be to use window.top if F1 is part of the top-most window, or possibly go top down window.top.someframe.someotherframe.F1.

An alternative might be to write a helper something like:

function getFrame(name) {
  var current = this;
  while (current) {
    if (current.document[name])
      return current.document[name].document;
    current = current.parent;
  }
  return undefined; // not found
}