  !
  !  Id: optionFocusXML.inc, v 1.3.2 2014-07-16 Hans Ungerechts
  !
  Call pakoXMLwriteStartElement("RESOURCE","focus",                              &
       &                         error=errorXML)                                 !
  !
  If (vars(iValue)%doFocus) Then 
     valueC = "T"
  Else
     valueC = "F"
  End If
  Call pakoXMLwriteElement("PARAM","doFocus",valueC,                             &
       &                         dataType="boolean",                             &
       &                         error=errorXML)                                 !
  !
  Write (valueC,*)       vars(iValue)%directionFocus
  Call pakoXMLwriteElement("PARAM","focusTranslation",valueC,                    &
       &                         dataType="char",                                &
       &                         error=errorXML)                                 !
  !
  If (vars(iValue)%doFocus) Then 
     !
     Call pakoXMLwriteStartElement("TABLE","focusOffsets",                       &
          &                         error=errorXML)                              !
     !
     Call pakoXMLwriteElement("FIELD","focusOffset",                             &
          &                         dataType="float",                            &
          &                         unit="mm",                                   &
          &                         error=errorXML)                              !
     !
     Call pakoXMLwriteStartElement("DATA",                                       &
          &                         error=errorXML)                              !
     !
     Call pakoXMLwriteStartElement("TABLEDATA",                                  &
          &                         comment="generated by paKo",                 &
          &                         error=errorXML)                              !
     !
     Call pakoXMLwriteStartElement("TR",                                         &
          &                         error=errorXML)                              !
     !
     Do  ii = 1, vars(iValue)%nFocus, 1
        !
        Write (valueC,'(F12.5)') vars(iValue)%focusList(ii)
        valueComment = 'mm'
        Call pakoXMLwriteElement("TD",                                           &
             &                         content=valueC,                           &
             &                         comment=valueComment,                     &
             &                         error=errorXML)                           !
        !
     End Do
     !
     Call pakoXMLwriteEndElement("TR",                                           &
          &                         error=errorXML)                              !
     !
     !
     Call pakoXMLwriteEndElement  ("TABLEDATA",                                  &
          &                         error=errorXML)                              !
     !
     Call pakoXMLwriteEndElement  ("DATA",                                       &
          &                         error=errorXML)                              !
     !
     Call pakoXMLwriteEndElement  ("TABLE","focusOffsets",                       &
          &                         error=errorXML)                              !
     !
  End If   !!   (vars(iValue)%doFocus)
  !
  Call pakoXMLwriteEndElement("RESOURCE","focus",                                &
       &                         error=errorXML)                                 !
  !




