<!-- // generations together

// variables
var costAmt = 322191660;		// amt. it costs not to implement changes to social security (in dollars)

// ======================================================================
function calcAmt() {
	var startDate = new Date("Jul 14, 2005");		// get start date in ms
	var todaysDate = new Date();		// get today's date in ms
	
	var diff = todaysDate - startDate;	// get time difference in ms
	diff = diff / 1000;					// $38/1 sec = $38/1000 ms
	var costAmt = diff * 21;			// determine how much money (in units of $38/1sec) has been added since startDate
	
	costAmt = costAmt + 322191660;		// add to original startDate value (in dollars)
	
	document.getElementById ("costamt").firstChild.nodeValue = number_str(costAmt);
	// document.getElementById ("costamt").firstChild.nodeValue = costAmt;

	// run this function again in 1000 milliseconds
	setTimeout('calcAmt()', 1000);
}



// ======================================================================
// Converts a number 'n' to a string with commas every three characters.
// thanks to the JavaScript code at www.costofwar.com
function number_str (n) {
	//var x = n.toFixed (0);  this doesn't seem to work on some browsers
	var x = n.toString ();
	var dot = x.lastIndexOf ('.');
	x = x.substr (0, dot);
	var l = x.length;
	var res = "";
	
	for (l -= 3; l > 0; l -= 3) {
		res = "," + x.substr (l, 3) + res;
	}
	
	res = x.substr (0, l+3) + res;
	return res;
}


// ======================================================================
function getCookie(NameOfCookie)
{

// First we check to see if there is a cookie stored.
// Otherwise the length of document.cookie would be zero.

if (document.cookie.length > 0) 
{ 

// Second we check to see if the cookie's name is stored in the
// "document.cookie" object for the page.

// Since more than one cookie can be set on a
// single page it is possible that our cookie
// is not present, even though the "document.cookie" object
// is not just an empty text.
// If our cookie name is not present the value -1 is stored
// in the variable called "begin".

begin = document.cookie.indexOf(NameOfCookie+"="); 
if (begin != -1) // Note: != means "is not equal to"
{ 

// Our cookie was set. 
// The value stored in the cookie is returned from the function.

begin += NameOfCookie.length+1; 
end = document.cookie.indexOf(";", begin);
if (end == -1) end = document.cookie.length;
return unescape(document.cookie.substring(begin, end)); } 
}
return null; 

// Our cookie was not set. 
// The value "null" is returned from the function.

}


// ======================================================================
function setCookie(NameOfCookie, value, expiredays) 
{

// Three variables are used to set the new cookie. 
// The name of the cookie, the value to be stored,
// and finally the number of days until the cookie expires.
// The first lines in the function convert 
// the number of days to a valid date.

var ExpireDate = new Date ();
ExpireDate.setTime(ExpireDate.getTime() + (expiredays * 24 * 3600 * 1000));

// The next line stores the cookie, simply by assigning 
// the values to the "document.cookie" object.
// Note the date is converted to Greenwich Mean time using
// the "toGMTstring()" function.

document.cookie = NameOfCookie + "=" + escape(value) + 
((expiredays == null) ? "" : "; expires=" + ExpireDate.toGMTString());
}


// -->