function TabStrip(){
	this.name = ""
	this.currentTab = 1
	this.nbrTabs = 0
	this.tabHeight = 40
	this.caption = new Array()
	this.act = new Array()
	this.OnImgPrefix = "On"
	this.OffImgPrefix = "Off"
	this.TopBorderImg = "TopBorder.gif"
    this.CssClassOn = ""
    this.CssClassOff = ""
	this.TabSpacing = 0
	this.FirstTabSpacer = 0
	this.OnFontColor = "black"
	this.OffFontColor = "black"
	this.FileExtension = "gif"

	this.getHTML = function(selected){
		var html = ""

		html += "<table cellpadding=0 cellspacing=0 border=0 width=100% height=" + this.tabHeight + "><tr>"
		if (this.TabSpacing == 0) {
			var n = this.nbrTabs+1
			for (x=1; x < n; x++) {
				if (x == selected-1){
				    html += "<td nowrap><img src='/UINet/UINetImages/WebTabs/" + this.OffImgPrefix + "Left." + this.FileExtension + "'></td><td nowrap background='/UINet/UINetImages/WebTabs/" + this.OffImgPrefix + "BG." + this.FileExtension + "' class='" + this.CssClassOff + "'><a href='#' onclick='setTimeout(\"" + this.name + ".show(" + x + ")\",1);" + this.act[x] + ";return false;'><font color=" + this.OffFontColor + ">" + this.caption[x] + "</font></a>&nbsp;</td>"
				}else if (x == selected){
				html += "<td nowrap><img src='/UINet/UINetImages/WebTabs/" + this.OnImgPrefix + "Left." + this.FileExtension + "'></td><td nowrap background='/UINet/UINetImages/WebTabs/" + this.OnImgPrefix + "BG." + this.FileExtension + "' class='" + this.CssClassOn + "'><font color=" + this.OnFontColor + ">" + this.caption[x] + "</font></td><td nowrap><img src='/UINet/UINetImages/WebTabs/" + this.OnImgPrefix + "Right." + this.FileExtension + "'></td>"
				}else if(x == selected + 1){
				html += "<td nowrap background='/UINet/UINetImages/WebTabs/" + this.OffImgPrefix + "BG." + this.FileExtension + "' align=center class='" + this.CssClassOff + "'>&nbsp;<a href='#' onclick='setTimeout(\"" + this.name + ".show(" + x + ")\",1);" + this.act[x] + ";return false;'><font color=" + this.OffFontColor + ">" + this.caption[x] + "</font></a></td><td nowrap><img src='/UINet/UINetImages/WebTabs/" + this.OffImgPrefix + "Right." + this.FileExtension + "'></td>"
				}else{
				html += "<td nowrap><img src='/UINet/UINetImages/WebTabs/" + this.OffImgPrefix + "Left." + this.FileExtension + "'></td><td nowrap background='/UINet/UINetImages/WebTabs/" + this.OffImgPrefix + "BG." + this.FileExtension + "' class='" + this.CssClassOff + "'><a href='#' onclick='setTimeout(\"" + this.name + ".show(" + x + ")\",1);" + this.act[x] + ";return false;'><font color=" + this.OffFontColor + ">" + this.caption[x] + "</font></a></td><td nowrap><img src='/UINet/UINetImages/WebTabs/" + this.OffImgPrefix + "Right." + this.FileExtension + "'></td>"
				}
			}
		} else {
			if (this.FirstTabSpacer > 0){
				html += "<td background='/UINet/UINetImages/WebTabs/" + this.TopBorderImg + "'><img src='/UINet/UINetImages/WebTabs/spacer.gif' height=1 width=" + (this.FirstTabSpacer) + " align=left></td>"
			}
			for (x=1; x < this.nbrTabs+1; x++) {
				if (x == selected){
					//a netscape 4 bug is responsible for the silly background attribute on the left cell
				    html += "<td><img src='/UINet/UINetImages/WebTabs/" + this.OnImgPrefix + "Left." + this.FileExtension + "'></td><td nowrap background='/UINet/UINetImages/WebTabs/" + this.OnImgPrefix + "BG." + this.FileExtension + "' align=center><a href='#' onclick='setTimeout(\"" + this.name + ".show(" + x + ")\",1);" + this.act[x] + ";return false;' class='" + this.name + "OnLink'><font color=" + this.OnFontColor + ">" + this.caption[x] + "</font></a></td><td nowrap><img src='/UINet/UINetImages/WebTabs/" + this.OnImgPrefix + "Right." + this.FileExtension + "'></td>"
				}else{
				    html += "<td><img src='/UINet/UINetImages/WebTabs/" + this.OffImgPrefix + "Left." + this.FileExtension + "'></td><td nowrap background='/UINet/UINetImages/WebTabs/" + this.OffImgPrefix + "BG." + this.FileExtension + "' align=center><a href='#' onclick='" + this.act[x] + ";setTimeout(\"" + this.name + ".show(" + x + ")\",1);return false;' class='" + this.name + "OffLink'><font color=" + this.OffFontColor + ">" + this.caption[x] + "</font></a></td><td nowrap><img src='/UINet/UINetImages/WebTabs/" + this.OffImgPrefix + "Right." + this.FileExtension + "'></td>"
				}
				if (this.TabSpacing > 0){
					html += "<td background='/UINet/UINetImages/WebTabs/" + this.TopBorderImg + "'><img src='/UINet/UINetImages/WebTabs/spacer.gif' height=1 width=" + (this.TabSpacing-1) + " align=left></td>"
				}
			}
			
		}
		html += "<td background='/UINet/UINetImages/WebTabs/" + this.TopBorderImg + "' width=100%><img src='/UINet/UINetImages/WebTabs/" + this.TopBorderImg + "'></td></tr></table>"
	
		return html
	}
	
	this.show = function(selected) {
		var html = ""
		if (selected == null) selected = this.currentTab
		this.currentTab = selected
		
		//save postback variable
		try{
			document.getElementById(this.name + "_Value").value = this.currentTab
		}catch(e){}
		
		//draw tab contents
		document.getElementById(this.name).innerHTML = this.getHTML(selected)
	}
	
	this.click = function(tabNbr) {
		var action = this.name + ".show(" + tabNbr + ");" + this.act[tabNbr]
		setTimeout(action,1)
	}
	
	this.addTab = function(caption,act){
		this.nbrTabs++
		this.caption[this.nbrTabs] = caption
		this.act[this.nbrTabs] = act
	}
	
	this.removeTab = function(nbr){
		for (x=1; x<this.nbrTabs+1;x++){
			if (x >= nbr){
				this.caption[x] = this.caption[x+1]
				this.act[x] = this.act[x+1]
			}
		}
		this.nbrTabs--
	}
}
