function tabbox_show( tabbox_id_, tab_id_ ){
	var tabbox_elem = js_element( tabbox_id_ );
	var tab_elem = js_element( tab_id_ );
	var height = 0;

	if( !tabbox_elem ){
		alert( "something wrong in tabbox_show" );
		return  ;
	}


	if( js_attribute( tabbox_elem, 'tab_current' ) ){
		var node = js_element( js_attribute( tabbox_elem, 'tab_current' ) );
		node.style['display'] = 'none';

		node = js_element( js_attribute( tabbox_elem, 'tab_current' ) + 'T' );
		if( node ){
//			node.className = 'spanTabN';
			node.className = 'n';
		}
		
//		node = js_element( js_attribute( node, 'tab_title_id' ) );
//		if( !node ){
//			alert( "no node" );
//			return ;
//		}
//		node.style['backgroundColor'] = js_attribute( tabbox_elem, 'tab_color' );
	}
	
//	alert( "Was I here?" );
	js_attribute( tabbox_elem, 'tab_current', tab_id_ );
	tab_elem.style['display'] = 'inline';
	node = js_element( tab_id_ + 'T' );
	if( node ){
//		node.className = 'spanTabS';
		node.className = 's';
		node.blur( );
		
		if( node.childNodes.length ){
			for( var i=0; i < node.childNodes.length; i++){
				node.childNodes[i].blur();
			}
		}
	}

//	node = js_element( js_attribute( tab_elem, 'tab_title_id' ) );
//	node.style['backgroundColor'] = js_attribute( tabbox_elem, 'tab_hi_color' );

	



}

function tabbox_of( tab_id_ ){
	var tab_node = node = js_element( tab_id_ );
	var tab_current, box_node ;
	while( node ){
		tab_current = js_attribute( node, 'tab_current' );
		if( tab_current && ( tab_node != node ) ){
			return node.id ;
		}
		node = node.parentNode ;
	}
	return null;
}


function xhtml_content_open( content_ID_ ){
	var node = js_element( content_ID_ );
	if( !node )
		return ;

	var method = js_attribute( node, 'content_method' );
	var query_str = '';
	if( method == 'URL2HTML' || method == 'URL' ){
		var content_url = js_attribute( node, 'content_url' );
		if( content_url.length ){
			var qindex = content_url.indexOf( '?' );
			if( qindex >= 0 ){
				query_str = content_url.substr( qindex +1, content_url.length );
				content_url = content_url.substr( 0, qindex );
			}
			ajax_post_request( content_url, query_str, '' , node );
		}
		if( method == 'URL2HTML' ){
			js_attribute( node, 'content_method', 'HTML' );
		}
	}

	if( node ){
		node.style['display'] = 'inline';
		js_attribute( node, 'content_opened', 1 );
	}

}
function xhtml_content_close( content_ID_ ){
	var node = js_element( content_ID_ );
	if( node ){
		node.style['display'] = 'none';
		js_attribute( node, 'content_opened', 0 );
	}
}

function xhtml_content_openNclose( content_ID_ ){
	var node = js_element( content_ID_ );
	if( !node )
		return ;
	
	if( js_attribute( node, 'content_opened' ) == 1 ){
		xhtml_content_close( content_ID_ );
	} else{
		xhtml_content_open( content_ID_ );
	}
}

function xhtml_group_open( group_ID_, content_ID_, img_ID_ ){
	
	var group_elem = js_element( group_ID_ );
	var content_elem = js_element( content_ID_ );
	if( !group_elem || !content_elem ){
		return ;
	}
	
	var current_ID = js_attribute( group_elem, 'current_content' );
	if( current_ID != content_ID_ ){
		var old_img = js_attribute( group_elem, 'current_img' );

		xhtml_content_close( current_ID );
		if( old_img ){
			js_image_swap( old_img, 'Off' );
		}

		xhtml_content_open( content_ID_ );
		js_image_swap( img_ID_, 'On' );

		js_attribute( group_elem, 'current_content', content_ID_ );
		js_attribute( group_elem, 'current_img', img_ID_ );
		
	} else{
		xhtml_content_close( current_ID );
		var old_img = js_attribute( group_elem, 'current_img' );
		if( old_img ){
			js_image_swap( old_img, 'Off' );
		}

		js_attribute( group_elem, 'current_content', '' );
		js_attribute( group_elem, 'current_img', '' );

	}
	
	
	return ;

}