//2009-11-30 :: M Picton :: Updated numEps from 2 to 8
// modified by H Yeend

if(typeof(epTitles)=="undefined") {
	var epTitles = Array();
	epTitles[0] = "Episode 1 - 'Series introduction'";
	epTitles[1] = "Episode 2 - 'Sustainable &amp; Renewable Solutions'";
	epTitles[2] = "Episode 3 - 'Transport for the 21st Century'";
	epTitles[3] = "Episode 4 - 'Protecting the World's Natural Resources'";
	epTitles[4] = "Episode 5 - 'Green Construction and Design'";
	epTitles[5] = "Episode 6 - 'Sustainable and Renewable Energy Solutions 2'";
	epTitles[6] = "Episode 7 - 'Serving the Next Four Billion'";
	epTitles[7] = "Episode 8 - 'Sustainable and Renewable Solutions'";
	epTitles[8] = "Episode 9 - 'Reducing Emissions'";
	epTitles[9] = "Episode 10 - '(Towards) The Carbon Neutral Company'";
}

if(typeof(numEps)=="undefined") {
	var numEps = 8;
}

if(typeof(isHome)!="undefined" && isHome==1){
	document.write('<p><!-- isHome-->');
	document.write('<a href="ep1.html">View '+epTitles[0]+' &gt;&gt;&gt;</a><br />');
	document.write('<a href="ep2.html">View '+epTitles[1]+' &gt;&gt;&gt;</a><br />');
	document.write('</p>');
} else {
	document.write('<p>');
	
	for(var i=0 ; i<numEps ; i++) {
		if(thisEpisode != i+1){
			if(typeof(epTitles[i])=="undefined") {
				// give default episode title in case it's not been set
				epTitles[i] = "Episode "+(i+1);
			}
			document.write('<a href="ep'+(i+1)+'.html">View  '+epTitles[i]+' &gt;&gt;&gt;</a><br />');
		}
	}
	document.write('</p>');
}