<public:component>
<public:attach event="oncontentready" onevent="toolbar_init()" />
</public:component>
<script>
oncontextmenu=onselectstart=function(){return false}
function toolbar_init()
{
var i;
var _Toolbar=element.all.tags("TR")[0].children;
for(i=0;i<_Toolbar.length-1;i++)
{   if(_Toolbar.item(i).apply=="no") continue
	var _htmcode=_Toolbar.item(i).innerHTML;
	var temp="<v:roundrect style='cursor:default;Z-INDEX:10;height:35;width:"+(_Toolbar.item(i).offsetWidth-2)+";padding:1 0 0 1' arcsize='10%'   strokecolor='#F1F2EB' fillcolor='#F0EEE0' strokeweight='1pt'>"+_htmcode+"</v:roundrect>";
	with(_Toolbar.item(i))
	{innerHTML=temp;
	 onmousedown=onclick=T_click;
	 onpropertychange=T_proch;
	}
         if(_Toolbar.item(i).enable=="no")
 		{
		 _Toolbar.item(i).all.tags("img")[0].style.filter="Gray(enabled=true) alpha(opacity=50)";
		}
		else 
		{
		_Toolbar.item(i).all.tags("img")[0].style.filter="Gray(enabled=false) alpha(opacity=80)";
		_Toolbar.item(i).all.tags("img")[0].filters.Gray.enabled=false;
		}
	with(_Toolbar.item(i).all.tags("roundrect")[0])
			{onmouseover=T_mover;
			 onmouseout=T_mout;
			 onmousedown=T_mdown;
			 onmouseup=T_mup;
			} 
		
}
}
function T_mover()
{
if(this.parentElement.enable=="no") return;
this.strokecolor='#666666'; this.fillcolor='#F9F9F5';
this.all.tags("IMG")[0].filters.alpha.opacity="100"
} 
function T_mout()
{
if(this.parentElement.enable=="no") return;
this.strokecolor='#F0EEE0';
this.fillcolor='#F0EEE0';
this.all.tags("IMG")[0].filters.alpha.opacity=80;
}
function T_mdown(){
if(this.parentElement.enable=="no") return;
this.style.padding="3 0 0 3";
this.fillcolor='#E2E1DA';
this.strokecolor='#9D9D92';
}
function T_mup()
{
if(this.parentElement.enable=="no")return;
this.style.padding="1 0 0 1";
this.strokecolor='#CECEC3';
this.fillcolor='#F9F9F5';
}
function T_click()
{
if(this.enable!="no") 
 eval(this.Tonclick)
}
function T_proch()
{
if(/enable/.test(event.propertyName))
  {	
	if(this.enable=="no")
	{
	this.all.tags("img")[0].filters.Gray.enabled=true;
	this.all.tags("img")[0].filters.alpha.opacity=50;
	if(this.all.tags("td").length>1)
	this.all.tags("td")[1].style.color="#ACA899";
	}
	else 
	{
	this.all.tags("img")[0].filters.Gray.enabled=false;
	this.all.tags("img")[0].filters.alpha.opacity=80;
	if(this.all.tags("td").length>1)
	this.all.tags("td")[1].style.color="#000000";
	}
  }
}
</script>