NS_IF_RELEASE(theDOMWindow);
DocumentViewerImpl::IsThereAnIFrameSelected(nsIWebShell*           aWebShell,                                             nsIDOMWindowInternal * aDOMWin,                                            PRBool&                aDoesContainFrameset){  aDoesContainFrameset = DoesContainFrameSet(aWebShell);  PRBool iFrameIsSelected = PR_FALSE;  // First, check to see if we are a frameset  if (!aDoesContainFrameset) {    // Check to see if there is a currenlt focused frame    // if so, it means the selected frame is either the main webshell    // or an IFRAME    if (aDOMWin != nsnull) {      // Get the main webshell's DOMWin to see if it matches       // the frame that is selected      nsIDOMWindow* theDOMWindow = GetDOMWindowForThisDV();                                                      if (aDOMWin != nsnull && theDOMWindow != aDOMWin) {        // we have a selected IFRAME        iFrameIsSelected = PR_TRUE;      }      NS_IF_RELEASE(theDOMWindow);    }  }  return iFrameIsSelected;}