// glac_daily_pic()
// 
// shows a random pic
// Copyright Throstur Thorsteinsson, updated by Joe MacGregor, 2004

function glac_daily_pic() {

pic_root = "pictures/";
pic_ext = ".jpg";
num_pics = 9;

pic_list = ["edw_mt_feather$Mt. Feather and Monastery Nunatak, in the Transantarctic Mountains near Taylor Dome, Victoria Land Antarctica#Image courtesy of Ed Waddington@http://www.geophys.washington.edu/People/Faculty/edw/e_waddington.html*314+Ed Waddington!",
"ginny_barnes$The Barnes Ice Tongue, Antarctica#Ginny took this picture while in Antarctica@http://www.geophys.washington.edu/People/Students/ginny/*250+Ginny Catania!",
"throstur_jokulhaup$Skei&eth;ar&aacute;rsandur, Iceland#This picture was taken in January 1997. The outburst flood from Gr&iacute;msv&ouml;tn happened 3 months earlier@http://www.geophys.washington.edu/People/Students/throstho/throstho.html*400+&THORN;r&ouml;stur &THORN;orsteinsson!",
"edw_radar_sled$Taylor Glacier near Finger Mountain, Victoria Land, Antarctica#Ice-penetrating radar survey on blue ice@http://www.geophys.washington.edu/People/Faculty/edw/e_waddington.html*521+Ed Waddington!",
"bo_nwg$Summit, Greenland#Collecting clean snow samples while overwintering at Summit@http://www.geophys.washington.edu/People/Students/bo/*449+Bob Hawley!",
"epettit_ridge_walk$South Cascade Glacier, WA#You could be walking on an ice ridge: opportunities for high school students and teachers@http://faculty.washington.edu/epettit*313+Erin Pettit!",
"ginny_crack_down$Down inside a crevasse near the UpD camp, Antarctica#Ginny took this picture while in Antarctica@http://www.geophys.washington.edu/People/Students/ginny/*326+Ginny Catania!",
"bo_siple$Siple Dome, Antarctica#Measuring temperatures in the 1000-meter deep Siple Dome borehole during a UW/USGS collaborative project (Image by G. Clow/USGS)@http://www.geophys.washington.edu/People/Students/bo/*562+Bob Hawley!",
"ginny_beacon$Beacon Valley, Antarctica#Tony Gades doing radar surveying on a rock glacier@http://www.geophys.washington.edu/People/Students/ginny/*503+Ginny Catania!"];

todays_date = new Date();
pic_num = todays_date.getTime();
pic_num = Math.round(Math.abs(Math.sin(pic_num)) * num_pics);
if (pic_num == num_pics) { 
	pic_num = pic_num - 1;
}
pic_string = pic_list[pic_num];

pic_name = pic_string.substring(0, pic_string.lastIndexOf("$"));
pic_title = pic_string.substring(pic_string.lastIndexOf("$") + 1, pic_string.lastIndexOf("#"));
pic_text = pic_string.substring(pic_string.lastIndexOf("#") + 1, pic_string.lastIndexOf("@"));
person_link = pic_string.substring(pic_string.lastIndexOf("@") + 1, pic_string.lastIndexOf("*"));
pic_width = pic_string.substring(pic_string.lastIndexOf("*") + 1, pic_string.lastIndexOf("+"));
person = pic_string.substring(pic_string.lastIndexOf("+") + 1, pic_string.lastIndexOf("!"));

document.write("<TABLE BORDER=\"0\" BORDERCOLOR=\"blue\" CELLPADDING=\"0\" WIDTH=\"200\"><TR><TD BGCOLOR=\"white\" align=\"center\"><A HREF=\""+person_link+"\"><IMG ALT=\"Refresh to see new pic,\nclick on pic to visit the author\" SRC=\""+pic_root+pic_name+"_small"+pic_ext+"\"></A><BR>");
document.write("<FONT SIZE=\"-1\" COLOR=\"blue\"><B>"+pic_title+".</B></FONT> <FONT SIZE=\"-1\">"+pic_text+".</FONT></TD></TR></TABLE>");

}












































































