if (container) {
if (container && nameExists) {
nsHTMLInputElement::RadioSetChecked(){  nsresult rv = NS_OK;  //  // Find the selected radio button so we can deselect it  //  nsCOMPtr<nsIDOMHTMLInputElement> currentlySelected;  nsCOMPtr<nsIRadioGroupContainer> container = GetRadioGroupContainer();  // This is ONLY INITIALIZED IF container EXISTS  nsAutoString name;  if (container) {    GetName(name);    container->GetCurrentRadioButton(name, getter_AddRefs(currentlySelected));  }  //  // Deselect the currently selected radio button  //  if (currentlySelected) {    rv = NS_STATIC_CAST(nsHTMLInputElement*,                        NS_STATIC_CAST(nsIDOMHTMLInputElement*, currentlySelected)         )->SetCheckedInternal(PR_FALSE);  }  //  // Actually select this one  //  if (NS_SUCCEEDED(rv)) {    rv = SetCheckedInternal(PR_TRUE);  }  //  // Let the group know that we are now the One True Radio Button  //  NS_ENSURE_SUCCESS(rv, rv);  if (container) {    rv = container->SetCurrentRadioButton(name, this);  }  return rv;}