
function pagedate()
{//puts the date and time the page was last modified on the page
	document.write("<br>Page last modified:<br>");
	d = new Date(Date.parse(document.lastModified));
	document.write(d);
	document.write("<br>");
	document.write(document.lastModified);
	document.write("<br>");
	
}

function breadcrumbs()
{//creates breadcrumbs
	var url = window.location.toString(); //gets the url
	var dir = url.split("/"); //splits the url into an array, seperated by slashes
	var output = "";
	
	document.write("<br>");
	if (url.search("/stuff/") > 0 || url.search("/pics/") > 0)
	{//if we are in a directory we need to use a different link for home
		document.write("<a href=\"../index.htm\">Home</a>");
	}
	else
	{//if we aren't in a directory we just link to home
		document.write("<a href=\"/index.htm\">Home</a>");
	}
	document.write(" > ");
	
	if (url.search("/stuff/") > 0)
	{//if we are in stuff I wrote then we put that in the trail
		document.write("<a href=\"../stuff.htm\">Stuff I Wrote</a>");
		document.write(" > ");
	}
	else if (url.search("/pics/") > 0)
	{//if we are in pics then put that in the trail
		document.write("<a href=\"../pics.htm\">Pics</a>");
		document.write(" > ");
	}
	
	for (crumb = 0; crumb <= dir.length; crumb++)
	{//go through the parts of the url and find the page name
		if (dir[crumb].search("htm") > 0)
		{//the page name will have htm in it
			output = "<a href=/" + dir[crumb] + ">" + dir[crumb] + "</a>"
			document.write(output);
		}		
	}
	document.write("<br>");
}



