// JavaScript Document
	function m_LabelButton(trayid)
	{
		this.tray = document.getElementById(trayid);
		this.currentCSS = "CssCurrentLabelButton";
		this.defaultCSS = "CssLabelButton";
		this.buttons = new Array();
		this.commandModal = "relating";
	}

	m_LabelButton.prototype.init = function (){
		if(this.tray){
			this.buttons = this.tray.getElementsByTagName("LI");
			for(var i=0;i<this.buttons.length;i++){
				this.buttons[i].lb=this;
				if(this.buttons[i].command){
					this.commandModal="command";
					this.buttons[i].Click =new Function (this.buttons[i].command);
				}
				this.buttons[i].onclick=function (){
					this.lb.ChangeCurrentLabel(this);
					this.lb.Click(this);
				}
			}
			if(this.buttons.length>1)
			{
				this.buttons[0].lb.Click(this.buttons[0])
			}
		}
	}
	m_LabelButton.prototype.ChangeCurrentLabel = function (sender){
		for(var i=0;i<this.buttons.length;i++){
			this.buttons[i].className=this.defaultCSS;
		}
		sender.className=this.currentCSS;
		return false;
	}
	m_LabelButton.prototype.Click = function (sender){
		if(this.commandModal=="command"){
			sender.Click();
		}else{
			for(var i=0;i<this.buttons.length;i++){
				var _control = document.getElementById(this.buttons[i].relating);
				if(_control){
					if(this.buttons[i]==sender){
						_control.style.display="block";
					}else{
						_control.style.display="none";
					}
				}
			}
		}
	}