var CAT_TABSET = function ( tabs_rows , active_tabs_row ) {
	//this.tabs_rows = tabs_rows;
	this.active_tabs_row = active_tabs_row;
	var tmp_obj, tmp_row;
	this.rows_array = new Array();
	this.tabs_array = new Array();
	for( var k=1; k <= tabs_rows; k++) {
		tmp_row = getElement( 'KB_TABS_tabs_row_' + k );
		if( tmp_row ) {
			this.rows_array[ k ] = tmp_row; 
			var tmp_tabs_array = tmp_row.getElementsByTagName( 'TABLE' );
			for( var i=0; i < tmp_tabs_array.length; i++ ) {
				if( tab_univName = tmp_tabs_array[i].getAttribute( "KB_tab_name_universal" ) ) {
					this.tabs_array[ tab_univName ] = new Array();
					this.tabs_array[ tab_univName ][ "name" ] = tmp_tabs_array[i].getAttribute( "KB_tab_name" );
					this.tabs_array[ tab_univName ][ "obj_container" ] = tmp_tabs_array[i];
					if( tmp_tabs_array[i].className == "active" ) {						
						KB_cur_bookmark = tab_univName;
						this.cur_tab = this.tabs_array[ tab_univName ];
						}
					this.tabs_array[ tab_univName ][ "row_pos" ] = tmp_tabs_array[i].getAttribute( "KB_tabs_row" );
					//tmp_obj = this.tabs_array[ tab_univName ][ "obj_container" ];
					this.tabs_array[ tab_univName ][ "caption_container" ] = getElement( tab_univName + "_caption" );
					}
				}
			}
		}
	}

CAT_TABSET.prototype.loadTab = function ( bokm_id , mark_id , only_set_style ) {
	CAT_cur_bookmark = bokm_id;
	if( this.cur_tab ) {
		this.cur_tab[ "obj_container" ].className = "not_active";
		this.cur_tab[ "obj_container" ].setAttribute( 'previousClassName' , 'not_active' );
		}
	this.tabs_array[ bokm_id ][ "obj_container" ].className = "active";
	this.tabs_array[ bokm_id ][ "obj_container" ].setAttribute( 'previousClassName' , 'active' );
	this.cur_tab = this.tabs_array[ bokm_id ];	

	row_real_pos = this.tabs_array[ bokm_id ][ "row_pos" ];
	if( this.active_tabs_row  && this.active_tabs_row  != row_real_pos ) {
		var tmp_tabs_row_obj;
		for( var k = 1; k <= this.rows_array.length ; k++ ) {
			tmp_tabs_row_obj = this.rows_array[ k ];
			if( tmp_tabs_row_obj ) {
				tmp_real_position = tmp_tabs_row_obj.getAttribute( "KB_TABS_real_position" );
				if( tmp_real_position == row_real_pos ) {
					tmp_tabs_row_obj.className = "tabs_row tabs_row_1";
					}
				else if( row_real_pos > tmp_real_position ) {
					tmp_tabs_row_obj.className = "tabs_row tabs_row_" + ( parseInt( tmp_real_position ) + 1 );
					}
				else {
					tmp_tabs_row_obj.className = "tabs_row tabs_row_" + tmp_real_position;
					}
				this.active_tabs_row = row_real_pos;
				}
			}	
		}
	
	if( !only_set_style ) {
		if( !CAT_CONTENT_OBJ.printContent(  bokm_id , mark_id ) ) document.location.href = "?bookmark_name=" + bokm_id + "&mark_id=" + mark_id;
		}
	return true;	
	}
CAT_TABSET.prototype.showType = function ( bokm_id , show_type ) {
	getElement( bokm_id ).style.display = show_type;
	}