// archives-specific javascript



// browse_submit (form_handle)
// checks the current date against the entered date to tag for SiteMinder
function browse_submit(fhandle)
{
	var today = new Date();

	var month = today.getMonth()+1;
	if (month < 10)
	{
		month = "0" + month;
	}
	
	var day = today.getDate();
	if (day < 10)
	{
		day = "0" + day;
	}
	
	var year = year_format(today);
	
	var today_str = month + "/" + day + "/" + year;
	
	if (today_str == fhandle.browsedate.value)
	{
		fhandle.c.value = 1;
	}
	else
	{
		fhandle.c.value = 0;
	}

}	// end browse_submit




// year_format works around a variety of compatibility problems with browsers and the way they handle dates
function year_format(date_handle)
{
	var y = date_handle.getYear();
	if (y < 1000)
	{
		y += 1900;
	}
	return y;
}	// end year_format

