
axe.SideBar = function(loc){
	this.id = YAHOO.util.Dom.generateId(this,"sidebar");
	this.HTML = document.createElement("div");
	this.HTML.id = this.id;
	this.HTML.className = "sidebar";	
	this.top = null;
	this.bottom = null;
}

axe.SideBar.prototype.addPanel=function(panel){
	
	if (panel != this.top) {
		
		if (this.bottom) {
			
			this.HTML.removeChild(this.bottom.HTML);
		}
		if (this.top) {
	
			this.bottom = this.top;
			this.HTML.insertBefore(panel.HTML, this.top.HTML);
			
		}
		else {
		
			this.HTML.appendChild(panel.HTML);
		}
	
		this.top = panel;
	}
}
axe.SidePanel = function(inits){

	this.sidebar = inits["sidebar"];

	this.panel = inits["panel"];
	this.id = YAHOO.util.Dom.generateId(this,"sidePanel");
	this.HTML = document.createElement("div");
	this.HTML.id = this.id;
	this.HTML.className = "sidePanelDiv";

}
axe.SidePanel.prototype.close=function() {
	
	if (this == this.sidebar.bottom){
	
		this.sidebar.bottom = null;
	}
	if (this == this.sidebar.top){

		this.sidebar.top = null;
	
	}
	this.HTML.parentNode.removeChild(this.HTML);
	
	//this.panel.sidePanel = null;
}
axe.SidePanelItem = function(id,panel,text,image){
	this.id = id;
	this.HTML.document.createElement("div");
	this.HTML.id = this.id;
	this.image = null;
}
axe.sidePanelClick = new YAHOO.util.CustomEvent("sidePanelClick");

//prototype for imagetaggerpanel

