
function writeTopBar() {
	topBarHTML = "<div class = 'topbar'>";
// topBarHTML += "<li> </li></table>";
	topBarHTML +="</div>";
	document.write(topBarHTML);
}

function writeLogo() {
	document.write("<img src='/images/landscapestitch.jpg'alt='sheering' 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='/help.html'>Help</a> | ";
	topNavBarHTML +="<a href='/contact.html'>Contact Us</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><li>";
	/*botNavBarHTML +="<a href='/aboutus.html'>About 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='/contact.html'>Contact Us</a></li>";
	sideMenuHTML +="<li><a href='/diary/'>Diary</a></li>";
	sideMenuHTML +="<li><a href='/latestnews'>Latest News</a></li>";
	sideMenuHTML +="<li><a href='/localbiz'>Local Businesses</a></li>";
	sideMenuHTML +="<li><a href='/localgov'>Local Government</a></li>";
	sideMenuHTML +="<li><a href='/localorgs'>Local Organisations</a></li>";
	sideMenuHTML +="<li><a href='/locallinks'>Local Links</a></li>";
	sideMenuHTML +="<li><a href='/notforprofit'>Not for Profit Orgs</a></li>";
	sideMenuHTML +="<li><a href='/ourvillages'>Our Villages</a></li>";
	sideMenuHTML +="<li><a href='/publictransport'>Public Transport</a></li>";
	sideMenuHTML +="<li><a href='/history'>Sheering History</a></li>";
	sideMenuHTML +="<li><a href='/news'>'Sheering News'</a></li>";
	sideMenuHTML +="<li><a href='/school'>Sheering School </a></li>";
	sideMenuHTML +="<li><a href='/usefulcontacts'>Useful Contacts </a></li>";	
	sideMenuHTML +="<li><a href='/villagehall'>Village Hall</a></li>";	
	sideMenuHTML +="<li><a href='/walks'>Walks</a></li>";
	sideMenuHTML +="<li><a href='/waste'>Waste & Recycling</a></li>";
	sideMenuHTML +="<li><a href='/whatson'>What's On</a></li>";
	sideMenuHTML +="<li><a href='/wherearetheynow'>Where Are They Now?</a></li>";
	sideMenuHTML +="<li><a href='/wildlife'>Wildlife</a></li>";

sideMenuHTML +="</ul></div>";

/*	sideMenuHTML ="<a class='menu' href='/localvillages.html'>Some Useful Links</a>";*/

	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();
}

