function jbtabs(){
		this.createTab=function(id){
			createTab(id);
		};
		function createTab(id){
		var c=document.getElementById(id);
		if(c==undefined||c.className==undefined){
			return;
		}
		className=c.className;
		tabEvent="mouseover";
		if(className=="tabpage"){
			tabEvent="click";
		}
		var ul=c.getElementsByTagName("ul");
		var b=ul[0].getElementsByTagName("li");
//		alert(b.length)
		for(i=0;i<b.length;i++){
			if(i==0){
				selectLi(b[i]);
			}else{
				deSelectLi(b[i]);
			}
			addEvent(b[i],tabEvent,ul[0]);
		}
	}
	function selectLi(li){
		li.setAttribute("class","ui-tabs-selected");
		li.className="ui-tabs-selected";
		v=document.getElementById(li.getAttribute("show"));
		v.setAttribute("class","fragment ui-tabs-panel");
		v.className="fragment ui-tabs-panel";
	}
	function deSelectLi(li){
		li.setAttribute("class","");
		li.className="";
		v=document.getElementById(li.getAttribute("show"));
		if(v==undefined){
			return;
		}
		v.setAttribute("class","fragment ui-tabs-panel ui-tabs-hide");
		v.className="fragment ui-tabs-panel ui-tabs-hide";
	}
	function addEvent(obj,tabEvent,container){
			var boxId=obj.getAttribute("show");
			if( obj.attachEvent ){
 			  obj.attachEvent('on'+tabEvent, function(){showTab(boxId,container)});
			} else {
   			obj.addEventListener(tabEvent, function(){showTab(boxId,container)},false); 
			}
	}
	function showTab(id,container){
			var f=document.getElementById(id);
			var lis=container.getElementsByTagName("li");
			for(i=0;i<lis.length;i++){
				curDivId=lis[i].getAttribute("show");
				if(id==curDivId){
					selectLi(lis[i]);
				}else{
					deSelectLi(lis[i])
				}
			}
	}
};