
theTA = document.getElementById("testarea")
// Persistant Banner
// R.C.Lockwood
// Places a banner at the bottom of the screen
// Originally written for ONnet - hence ONbox sniffer. 
// In this case the banner will be an ONnet style navigation bar and call to action.
// V.1.0 - 29 September 2000
//////////////////////////////////////////////////////////////////////////////

// v.1.1 - 31 August 2004
// Need to rewrite for Mozilla.  Grr.

// bannerheight
bannerHeight = 23
// browser sniffer
function Is() {
  var agent = navigator.userAgent.toLowerCase();
  this.major = parseInt(navigator.appVersion);
  this.minor = parseFloat(navigator.appVersion);
  this.ONbox = (agent.indexOf("netbox")!=-1);
  this.ie = (agent.indexOf("msie") != -1);
  this.ns = ((agent.indexOf('mozilla')!=-1) && ((agent.indexOf('spoofer')==-1) && (agent.indexOf('compatible') == -1)));
  this.ns4 = (this.ns && (this.major == 4));
}	// end browser sniffer
var is = new Is();


thePosition = ""
// get position of footer
if (is.ie) {
	thePosition += document.body.clientHeight - bannerHeight
	footerStr = "<SPAN ID='theFooter' STYLE='POSITION:absolute;  LEFT:0;width:100%;'>"
}
if (is.ns4) {
	thePosition += window.innerHeight - bannerHeight
	window.status = thePosition
	footerStr = "<LAYER ID='theFooter' TOP=" + thePosition + " LEFT=0 width=100%>"
}
if (is.ns && !is.ns4) {
	thePosition += document.body.clientHeight - bannerHeight
	footerStr = "<SPAN ID='theFooter' STYLE='POSITION:absolute;  LEFT:0;width:100%;'>"
}

if (!is.ONbox) {
// footer content
footerStr += '<div id="footer"><div id="footertext" style="display: inline">&copy;&nbsp;Copyright <script type=\"text/javascript\">var theDate=new Date();document.write(theDate.getFullYear())</script> Chesterfield Water Treatment &nbsp; &nbsp; &nbsp; &nbsp; Webmaster: <A HREF="http://www.mycrowconsulting.com">Mycrow</A></div></div>'

if (is.ns4) footerStr += "</LAYER>"
if (is.ie) footerStr += "</SPAN>"
if (is.ns && !is.ns4) footerStr += "</SPAN>"
document.write(footerStr)
}

function moveFooter()
{
if (!is.ONbox) {
	// get position of footer and move it
	if (is.ie) {
		
		thePosition = document.body.clientHeight - bannerHeight
		theFooter.style.top = document.body.scrollTop + thePosition
	}
	if (is.ns4) {	
		thePosition = window.innerHeight - bannerHeight
		document.layers.theFooter.top = pageYOffset + thePosition
	}
	
	if (is.ns && !is.ns4) {
		// Mozilla code
		thePosition = window.innerHeight - bannerHeight
		document.getElementById("theFooter").style.top = self.pageYOffset + thePosition - 2
	}
	
	
	
	
	lag = setTimeout("moveFooter()", 10)
}
}
if (!is.ONbox) moveFooter()

//this next bit seems to fix a bug which occured when a Netscape window was repeatedly resized - the banner would move to the bottom of the page and stay there.
function regen() {
	window.location.reload()
}
if (is.ns4) setTimeout("window.onresize = regen",600)




// As well as the footer code, we'll put in the date code here.
today = new Date()
theDate = today.getDate()
theMonth = today.getMonth()
theYear = today.getFullYear()

monthName = new Array("January","February","March","April","May","June","July","August","September","October","November","December")

theSuffix = new Array("st","nd","rd","th","th","th","th","th","th","th","th","th","th","th","th","th","th","th","th","th","st","nd","rd","th","th","th","th","th","th","th","st")

theDateString = theDate + "<sup>" + theSuffix[theDate] + "</sup> " + monthName[theMonth] + " " + theYear
// Don't want the date any more: removed 10 March 2006
// document.getElementById("dateDiv").innerHTML = theDateString

document.getElementById("menucol").style.height = document.getElementById("maindiv").offsetHeight + 100



