Fix multilingual template local codes.
Fix for Ticket #996
Cleanup headers to avoid duplicate loading of the same headers.
Duplicate loading of the protocol.js was causing ie7 to fail.
Fix for Ticket #871
Most of the code for this fix was taken from the main-page.xsl
added option to enable or disable map panel in metadata.show
modified metadata-show so that the metadata-show showMapPanel gui parameter works better