<!--
HTC 页签控制项
作者：星君 donmtt@iname.com
感谢各位使用，有任何建议欢迎来信！
-->

<PUBLIC:COMPONENT>
<PUBLIC:PROPERTY NAME="default" />
<SCRIPT LANGUAGE="JScript">
function open(x) {
	if(event) for(i=0;i<k.length;i++) if(k[i]==event.srcElement) x=i;
	for(i=0;i<k.length;i++) {
		if(i==x) { k[i].style.zIndex=k.length*2+1; childNodes[i+k.length].style.zIndex=k.length*2;
			k[i].style.posTop=0; k[i].style.posLeft=k[i].left-2; k[i].style.padding="5px";
			


			childNodes[i+k.length].style.visibility="visible";
			}else childNodes[i+k.length].style.visibility="hidden"; 




		if(i<x) { k[i].style.zIndex=i*2+1; childNodes[i+k.length].style.zIndex=i*2;}
		if(i>x) { k[i].style.zIndex=i*2-1; childNodes[i+k.length].style.zIndex=i*2-2;}
		if(i<x||i>x) { k[i].style.posTop=2; k[i].style.posLeft=k[i].left; k[i].style.padding="3px";}
		k[i].style.paddingTop="2px";
	}
}
function nothing() { event.returnValue=false;}

var obj, str, chi, k=new Array(), i, j, B, g;

if(hasChildNodes()) {
	if(!style.position||style.position=="static") style.position="relative";
	B=style.background; style.background="transparent"; style.overflow="hidden";
	chi=childNodes.item(0);
	for(i=0;i<childNodes.length;i++)
		if(childNodes[i].nodeName!="frame")
			removeChild(childNodes[i]);
	for(i=0;i<childNodes.length;i++) {
		k[i]=document.createElement("span");
		k[i].style.position="absolute";
		k[i].style.posTop=1; k[i].style.color="black";
		k[i].innerText=childNodes[i].text;
		k[i].style.borderTop="1px solid #333";
		k[i].style.borderLeft="1px solid #333";
		k[i].style.borderRight="1px solid #333";
		k[i].style.padding="4px"; k[i].style.paddingTop="1px";
		k[i].style.background=B; k[i].style.cursor="default";
		k[i].onclick=open; k[i].onselectstart=nothing;
		childNodes[i].style.width=style.posWidth;
		childNodes[i].style.borderTop="1px solid #333";
		childNodes[i].style.borderLeft="1px solid #333";
		childNodes[i].style.borderRight="1px solid #333";
		childNodes[i].style.borderBottom="1px solid #333";
		childNodes[i].style.background=B;
		childNodes[i].style.position="absolute";
		childNodes[i].style.padding="1px";
	}
	for(i in k) {
		insertBefore(k[i], chi);
		if(i>0) { g=2; for(j=0;j<i;j++) g+=k[j].clientWidth+4; k[i].style.posLeft=g;} else k[i].style.posLeft=2;
		k[i].left=k[i].style.posLeft;
		k[i].style.zIndex=i*2+1;
		childNodes[i*2+1].style.height=style.posHeight-k[i].clientHeight-2;
		childNodes[i*2+1].style.posTop=k[i].clientHeight+2;
		childNodes[i*2+1].style.zIndex=i*2;
	}
}

open(0);

</SCRIPT>
</PUBLIC:COMPONENT>