/* Genericized code for tabbed headers element - WY */

function setTab(tabgp,tabid){
	var tabttl = $('#' + tabgp).children().size();
	
	for (i = 1;i <= tabttl; i++){
		$('#' + tabgp + '-' + i + 'b').css( 'display', 'none' );
	};
	$('#' + tabgp + '-' + tabid + 'b').css( 'display', 'inline' ).css( 'visibility', 'visible' );
	
	for (i = 1;i <= tabttl; i++){
		$('#' + tabgp + '-' + i + 'h').removeClass( 'tabh_sel' ).addClass( 'tabh_des' );
	};
	$('#' + tabgp + '-' + tabid + 'h').removeClass( 'tabh_des' ).addClass( 'tabh_sel' );
	
};

function detEmptyWidth(tabgp){
	var tabttl = $('#' + tabgp).children().size();
	var width_exist = 0;
	
	for (i = 1; i <= tabttl; i++){
		width_exist = width_exist + $('#' + tabgp + '-' + i + 'h').outerWidth();
	}
	var width_empty = $('#' + tabgp).width() - width_exist;
	$('#' + tabgp + ' h5:last').css( 'width' , width_empty ); 
};
	
