//****************
// Script to hide email addresses:
function emailaddr(addr,name,subject) 
{ var domain = 'annehughesdiary.co.uk';
  if ( arguments.length < 2 )  name = addr + '@' + domain;
  if ( name == "" )            name = addr + '@' + domain; 
  if ( arguments.length < 3 ) 
      document.write('<a href=\"mailto:' + addr + '@' + domain + '\">' + name + '<\/a>'); 
  else 
      document.write('<a href=\"mailto:' + addr + '@' + domain + '?subject=' + subject + '\">' + name + '<\/a>'); 
}
//****************
// Script to provide popup windows:
// (The idea here is to pass the exact h and w to the function)
var mywin = 0;
function popup(url,h,w)
{  
   if ( h == '' ) { h = 800; } else { h = h + 20; }
   if ( w == '' ) { w = 300; } else { w = w + 20; }
   if (mywin) { if (!mywin.closed) { mywin.close(); } }
   mywin=window.open
       (url,'PopUpWindow','height=' + h + ',width=' + w + ',left=30,top=30');
   mywin.focus();  
}

//****************
// Now go write the navigation.

document.writeln (

'<div class="outer">' +
'   <div class="inner">' +
'      <img src="AHD-top-banner-for-web.gif">' +
'      <div class="topnav">' +
'         <ul class="topnav">' +
'         <li class="home"><a id="Home" href="home.html">Home</a></li>' +
'         <li class="anne"><a id="Anne" href="anne.html">Anne Hughes - 18thC Farmer\'s Wife</a></li>' +
'         <li class="hist"><a id="Hist" href="hist.html">The History and the Mystery</a></li>' +
'         <li class="puzl rightmost"><a id="Puzl" href="puzl.html">Solving the Puzzle</a></li>' +
'        </ul>' +
'      </div><div style="clear: both;">' +
'      </div>');

document.getElementById(current).className += " topcur"; 

function writelinks() 
{  document.writeln (
     '<p style="text-align: right; margin-top: 0px;">' +
        '<a href="photo.html">Photographs</a>&nbsp;&nbsp;' +
        '<a href="contc.html">Contact us</a>&nbsp;&nbsp;' +
        '<a href="pzud.html">Research updates</a>&nbsp;&nbsp;' +
        '<a href="whswho.html">Who\'s who?</a>&nbsp;&nbsp;' +
        '<a href="abrvns.html">Abbreviations</a>&nbsp;&nbsp;' +
        '<a href="sitemap.html">Site Map</a>' +
     '</p>');
}
