function tab(){

    this.resetData = function() {
        this.sackObj = null;
        this.responseXML = null;
        this.rootPath = "";
        this.text = "";
        this.tabIndex = -1;
        this.subTabs = new Array(); // tab objects
        this.isLoaded = false;
        this.subTabsCurrent = 0;
  	};
  	
    this.reset = function() {
		//this.resetFunctions();
		this.resetData();
	};
	
	this.create = function(text, index) {
	    this.text = text;
	    this.tabIndex = index;
	};
	
	this.createSubTabs = function(numSubTabs) {
	    for(i=0; i<numSubTabs; i++) {
	        this.subTabs[i] = new tab();
	        this.subTabs[i].rootPath = this.rootPath;
	        this.subTabs[i].create("",i);
	    }
	};
	
	this.isSubTabLoaded = function(subTabIdx) {
        if (this.subTabs.length > subTabIdx && this.subTabs[subTabIdx].isLoaded)
            return true;
        return false;
    };
	
    this.isCurrentSubTabLoaded = function() {
        if (this.subTabs.length > this.subTabsCurrent && this.subTabs[this.subTabsCurrent].isLoaded)
            return true;
        return false;
    };
	
	this.docelm = function(str){
		return document.getElementById(str);
	};
  	
  	this.reset();
}