// Tools used throughout site
// Created 08 Feb 2007


// **** Universal variables **** //
var emailWarning = "WARNING: The contents of any communication sent to this public official through this email address is considered to be public record and may be retained by anyone upon request.";

// Today's date code
var today = new Date();
var year = today.getYear();
var month = today.getMonth();
var day = today.getDate();
if (year < 1000) {year+=1900}
year = (year % 2000) * 10000;
month = (month + 1) * 100;
var dateToday = year+month+day;


// **** Functions **** //

function initialize()
// Created 8 Feb 2007
{
	initThisPage();
	setToday();
}

function openPopup(page) {win = window.open(page,'popup','menubar,resizable,width=700,height=400,top=100,left=50,scrollbars,status')}

function redirect(page) {window.location.replace(page)}

function setToday()
{
	var dayNames = new Array("Sunday","Monday","Tuesday","Wednesday", "Thursday","Friday","Saturday");
	var monthNames = new Array("January","February","March","April","May","June","July","August","September","October","November","December");

	var now = new Date();
	document.getElementById('today').innerHTML = (dayNames[now.getDay()] + ", " + monthNames[now.getMonth()] + " " + now.getDate() + ", " + now.getFullYear());
}

function toggleVis(blockRef, action)
// Created 3 June 2010 for agenda/minute listings
{
	var colBlock = document.getElementById(blockRef+'col');
	var expBlock = document.getElementById(blockRef+'exp');
	
	if (action == 'exp')
	{
		colBlock.style.display = "none";
		expBlock.style.display = "block";
	}
	else
	{
		colBlock.style.display = "block";
		expBlock.style.display = "none";
	}
}

