#!/usr/bin/ruby
html = <<EOF
Content-type: text/html; charset=ISO-8859-1\n\n
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta name="generator" content="HTML Tidy for Mac OS X (vers 1st December 2004), see www.w3.org">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="expires" content="Mon, 3 Jan 2000 08:00:00 GMT">
<meta http-equiv="cache-control" content="no-cache, must-revalidate">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Cobb County Government</title>
<style type="text/css">
/*<![CDATA[*/

body,td,th {
font-family: Geneva, Arial, Helvetica, sans-serif;
color: #000000;
}

body {
background-color: #CBDCED;
margin-top: 0px;
}
.caselist {font-size: 12pt;
margin-left: 10px;
line-height: 14px;
font-family: Arial, Helvetica, sans-serif;
font-style: bold; 
}
.left-margin {
padding-top:4px;
padding-left:6px;
}

.dept {
padding: 10px 10px 10px 10px;
}

.content-margin {
padding-top:10px;
padding-left:4px;
}

.right-margin {
padding-top:6px;
padding-right :0px;
}

.style001 {
font-size: 8pt;
color: #000000;
font-family: Geneva, Arial, Helvetica, sans-serif;
}

.style01 {
font-size: 9pt;
color: #000000;
font-family: Geneva, Arial, Helvetica, sans-serif;
}

.style1 {
font-size: 9pt;
font-weight:bold;
color: #999999;
font-family: Geneva, Arial, Helvetica, sans-serif;
}

.style2 {font-size: 10pt;
color: #000000;
font-family: Geneva, Arial, Helvetica, sans-serif;
}

.style3b {font-size: 12pt;
font-weight: bold;
color: #000099;
font-family: Geneva, Arial, Helvetica, sans-serif;
}

.cutline {font-size: 8pt;
margin-left: 10px;
color: #333333;
line-height: 11px;
font-family: Geneva, Arial, Helvetica, sans-serif;
}
.title {font-size: 14pt;
font-weight: bold;
color: #000099;
font-family: Geneva, Arial, Helvetica, sans-serif;
}

a{ 
color: #000099;
font-size: 12px;
text-decoration: none;
font-family: Geneva, Arial, Helvetica, sans-serif;
padding: 0px;
}
a:hover {
color: #0033FF;
font-size: 12px;
text-decoration: underline;
font-family: Geneva, Arial, Helvetica, sans-serif;
padding: 0px;
}
a:active {
color: #000099;
font-size: 12px;
text-decoration: none;
font-family: Geneva, Arial, Helvetica, sans-serif;
padding: 0px;
}
a:visited {
font-size: 12px;
font-family: Geneva, Arial, Helvetica, sans-serif;
padding: 0px;
}


a.left-menu {
line-height: 20px;
font-size: 11px;
color: #000099;
text-decoration: none;
}
a.left-menu:visited {
line-height: 20px;
font-size: 11px;
text-decoration: none;
color: #000099;
}
a.left-menu:hover {
line-height: 20px;
font-size: 11px;
text-decoration: underline;
color: #000099;
}
a.left-menu:active {
line-height: 20px;
font-size: 11px;
text-decoration: none;
color: #000099;
}

a.adv {
font-size: 10px;
color: #000099;
text-decoration: none;
}
a.adv:visited {
font-size: 10px;
color: #000099;
text-decoration: none;
}
a.adv:hover {
font-size: 10px;
color: #000099;
text-decoration: none;
text-decoration: underline;
}
a.adv:active {
font-size: 10px;
color: #000099;
text-decoration: none;
}

a.footer-link { 
color: #FFFFFF;
font-size: 10px;
text-decoration: none;
font-family: Geneva, Arial, Helvetica, sans-serif;
}
a.footer-link:hover {
color: #FFFFFF;
font-size: 10px;
text-decoration: none;
font-family: Geneva, Arial, Helvetica, sans-serif;
}
a.footer-link:active {
color: #FFFFFF;
font-size: 10px;
text-decoration: none;
font-family: Geneva, Arial, Helvetica, sans-serif;
}
a.footer-link:visited {
color: #FFFFFF;
font-size: 10px;
text-decoration: none;
font-family: Geneva, Arial, Helvetica, sans-serif;
}
.footer-text {
font-size: 10px;
color: #FFFFFF;
font-family: Geneva, Arial, Helvetica, sans-serif;
}
/*]]>*/
</style>
</head>
<body>
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td colspan="2" bgcolor="#000099"><!-- start tv23 infocaster crawl -->
      <script language="javascript" src="http://www.cobbcountyga.gov/v6/scroller.rb" type="text/javascript">
</script>
      <!-- end tv23 infocaster crawl -->
    </td>
  </tr>
  <tr>
    <td colspan="2"><!-- start swf1 -->
      <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="760" height="110">
        <param name="movie" value="http://www.cobbcountyga.gov/flash/v6-main-a.swf">
        <param name="quality" value="high">
        <embed src="http://www.cobbcountyga.gov/flash/v6-main-a.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="760" height="110">
      </object>
      <!-- end swf1 --></td>
  </tr>
  <tr>
    <td colspan="2"><!-- start menu2 -->
      <script language="JavaScript" src="http://www.cobbcountyga.gov/menu/3/imenus0.js" type="text/javascript">
</script>
      <!-- end menu2 -->
    </td>
  </tr>
  <tr valign="top">
    <td width="155" bgcolor="#EBEBEC" class="left-margin"><!-- start search -->
      <form name="gs" method="get" action="http://216.235.146.75/search?site=Cobb_County&amp;client=Cobb_County&amp;output=xml_no_dtd&amp;proxystylesheet=Cobb_County&amp;proxycustom=%3CHOME/%3E&amp;ie=&amp;oe=&amp;lr=" id="gs">
        <p>
          <input type="text" name="q" size="19" maxlength="256" value="">
          <input type="submit" name="btnG" value="Search">
&nbsp;<a class="adv" href="http://216.235.146.75/search?site=Cobb_County&amp;client=Cobb_County&amp;output=xml_no_dtd&amp;proxystylesheet=Cobb_County&amp;proxycustom=%3CADVANCED/%3E&amp;ie=&amp;oe=&amp;lr=">Advanced</a>
          <input type="hidden" name="ie" value="">
          <input type="hidden" name="site" value="Cobb_County">
          <input type="hidden" name="output" value="xml_no_dtd">
          <input type="hidden" name="client" value="Cobb_County">
          <input type="hidden" name="lr" value="">
          <input type="hidden" name="proxystylesheet" value="Cobb_County">
          <input type="hidden" name="oe" value="">
        </p>
      </form>
      <!-- end search -->
      <!-- start deptnav -->
      <p class="style01"> <img src="http://www.cobbcountyga.gov/images/arrow-r-7x7.gif" alt="arrow" width="7" height="7"> <a class="left-menu" href="../index.htm"> Zoning Case Home</a><br>
        <img src="http://www.cobbcountyga.gov/images/arrow-r-7x7.gif" alt="arrow" width="7" height="7"> <a class="left-menu" href="http://comdev.cobbcountyga.gov/zoning.htm">Zoning Dept Home</a><br>
        <img src="http://www.cobbcountyga.gov/images/arrow-r-7x7.gif" alt="arrow" width="7" height="7"> <a class="left-menu" href="http://comdev.cobbcountyga.gov/planning_comm.htm">Planning Commission</a><br>
        <img src="http://www.cobbcountyga.gov/images/arrow-r-7x7.gif" alt="arrow" width="7" height="7"> <a class="left-menu" href="http://comdev.cobbcountyga.gov/index.htm">Community Development</a><br>
      </p>
      <p class="style01"><br>
      </p>
      <p class="style01">Cobb County Government<br>
        191 Lawrence Street<br>
        Marietta, GA 30060<br>
        (770) 528-2004<br>
        <br>
      </p>
      <!-- end deptnav --></td>
    <td class="dept" width="605" bgcolor="#FFFFFF"><!-- start deptcontent -->
      <br>
      <span class="title">Online Zoning Analysis</span>
      <hr align="left" width="96%">
      <span class="style01">Zoning analysis information is provided in PDF format. Depending on your Internet connection speed, these files may take several minutes to download and display. <br>
      <br>
      This information is preliminary and subject to change. Any questions regarding these applications should be directed to the Zoning Division at (770) 528-2004.<br>
      <br>
      <br>
      ******* ALL VARIANCE DOCUMENTS FOR <!--DATE--> *******<br>
      <br>
      <!--CONTENT-->
      </span>
      <br>
      <br>
      <span class="style01">******* END OF DOCUMENT LIST *******</span><br>
      <br>
      <!-- end deptcontent -->
    </td>
  </tr>
  <tr align="center" valign="middle">
    <td height="10" colspan="2" bgcolor="#000099"><div align="center"> <span class="footer-text">© COBB COUNTY GOVERNMENT &nbsp; &nbsp; • &nbsp;&nbsp; COBB COUNTY...EXPECT THE BEST! &nbsp; &nbsp; • &nbsp;&nbsp; <a class="footer-link" href="http://www.cobbcountyga.gov/privacy.htm">PRIVACY STATEMENT</a></span></div></td>
  </tr>
</table>
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</script>
<script type="text/javascript">
_uacct = "UA-1367542-1";
urchinTracker();
</script>
<script language="JavaScript" src="http://www.cobbcountyga.gov/menu/3/ocscript.js" type="text/javascript"></script>
</body>
</html>

EOF

date = "DECEMBER 2008"
#                Name                      Directory
directories = [{'Variance' => 'documents'}]

content = String.new 
directories.each do |hash|
  catagory = hash.keys[0]
  directory_name = hash.values[0]
#  content << "<b>#{catagory} Documents</b><br>"
  directory = Dir.new(directory_name)
  content << "No files in this section at this time<br>" if directory.max == '..'
  directory.each do |filename|
    unless (filename == '.') or (filename == '..')
      content << "<a href='#{directory_name}/#{filename}'>#{filename}</a><br>"
    end
  end
  directory.close
  content << '<br><br>'
end

print html.gsub('<!--CONTENT-->',content).gsub('<!--DATE-->',date)