function initTop()
{
	if ( IE_VER != 6 )
	{
		replaceInfoHeight();
	}
	replaceTabButton();
}

function replaceInfoHeight()
{
	var titleNode;
	var anchorNode;
	var h;
	var pTop;
	var pBototm;
	var n = 0;
	
	while( titleNode = document.getElementById( 'info_title_' + n ) )
	{
		anchorNode = document.getElementById( 'info_anchor_' + n );
		
		pTop = removeUnit( computedStyle( anchorNode, "paddingTop" ));
		pBototm = removeUnit( computedStyle( anchorNode, "paddingBottom" ));
		
		pTop = em2px( pTop, 12 );			// 12px基準
		pBototm = em2px( pBototm, 12 );		// 12px基準
		
		h = titleNode.offsetHeight > anchorNode.offsetHeight ? titleNode.offsetHeight : anchorNode.offsetHeight;
		h = h - pTop - pBototm;		// 3pxは調整分
		
		titleNode.style.height = ( titleNode.offsetHeight > anchorNode.offsetHeight ? titleNode.offsetHeight : anchorNode.offsetHeight ) + "px";
		
		anchorNode.style.height = h + "px";
		n++;
	}
}

function replaceTabButton()
{
	var wordTabNode = document.getElementById( 'searchwordtab' );
	var menuTabNode = document.getElementById( 'searchmenutab' );
	
	wordTabNode.onclick = function()
	{
		this.style.display = 'inline';
		menuTabNode.style.display = 'block';
		showArea( 'searchword' );
		hideArea( 'searchmenu' );
		return false;
	}
	
	menuTabNode.onclick = function()
	{
		this.style.display = 'inline';
		wordTabNode.style.display = 'block';
		showArea( 'searchmenu' );
		hideArea( 'searchword' );
		return false;
	}
}

addOnloadEvent( initTop );

