	var sRoot= "http://" + document.domain + "/";
	var sUpURL= "../";
	var bShouldUpBeShown = "True";

	var footerInformation = document.createElement("span");
	footerInformation.setAttribute("class","OnlineInformation");
	footerInformationParagraph = document.createElement("p");
	//Style sheet doesn't seem to apply to align when the paragraph is inserted
	footerInformationParagraph.setAttribute("align","right");
	footerInformation.appendChild(footerInformationParagraph);

	//Setup stylesheet
	var headRef = document.getElementsByTagName("head").item(0);
	linkElement = document.createElement("link");
	linkElement.setAttribute("rel","stylesheet");
	linkElement.setAttribute("type","text/css");
	styleSheetURI = sRoot + "myforeststyle.css";
	linkElement.setAttribute("href", styleSheetURI);

	headRef.appendChild(linkElement);
	
	if (sRoot==document.location)
		bShouldUpBeShown="False";
	else
		if ( document.location=="XML")
			bShouldUpBeShown="False";
		else
			bShouldUpBeShown="True";	


	var bodyRef = document.getElementsByTagName("body").item(0);
	
	if (bShouldUpBeShown=="True")
		var upLink =document.createElement("a");
		upLink.setAttribute("href",  sUpURL);
		var up=document.createTextNode("Up");
		upLink.appendChild(up);

		footerInformationParagraph.appendChild(upLink.cloneNode(true));
					
		var div = document.createElement("div");
		div.setAttribute("class","OnlineInformation");
		div.setAttribute("align","right");
		div.appendChild(upLink);

		bodyRef.insertBefore(div,bodyRef.firstChild);

	//Setup title			
	var titleDiv = document.createElement("div");
	titleDiv.setAttribute("class","MyForest");
	var nestedTitleDiv = document.createElement("div");
	nestedTitleDiv.setAttribute("class","Header");
	titleDiv.appendChild(nestedTitleDiv);

	titleText = document.createTextNode("|"  + document.title + "|");
	nestedTitleDiv.appendChild(titleText);

	bodyRef.insertBefore(titleDiv,bodyRef.firstChild);
	
	if (bShouldUpBeShown=="True")
	
		//Link to home
		homeParagraph = document.createElement("p");
		homeParagraph.setAttribute("align","right");
	
		homeLink = document.createElement("a");
		homeLink.setAttribute("href",sRoot);
		homeLink.setAttribute("title","Home");
	
		homeLinkClone = homeLink.cloneNode(true);
		homeLinkText=document.createTextNode(document.domain);
		homeLink.appendChild(homeLinkText);
	
		homeParagraph.appendChild(homeLinkClone);
	
		//Doesn't do anything visually    homeParagraph.appendChild(document.createTextNode(" "));
	
		homeLinkClone = homeLink.cloneNode(true);
		homeLinkImage=document.createElement("img");
		homeLinkImage.setAttribute("align","top");
		homeLinkImage.setAttribute("border","0");
		homeLinkImage.setAttribute("src",sRoot + "images/home.gif");
		homeLinkClone.appendChild(homeLinkImage);
		homeParagraph.appendChild(homeLinkClone);
	
		footerInformation.appendChild(homeParagraph);
	

		//Link to site info	
		siteParagraph = document.createElement("p");
		siteParagraph.setAttribute("align","right");
		siteParagraph.setAttribute("class","LinkToSiteInfo");
	
		siteLink = document.createElement("a");
		siteLink.setAttribute("href",sRoot + "site/");
		siteLink.setAttribute("title","Information about " + document.domain );
	
		siteLinkText=document.createTextNode("This Site");
		siteLink.appendChild(siteLinkText);
		siteParagraph.appendChild(siteLink);
	
		footerInformation.appendChild(siteParagraph);
	
	
		//Link to Valid HTML and CSS links
		complianceParagraph = document.createElement("p");
		complianceParagraph.setAttribute("align","right");
	
		xhtmlLink = document.createElement("a");
		xhtmlLink.setAttribute("href","http://validator.w3.org/check/referer");
		xhtmlLinkImage=document.createElement("img");
		xhtmlLinkImage.setAttribute("alt","Valid XHTML 1.0");
		xhtmlLinkImage.setAttribute("height","31");
		xhtmlLinkImage.setAttribute("width","88");
		xhtmlLinkImage.setAttribute("border","0");
		xhtmlLinkImage.setAttribute("src","http://www.w3.org/Icons/valid-xhtml10.png");
		xhtmlLink.appendChild(xhtmlLinkImage);
		complianceParagraph.appendChild(xhtmlLink);
	
		cssLink = document.createElement("a");
		cssLink.setAttribute("href","http://jigsaw.w3.org/css-validator/validator?uri=" + styleSheetURI);
		cssLinkImage=document.createElement("img");
		cssLinkImage.setAttribute("alt","Valid CSS");
		cssLinkImage.setAttribute("height","31");
		cssLinkImage.setAttribute("width","88");
		cssLinkImage.setAttribute("border","0");
		cssLinkImage.setAttribute("src","http://jigsaw.w3.org/css-validator/images/vcss");
		cssLink.appendChild(cssLinkImage);
		complianceParagraph.appendChild(cssLink);

		footerInformation.appendChild(complianceParagraph);


	bodyRef.insertBefore(footerInformation, bodyRef.lastChild);

	//document.title = document.title + " - The style of this page defined by the DOM manipulating JavaScript";
