
function writeTopBar() {
	topBarHTML = "<div class = 'topbar'>";
// topBarHTML += "<li> </li></table>";
	topBarHTML +="</div>";
	document.write(topBarHTML);
}

function writeLogo() {
			document.write("<img src='/images/banner2.png'alt='logo' name='logo' class='logo'>");
}

function writeTopNavBar() {
	topNavBarHTML = "<div class = 'topnavbar'>"; 
	topNavBarHTML +="<ul class='menu'><li>";
	/*topNavBarHTML +="<a href='/index.html'>Home</a> | ";
	topNavBarHTML +="<a href='/contact.html'>Contact Us</a> | ";
	topNavBarHTML +="<a href='/help.html'>Help</a> | ";
	topNavBarHTML +="<a href='/diary/index.html'>Village Diary</a> | ";
	topNavBarHTML +="<a href='/latestnews.html'>Latest News</a> | ";
	topNavBarHTML +="<a href='/sheeringnews.html'>Sheering News</a> | ";
	topNavBarHTML +="<a href='/history.html'>History</a> | ";*/
	topNavBarHTML +="</li></ul>";
	topNavBarHTML +="</div>";
	document.write(topNavBarHTML);
}

function writeBotNavBar() {
	botNavBarHTML = "<div class = 'botnavbar'>";
	botNavBarHTML +="<ul class='menu'><li>";
	botNavBarHTML +="<a href='/contact/'>Contact Us</a> | ";
	/*botNavBarHTML +="<a href='/contactus.html'>Contact</a> | ";
	botNavBarHTML +="<a href='/faqs.html'>FAQS</a> | ";
	botNavBarHTML +="<a href='/localvillages.html'>Links</a>";*/
	botNavBarHTML +="</li></ul>";
	botNavBarHTML +="</div>";
	document.write(botNavBarHTML);
}


function writeSideMenu() {
	sideMenuHTML = "<div class = 'sidenavbar'>"; 
	sideMenuHTML +="<ul  class='menu'>";
	sideMenuHTML +="<li><a href='/index.html'>Home</a></li>";	
	sideMenuHTML +="<li><a href='/admissions/'>Admissions</a></li>";	
	sideMenuHTML +="<li><a href='/aboutus'>About Us</a></li>";
	sideMenuHTML +="<li><a href='/classes/'>Class Pages</a></li>";
	sideMenuHTML +="<li><a href='/clubs/'>Clubs</a></li>";
	sideMenuHTML +="<li><a href='/communications'>Communications</a></li>";
	sideMenuHTML +="<li><a href='/contact/'>Contact Us</a></li>";
	sideMenuHTML +="<li><a href='/curriculum/'>Curriculum</a></li>";
	sideMenuHTML +="<li><a href='/diary/'>Diary</a></li>";
	sideMenuHTML +="<li><a href='/documents/'>Documents</a></li>";
	sideMenuHTML +="<li><a href='/familyinformation/'>Family Information</a></li>";
	sideMenuHTML +="<li><a href='/fundraising/'>Fundraising</a></li>";
	sideMenuHTML +="<li><a href='/governors/'>Governors</a></li>";
	sideMenuHTML +="<li><a href='/history/'>History</a></li>";
	sideMenuHTML +="<li><a href='/more/'>More News</a></li>";
	sideMenuHTML +="<li><a href='/opportunities'>Job Opportunities</a></li>";
	sideMenuHTML +="<li><a href='/pupilparentvoice'>Pupil & Parent Voice</a></li>";
	
	/*sideMenuHTML +="<li><a href='/locallinks.html'>Local Links</a></li>";
	sideMenuHTML +="<li><a href='/notforprofit.html'>Not for Profit Orgs</a></li>";
	sideMenuHTML +="<li><a href='/publictransport.html'>Public Transport</a></li>";
	sideMenuHTML +="<li><a href='/history.html'>Sheering History</a></li>";
	sideMenuHTML +="<li><a href='/sheeringnews.html'>'Sheering News' </a></li>";
	sideMenuHTML +="<li><a href='/school'>Sheering School </a></li>";
	sideMenuHTML +="<li><a href='/villagehall.html'>Village Hall</a></li>";
	sideMenuHTML +="<li><a href='/waste.html'>Waste & Recycling</a></li>";
	sideMenuHTML +="<li><a href='/usefulcontacts.html'>Useful Contacts </a></li>";
	sideMenuHTML +="<li><a href='/http://www.weather.co.uk'>Weather</a></li>";	
	sideMenuHTML +="<li><a href='/whatson.html'>What's On</a></li>";
	sideMenuHTML +="<li><a href='/wherearetheynow.html'>Where Are They Now?</a></li>";*/

	sideMenuHTML +="</li></ul>";
	sideMenuHTML +="</div>";

	document.write(sideMenuHTML);
}

function Toggle(menuItem) {		
   obj=document.getElementById(menuItem);
   visible=(obj.style.display!="none")
   key=document.getElementById("x" + menuItem);
   if (visible) {
     obj.style.display="none";
     key.innerHTML="[+]";}
	 else {
      obj.style.display="block";
      key.innerHTML="[-]";
   } 
}
var menu1 = 'products';
function dhtmlSideMenu() {
	sideMenuHTML ="<div class='menu'>";
	alert(menu1);
	sideMenuHTML +="<b><a ID='xproducts' href='javascript:Toggle(" + menu1 + ");'>[+]</a> Products</b><br>";
	sideMenuHTML +="<div ID='products' style='display:none;'>"  
	sideMenuHTML +="<a href='prodlist.html'>Product List</a>Product List<br>";
	sideMenuHTML +="<a href='order.html'>Order Form</a><br>";
	sideMenuHTML +="<a href='pricelist.html'>Price List</a><br>";
	sideMenuHTML +="</div>";

	sideMenuHTML +="</div>";
	document.write(sideMenuHTML);

}

function writeBackButton() {
	backbuttonHTML ="<p class = 'centre'><div class = 'backbutton'><table><tr>";
	backbuttonHTML +="<td><input type='button' name='Main Page' value='Main Page' onClick=window.location.href='../index.html'></td>";
	backbuttonHTML +="</tr></table><div></p>";
	document.write(backbuttonHTML);
}

function writeOrderButtons() {
	orderbuttonsHTML ="<p class = 'centre'><table><tr>";
	orderbuttonsHTML +="<td><input type='button' value='Add to Order' onclick='addToOrder()'></td>";
	orderbuttonsHTML +="<td><input type='button' name='View Order' value='View Order' onClick=window.location.href='/orderform.html'></td>";
	orderbuttonsHTML +="<td><input type='button' name='Main Page' value='Main Page' onClick=window.location.href='../../index.html'></td>";
	orderbuttonsHTML +="</tr></table></p>";
	document.write(orderbuttonsHTML);
}

function click(e) {
	if (document.all) { 
		if(event.button==2||event.button==3) {
			alert("Button disabled !")  ; return false;
		}
	}
	if (document.layers) {
		if (event.button == 3) {
			alert("Button disabled !")  ;return false;
		}
	}
}

function writeStopClick(){
	if (document.layers) {document.captureEvents(Event.mousedown);}				 
	document.onmousedown=click;
}

function writeSSI(){

}


function writeBasicPage(){
//	writeTopBar();
	writeLogo(0);	
	writeTopNavBar();
  writeSideMenu();
	
//	writeSSI();
//  dhtmlSideMenu();
//writeBotNavBar();
}


