
var begHRdate=[2010, 4, 22];
var endHRdate=[2010, 9, 30];

var wedRteMap=[1,1,1,3,4,5,6,7,8,9,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1];
var wedRteList=[
	[0, "special"],
	[1, "TBD"],
	[2, "Tree"],
	[3, "Edgewood"],
	[4, "Baylands"],
	[5, "S Palo Alto"],
	[6, "Stanford"],
	[7, "St Francis"],
	[8, "Lagunita"],
	[9, "Lagunita (lakeless)"]
];

var actList=[
	[0, "6:10pm","PARC Run route: TBD @Stanford", "monday.htm"],
	[1, "6:30pm","PARC Run interval training @Stanford track", "tuesday.htm"],
	[2, "8:00am","PARC Run marathon training @Sawyer Camp", "saturday.htm"],
	[3, "6:10pm","PARC Run route: Edgewood @Lucie Stern", "wednesday.htm"],
	[4, "6:10pm","PARC Run route: Baylands @Lucie Stern", "wednesday.htm"],
	[5, "6:10pm","PARC Run route: S Palo Alto @Lucie Stern", "wednesday.htm"],
	[6, "6:10pm","PARC Run route: Stanford @Lucie Stern", "wednesday.htm"],
	[7, "6:10pm","PARC Run route: St Francis @Lucie Stern", "wednesday.htm"],
	[8, "6:10pm","PARC Run route: Lagunita @Lucie Stern", "wednesday.htm"],
	[9, "6:10pm","PARC Run route: Lagunita (lakeless) <br>@Lucie Stern", "wednesday.htm"],
	[10, "6:10pm","PARC Run route: Tree<br>@Lucie Stern", "wednesday.htm"],
	[11, "6:10pm","PARC Run route: TBD<br>@Lucie Stern", "wednesday.htm"],
	[12, "6:10pm","PARC Run route: campus @Stanford", "monday.htm"],
	[13, "6:10pm","PARC Run route: dish loop @Stanford", "monday.htm"],
	[14, "2:00am","Daylight Savings Begins", "calendar.htm"],
	[15, "2:00am","Daylight Savings Ends", "calendar.htm"],
	[16, "6:30pm","PARC Run<br>hill repeats<br>@Menlo Park", "thursday.htm"],
	[17, "6:10pm","PARC Run route: TBD<br>@ZombieRunner", "wednesday.htm"]
];
var wedRt=new Array();

function ComposeAct(d, act) {
	return('<div class="item" onmouseover="MOverI(this)" onmouseout="MOutI(this)" onclick="DoItemLink(this, &quot;'+act[3]+'&quot;)"><span style="color:993333">'+act[1]+'</span> '+act[2]+'</div>');
}

function SpecifyPARCalThursdays() {
	var begHRw=GetTheWeek(begHRdate[0],begHRdate[1],begHRdate[2]);
	if (begHRw<minWk) begHRw=minWk;
	var endHRw=GetTheWeek(endHRdate[0],endHRdate[1],endHRdate[2]);
	if (endHRw>maxWk) endHRw=maxWk;
	var  i;
	for (i=begHRw; i<=endHRw; i++) actPARCal[i][4]=ComposeAct((i-1)*7+4, actList[16]);
}

function SpecifyPARCalWedRoutes() {
	InitWedRte();
	SpecifyWedRteChange ([2008, 6, 4],[6,7,3,10,8,6,4,7,0,10,8,4,6,7,3,10,8,4,6,7,3,10,9,5,6,7,3,10,0,9,0]);
	SpecifyWedRteChange ([2009, 1, 7],[7,3,10,9,5,6,7,3,10,9,5,6,7,3,10,8,4,6,7,3,8,10,4,6,7,3,10,8,6,7,4,3,10,8,6,7,4,3,10,8,6,7,5,3,10,9,6,7,3,5,10,9]);
	SpecifyWedRteChange ([2010, 1, 6],[6,7,5,3,10,9,6,7,5,3,10,8,6,7,4,3,10,8,6,7,4,3,17,10,6,8,7,4,3,10,8,6,7,10,3,4,8,6,7,4,3]);
	CompileWedRteInfo();
}

function InitWedRte(){
	var  i;
	for (i=minWk; i<=maxWk; i++) wedRt[i]=11;
}

function SpecifyWedRteChange(startdate, routes){
	var wk, i;
	wk=GetTheWeek(startdate[0],startdate[1],startdate[2]);
	for (i=0; i<routes.length; i++) wedRt[i+wk]=routes[i];
	if (debug) debugA[1]=wedRt[5];
	if (debug) debugA[2]=wedRt[9];
	if (debug) debugA[3]=startdate[0];
	if (debug) debugA[4]=startdate[1];
	if (debug) debugA[5]=startdate[2];
	if (debug) debugA[6]=wk;
	if (debug) debugA[7]=routes.length;
}

function CompileWedRteInfo(){
	var  i;
	for (i=minWk; i<=maxWk; i++) actPARCal[i][3]=ComposeAct((i-1)*7+3, actList[wedRt[i]]);
	i=GetCurrentWeek()
}


function SpecifyPARCalSpecialDays() {
	var i, j, w;
	var actWeek=[
		[1],
		[2, [0, "7:45am","PARC Trail Run carpool","trail2008jun.htm"], [0, "8:15am","PARC Run <b>JUN Trail Run</b>, Purisma Creek Redwoods OSP", "trail2008jun.htm"]],
		[6, [6, "7:45am","PARC Trail Run carpool","trail2008jul.htm"], [6, "8:15am","PARC Run <b>JUL Trail Run</b>, Wunderlich Park", "trail2008jul.htm"]],
		[8, [2, "6:20pm","PARC Run <b>hill repeats</b> @Stanford dish", "tuesday.htm"]],
		[9, [3, 3],[3, "after the run:","<br><b>Pizza Party</b>", "wednesday.htm"],[6, "7:40am","PARC Trail Run carpool","trail2008aug.htm"], [6, "8:15am","PARC Run <b>AUG Trail Run</b>, Portola Redwoods State Park", "trail2008aug.htm"]],
		[12, [2, "6:30pm","PARC Run <b>hill repeats</b> @Stanford dish", "tuesday.htm"]],
		[13, [3, 6],[3, "after the run:","<br><b>Summer BBQ</b>", "wednesday.htm"]],
		[14, [6, "8:00am","PARC Trail Run carpool","trail2008sep.htm"], [6, "8:15am","PARC Run <b>SEP Trail Run</b>, Windy Hill OSP", "trail2008sep.htm"]],
		[19, [0, "7:45am","PARC Trail Run carpool","trail2008oct.htm"], [0, "8:15am","PARC Run <b>OCT Trail Run</b>, Skyline Ridge & Russian Ridge", "trail2009oct.htm"]],
		[22, [6, "7:50am","PARC Trail Run carpool","trail2008nov.htm"], [6, "8:15am","PARC Run <b>NOV Trail Run</b>, Stevens Creek & Fremont Older", "trail2009nov.htm"]],
		[23, [6, "9:00am","<b>PARC 22nd<br>Aniversary Party</b> @Mitchell Park", "aparty.htm"]],
		[28, [0, "7:30am","PARC Trail Run carpool","trail2009dec.htm"], [0, "8:15am","PARC Run <b>DEC Trail Run</b>, Montara Mountain", "trail2009dec.htm"], [1, 12], [1, "7:30pm", "PARC <b>Holiday Party</b> Estrellita, Los Altos","hparty.htm"]],
		[29, [2, "6:30pm","PARC Run <b>holiday intervals</b> xmas tree lane @Lucie Stern", "hintervals.htm"], [3, "6:10pm","PARC Run route: Stanford <b>xmas lights run</b> @Lucie Stern", "wednesday.htm"]],
		[31, [3, "6:10pm","Wed Night Run--Cancelled","wednesday.htm"]],		 
		[36, [6, "7:40am","PARC Trail Run carpool","trail2009feb.htm"], [6, "8:15am","PARC Run <b>FEB Trail Run</b>, Castle Rock","trail2009feb.htm"]],
		[39, [6, 2], [6,"8:30am","local race <b>Juana Run</b>,<br>Palo Alto","http://www.barron.pausd.org/juanarun/"]],
		[40, [0, "8:15am","PARC Run <b>MAR Trail Run</b>, Baylands","trail2009mar.htm"]],
		[43, [0, "8:00am","local race <b>Lifelong Fitness</b>,<br>Stanford","http://www.50plus.org/race.php"]],
		[44, [6, "8:15am","PARC Run <b>APR Trail Run</b>,, Arastradero & Foothills parks","trailrun.htm"]],
		[45, [1, "6:10pm","PARC <b>2009 Spring Raffle</b>","raffle.htm"], [1, 13], [3, "6:10pm","PARC <b>2009 Spring Raffle</b>","raffle.htm"], [3, 3], [6, 2], [6, "9:00am","local race <b>Running of the Bulls</b>, Palo Alto","http://www.bulls5k.com/"]],	
		[47, [2, "6:30pm","PARC <b>2009 Spring Raffle</b>","raffle.htm"], [2, 1]],
		[49, [0, "8:15am","PARC Run <b>MAY Trail Run</b>, Huddart Park & Phleger Estate","trailrun.htm"]],
		[51, [0, "9:00am","local race <b>ILP Race for Literacy</b>,<br>Mountain View","http://www.raceforliteracy.org/"]],
		[53, [3, 10],[3, "after the run:","<br><b>PARC nite at ZombieRunner", "wednesday.htm"],[6, "8:15am","PARC Run <b>JUN Trail Run</b>, Stevens Creek & Fremont Older","trailrun.htm"]],
		[56, [3, 7],[3, "after the run:","<br><b>Pizza Party</b>", "wednesday.htm"]],
		[57, [0, "8:30am","local race <b>Vibha Dream Mile</b>,<br>Mountain View","http://wiki.vibha.org/Dream_Mile:2009_Bayarea_Home"]],
		[59, [0, "8:15am","PARC Run <b>JUL Trail Run</b>, Headlands &<br>Rodeo Beach","trailrun.htm"], [6, 2], [6, "9:00am","local race <b>Run on the Bank</b>, Shoreline Park","http://www.runonbanktnt.org/"]],
		[60, [3, 6],[3, "after the run:","<br><b>Subway Party</b>", "wednesday.htm"]],
		[62, [0, "8:15am","PARC Run <b>AUG Trail Run</b>, Wunderlich Park","trailrun.htm"]],
		[63, [3, 3],[3, "after the run:","<br><b>PARC Summer BBQ</b>", "wednesday.htm"]],
		[67, [6, "8:15am","PARC Run <b>SEP Trail Run</b>, Windy Hill OSP","trailrun.htm"]],
		[72, [0, "8:15am","PARC Run <b>OCT Trail Run</b>, Monte Bello OSP","trailrun.htm"]],
		[75, [0, "8:15am","PARC Run <b>NOV Trail Run</b>,<br>Ed Levin Park to Mission Peak","trailrun.htm"],[6, "9:00am","<b>PARC 23rd<br>Aniversary Party</b>  Alexanders Peers Park, Palo Alto", "aparty.htm"]],
		[77, [0, "9:00am","local race <b>Stanford Home Run 2009</b>,<br>Stanford","http://www.stanfordhabitat.org/#"]],
		[80, [1, 12], [1, "7:00pm", "PARC <b>Holiday Party</b> Stanford Grill","hparty09.htm"],[6, "8:15am","PARC Run <b>DEC Trail Run</b>,<br>El Corte de<br>Madera OSP","trailrun.htm"]],
		[81, [2, "6:30pm","PARC Run <b>holiday intervals</b> xmas tree lane @Lucie Stern", "hintervals09.htm"], [3, "6:10pm","PARC Run route: S Palo Alto <b>xmas lights run</b> @Lucie Stern", "wednesday.htm"]],
		[82, [2, "6:30pm","Tues Night Run--Cancelled","tuesday.htm"]],
		[83, [2, "6:30pm","Tues Night Run--Cancelled","tuesday.htm"],[5, "9:30am","local race <b>New Year's Run</b> Palo Alto Baylands",'http://www.worldrunners.org/dp/?q=node/44']],
		[85, [0, "8:15am","PARC Run <b>JAN Trail Run</b>,<br>Castle Rock SP","trailrun.htm"]],
		[89, [0, "8:15am","PARC Run <b>FEB Trail Run</b>,<br>Grant Ranch","trailrun.htm"]],
		[90, [6, 2], [6, "8:15am","local race <b>Juana Run 2010</b>,<br>Palo Alto",'http://www.barron.pausd.org/juanarun/']],
		[93, [0, "8:15am","PARC Run <b>MAR Trail Run</b>,<br>Arasterdero & Foothill Parks","trailrun.htm"]],
		[96, [6, "8:15am","PARC Run <b>APR Trail Run</b>,<br>Huddart Park & Phleger Estate","trailrun.htm"]],
		[101, [3, 8],[3, "after the run:","<br><b>cinco de mayo party and poker</b>", "wednesday.htm"]],
		[102, [0, "9:00am","local race <b>Running of the Bulls</b>, Palo Alto","http://www.bulls5k.com/"]],
		[103, [0, "9:00am","local race <b>ILP Race for Literacy</b>,<br>Mountain View","http://www.raceforliteracy.org/"]],
		[104, [0, "7:30am","PARC Run <b>MAY Trail Run</b>,<br>Angel Island &<br>Dim Sum","trailrun.htm"]],
		[106, [0, "8:15am","PARC Run <b>JUN Trail Run</b>,<br>Sanborn County Park","trailrun.htm"],[3, 17],[3, "after the run:","<br><b>PARC nite at ZombieRunner</b>", "wednesday.htm"]],
		[108, [3, 6],[3, "after the run:","<br><b>pizza party</b>", "wednesday.htm"]],
		[109, [0, "8:00am","local race <b>2010 Vibha Dream Mile</b>,<br>Mountain View","http://wiki.vibha.org/Dream_Mile:2010_Bayarea_EventInfo"]],
		[111, [0, "8:15am","PARC Run <b>JUL Trail Run</b>,<br>Fremont Older OSP","trailrun.htm"],[0, "after the run:","<br><b>pool party and potluck</b>", "trailrun.htm"]],
		[112, [3, 3],[3, "after the run:","<br><b>sandwich party</b>", "wednesday.htm"]],
		[116, [3, 7],[3, "after the run:","<b>PARC summer BBQ</b>", "wednesday.htm"], [6, 2], [6, "9:00am","local race <b>Baylands Summer Run</b>,<br>Mountain View","http://www.summerrun2010.com/"]],
		[666]
	];
	for (i=0; i<actWeek.length; i++) {
		//w = actWk[i, 0]; l=len
		//for (j=1; j<actWk[i].length; i++) {
		actWk[i]=actWeek[i];
	}
}

