[% USE raw %]
[% USE Branches %]
[% SET classprop  = 'class="' %]
[% IF Branches.GetLoggedInBranchcode %]
    [% classprop = classprop _ 'branch-' _ Branches.GetLoggedInBranchcode %]
[% ELSE %]
    [% classprop = classprop _ 'branch-default' %]
[% END %]
[% IF bodyclass.defined %]
    [% classprop = classprop _ ' ' _ bodyclass %]
[% END %]
[% classprop = classprop _ '"' %]

[% IF bodyid.defined %]
    [% SET idprop = 'ID="' _ bodyid _ '" ' %]
[% END %]
<body [%idprop|$raw%][%classprop|$raw%] >
