function checkForJavascript()
{ 
   document.getElementById('divJavascriptDisabled').style.display = "none";
   document.getElementById('divJavascriptChange').innerHTML = "Javascript is enabled.";
} 


function GenerateBanner(homeRelativePath)
{
	document.write("<div class=\"Banner\">");
	document.write("<div>");
	document.write("<a href=\"" + homeRelativePath + "Default.htm\"><img src=\"" + homeRelativePath + "Images/Logos/SJANegative3D-60.gif\" alt=\"St John Ambulance Buckinghamshire\" width=\"196\" height=\"83\" border=\"0\" /></a>");
	document.write("</div>");
	document.write("<div id=\"BannerNav\">");
	document.write("<ul>");
	document.write("<li class=\"FirstLink\"><a href=\"" + homeRelativePath + "Default.htm\">Home</a></li>");
	document.write("<li><a href=\"" + homeRelativePath + "Events/2011/Default.htm\">Santa Dash 2011</a></li>");
	document.write("<li><a href=\"" + homeRelativePath + "FAQs/Default.htm\">FAQs</a></li>");
	document.write("<li><a href=\"" + homeRelativePath + "Downloads/Default.htm\">Downloads</a></li>");
	document.write("<li><a href=\"" + homeRelativePath + "TheCharities/Default.htm\">The Charities</a></li>");
	document.write("<li><a href=\"" + homeRelativePath + "PhotoGallery/Default.htm\">Photo Gallery</a></li>");
	document.write("<li><a href=\"" + homeRelativePath + "LatestNews/Default.htm\">Latest News</a></li>");
	document.write("<li><a href=\"" + homeRelativePath + "ContactUs/Default.htm\">Contact Us</a></li>");
	document.write("</ul>");
	document.write("</div>");
	document.write("</div>");
	document.write("<div id=\"Search\">");
	document.write("<div id=\"SubNav\">");
	document.write("<h2 class=\"FirstLink\"><font color=\"white\">St John Ambulance<br />Buckinghamshire and Milton Keynes</font></h2>");
	document.write("</div>");
	document.write("</div>");
}

function GenerateFooter()
{
    document.write("<hr />");
    document.write("<table class=\"FooterTable\">");
    document.write("<tr>");
    document.write("<td>");
    document.write("<small>");
    document.write("Registered Charity No. 1077265/1.  A company registered in England no. 3866129.");
    document.write("<br/>");
    document.write("Registered office: St John's Gate, Clerkenwell, London EC1M 4DA");
    document.write("<br/>");
    document.write("Copyright &copy;2010 St John Ambulance - Buckinghamshire.");
    document.write("<br/>");
    document.write("Please read our <a href=\"http://www.sja.org.uk/sja/system-pages/legal.aspx\">legal and site information</a> ");
    document.write("and <a href=\"http://www.sja.org.uk/sja/system-pages/legal/privacy-policy.aspx\">privacy policy</a>.");
    document.write("<br/>");
    document.write("</small>");
    document.write("</td>");
    document.write("</tr>");
    document.write("</table>");
}

function GeneratePDFReaderFooter(homeRelativePath)
{   
    document.write("<br/>");
    document.write("<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\"");
    document.write("<tr>");
    document.write("<td align=\"center\">");
    document.write("<a href=\"http://www.adobe.com/uk/products/acrobat/readstep2.html\" target=\"_blank\">");
    document.write("<img src=\"" + homeRelativePath + "Images/Icons/get_adobe_reader.gif\" alt=\"Download Adobe Acrobat (PDF) Reader\" width=\"88\" height=\"31\" border=\"0\"/>");
    document.write("</a>");
    document.write("</td>");
    document.write("</tr>");
    document.write("<tr>");
    document.write("<td align=\"center\">");
    document.write("<small>");
    document.write("<a href=\"http://www.adobe.co.uk/support/toptech/acrobat/main.html\" target=\"_blank\">Troubleshoot PDF problems</a>");
    document.write("</small>");
    document.write("</td>");
    document.write("</tr>");
    document.write("</table>");
}

function GenerateSectionBanner(sectionPathFromhome, caption, id)
{
    document.write("<ul class=\"SectionBanner\">");
    
    if(sectionPathFromhome)
    {
        document.write("<li a id=\"" + id + "\"><a href=\"" + sectionPathFromhome + "\">" + caption + "</a></li>");
    }
    else
    {
        document.write("<li class=\"Title\" id=\"" + id + "\">" + caption + "</li>");
    }
        
    document.write("</ul>");
}

function WriteSpaces(count)
{
	var res = "";

	for (index = 0; index < count; index++)
	{
		res = res + "&nbsp;";
	}

	return res;
}


