function togglesidemenu() {
	Ajax.Popup (  );
	var menu=document.getElementById('linkbar');
	var togg=document.getElementById('sidemenubutton');
	var showing=menu.className=='show';
	if(document.all) togg.innerText=showing?'Hide':'Show';
	else togg.textContent=showing?'Show':'Hide';
	menu.className=showing?'hide':'show';
	togg.className=showing?'showbutton':'hidebutton';
}
var Ajax = new Object();
Ajax.popupId = "linkbar";
Ajax.poppedup = false;
Ajax.animate = false;
Ajax.Popup = function() {
	this.animate = true;
	if ( this.poppedup ) this.HidePopup(0);
	else this.ShowPopup(0);
	this.animate = false;
}
Ajax.ShowPopup = function(y) {
	this.element = document.getElementById(this.popupId);
	this.element.style.display = "block";
	height = this.element.clientHeight;
	this.element.style.left = (y - height) + "px";
	for ( var i = 0; i <= 100; i++ ) {
		(function(){
			var step = i;
			setTimeout(function(){
				Ajax.element.style.left = (((step / 100) * height) - height) + "px";
			}, step * 3);
		})();
	}
	this.poppedup = true;
}
Ajax.HidePopup = function(y) {
	this.element = document.getElementById(this.popupId);
	height = this.element.clientHeight;
	for ( var i = 0; i <= 50; i++ ) {
		(function(){
			var step = i;
			setTimeout(function(){
				Ajax.element.style.left = ((((100 - step) / 100) * height) - height) + "px";
			}, step * 2);
		})();
	}
	this.poppedup = false;
}

