Considerations displaying page titles in page or node template
It would be a much better practice to move most of this logic to the theme's preprocess_page: http://api.drupal.org/api/drupal/includes--theme.inc/function/template_preprocess_page function so you can keep the separation of logic and presentation and make things easier on your designers.

You could add variables that could contain the different fields and classes that change based on the nodes content type in the preprocess_page.