#!/usr/bin/ruby
print "Content-type: text/html; charset=ISO-8859-1\n\n"
template = <<EOF
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<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;
}

.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;
}

.style01 {
font-size: 9pt;
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;
}
/*]]>*/
.style1 {font-size: 9pt;
font-weight:bold;
color: #999999;
font-family: Geneva, Arial, Helvetica, sans-serif;
}
</style>
<script src="../Scripts/AC_RunActiveContent.js" type="text/javascript"></script>

</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 -->
	<script type="text/javascript">
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0','width','760','height','110','src','http://www.cobbcountyga.gov/flash/v6-main-a','quality','high','pluginspage','http://www.macromedia.com/go/getflashplayer','movie','http://www.cobbcountyga.gov/flash/v6-main-a' ); //end AC code
</script>
      <noscript>
      <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>
	  </noscript>
      <!-- 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="14" 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="../images/arrow-r-7x7.gif" alt="arrow" width="7" height="7" /> <a href="http://hr.cobbcountyga.gov/" class="left-menu"> Cobb HR Home </a><br />
      <img src="../images/arrow-r-7x7.gif" alt="arrow" width="7" height="7" /> <a href="http://hr.cobbcountyga.gov/classifications" class="left-menu"> Employee Classifications </a><br />
        <br />
<span class="style1">Human Resources:<br />
</span>(770) 528-2541
<span class="style1"><br />
Employment Desk:</span><br />
(770) 528-2535<br />
<span class="style1">Jobline:</span><br />
(770) 528-2555<br />
<span class="style1">Fax:</span><br />
(770) 528-2550 <br />
<br />
<br />
Human Resources<br />
Tony Hagler, Director<br />
100 Cherokee St<br />
Second Floor<br />
Marietta, GA<br />
30090-9679<br>
        <br>
      </p>
      <!-- end deptnav --></td>
    <td class="dept" width="605" bgcolor="#FFFFFF"><!-- start deptcontent -->
      <br>
          <span class="title">Cobb County Human Resources</span>
  
          <hr align="left" width="96%">
      <span class="style01"><!--CONTENT--></span><span class="style01"><br>
<br>
</span></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 type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-1367542-1");
pageTracker._initData();
pageTracker._trackPageview();
</script>
<script language="JavaScript" src="http://www.cobbcountyga.gov/menu/3/ocscript.js" type="text/javascript"></script>
</body>
</html>
EOF

require 'cgi'
cgi = CGI.new
filename = cgi.params['f']

job_text = ''
open("specs/#{filename}",'r') {|file| job_text = file.read}
job_html = job_text.gsub("<!--HEAD-->","<!--HEAD--><strong>").gsub("\n","<br>").gsub("<!--DESCRIPTION-->", "DESCRIPTION</strong><br>").gsub("<!--ESSENTIAL FUNCTIONS-->", "<strong>ESSENTIAL FUNCTIONS</strong><br>").gsub("<!--MINIMUM QUALIFICATIONS-->", "<strong>MINIMUM QUALIFICATIONS</strong><br>").gsub("<!--SUPPLEMENTAL INFORMATION-->", "<strong>SUPPLEMENTAL INFORMATION</strong><br>")
puts template.gsub("<!--CONTENT-->", job_html)
