<?php include_once( "../../spider.inc.php" ); ?>
{charset:UTF-8}
{template:admin_default.tpl}
{module:member.member.LoadList}
{module:member.member.Select}
{preset:page_title MEMBER_PERSONAL_LABEL . '管理 > ' . MEMBER_PERSONAL_LABEL . '一覧と検索'}

	<div class="panc">
		<a href="../">管理パネルトップ</a>
		&gt; {write:MEMBER_PERSONAL_LABEL}一覧と検索
	</div>

	<h1>{write:MEMBER_PERSONAL_LABEL}管理 &gt; {write:MEMBER_PERSONAL_LABEL}一覧と検索</h1>
	<div style="width:96%;margin:0 auto;text-align:right;">
		<input type="button" value="選択リスト確認" style=""
			onclick="window.location.href='./selected.php'"
		/><input type="button" name="" value="検索結果全メール送信" style=""
			onclick="window.location.href='./mail/form.php?stype=q';"
		/><input type="button" value="新規登録"
			onclick="window.location.href='./member/form.php'"
		/><input type="button" name="" value="CSV登録" 
			onclick="window.location.href='./upload/form.php';"
		/><input type="button" name="" value="CSVダウンロード" 
			onclick="window.location.href='./download/form.php?stype=q';"
		/>
	</div>	
	{if:IS_ERROR}
	<ul class="error">
	{foreach:errors error}
		<li>{write:error}</li>
	{/foreach}
	</ul>
	{/if}
	
	<form name="sform" action="./index.php" method="get">
	<input type="hidden" name="pn" value="{write:member.page_number}" />
	<div style="width:96%;margin:0 auto;">
		検索ワード：<input type="text" name="q" value="{write:member.query}" />
		<input type="button" value="検索" onclick="document.sform.pn.value='1';document.sform.submit();" /><br />
		<select name="mmstf" onchange="document.sform.submit();">
			<option value=""{if:member.statusFlag==''} selected{/if}>削除以外</option>
		{foreach:MEMBER_STATUS_HASH stNum stName}
			<option value="{write:stNum}"{if:strlen(member.statusFlag)>0 && member.statusFlag==stNum} selected{/if}>{write:stName}</option>
		{/foreach}
		</select>
		<select name="mmc" onchange="document.sform.submit();">
			<option value="">全種別</option>
			{foreach:MEMBER_MEMBER_CLASS_HASH classNumber className}
			<option value="{write:classNumber}"{if:strlen(member.memberClass)>0 && member.memberClass==classNumber} selected{/if}>{write:className}</option>
			{/foreach}
		</select>
		&nbsp; <a id="member-detail-search-button" href="javascript:memberSearchChangeDetailView()" style="font-size:x-small;">▼詳細検索条件</a>
	</div>
	
	<!-- 詳細検索条件 -->
	<div id="member-detail-search">
		<div style="width:96%;margin:0 auto;">
			PCメール戻り回数<select name="mretpc">
				<option value="">指定しない</option>
				<option value="1"{if:member.mailReturnPc=='1'} selected{/if}>1回未満</option>
				<option value="2"{if:member.mailReturnPc=='2'} selected{/if}>2回未満</option>
				<option value="3"{if:member.mailReturnPc=='3'} selected{/if}>3回未満</option>
				<option value="5"{if:member.mailReturnPc=='5'} selected{/if}>5回未満</option>
				<option value="10"{if:member.mailReturnPc=='10'} selected{/if}>10回未満</option>
				<option value="u1"{if:member.mailReturnPc=='u1'} selected{/if}>1回以上</option>
				<option value="u2"{if:member.mailReturnPc=='u2'} selected{/if}>2回以上</option>
				<option value="u3"{if:member.mailReturnPc=='u3'} selected{/if}>3回以上</option>
				<option value="u5"{if:member.mailReturnPc=='u5'} selected{/if}>5回以上</option>
				<option value="u10"{if:member.mailReturnPc=='u10'} selected{/if}>10回以上</option>
			</select>
			&nbsp;携帯メール戻り回数<select name="mretmb">
				<option value="">指定しない</option>
				<option value="1"{if:member.mailReturnMobile=='1'} selected{/if}>1回未満</option>
				<option value="2"{if:member.mailReturnMobile=='2'} selected{/if}>2回未満</option>
				<option value="3"{if:member.mailReturnMobile=='3'} selected{/if}>3回未満</option>
				<option value="5"{if:member.mailReturnMobile=='5'} selected{/if}>5回未満</option>
				<option value="10"{if:member.mailReturnMobile=='10'} selected{/if}>10回未満</option>
				<option value="u1"{if:member.mailReturnMobile=='u1'} selected{/if}>1回以上</option>
				<option value="u2"{if:member.mailReturnMobile=='u2'} selected{/if}>2回以上</option>
				<option value="u3"{if:member.mailReturnMobile=='u3'} selected{/if}>3回以上</option>
				<option value="u5"{if:member.mailReturnMobile=='u5'} selected{/if}>5回以上</option>
				<option value="u10"{if:member.mailReturnMobile=='u10'} selected{/if}>10回以上</option>
			</select>
			
			一斉メール配信を<select name="mlhm">
				<option value=""></option>
				<?php for($i=1;$i<=12;$i++) { $request_object->setAttribute('month',$i); ?>
					<option value="{write:month}"
						{if:member.mailSendMonth==month} selected{/if}
						>{write:month}</option>
				<?php } ?>
				</select>ヵ月以内に<select name="mlhc">
				<option value=""></option>
					<option value="sent"
						{if:member.mailSendCondition=='sent'} selected{/if}
						>した</option>
					<option value="nosent"
						{if:member.mailSendCondition=='nosent'} selected{/if}
						>していない</option>
			</select>

			<br />

			<input type="checkbox" name="owner" value="true"
				{if:strlen(member.owner)>0} checked{/if}
				/>自分の登録{write:MEMBER_PERSONAL_LABEL}のみ
			<input type="checkbox" name="correspond" value="true"
				{if:strlen(member.correspond)>0} checked{/if}
				/>要対応のみ
			&nbsp;
			<br />

			登録日&nbsp;&nbsp;<select name="mrsy">
				<option value=""></option>
				<?php for($i=date('Y');$i>date('Y')-5;$i--) { $request_object->setAttribute('year',$i); ?>
					<option value="{write:year}"
						{if:member.start_year==year} selected{/if}
						>{write:year}</option>
				<?php } ?>
				</select>年<select name="mrsm">
				<option value=""></option>
				<?php for($i=1;$i<=12;$i++) { $request_object->setAttribute('month',$i); ?>
					<option value="{write:month}"
						{if:member.start_month==month} selected{/if}
						>{write:month}</option>
				<?php } ?>
				</select>月<select name="mrsd">
				<option value=""></option>
				<?php for($i=1;$i<=31;$i++) { $request_object->setAttribute('day',$i); ?>
					<option value="{write:day}"
						{if:member.start_day==day} selected{/if}
						>{write:day}</option>
				<?php } ?>
				</select>日～<select name="mrey">
				<option value=""></option>
				<?php for($i=date('Y');$i>date('Y')-5;$i--) { $request_object->setAttribute('year',$i); ?>
					<option value="{write:year}"
						{if:member.end_year==year} selected{/if}
						>{write:year}</option>
				<?php } ?>
				</select>年<select name="mrem">
				<option value=""></option>
				<?php for($i=1;$i<=12;$i++) { $request_object->setAttribute('month',$i); ?>
					<option value="{write:month}"
						{if:member.end_month==month} selected{/if}
						>{write:month}</option>
				<?php } ?>
				</select>月<select name="mred">
				<option value=""></option>
				<?php for($i=1;$i<=31;$i++) { $request_object->setAttribute('day',$i); ?>
					<option value="{write:day}"
						{if:member.end_day==day} selected{/if}
						>{write:day}</option>
				<?php } ?>
			</select>日
			<br />
			
			ログイン&nbsp;<select name="mlsy">
				<option value=""></option>
				<?php for($i=date('Y');$i>date('Y')-5;$i--) { $request_object->setAttribute('year',$i); ?>
					<option value="{write:year}"
						{if:member.loginStartYear==year} selected{/if}
						>{write:year}</option>
				<?php } ?>
				</select>年<select name="mlsm">
				<option value=""></option>
				<?php for($i=1;$i<=12;$i++) { $request_object->setAttribute('month',$i); ?>
					<option value="{write:month}"
						{if:member.loginStartMonth==month} selected{/if}
						>{write:month}</option>
				<?php } ?>
				</select>月<select name="mlsd">
				<option value=""></option>
				<?php for($i=1;$i<=31;$i++) { $request_object->setAttribute('day',$i); ?>
					<option value="{write:day}"
						{if:member.loginStartDay==day} selected{/if}
						>{write:day}</option>
				<?php } ?>
				</select>日～<select name="mley">
				<option value=""></option>
				<?php for($i=date('Y');$i>date('Y')-5;$i--) { $request_object->setAttribute('year',$i); ?>
					<option value="{write:year}"
						{if:member.loginEndYear==year} selected{/if}
						>{write:year}</option>
				<?php } ?>
				</select>年<select name="mlem">
				<option value=""></option>
				<?php for($i=1;$i<=12;$i++) { $request_object->setAttribute('month',$i); ?>
					<option value="{write:month}"
						{if:member.loginEndMonth==month} selected{/if}
						>{write:month}</option>
				<?php } ?>
				</select>月<select name="mled">
				<option value=""></option>
				<?php for($i=1;$i<=31;$i++) { $request_object->setAttribute('day',$i); ?>
					<option value="{write:day}"
						{if:member.loginEndDay==day} selected{/if}
						>{write:day}</option>
				<?php } ?>
			</select>日
			
			<br />
		</div>
		<div>
			性別 <select name="msex">
				<option value="">全て</option>
				{foreach:MEMBER_MEMBER_SEX_HASH sex sexLabel}
				<option value="{write:sex}"{if:strlen(member.sex)>0 && member.sex==sex} selected{/if}>{write:sexLabel}</option>
				{/foreach}
			</select>
			&nbsp;
			生年月日&nbsp;<select name="mbsy">
				<option value=""></option>
				<?php for($i=date('Y');$i>1900;$i--) { $request_object->setAttribute('year',$i); ?>
					<option value="{write:year}"
						{if:member.birthStartYear==year} selected{/if}
						>{write:year}</option>
				<?php } ?>
				</select>年<select name="mbsm">
				<option value=""></option>
				<?php for($i=1;$i<=12;$i++) { $request_object->setAttribute('month',$i); ?>
					<option value="{write:month}"
						{if:member.birthStartMonth==month} selected{/if}
						>{write:month}</option>
				<?php } ?>
				</select>月<select name="mbsd">
				<option value=""></option>
				<?php for($i=1;$i<=31;$i++) { $request_object->setAttribute('day',$i); ?>
					<option value="{write:day}"
						{if:member.birthStartDay==day} selected{/if}
						>{write:day}</option>
				<?php } ?>
				</select>日～<select name="mbey">
				<option value=""></option>
				<?php for($i=date('Y');$i>1900;$i--) { $request_object->setAttribute('year',$i); ?>
					<option value="{write:year}"
						{if:member.birthEndYear==year} selected{/if}
						>{write:year}</option>
				<?php } ?>
				</select>年<select name="mbem">
				<option value=""></option>
				<?php for($i=1;$i<=12;$i++) { $request_object->setAttribute('month',$i); ?>
					<option value="{write:month}"
						{if:member.birthEndMonth==month} selected{/if}
						>{write:month}</option>
				<?php } ?>
				</select>月<select name="mbed">
				<option value=""></option>
				<?php for($i=1;$i<=31;$i++) { $request_object->setAttribute('day',$i); ?>
					<option value="{write:day}"
						{if:member.birthEndDay==day} selected{/if}
						>{write:day}</option>
				<?php } ?>
			</select>日
		</div>
		<div style="line-height:1.5em;">
			{foreach:PREFECTURE_HASH pNum pName}
			<span style="white-space:nowrap;"
			><input type="checkbox" name="pref[]" value="{write:pNum}"
				{if:in_array(pNum,member.member.prefectureNumberArray)} checked{/if}
				/>{write:pName}</span>
			{/foreach}
			
		</div>
		<div>
			{foreach:member.extraConditionFormHash key formString}
				{write:formString noescape}
			{/foreach}
		</div>
	</div>
	<div style="width:96%;margin:0 auto;text-align:right;">
		並替項目：<select name="si" onchange="document.sform.submit();">
			<option value="id"{if:member.sort_item=='id'} selected{/if}>ID</option>
			<option value="reg"{if:member.sort_item=='reg'} selected{/if}>登録日</option>
			<option value="handle"{if:member.sort_item=='handle'} selected{/if}>表示名</option>
		</select>
		並順 <select name="so" onchange="document.sform.submit();">
			<option value="asc"{if:preg_match('/^[aA][sS][cC]$/',member.sort_order)>0} selected{/if}>昇順</option>
			<option value="desc"{if:preg_match('/^[dD][eE][sS][cC]$/',member.sort_order)>0} selected{/if}>降順</option>
		</select>
		表示数：<select name="pr" onchange="document.sform.submit();">
			<option value="1"{if:member.page_rows==1} selected{/if}>1</option>
			<option value="5"{if:member.page_rows==5} selected{/if}>5</option>
			<option value="10"{if:member.page_rows==10} selected{/if}>10</option>
			<option value="20"{if:member.page_rows==20} selected{/if}>20</option>
			<option value="50"{if:member.page_rows==50} selected{/if}>50</option>
			<option value="100"{if:member.page_rows==100} selected{/if}>100</option>
		</select>
	</div>
	</form>

	<form name="listform">
	<div style="width:96%;margin:0 auto;">
		{if:member.total_page>1}
			{write:member.total_count}件の検索結果 {write:member.page_number}/{write:member.total_page}ページ {write:count(member.data_array)}件を表示
			&nbsp;
			{if:member.page_number-5>1}...{/if}
			<?php for( $GLOBALS['pageNavi']=($GLOBALS['member.page_number']-5 >= 1 ? $GLOBALS['member.page_number']-5 : 1);
				$GLOBALS['pageNavi']<=$GLOBALS['member.total_page']
					&& $GLOBALS['pageNavi']<=($GLOBALS['member.page_number']-5 >= 1 ? $GLOBALS['member.page_number']-5 : 1)+9;
				$GLOBALS['pageNavi']++ ) { ?>
				{if:trim(pageNavi)!=trim(member.page_number)}
					<a href="javascript:FormerCommon.jumpPage({write:pageNavi})" onmouseover="this.style.color='#0000ff';" onmouseout="this.style.color='#808080';">{write:pageNavi}</a>
				{else}
					{write:pageNavi}
				{/if}
			<?php } ?>
			{if:member.page_number+9 < member.total_page}...{/if}
			&nbsp;
			{if:member.page_number-5>1}<a href="javascript:FormerCommon.jumpPage(1)" onmouseover="this.style.color='#0000ff';" onmouseout="this.style.color='#808080';">最初</a>{/if}
			{if:member.page_number+9 < member.total_page}<a href="javascript:FormerCommon.jumpPage({write:member.total_page})" onmouseover="this.style.color='#0000ff';" onmouseout="this.style.color='#808080';">最後</a>{/if}
			{if:member.has_prev_page}<a href="javascript:FormerCommon.prevPage()" onmouseover="this.style.color='#0000ff';" onmouseout="this.style.color='#808080';">前頁</a>{/if}
			{if:member.has_next_page}<a href="javascript:FormerCommon.nextPage()" onmouseover="this.style.color='#0000ff';" onmouseout="this.style.color='#808080';">次頁</a>{/if}
		{else}
			{write:member.total_count}件の検索結果
		{/if}
	</div>
		
	<table class="list" style="margin:0 auto;width:95%;">
	<tbody>
	<tr class="list">
		<th style="text-align:left;">ID</th>
		<th>ニックネーム</th>
		<th>メール</th>
		<th>対応状況</th>
		<th>現在Pt.</th>
		<th>操作</th>
	</tr>
	{foreach:member.data_array memberObject}
	<tr class="list">
		<td style="text-align:left;">
			<input type="checkbox" name="select_{write:memberObject->'member_id'}" value="{write:memberObject->'member_id'}" onclick="member_selectMemberCheck(this)"
				{if:array_key_exists(memberObject::member_id,member.member.select.selected_hash)} checked{/if}
				/>
			{write:memberObject->'member_id'}
			<div style="font-size:x-small;margin-left:2em;">
				<span class="member_class_{write:memberObject->'member_class'}">{write:MEMBER_MEMBER_CLASS_HASH[memberObject->'member_class']}</span><br />
				[<a href="./member/form.php?mn={write:memberObject->'member_number'}"
				title="クリックして{write:memberObject->'view_name'}さんの登録情報を編集します。">編集</a>]
			</div>
		</td>
		<td>
			<a href="./member/detail.php?mi={write:memberObject->'member_id'}"
			title="クリックして{write:memberObject->'view_name'}さんの詳細情報を閲覧します。"
			>{write:memberObject->'view_name'}</a>
		</td>
		<td>
			<a href="./mail/form.php?mi={write:memberObject->getUniqueId()}">{write:memberObject->'pc_mail'}</a>
			{if:memberObject->'pc_mail_error_count'>0}<span style="font-size:x-small;color:#ff0000;">(エラー戻り:{write:memberObject->'pc_mail_error_count'})</span>{/if}
			<br />
			<a href="./mail/form.php?mi={write:memberObject->getUniqueId()}">{write:memberObject->'mb_mail'}</a>
			{if:memberObject->'mb_mail_error_count'>0}<span style="font-size:x-small;color:#ff0000;">(エラー戻り:{write:memberObject->'mb_mail_error_count'})</span>{/if}
		</td>
		<td>
			{if:strlen(memberObject->'last_correspond_date_year')>0}最終対応日<br />{write:memberObject->'last_correspond_date_year'}年{write:memberObject->'last_correspond_date_month'}月{write:memberObject->'last_correspond_date_day'}日<br />{/if}
			{if:memberObject->'complete_correspond'>0}対応済: {write:memberObject->'complete_correspond'}件<br />{/if}
			{if:memberObject->'remain_correspond'>0}<span style="color:#ff0000;font-weight:bold;">要対応: {write:memberObject->'remain_correspond'}件</span><br />{/if}
		</td>
		<td style="text-align:right;">
			{write:number_format(memberObject->'point')}Pt.
		</td>
		<td style="text-align:left;">
			<select name="member_status_{write:memberObject->'member_id'}"
				onfocus="memberStatusSetPrevSelectIndex(this)"
				onchange="memberStatusChange('{write:memberObject->'member_id'}',this)">
			{foreach:MEMBER_STATUS_HASH stNum stName}
				<option value="{write:stNum}"{if:memberObject->'status_flag'==stNum} selected{/if} class="status_{write:stNum}">{write:stName}</option>
			{/foreach}
			</select><br />
			<a href="./member/bank/form.php?mi={write:memberObject->'member_id'}">銀行口座設定</a><br />
			<a href="./member/reject/form.php?mi={write:memberObject->'member_id'}">メール拒否設定</a><br />
			<a href="./history/login.php?mi={write:memberObject->'member_id'}">ログイン履歴</a><br />
			<a href="./history/point.php?mi={write:memberObject->'member_id'}">ポイント履歴</a><br />
			<a href="./history/correspond.php?mi={write:memberObject->'member_id'}">対応履歴</a><br />
			{foreach:member.existsConnectorHash connectorObject}
				{set:linkArray connectorObject->getMemberLinkArray( request, memberObject )}
				{foreach:linkArray linkStr}
					{write:linkStr noescape}
				{/foreach}
			{/foreach}
		</td>
	</tr>
	{/foreach}
	</tbody>
	</table>

	<div style="width:96%;margin:0 auto;">
		{if:member.total_page>1}
			{write:member.total_count}件の検索結果 {write:member.page_number}/{write:member.total_page}ページ {write:count(member.data_array)}件を表示
			&nbsp;
			{if:member.page_number-5>1}...{/if}
			<?php for( $GLOBALS['pageNavi']=($GLOBALS['member.page_number']-5 >= 1 ? $GLOBALS['member.page_number']-5 : 1);
				$GLOBALS['pageNavi']<=$GLOBALS['member.total_page']
					&& $GLOBALS['pageNavi']<=($GLOBALS['member.page_number']-5 >= 1 ? $GLOBALS['member.page_number']-5 : 1)+9;
				$GLOBALS['pageNavi']++ ) { ?>
				{if:trim(pageNavi)!=trim(member.page_number)}
					<a href="javascript:FormerCommon.jumpPage({write:pageNavi})" onmouseover="this.style.color='#0000ff';" onmouseout="this.style.color='#808080';">{write:pageNavi}</a>
				{else}
					{write:pageNavi}
				{/if}
			<?php } ?>
			{if:member.page_number+9 < member.total_page}...{/if}
			&nbsp;
			{if:member.page_number-5>1}<a href="javascript:FormerCommon.jumpPage(1)" onmouseover="this.style.color='#0000ff';" onmouseout="this.style.color='#808080';">最初</a>{/if}
			{if:member.page_number+9 < member.total_page}<a href="javascript:FormerCommon.jumpPage({write:member.total_page})" onmouseover="this.style.color='#0000ff';" onmouseout="this.style.color='#808080';">最後</a>{/if}
			{if:member.has_prev_page}<a href="javascript:FormerCommon.prevPage()" onmouseover="this.style.color='#0000ff';" onmouseout="this.style.color='#808080';">前頁</a>{/if}
			{if:member.has_next_page}<a href="javascript:FormerCommon.nextPage()" onmouseover="this.style.color='#0000ff';" onmouseout="this.style.color='#808080';">次頁</a>{/if}
		{else}
			{write:member.total_count}件の検索結果
		{/if}
	</div>

	{if:count(member.data_array)==0}
	<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />
	{/if}
	</form>

<style type="text/css">
#member-detail-search {
	width: 96%;
	margin: 0 auto;
	line-height: 2em;
}
.member_class_0 {
	color: #808080;
}
.member_class_1 {
	color: #0080c0;
	font-weight:bold;
}
.member_class_2 {
	color: #e0a030;
	font-weight:bold;
}
.status_0 {
	background-color: #ffe0e0;
}
.status_101 {
	background-color: #e0e0ff;
}
.status_251 {
	background-color: #c0c0c0;
}
.status_255 {
	background-color: #c0c0c0;
}
</style>
<script language="JavaScript" type="text/javascript"><!--
if(window.attachEvent){
	window.attachEvent('onload',memberSearchInit);
}else{
	window.addEventListener('DOMContentLoaded',memberSearchInit,false);
}
function memberSearchInit() {
	memberSearchApplyDetailView();
}
function memberSearchChangeDetailView() {
	var isVisible		= FormerCommon.getCookie('APMSVIEW');
	var detailPanel		= document.getElementById('member-detail-search');
	var buttonObject	= document.getElementById('member-detail-search-button');
	if( detailPanel ) {
		if( isVisible && isVisible == 'true') {
			// 現在表示しているなら隠す
			FormerCommon.setCookie('APMSVIEW','false',60*60*24);
		} else {
			// それ以外なら表示
			FormerCommon.setCookie('APMSVIEW','true',60*60*24);
		}
		memberSearchApplyDetailView();
	}
}
function memberSearchApplyDetailView() {
	var isVisible		= FormerCommon.getCookie('APMSVIEW');
	var detailPanel		= document.getElementById('member-detail-search');
	var buttonObject	= document.getElementById('member-detail-search-button');
	if( detailPanel ) {
		if( isVisible && isVisible == 'true') {
			// 表示
			detailPanel.style.position		= 'static';
			detailPanel.style.display	= 'block';
			detailPanel.style.visibility	= 'visible';
			detailPanel.style.zIndex		= '10';
			if( buttonObject.type && buttonObject.type == 'button' ) {
				buttonObject.value		= '▲詳細条件を隠す';
			} else {
				buttonObject.innerHTML	= '▲詳細条件を隠す';
			}
		} else {
			// 非表示
			detailPanel.style.position		= 'absolute';
			detailPanel.style.display	= 'none';
			detailPanel.style.visibility	= 'hidden';
			detailPanel.style.zIndex		= '-9999';
			if( buttonObject.type && buttonObject.type == 'button' ) {
				buttonObject.value		= '▼詳細検索条件';
			} else {
				buttonObject.innerHTML	= '▼詳細検索条件';
			}
		}
	}
}
var memberStatusHttpObject;
var memberStatusPrevSelectIndex;
function memberStatusSetPrevSelectIndex(selectObject) {
	memberStatusPrevSelectIndex	= selectObject.selectedIndex;
}
function memberStatusChange(memberId,selectObject) {
	if( selectObject.selectedIndex == memberStatusPrevSelectIndex ) {
		return;
	}
	var statusFlag	= selectObject.options[selectObject.selectedIndex].value;
	var statusLabel	= selectObject.options[selectObject.selectedIndex].label;
	if( !statusLabel ) {
		statusLabel	= selectObject.options[selectObject.selectedIndex].text;
	}
	if( confirm('ID [' + memberId +']の状態を[' + statusLabel + ']に変更してよろしいですか？') ) {
		// 変更処理
		var contents	= encodeURIComponent('member_id')+"="+encodeURIComponent(memberId);
		contents	+= '&' + encodeURIComponent('status_flag')+"="+encodeURIComponent(statusFlag);
		memberStatusHttpObject	= FormerCommon.createHttpRequest(memberStatusChangeResult);
		if( memberStatusHttpObject ) {
			FormerCommon.displayGrayOut(9999);
			memberStatusHttpObject.open("POST",'./member/status.php',true);
			memberStatusHttpObject.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
			memberStatusHttpObject.send(contents);
		} else {
			alert('サーバー通信作成に失敗しました!');
		}
	} else {
		selectObject.selectedIndex	= memberStatusPrevSelectIndex;
		selectObject.blur();
	}
}
function memberStatusChangeResult() {
	if ((memberStatusHttpObject.readyState == 4) && (memberStatusHttpObject.status == 200)){
		setTimeout(FormerCommon.displayWhiteIn, 300);
		var lines	= memberStatusHttpObject.responseText.cr2lf().split(LF);
		var result	= '';
		while( result.length == 0 && lines.length > 0 ) {
			result	= lines.shift();
		}
		if( 'OK' == result ) {
			memberStatusPrevSelectIndex	= selectObject.selectedIndex;
			selectObject.blur();
		} else {
			selectObject.selectedIndex	= memberStatusPrevSelectIndex;
			selectObject.blur();
	    	alert(memberStatusHttpObject.responseText);
	    }
	} else if ((memberStatusHttpObject.readyState == 4) && (memberStatusHttpObject.status != 200)){
		setTimeout(FormerCommon.displayWhiteIn, 300);
		selectObject.selectedIndex	= memberStatusPrevSelectIndex;
		selectObject.blur();
		alert('適用時にサーバー通信でエラーが発生しました。');
	}
}
//--></script>