// JavaScript Document
function toggleOverlay(overlay) {
    overlay.style.visibility = (overlay.style.visibility == "visible")? "hidden" : "visible";
    overlay.style.display = (overlay.style.display == 'block') ? 'none' : 'block';
}

function toggleDisplay(ele) {
    ele.style.display = (ele.style.display == 'block') ? 'none' : 'block';
}

function togglePopup(popup) {
    popup = document.getElementById(popup);
	if(document.all) popup.style.top = (document.body.scrollTop + 50)+"px";
	else popup.style.top = (window.scrollY + 50)+"px"; 
    var overlay = document.getElementById('overlay');
    //toggleOverlay(overlay);
    toggleDisplay(popup);
}


function showEntry(pic) {
	var iframe = document.getElementById("popup_iframe");
        iframe.src = "big/" + pic + ".jpg";
		document.getElementById("caption").firstChild.data = captionArray[pic];
        togglePopup('popup');
}


var captionArray = new Array(
"",
"My photo shows 15 seconds of 22nd Street Caltrain riders' flow. We exit the train, clog at the stairs, then move synchronously upwards in 3 columns (carrying a bike or two). See what stories you can find!",
"I burn about 200 calories each day on my five-mile bike to Stanford. That's 4,000 calories each month, or 30 chocolate-chip cookies. As far as I'm concerned, guilt-free cookies make it all worthwhile.",
"My commute allows me to bond with my son. We ride together and talk about cars, global warming and alternative transportation.",
"Carpool lane at afternoon rush home.",
"On my bike commute to Stanford from Menlo Park, the beautiful fall colors make it a joy to ride my Commute Club bicycle along the many beautiful paths around campus.",
"Every morning my bike ride along Palm Drive refreshes me and prepares me for the day. Working at the Woods Institute for the Environment, I try to walk the walk...or at least bike it!",
"A U shuttle bus pulls up Palm Drive during the early morning hours. The free shuttle, connecting the East Bay with Stanford, saves me a bridge toll and the headache of driving in traffic every day.",
"We are proud to come and work at Stanford everyday! Stanford provides us with so many benefits, doing a clean commute is our way of giving back.",
"Postcard from the San Carlos Screamers...",
"Tickets? No thanks, I quit two years ago.",
"We are all Caltrain-mates from Stanford! We commute together as a group. We make new friends and enjoy free trip every day! (Pictured from left: Lihua ying, Xiaoyuan Ma, Jing Huang, hen Jing, Yong Huang, Hui Xui, Zhuxiong Chen, Yi Chen and Mingming Zhao.)",
"My bike ride to work en route before sunrise - Every Friday at 6:30am a group departs from Mission and 24th in San Francisco. No cost or carbon to get to work and you get an awesome  workout! (Far left Lauren Barnikow in the red long sleeve, left at the back in blue is Catharine Birtley, in orange is Elizabeth Yepsen, at the back with the red sleeves is Ksenya Gusak, in front in light blue is Sarah Bell, and far right at the back in blue is Lisa Haffenreffer.)"
);