<apex:page id="Page" standardController="Lead" extensions="StartTradingController" sidebar="false" action="{!init}">
	<apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
    <script type="text/javascript">
		function requiredCheck(){
			var val = document.getElementById('Page:mainForm:idDayEdit:idDep').selectedIndex;
			if (val == 0) {
				//「診療科名を選択してください。」
				alert('{!$Label.StartTrading_Alert}');
			}
		}
    </script>
    <style>
    </style>
    <!-- リード 取引の開始 -->
    <apex:sectionHeader title="{!$ObjectType.Lead.Label}" subtitle="{!$Label.StartTrading_Subtitle}"/>
	    <apex:form id="mainForm">
	        <apex:pageMessages />
	        <apex:pageBlock id="idDayEdit" title="" mode="edit" >
		        <apex:pageBlockButtons >
		        	<!-- 取引の開始 -->
		            <apex:commandButton action="{!start}" value="{!$Label.StartTrading_Subtitle}" onclick="requiredCheck();" />
		            <!-- キャンセル -->
		            <apex:commandButton action="{!cancel}" value="{!$Label.StartTrading_Cancel}"/>
		        </apex:pageBlockButtons>
		        <div class="pbSubheader first tertiaryPalette">
                    <span class="pbSubExtra"><span class="requiredLegend"><span class="requiredExampleOuter"><span class="requiredExample">&nbsp;</span></span><span class="requiredText"> = 必填信息</span></span></span><!-- 必須情報 -->
                    <!-- 基本情報 -->
                    <h3>{!$Label.Basic_Information}</h3>
                </div>
                <table>
                	<tr>
                		<td width="100px"></td>
                		<!-- 診療科名 -->
                		<td>{!$Label.Department_Name}</td>
                		<td>
                			<apex:selectList value="{!sltDep}" multiselect="false" size="1" id="idDep" style="width:400px;" >
			                	<apex:selectOptions value="{!depList}" ></apex:selectOptions>
				                <apex:actionSupport event="onchange" onsubmit="" onbeforedomupdate="" action="{!depChange}" rerender="idCon">
				                    <apex:param name="sltD" value="{!sltDep}"/>
				                </apex:actionSupport>
				            </apex:selectList>
		                </td>
	                </tr>
	                <tr>
	                	<td width="100px"></td>
	                	<!-- 担当者 -->
	                	<td>{!$ObjectType.Contact.Label}</td>
	                	<td><apex:selectList value="{!sltCon}" multiselect="false" size="1" id="idCon" style="width:200px;">
				                	<apex:selectOptions value="{!conList}" />
				                </apex:selectList>
				        </td>
	                </tr>
	                <tr>
	                	<td width="100px"></td>
	                	<td>
	                	{!$ObjectType.lead.fields.SI_OppoLeadSec__c.label}
	                	</td>
	                	<td>
	                		<apex:inputField value="{!lead.SI_OppoLeadSec__c}"/>
	                	</td>
	                </tr>
	                 <tr>
	                	<td width="100px"></td>
	                	<!-- 是否SI本部共同推进询价 -->
	                	<td>是否SI本部共同推进询价</td>
	                	<td><apex:inputCheckbox value="{!SI_Flg}" id="SI_Flg" />
				        </td>
	                </tr>
	            </table>
	        </apex:pageBlock>
	    </apex:form>
</apex:page>