<?php header('Content-type: text/html; charset=utf-8'); ?>
<?php
  /* STEP 1: LOAD RECORDS - Copy this PHP code block near the TOP of your page */
  require_once "/var/www/vhosts/wilmot.ca/httpdocs/cmsAdmin/lib/viewer_functions.php";

  list($a_z_of_servicesRecords, $a_z_of_servicesMetaData) = getRecords(array(
    'tableName'   => 'a_z_of_services',
    'orderBy'     => 'service_desc',
  ));
  
  //create array 
$recordsByFirstLetter = array('A' => array(),'B' => array(), 'C' => array(), 'D' => array(),'E' => array(), 'F' => array(),
                              'G' => array(),'H' => array(), 'I' => array(),'J' => array(),'K' => array(), 'L' => array(),
                              'M' => array(),'N' => array(), 'O' => array(),'P' => array(),'Q' => array(), 'R' => array(),
                              'S' => array(),'T' => array(), 'U' => array(),'V' => array(),'W' => array(), 'X' => array(),
                              'Y' => array(),'Z' => array()); 
 
//populate array 
foreach($a_z_of_servicesRecords as $record){ 
  //get the first letter of the service_desc 
  $firstLetter = strtoupper(substr(trim($record['service_desc']),0,1)); 
   
  //add record to the array based on it's first letter 
  $recordsByFirstLetter[$firstLetter][]=$record; 
} 

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
 <head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="google-site-verification" CONTENT="2CBIxlf625GPtgWnfAv4byaDCH1wHXicIcZZJDbi8nM" />
<TITLE>A to Z Services</TITLE>
<LINK HREF="styles2010.css" REL="stylesheet" TYPE="text/css">
<SCRIPT TYPE="text/javascript">
<!--
<!--

function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}

var preloadFlag = false;
function preloadImages() {
	if (document.images) {
		Home_over = newImage("images/Home-over.gif");
		Services_over = newImage("images/Services-over.gif");
		Departments_over = newImage("images/Departments-over.gif");
		News_over = newImage("images/News-over.gif");
		About_over = newImage("images/About-over.gif");
		Links_over = newImage("images/Links-over.gif");
		Contact_over = newImage("images/Contact-over.gif");
		preloadFlag = true;
	}
}

// -->

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</SCRIPT>

<SCRIPT TYPE="text/javascript" SRC="textsizer.js">

/***********************************************
* Document Text Sizer- Copyright 2003 - Taewook Kang.  All rights reserved.
* Coded by: Taewook Kang (http://www.txkang.com)
* This notice must stay intact for use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/

</SCRIPT>
 <link rel="stylesheet" type="text/css" href="anylinkmenu.css" />

<script type="text/javascript" src="menucontents.js"></script>

<script type="text/javascript" src="anylinkmenu.js">

/***********************************************
* AnyLink JS Drop Down Menu v2.0- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Project Page at http://www.dynamicdrive.com/dynamicindex1/dropmenuindex.htm for full source code
***********************************************/

</script>

<script type="text/javascript">

//anylinkmenu.init("menu_anchors_class") //Pass in the CSS class of anchor links (that contain a sub menu)
anylinkmenu.init("menuanchorclass")

</script>
 </HEAD>

<BODY onLoad="MM_preloadImages('images-nav/Home-over.gif','images-nav/Services-over.gif','images-nav/Departments-over.gif','images-nav/News-over.gif','images-nav/About-over.gif','images-nav/Links-over.gif','images-nav/Contact-over.gif')">
<TABLE WIDTH="962" BORDER="0" ALIGN="CENTER" CELLPADDING="0" CELLSPACING="0" ID="Holding">
  
  <TR>
    <TD COLSPAN="5"><TABLE WIDTH="962" BORDER="0" CELLPADDING="0" CELLSPACING="0" ID="Masthead">
      
      <TR>
        <TD ROWSPAN="3"><A HREF="home.php"><IMG SRC="images2010/logo-wilmot.png" ALT="Building a Sure Foundation" WIDTH="143" HEIGHT="138" BORDER="0"></A></TD>
        <TD><IMG SRC="images2010/single-pixel.gif" WIDTH="18" HEIGHT="32"></TD>
        <TD CLASS="tdRightAlign"><!-- #BeginLibraryItem "/Library/Google Search.lbi" --><!-- Atomz HTML for Search -->
<form method="get" action="http://search.atomz.com/search/">
<input type="hidden" name="sp_a" value="sp10043f50" />
<input  class="inputSearchField" size="31" name="sp_q" />
<input type="submit" value="Search"  class="inputButton" />
<input type="hidden" name="sp_p" value="all" />
<input type="hidden" name="sp_f" value="ISO-8859-1" />
</form><!-- #EndLibraryItem --><SCRIPT TYPE="text/javascript" SRC="http://www.google.com/cse/brand?form=cse-search-box&lang=en"></SCRIPT></TD></TR>
      <TR>
        <TD ROWSPAN="2"><IMG SRC="images2010/single-pixel.gif" WIDTH="18" HEIGHT="85"></TD>
        <TD CLASS="tdMastheadHeadingCell"><A HREF="home.php"><IMG SRC="images2010/masthead-heading.png" ALT="The Corporation of the Township of Wilmot" WIDTH="802" HEIGHT="42" BORDER="0"></A></TD>
      </TR>
      <TR>
        <TD CLASS="tdNavigationGlobalOuter"><TABLE ID="Global Navigation" WIDTH="801" HEIGHT="31" BORDER="0" CELLPADDING="0" CELLSPACING="0">
          <TR>
            <TD><A HREF="home.php" onMouseOver="MM_swapImage('Home','','images-nav/Home-over.gif',1)" onMouseOut="MM_swapImgRestore()"> <IMG NAME="Home" SRC="images-nav/Home.gif" WIDTH="58" HEIGHT="31" BORDER="0" ALT="" /></A></TD>
            <TD><IMG SRC="images-nav/Divider.gif" WIDTH="11" HEIGHT="31" ALT="" /></TD>
            <TD><A HREF="services.php" onMouseOver="MM_swapImage('Services','','images-nav/Services-over.gif',1)" onMouseOut="MM_swapImgRestore()"> <IMG NAME="Services" SRC="images-nav/Services.gif" WIDTH="116" HEIGHT="31" BORDER="0" ALT="" /></A></TD>
            <TD><IMG SRC="images-nav/Divider.gif" WIDTH="11" HEIGHT="31" ALT="" /></TD>
            <TD><A HREF="departments.php" onMouseOver="MM_swapImage('Departments','','images-nav/Departments-over.gif',1)" onMouseOut="MM_swapImgRestore()"> <IMG NAME="Departments" SRC="images-nav/Departments.gif" WIDTH="146" HEIGHT="31" BORDER="0" ALT="" /></A></TD>
            <TD><IMG SRC="images-nav/Divider.gif" WIDTH="11" HEIGHT="31" ALT="" /></TD>
            <TD><A HREF="news.php" onMouseOver="MM_swapImage('News','','images-nav/News-over.gif',1)" onMouseOut="MM_swapImgRestore()"> <IMG NAME="News" SRC="images-nav/News.gif" WIDTH="130" HEIGHT="31" BORDER="0" ALT="" /></A></TD>
            <TD><IMG SRC="images-nav/Divider.gif" WIDTH="11" HEIGHT="31" ALT="" /></TD>
            <TD><A HREF="about.php" onMouseOver="MM_swapImage('About','','images-nav/About-over.gif',1)" onMouseOut="MM_swapImgRestore()"><IMG NAME="About" SRC="images-nav/About.gif" WIDTH="72" HEIGHT="31" BORDER="0" ALT="" /></A></TD>
            <TD><IMG SRC="images-nav/Divider.gif" WIDTH="11" HEIGHT="31" ALT="" /></TD>
            <TD><A HREF="links.php" onMouseOver="MM_swapImage('Links','','images-nav/Links-over.gif',1)" onMouseOut="MM_swapImgRestore()"> <IMG NAME="Links" SRC="images-nav/Links.gif" WIDTH="126" HEIGHT="31" BORDER="0" ALT="" /></A></TD>
            <TD><IMG SRC="images-nav/Divider.gif" WIDTH="11" HEIGHT="31" ALT="" /></TD>
            <TD><A HREF="contact.php" onMouseOver="MM_swapImage('Contact','','images-nav/Contact-over.gif',1)" onMouseOut="MM_swapImgRestore()"> <IMG NAME="Contact" SRC="images-nav/Contact.gif" WIDTH="87" HEIGHT="31" BORDER="0" ALT="" /></A></TD>
          </TR>
        </TABLE></TD>
      </TR>
      
    </TABLE></TD>
  </TR>
  <TR>
    <TD><IMG SRC="images2010/single-pixel.gif" WIDTH="141" HEIGHT="15"></TD>
    <TD><IMG SRC="images2010/single-pixel.gif" WIDTH="20" HEIGHT="10"></TD>
    <TD><IMG SRC="images2010/single-pixel.gif" WIDTH="601" HEIGHT="10"></TD>
    <TD><IMG SRC="images2010/single-pixel.gif" WIDTH="20" HEIGHT="10"></TD>
    <TD><IMG SRC="images2010/single-pixel.gif" WIDTH="180" HEIGHT="10"></TD>
  </TR>
  
  <TR>
    <TD><!-- #BeginLibraryItem "/Library/Subnav Services.lbi" -->
    <link href="styles2010.css" rel="stylesheet" type="text/css" />
    <p class="pSubnavHeading">In this section:</p>
    <p class="pSubnav"><a href="a-z-services.php">A-Z of Services</a></p>
    <p class="pSubnav"><a href="services-2010-election.php">2010 Election</a></p>
    <p class="pSubnav"><a href="services-bylaws.php">By-laws</a></p>
    <p class="pSubnav"><a href="services-council-committees.php">Council and Committees </a></p>
    <p class="pSubnav"><a href="services-employment.php">Employment</a></p>
    <p class="pSubnav"><a href="services-maps.php">Maps</a> </p>
    <p class="pSubnav"><a href="services-marriage.php">Marriage</a> </p>
    <p class="pSubnav"><a href="services-planning-reports.php">Planning Reports</a> </p>
    <p class="pSubnav"><a href="services-notices.php">Public Notices </a></p>
    <p class="pSubnav"><a href="services-stats.php">Statistics</a></p>
    <!-- #EndLibraryItem --><!-- #BeginLibraryItem "/Library/Buttons.lbi" -->
<link href="styles2010.css" rel="stylesheet" type="text/css" />
<table width="141" border="0" cellpadding="0" cellspacing="0" id="Buttons">
        
        <tr>
          <td><img src="images2010/single-pixel.gif" width="141" height="1" /></td>
        </tr>
        <tr>
          <td class="tdHorizontalRule"><img src="images2010/single-pixel.gif" width="141" height="1" /></td>
        </tr>
        <tr>
          <td><a href="services-maps.php"><img src="images2010/button-map.gif" width="141" height="21" border="0" /></a></td>
        </tr>
        <tr>
          <td><img src="images2010/single-pixel.gif" width="141" height="5" /></td>
        </tr>
        <tr>
          <td><a href="services-stats.php"><img src="images2010/button-local.gif" width="141" height="21" border="0" /></a></td>
        </tr>
        <tr>
          <td><img src="images2010/single-pixel.gif" width="141" height="5" /></td>
        </tr>
        <tr>
          <td><a href="faqs.php"><img src="images2010/button-faqs.gif" width="141" height="21" border="0" /></a></td>
        </tr>
        <tr>
          <td><img src="images2010/single-pixel.gif" width="141" height="5" /></td>
        </tr>
        <tr>
          <td><img src="images2010/button-increase.gif" width="141" height="21" border="0" usemap="#Map" /></td>
        </tr>
        <tr>
          <td><img src="images2010/single-pixel.gif" width="141" height="9" /></td>
        </tr>
        <tr>
          <td class="tdHorizontalRule"><!-- AddThis Button BEGIN -->
            <div align="center"><a class="addthis_button" href="http://www.addthis.com/bookmark.php?v=250&amp;username=xa-4bd1e34e23358cd6"><img src="http://s7.addthis.com/static/btn/v2/lg-share-en.gif" width="125" height="16" alt="Bookmark and Share" style="border:0"/></a>
                <script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#username=xa-4bd1e34e23358cd6"></script>
              <!-- AddThis Button END -->
          </div></td>
        </tr>
        <tr>
          <td><span class="tdHorizontalRule"><img src="images2010/single-pixel.gif" width="141" height="15" /></span></td>
        </tr>
</table>

<map name="Map" id="Map">
<area shape="rect" coords="-5,1,23,20" href="javascript:ts('Main Content',-1)" />
<area shape="rect" coords="119,-1,140,20" href="javascript:ts('Main Content',1)" />
</map><!-- #EndLibraryItem -->
    <P CLASS="pSubnav">&nbsp;</P></TD>
    <TD>&nbsp;</TD>
    <TD><TABLE WIDTH="601" CELLPADDING="0" CELLSPACING="0" ID="Listings">
      <TR>
        <TD><H1>A to Z Services</H1>          </TD>
      </TR>
      
      <TR>
        <TD><p><strong>Township of Wilmot Services &nbsp;&nbsp;&nbsp;&nbsp;Across Region Services </strong></p></TD>
      </TR>
      <TR>
        <TD class="tdHorizontalRule"><a name="top"><p class="pAZindex">
          <?php foreach($recordsByFirstLetter as $firstLetter => $records): ?>
            <?php if($records):?>
                <a href="#services_<?php echo $firstLetter;?>"><?php echo $firstLetter;?></a>
            <?php else: ?>
                <?php echo $firstLetter;?>
            <?php endif ?>
          <?php endforeach ?>
        </a></p></TD>
      </TR>
      
        
				
		<?php //Output sorted records by first letter ?> 
<?php foreach($recordsByFirstLetter as $firstLetter => $records):?> 
  <TR>
  <TD class="tdHorizontalRule"><p class="pNoPad"><strong><a name="services_<?php echo $firstLetter;?>" id="services_<?php echo $firstLetter;?>"><?php echo $firstLetter;?></a></strong></p>
   
  <?php foreach($records as $record):?> 
     <p class="pAZListing"><a href="<?php echo $record['url'];?>"><?php echo $record['service_desc'];?></a></p> 
  <?php endforeach ?>
    </TD>
        </TR>
<?php endforeach ?>
      
      
    </TABLE>    </TD>
    <TD>&nbsp;</TD>
    <TD><!-- #BeginLibraryItem "/Library/Contact Panel.lbi" -->
<link href="styles2010.css" rel="stylesheet" type="text/css" />
<table width="180" border="0" cellpadding="0" cellspacing="0" id="Contact Panel">
      <tr>
        <td class="tdBluePanelBG"><h3><a href="contact.php">Contact Us </a></h3>
          <p class="pPanelText"><strong>The Corporation of the Town<span class="pPanelTextPadded">ship of Wilmot</span></strong><span class="pPanelTextPadded"><br />
          60 Snyder's Road West<br />
          Baden, Ontario<br />
          N3A 1A1</span></p>
          <p class="pPanelTextPadded">Canada</p>
          <p class="pPanelTextPadded"><strong> Toll Free:</strong> 1.800.469.5576<br />
              <strong>Tel: </strong>519.634.8444<br />
              <strong>Fax: </strong>519.634.5522 </p>
          <p class="pPanelTextPadded"> <strong>Office Hours<br />
          </strong>Monday - Friday <br />
          8:30am - 4:30pm  </p>
          <p class="pPanelText"><a href="contact-directory.php"><strong>Township Directory &raquo;</strong></a></p></td>
      </tr>
      <tr>
        <td><span class="tdHorizontalRule"><img src="images2010/single-pixel.gif" width="141" height="15" /></span></td>
      </tr>
    </table>
<!-- #EndLibraryItem --></TD>
  </TR>
  
  <TR>
    <TD COLSPAN="5"><IMG SRC="images2010/single-pixel.gif" WIDTH="100" HEIGHT="5"></TD>
  </TR>
  <tr>
    <td colspan="3" class="tdHorizontalRule"><p class="pFooter">&copy;
            <script language="JavaScript" type="text/javascript">

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->
<!--  Author: www.cgiscript.net  -->

<!-- Begin

// Get today's current date.
var now = new Date();

// Array list of days.
var days = new Array('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday');

// Array list of months.
var months = new Array('January','February','March','April','May','June','July','August','September','October','November','December');

// Calculate the number of the current day in the week.
var date = ((now.getDate()<10) ? "0" : "")+ now.getDate();

// Calculate four digit year.
function fourdigits(number)	{
	return (number < 1000) ? number + 1900 : number;
								}

// Join it all together
today =  (fourdigits(now.getYear())) ;

// Print out the data.
document.write(today);

//  End -->
                  </script>
      The Corporation of The Township of Wilmot&nbsp;  |&nbsp; <a href="privacy.php">Privacy Policy</a></p></td>
    <td colspan="2" class="tdHorizontalRule"><p align="right" class="pFooter">&nbsp;</p></td>
  </tr>
  <TR>
    <TD><IMG SRC="images2010/single-pixel.gif" WIDTH="141" HEIGHT="15"></TD>
    <TD><IMG SRC="images2010/single-pixel.gif" WIDTH="20" HEIGHT="10"></TD>
    <TD><IMG SRC="images2010/single-pixel.gif" WIDTH="601" HEIGHT="10"></TD>
    <TD><IMG SRC="images2010/single-pixel.gif" WIDTH="20" HEIGHT="10"></TD>
    <TD><IMG SRC="images2010/single-pixel.gif" WIDTH="180" HEIGHT="10"></TD>
  </TR>
</TABLE>
</BODY>
</HTML>
