// JavaScript Document
//天使口腔首页标签按钮控制
	function LabelButton(label_button_container,current_style_name)
	//label_button_container 标签按钮容器的ID
	//current_style_name 标签按钮当前效果样式
	{
		this.Container = document.getElementById(label_button_container);
		this.Buttons = new Array();
		this.CurrentStyleName = current_style_name
	}
	LabelButton.prototype.Init = function ()
	//初始化
	{
		if(!this.Container)return false;
		var _buttons = this.Container.getElementsByTagName("a");
		for(var i=0;i<_buttons.length;i++)
		{
			_buttons[i].lb = this;
			this.Buttons.push(_buttons[i]);
			_buttons[i].onclick = function ()
			{
				this.lb.OnClick(this);
			}
		}
	}
	
	LabelButton.prototype.OnClick = function (sender)
	//点击事件
	{
		if(!this.Container)return false;
		for(var i=0;i<this.Buttons.length;i++)
		{
			var _content = document.getElementById(this.Buttons[i].attributes.getNamedItem("relating").value);
			if(sender==this.Buttons[i])
			{
				this.Buttons[i].className = this.CurrentStyleName;
				_content.style.display = "block";
			}else{
				this.Buttons[i].className = ""
				_content.style.display = "none";
			}
		}
	}