function show_header() {

  // determine the browser version
  var agt=navigator.userAgent.toLowerCase();
  var is_major = parseInt(navigator.appVersion);
  var is_ie     = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));
  var is_win   = ( (agt.indexOf("win")!=-1) || (agt.indexOf("16bit")!=-1) );
  var is_ie_win = (is_ie && is_win && ((agt.indexOf("msie 5.")!=-1) || (agt.indexOf("msie 6.")!=-1)));
   
  if (is_ie_win) {
    shadow = 'shadow1';
  } else {
    shadow = 'shadow';
  }

  var path = '';
  var test = location.pathname.toLowerCase();
  if (test.indexOf('/wiep/20') > -1 || test.indexOf('/photoshow/') > -1 || test.indexOf('/reflector/jan') > -1 || test.indexOf('/reflector/feb') > -1 || test.indexOf('/reflector/mar') > -1 || test.indexOf('/reflector/apr') > -1 || test.indexOf('/reflector/may') > -1 || test.indexOf('/reflector/jun') > -1 || test.indexOf('/reflector/sep') > -1 || test.indexOf('/reflector/oct') > -1 || test.indexOf('/reflector/nov') > -1 || test.indexOf('/reflector/dec') > -1) {
    path = '../../' ;
    if (is_ie_win) shadow = 'shadow3';
  } else if (test.indexOf('/reflector/') > -1 || test.indexOf('/wiep/') > -1 || test.indexOf('/logs/') > -1 || test.indexOf('/belgium/') > -1 || test.indexOf('/test/') > -1 || test.indexOf('/argentina/') > -1) {
    path = '../' ;
    if (is_ie_win) shadow = 'shadow2';
  }
  
  if (is_ie_win) {
    try {
      document.execCommand("BackgroundImageCache",false,true);
    } catch(e) { }
  }
  
  var newpage = '<table style="background-color:black" height="90" width="945" border="0" cellspacing="0" cellpadding="0" align="center"><tr><td height=25>'
  newpage = newpage + '<TABLE cellpadding="0" cellspacing="0" border="0" align="center"><tr>'
  newpage = newpage + '<td class="button-popups" onmouseover="this.className=\'buttonon-popups\'" onmouseout="this.className=\'button-popups\'" onClick="parent.location=\'' + path + 'index.html\'">Home</td>'
  newpage = newpage + '<td class="button-popups" onmouseover="this.className=\'buttonon-popups\'" onmouseout="this.className=\'button-popups\'" onClick="parent.location=\'' + path + 'events.html\'" id="events">Events</td>'
  newpage = newpage + '<td class="button-popups" onmouseover="this.className=\'buttonon-popups\'" onmouseout="this.className=\'button-popups\'" onClick="parent.location=\'' + path + 'reflector/reflector.html\'" id="newsletter">&nbsp;&nbsp;Newsletter&nbsp;&nbsp;</td>'
  newpage = newpage + '<td class="button-popups" onmouseover="this.className=\'buttonon-popups\'" onmouseout="this.className=\'button-popups\'" onClick="parent.location=\'' + path + 'monthly_competition.html\'" id="competition">&nbsp;&nbsp;Competition&nbsp;&nbsp;</td>'
  newpage = newpage + '<td class="button-popups" onmouseover="this.className=\'buttonon-popups\'" onmouseout="this.className=\'button-popups\'" onClick="parent.location=\'' + path + 'wiep/archives.html\'" id="wiep">WIEP</td>'
  newpage = newpage + '<td class="button-popups" onmouseover="this.className=\'buttonon-popups\'" onmouseout="this.className=\'button-popups\'" onClick="parent.location=\'' + path + 'gallery/gallery.html\'" id="gallery">Gallery</td>'
  newpage = newpage + '<td class="button-popups" onmouseover="this.className=\'buttonon-popups\'" onmouseout="this.className=\'button-popups\'" onClick="parent.location=\'' + path + 'contacts.html\'" id="contacts">&nbsp;&nbsp;Contacts&nbsp;&nbsp;</td>'
  newpage = newpage + '<td class="button-popups" onmouseover="this.className=\'buttonon-popups\'" onmouseout="this.className=\'button-popups\'" onClick="parent.location=\'' + path + 'DPS_Info.html\'" id="info">Info</td>'
  newpage = newpage + '<td class="button-popups" onmouseover="this.className=\'buttonon-popups\'" onmouseout="this.className=\'button-popups\'" onClick="parent.location=\'' + path + 'links.html\'" id="links">Links</td>'
  newpage = newpage + '</td></tr></table>'
  newpage = newpage + '</td></tr>'
  newpage = newpage + '<tr><td align="center">'
  newpage = newpage + '   <img src="' + path + 'gifs/logo.gif" border="0" alt="" galleryimg="no"></td></tr>'
  newpage = newpage + '</table>'
  newpage = newpage + '<table height="35" width="945" border="0" cellspacing="0" cellpadding="0" align="center"><tr><td>'
  newpage = newpage + '  <div height="35" width="945" id="' + shadow + '">'
  newpage = newpage + '      <div align="center" class=gallery_font id="gallery">' + document.title + '<img src="' + path + 'gifs/spacer.gif" height="45" width="1" align="top"></div>'
  newpage = newpage + '  </div>'
  newpage = newpage + '</td></tr></table>'
   
  var me = '';
  if (test.indexOf('events.html') > 0) {
    me = 'events';
  } else if (test.indexOf('reflector.html') > 0) {
    me = 'newsletter';
  } else if (test.indexOf('gallery.html') > 0) {
    me = 'gallery';
  } else if (test.indexOf('archives.html') > 0) {
    me = 'wiep';
  } else if (test.indexOf('contacts.html') > 0) {
    me = 'contacts';
  } else if (test.indexOf('dps_info.html') > 0) {
    me = 'info';
  } else if (test.indexOf('monthly_competition.html') > 0) {
    me = 'competition';
  } else if (test.indexOf('links.html') > 0) {
    me = 'links';
  }
  
  document.getElementById('header').innerHTML = newpage;
  
  if (me !='') {
    document.getElementById(me).className = 'buttonsel-popups';
    document.getElementById(me).onmouseout = function() {this.className='buttonsel-popups';}
  }
}

function show_home_header() {
  
  // determine the browser version
  var agt=navigator.userAgent.toLowerCase();
  var is_major = parseInt(navigator.appVersion);
  var is_ie     = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));
  var is_win   = ( (agt.indexOf("win")!=-1) || (agt.indexOf("16bit")!=-1) );
  var is_ie_win = (is_ie && is_win && ((agt.indexOf("msie 5.")!=-1) || (agt.indexOf("msie 6.")!=-1)));
  
  if (is_ie_win) {
    shadow = 'shadow1_short';
  } else {
    shadow = 'shadow_short';
  }

  var test = location.pathname.toLowerCase();
  if (test.indexOf('/wiep/20') > 0) {
    if (is_ie_win) shadow = 'shadow3';
  } else if (test.indexOf('/reflector/') > 0 || test.indexOf('/wiep/') > 0 || test.indexOf('/belgium/') > 0 || test.indexOf('/test/') > 0 || test.indexOf('/argentina/') > 0) {
    if (is_ie_win) shadow = 'shadow2';
  }
 
  var newpage = '<table style="background-color:black" height="90" width="945" border="0" cellspacing="0" cellpadding="0" align="center"><tr><td height="25">'
  newpage = newpage + '</td></tr>'
  newpage = newpage + '<tr><td align="center">'
  newpage = newpage + '   <img src="gifs/logo.gif" border="0" alt="" galleryimg="no"></td></tr>'
  newpage = newpage + '</table>'
  newpage = newpage + '<table height="25" width="745" border="0" cellspacing="0" cellpadding="0" align="center"><tr><td>'
  newpage = newpage + '  <div height="25" width="745" id="' + shadow + '">'
  newpage = newpage + '      <div align="center" class=gallery_font id="gallery"><img src="gifs/spacer.gif" height="25" width="25"></div>'
  newpage = newpage + '  </div>'
  newpage = newpage + '</td></tr></table>'
   
  document.getElementById('header').innerHTML = newpage;
}


function show_footer() {
  var newpage = '<div style="padding-left:40px; padding-right:40px;" align="center"><hr><font size="2" face="Arial,Helvetica">Copyright &copy; 2007-2011 Delaware Photographic Society. All rights reserved.</font></p><p>&nbsp;</p></div>'
  document.getElementById('footer').innerHTML = newpage;
  
  var isIEMac = (navigator.userAgent.toLowerCase().indexOf("msie") != -1) && (navigator.userAgent.toLowerCase().indexOf("mac") != -1); 
  if (isIEMac) {
    fixSize();
    document.body.onresize = function() {
      window.setTimeout('fixSize()',500);  
    }
  }
}



function fixSize(){
  bodyWidth = document.body.clientWidth;
  bodyHeight = document.body.clientHeight;
  document.getElementById('wrapper').style.width = (bodyWidth)  + 'px';
  document.getElementById('wrapper').style.height = (bodyHeight)  + 'px';
}


