//Display default status message in IE and Netscape
var now = new Date()
if (now.getDay() == "0" || now.getDay() == "4") {
	window.defaultStatus="The Cochituate Rail Trail will be a multi-use between Saxonville in Framingham and downtown Natick.";
}
if (now.getDay() == "1" || now.getDay() == "5") {
	window.defaultStatus="The Cochituate Rail Trail passes Cochituate Brook Reservation and Cochituate State Park.";
}
if (now.getDay() == "2" || now.getDay() == "6") {
	window.defaultStatus="Plans call for a spur from the Cochituate Rail Trail to the Natick Mall and Shoppers World.";
}
if (now.getDay() == "3") {
	window.defaultStatus="Volunteers have cleared the Framingham section of the Cochituate Rail Trail!";
}

function WindowStatus(TheString) {
	if (navigator.appName != "Microsoft Internet Explorer") {
		window.status = TheString
	}
}


// Change color upon mouseover
function rollYellow() {
	if (navigator.appName == "Microsoft Internet Explorer") {
		what = window.event.srcElement;
		what.style.color="yellow"
	}
}

function rollGreen() {
	if (navigator.appName == "Microsoft Internet Explorer") {
		what = window.event.srcElement;
		what.style.color="#006F43";
	}
}

function rollBlack() {
	if (navigator.appName == "Microsoft Internet Explorer") {
		what = window.event.srcElement;
		what.style.color="red";
	}
}

function rollBlue() {
	if (navigator.appName == "Microsoft Internet Explorer") {
		what = window.event.srcElement;
		what.style.color="#000080";
	}
}
// Endof change color upon mouseover

//Change link colors on left hand side to CSS color on mouseout
function rollOff() {
	if (navigator.appName == "Microsoft Internet Explorer") {
		what = window.event.srcElement;
		what.style.color=""
	}
}
//END Change link colors on left hand side to CSS color on mouseout

//Random image generator
Interval = now.getSeconds()
if (Interval >= 0 && Interval < 7) {
	MainPhoto = "<img src='graphics/t-Minuteman.jpg' width=225 alt='Minuteman Bikeway' border=1 align='center'>";
	caption = "<span class='caption'>The Minuteman Bikeway in Arlington, Lexington, and Bedford is a successful rail trail.</span>"
}
if (Interval >= 7 && Interval < 13) {
	MainPhoto = "<img src='graphics/t-TJX_building_and_trail.jpg' width=225 alt='Trail passing by TJX headquarters' border=1 align='center'>"
	caption = "<span class='caption'>The CRT passes many office buildings and will provide an attractive transportation alternative.</span>"
}
if (Interval >= 13 && Interval < 19) {
	MainPhoto = "<img src='graphics/t-Turnpike_underpass.jpg' width=225 alt='Trail passing under MassPike' border=1 align='center'>"
	caption = "<span class='caption'>This MassPike underpass will allow the CRT to connect neighborhoods which have been separated by highway construction.</span>"
}
if (Interval >= 19 && Interval < 25) {
	MainPhoto = "<img src='graphics/t-Route_9_bridge.jpg' width=225 alt='Trail passing over Route 9' border=1 align='center'>"
	caption = "<span class='caption'>This rail bridge over Route 9 will allow the CRT to link neighborhoods which have been separated by highway construction.</span>"
}
if (Interval >= 25 && Interval < 31) {
	MainPhoto = "<center><img src='graphics/t-Natick2.jpg' width=225 alt='Scenic section of trail in Natick' border=1 align='center'></center>"
	caption = "<span class='caption'>This scenic section of rail line in Natick is expected to become available for trail use.</span>"
}
if (Interval >= 31 && Interval < 37) {
	MainPhoto = "<img src='graphics/t-MassCentral.jpg' width=225 alt='Mass Central Rail Trail' border=1 align='center'>";
	caption = "<span class='caption'>The Mass Central Rail Trail in West Boylston, MA.</span>"
}
if (Interval >= 37 && Interval < 43) {
	MainPhoto = "<img src='graphics/t-TJX_building_and_trail.jpg' width=225 alt='Trail passing by TJX headquarters' border=1 align='center'>"
	caption = "<span class='caption'>The CRT passes many office buildings and will provide an attractive transportation alternative.</span>"
}
if (Interval >= 43 && Interval < 49) {
	MainPhoto = "<img src='graphics/t-Near-Nissan.jpg' width=225 alt='Fall foliage along the trail' border=1 align='center'>"
	caption = "<span class='caption'>Fall foliage on the CRT.</span>"
}
if (Interval >= 49 && Interval < 55) {
	MainPhoto = "<img src='graphics/t-Route_9_bridge.jpg' width=225 alt='Trail passing over Route 9' border=1 align='center'>"
	caption = "<span class='caption'>This rail bridge over Route 9 will allow the CRT to link neighborhoods which have been separated by highway construction.</span>"
}
if (Interval >= 55 && Interval < 61) {
	MainPhoto = "<img src='graphics/t-Natick2.jpg' width=225 alt='Scenic section of trail in Natick' border=1 align='center'>"
	caption = "<span class='caption'>This scenic section of rail line in Natick is expected to become available for trail use.</span>"
}
//END Random image generator

// Array for maps
var Map= new Array()
Map[0]= "<img src='graphics/CRT-map.gif' width=845 alt='Map of the CRT' border=1>";
Map[1]= "<img src='graphics/MetroWest-map.gif' width=766 alt='Map of trails near the CRT' border=1>";

var maplegend = new Array()
maplegend[0] = "Map of the Cochituate Rail Trail.";
maplegend[1] = "Proposed rail trail network for MetroWest.";
// End array for maps

//Open chrome-less window for maps
function presentmap(i)
{
//window.location.reload();
presentmap = window.open( "", "", "width=900,height=700,scrollbars,resizable,screenX=25,screenY=20,left=25,top=20");
presentmap.document.write("<body bgcolor='#F4EAD5'><center><table><tr><td>" + Map[i] + "</center><br><center>" + maplegend[i] + "</td></tr></table></center></body>");
presentmap.document.close();
window.location.reload();
}
//End Open chrome-less window for maps

