function ulTab(ul, clsName) {
	this.className = clsName;
	this.ifswitch = false;
	this.tabs = new Array();
	this.divs = new Array();
	ul.className = "shadetabs";
	this.index = 0;
	this.addControl = function(li, div) {
		if (this.tabs.length == 0) {
			li.className = "selected";
			div.style.display = "";
		} else {
			li.className = " ";
			div.style.display = "none";
			// div.style.width="50px";
		}
		var index = this.tabs.length;
		li.onmouseover = function() {
			eval(clsName + ".tabCheck(" + index + ")");
		};
		li.onclick = function() {	eval(clsName + ".ifswitch=false;");
		};
		this.tabs[this.tabs.length] = li;
		this.divs[this.divs.length] = div;

	}
	this.tabCheck = function(index) {
		for ( var i = 0; i < this.tabs.length; i++) {
			if (i == index) {

				this.divs[i].style.display = "";
				this.tabs[i].className = "selected"
			} else {

				this.divs[i].style.display = "none";
				this.tabs[i].className = "";
			}
		}
	}
	this.divSwitch = function(delay) {
		var delayTime = 3000;
		if (delay) {
			delayTime = delay;
		}
		if (this.ifswitch) {
			if (this.index == this.tabs.length)
				this.index = 0;
			this.tabCheck(this.index);
			this.index += 1;

			setTimeout(this.className + ".divSwitch()", delayTime);
		}
	}

	this.ini = function() {

	}
}

