/*	---------------------------------------------------------------------

						ボックスレイアウト整列処理
		 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
		本機能を実装するには、以下のjsファイルが必要です。
			・jquery.js
			・heightline.js
	---------------------------------------------------------------------	*/

/*	===============================================
				初期化
	===============================================		*/
var bodyid;

/*	===============================================
		任意列中央の幅調整処理
	===============================================		*/

function adjlistBlock(col_max1,parent1,child1)	{

	if(	(col_max1 == 'undefined')
	||	(col_max1 == 0)
	||	(col_max1 == null)	)		{	col_max1 = 1;	}

//	alert('oK');
	//	選択ボタンの高さ揃え処理
	var tgt1 = '';
	if(child1 != '')	tgt1 = $(parent1 + ' ' + child1);
	else				tgt1 = $(parent1);

	var row_max0 = Math.floor((tgt1.length - 1) / col_max1) + 1;
//	alert($(tgt1).length);

/*	IEでエラー発生。調査中のためコメントアウト		del[100310]
	tgt1.each(function(idx0) {
		var cls0 = '';
		var block0 = '';

		var this0 = $(this);
		alert('max0 = ' + col_max1);
		var col_cnt0 = (idx0 % col_max1) + 1;

		alert('cnt0 = ' + col_cnt0);
		alert('parent1 = ' + parent1);
		var s_str0 = parent1.match('\.|#');
		alert('s_str0 = ' + s_str0);

		var buf0 = parent1.split(s_str0);
		block0 = buf0[1];
//		alert('block0 = ' + block0);

//		block0 = parent1.substr(1,4);
//		alert(block0);
		//	最右列用クラス設定

		if(col_cnt0 == col_max1)	{
			cls0 = 'list-r';
			this0.addClass(cls0);
		}

		//	各列に高さ揃え用クラス設定
		var row_cnt0 = Math.floor(idx0 / col_max1) + 1;


		cls0 = 'heightLine-' + block0 + row_cnt0;		//	idブロックごとで同じrow_cnt0でも異なる名前にするため
		this0.addClass(cls0);

		//	最下段のみクラス設定
		if(row_cnt0 == row_max0)	{
			cls0 = 'list-btm';
			this0.addClass(cls0);
		}

	});
	IEでエラー発生。調査中のためコメントアウト		del[100310]		*/
}
