function quoteOfTheDay()
{
	quotes = new Array("Dont Worry; This page is just an illusion", "Colour is just a pigment of your imagination", "What if everything is an illusion and nothing exists?", "Official truths are often powerful illusions", "Life is full of obstacle illusions.", "If it weren\'t for our illusions we\'d live; free from deceptions, and free from any interests", "Show me a man who claims he is objective and I'll show you a man with illusions.", "Attachment is the great fabricator of illusions; reality can be attained only by someone who is detached", "It is respectable to have no illusions - and safe - and profitable, and dull", "Experience teaches us at the expense of our illusions", "Politics is a pendulum whose swings between anarchy and tyranny are fueled by perpetually rejuvenated illusions.");
	return quotes[Math.floor(Math.random()*quotes.length)];
	//return quotes[quotes.length - 1] //i was checking if the last one was too long - it is a bit as are a bunch of others :D (oh well)
}

function startPage()
{
	beginStr = "<table cols=3 border=0 cellspacing=0 cellpadding=0 margin=0 width=100%>\n"
	+ "	<!--space at the top of the screen-->\n"
	+ "	<tr height=10px>\n"
	+ "	</tr>\n"
	+ "	\n"
	+ "	<!--heading area-->\n"
	+ "	<tr height=149px>\n"
	+ "		<!--space at the left edge-->\n"
	+ "		<td width=80px align=right>\n"
	+ "			<img src=\"./images/bannerEdge.gif\"/>\n"
	+ "		</td>\n"
	+ "		<!--banner area-->\n"
	+ "		<!--create a new table to allow text next to image to be nicely positioned-->\n"
	+ "		<td bgcolor=FFFFFF width=100%><table cols=1 border=0 cellspacing=0 cellpadding=0 width=100%>\n"
	+ "			<tr>\n"
	+ "				<td rowspan=2 width=216>\n"
	+ "					<img src=\"./images/eyes.gif\" width=149px/>\n"
	+ "				</td>\n"
	+ "				<td colspan=2>\n"
	+ "					<big>[Optical Illusions] . [com]</big>\n"
	+ "				</td>\n"
	+ "			</tr>\n"
	+ "			\n"
	+ "			<tr>\n"
	+ "				\n"
	+ "			<!-- spaces the subscript a little to the right -->\n"
	+ "				<td width=80px/>\n"
	+ "				\n"
	+ "				<td valign=top>\n"
	+ "					<small>" + quoteOfTheDay() + "</small>\n"
	+ "				</td>\n"
	+ "				\n"
	+ "		</table></td>\n"
	+ "		<!--space at the right edge-->\n"
	+ "		<td width=80px>\n"
	+ "			<img src=\"./images/bannerEdgeR.gif\"/>\n"
	+ "		</td>\n"
	+ "	</tr>\n"
	+ "			\n"
	+ "			<!-- content & links area -->\n"
	+ "			<tr>\n"
	+ "				<!--space on the left edge-->\n"
	+ "				<td/>\n"
	+ "				\n"
	+ "				<!-- new table to seperate content and links on the left-->\n"
	+ "				<td><table cols=2 border=0 cellspacing=0 cellpadding=0 width=100% height=100%>\n"
	+ "					<!--this row just moves everything a little bit away from the banner-->\n"
	+ "					<tr height=6px/>\n"
	+ "					\n"
	+ "					<tr height=16px>\n"
	+ "						<!--links column but not links row (the height of the previous row dictates the distance of the links column from the banner)-->\n"
	+ "						<td\>\n"
	+ "						<!-- content area -->\n"
	+ "						<td width=80% rowspan=2 valign=top>";

	document.write(beginStr);
}

function endPage (active)
{


	pages = new Array("index", "history", "movement", "perspectivel", "perspectivep", "physiological", "cognitive", "aboutUs");
	titles = new Array("Home", "History", "Movement", "Perspective: Line", "Perspective: Pictures", "Physiological", "Cognitive", "About Us");

	var links = "";
	for (i in pages)
	{
		links = links + "								<li><a href=\"" + pages[i] + ".html\"";
		if (active == pages[i])
		{
			links = links + " id=\"active\"";
		}
		links = links + "\">" + titles[i] + "</a></li>\n";
	}

	endStr = "						</td>\n"
	+ "					</tr>\n"
	+ "					<tr height=*>\n"
	+ "						<!-- links area -->\n"
	+ "						<td valign=top align=left/>\n"
	+ "							<ul>\n"
	+ links
	+ "							</ul>\n"
	+ "						</td>\n"
	+ "					</tr>\n"
	+ "				</table></td>\n"
	+ "				\n"
	+ "				<!--space on the right edge-->\n"
	+ "				<td width=80px/>\n"
	+ "			</tr>\n"
	+ "			\n"
	+ "			<!-- spacing at the bottom of the page -->\n"
	+ "			<tr height=10px>\n"
	+ "			</tr>\n"
	+ "			<!--footnote-->"
	+ "			<tr>"
	+ "				<td colspan=2 align=center valign=top>"
	+ "					<h7>Best viewed using <a href=\"http://en-us.www.mozilla.com/en-US/firefox/\">Firefox Web browser</a><br>At a resolution of 1280*1024</h7>"
	+ "				</td>"
	+ "			</tr>"
	+ "		</table>";
	
	document.write(endStr);
}
