function Tab ( element_id, tab_tag_container, tab_delta_id ) {	

	var timer;
	var obj = null;
	var element_id = element_id;

	var use_link = true;
	
	if( tab_delta_id ) this.tab_delta_id = tab_delta_id ;
	if( tab_tag_container ) this.tab_tag_container = tab_tag_container ;
	
	var that = this;

	if( _( element_id ) ) {	 
	    var tab = _( element_id ).getElementsByTagName( this.tab_tag_element );
	    for ( var i = this.tab_delta_id; i < tab.length; i++ ) {
	    	
		if (use_link == false) {
			tab[i].onmouseover = function( e ) {
				obj = this; 
				timer = setTimeout(that.timeCount, this.tab_timeout);
			}
			tab[i].onmouseout = function( e ) {
				clearTimeout(timer)
			}     	
	    
		} else {            

	    tab[i].onclick = function( e ) {
                obj = this;
		var obj_link = obj.getElementsByTagName('a')[0];
		    obj_link.onclick = function (e) {
			return false;
		    }
		that.timeCount();
		return false;
	    }
		}        
	}

		this.timeCount = function () {
			if ( obj ){
				for( var i=that.tab_delta_id; i < tab.length; i++ ) {
					tab[i].className = "";
					_( element_id + that.tab_prefix_link + i ).className = '';
					if( tab_tag_container ) {
						_( element_id + that.tab_block_div + i).style.display = (i == obj.id) ? "block" : "none";
					}
				}

                _( element_id + that.tab_prefix_link + obj.id ).parentNode.className = that.tab_css_current;

				if( !tab_tag_container ) {

					var tabul = _( element_id + that.tab_prefix_ul ).getElementsByTagName( that.tab_tag_container );
					for( var i=that.tab_delta_id; i<tabul.length; i++ ) {
						tabul[i].className = that.tab_css_base;
					}
					tabul[obj.id].className = that.tab_css_base + ' ' + that.tab_css_active;
				}
			}
			            return false;
		}	
	}    
}

Tab.prototype = new Base();