OK I've looked into the code and it can be done two ways:
1) in yourtheme/header.html, add additionnal criterias to the "else if ($heading)" line.
2) Whereas $heading is actually the second parameter sent to the print_header() function of "weblib.php", the other way around would be to play with the print_header calls where needed. For example, as I needed to have an alternate header for my for glossary entry popup windows (actually no header at all), I changed the second value of print_header at line 41-42 and put a null value.
I think a combination of both methods above described would be the ideal so you can create as much customized headers in your header.html (e.g. for different courses or activities) and invoke them as pleased with the correct $heading value embedded in the proper print_header().
Again, I'm a newbie and those changes are very intuitives.