function writenavbar() {
  var theString="";
  var theSplit;
  try {
    for (var i=0;i<(navbarlist.length -1) ;i++) {
      theSplit=navbarlist[i].split(",");
	  theString += '<a href="' + theSplit[1] + ' ">' + theSplit[0] + '<\/a> &gt; ';
    }
	theSplit=navbarlist[navbarlist.length-1].split(",");
	theString+=theSplit[0];
  }
  catch(e) {
    theString="&nbsp;";
  };
  document.write(theString);
}

function writecontactutilities() {
writefriendutility();
document.write('&nbsp;&nbsp;');
writewebmasterutility();
}

function writefriendutility() {
 var theString;
 theString= '<a href="mailto:?subject=A page from the Friends of Dufferin Grove Park website' +
  '&body=' + 
  '%0D%0A____________________________________' +   
  '%0D%0A' +
  'The web page is ' +    
  getpageanchor() +
  '%0D%0A' +   
  '%0D%0A' +   
  'The home page is ' + 
  gethomeanchor() + 
  '"' +
  '>email this page to a friend<\/a>';
  document.write(theString);
}

function writewebmasterutility() {
 var theString;
 theString= ' <a href="mailto:webmaster@dufferinpark.ca?subject=A page from your website&body=' +
  'Regarding the web page ' + 
   getpageanchor() + 
  '%0D%0A____________________________________' +   
  '%0D%0A' +   
  '%0D%0A' +   
  '">contact our webmaster<\/a>';
  document.write(theString);
}

function getpageanchor() {
 return '%22' + 
 document.title + '%22: ' + 
 '%0D%0A' +   
 getpageurl();
}

function gethomeanchor() {
  return '%22' +
  'Friends of Dufferin Grove Park%22: ' +
  '%0D%0A' +   
  'www.dufferinpark.ca';
}

function getpageurl() {
 return encodeURI(document.URL.substring(0,(document.URL.indexOf('#')==(-1)) ? (document.URL.length +1) : (document.URL.indexOf('#'))));
}

function writelastupdated() {
 var monthlist = ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec']
 var lastModifiedDate = new Date(document.lastModified);
 document.write(
 'This page last updated: ' + 
 lastModifiedDate.getDate() + '-' + 
 monthlist[lastModifiedDate.getMonth()] + '-' + 
 lastModifiedDate.getFullYear());
}

function writenavrow() {
document.write(
 '<div style="text-align:center;color:green">' +
 '| <a href="/home/wiki/wiki.php">Home<\/a> ||&nbsp;' +
 '<a href="/newsletter/wiki/wiki.php">Newsletter<\/a> |&nbsp;' +
 '<a href="/editor/wiki/wiki.php">Editor<\/a> ||&nbsp;' +
 '<a href="/calendar">Events Calendar<\/a> ||&nbsp;' +
 '<a href="/arts/wiki/wiki.php">Arts in the Park<\/a> |&nbsp;' +
 '<a href="/oven/wiki/wiki.php">Bake Ovens &amp; Food<\/a> |&nbsp;' +
 '<a href="/campfires/wiki/wiki.php">Campfires<\/a> |&nbsp;' +
 '<a href="/cobcourtyard/wiki/wiki.php">Cob Courtyard<\/a> |&nbsp;' +
 '<a href="/dogs/wiki/wiki.php">Dogs<\/a> |&nbsp;' +
 '<a href="/market/wiki/wiki.php">Farmer&#39;s Market<\/a> |&nbsp;' +
 '<a href="/maintenance/wiki/wiki.php">Maintenance<\/a> |&nbsp;' +
 '<a href="/gardens/wiki/wiki.php">Park Gardens<\/a> |&nbsp;' +
 '<a href="/picnics/wiki/wiki.php">Picnics &amp; Permits<\/a> |&nbsp;' +
 '<a href="/play/wiki/wiki.php">Playground<\/a> |&nbsp;' +
 '<a href="/police/wiki/wiki.php">Police &amp; Park Safety<\/a> |&nbsp;' +
 '<a href="/sports/wiki/wiki.php">Sports<\/a> ||&nbsp;' +
 '<a href="/cityrinks/wiki/wiki.php">City Rinks<\/a> |&nbsp;' +
 '<a href="/neighbourhood/wiki/wiki.php">Neighbourhood<\/a> |&nbsp;' +
 '<a href="/research/wiki/wiki.php">Research<\/a> ||&nbsp;' +
 '<a href="/aboutus/wiki/wiki.php">About Us<\/a> |' +
 '</div>'
)
}
