thePopup=null;
function writepageutility() {
 var theString;
 theString= '<a class="homepage" href="mailto:?subject=A page from the Friends of Dufferin Grove Park website' +
  '&body=' + 
  '%0D%0A____________________________________' +   
  '%0D%0A' +
  'The web page is ' +    
  getpageanchor() +
  '"' +
  '>email this page to a friend<\/a>';
  document.write(theString);
}
function writewebmasterutility() {
 var theString;
 theString= '<a class="homepage" 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 getpageurl() {
 return encodeURI(document.URL.substring(0,(document.URL.indexOf('#')==(-1)) ? (document.URL.length +1) : (document.URL.indexOf('#') + 1)));
}
function openpopover(popoverID) {
  var thepopover = document.getElementById(popoverID);
  if (thePopup) {
    document.getElementById(thePopup).style.display="none";
  }
  thePopup=popoverID;
  thepopover.style.display="block";
}
function closepopover(popoverID) {
  var thepopover = document.getElementById(popoverID);
  thepopover.style.display="none";
}
function openpage(pageselector) {
  var theURL;
  switch (pageselector) {
    case 'aboutus': theURL='/aboutus/wiki/wiki.php'; break;
    case 'cityplaygrounds': theURL='/cityplaygrounds/cityplaygrounds.html'; break;
    case 'research': theURL='/research/wiki/wiki.php'; break;
    case 'editor': theURL='/editor/wiki/wiki.php'; break;
	case 'bakeoven': theURL='/oven/wiki/wiki.php'; break;
	case 'newsletter': theURL='/newsletter/wiki/wiki.php'; break;
	case 'arts': theURL='/arts/wiki/wiki.php'; break;
	case 'gardens': theURL='/gardens/wiki/wiki.php'; break;
	case 'police': theURL='/police/wiki/wiki.php'; break;
	case 'cityrinks': theURL='/cityrinks/wiki/wiki.php'; break;
	case 'neighbourhood': theURL='/neighbourhood/wiki/wiki.php';break;
	case 'market': theURL='/market/wiki/wiki.php'; break;
	case 'forum': theURL='http://community.dufferinpark.ca'; break;
	case 'dogs': theURL='/dogs/wiki/wiki.php'; break;
	case 'skating': theURL='/skating/wiki/wiki.php'; break;
	case 'sports': theURL='/sports/wiki/wiki.php'; break;
	case 'playground': theURL='/play/wiki/wiki.php'; break;
	case 'campfires': theURL='/campfires/wiki/wiki.php'; break;
	case 'picnics': theURL='/picnics/wiki/wiki.php'; break;
	case 'maintenance': theURL='/maintenance/wiki/wiki.php'; break;
  };
  location.href=theURL;
}
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());
}


