			<form id="staby" name="staby" method="post" action="statistics.php?client={$pre}&active=4" onSubmit="return checkStabyForm()">
			<div class="f_l" style="vertical-align:middle; height:25px; line-height:25px;">Statistics For:</div>
			<div class="statisticby">
					<select name="act" id="act">
					  <option value="ready">==Statistics By==</option>
					  <!--{if $act eq 'QP'}-->
		<option value="QP" selected="selected">Qualified Percentage</option>       <!--{else}-->
					  <option value="QP">Qualified Percentage</option>       
					  <!--{/if}-->
					  <!--{if $act eq 'QD'}-->
		<option value="QD" selected="selected">Qualified Details</option>
					  <!--{else}-->
					  <option value="QD">Qualified Details</option>
					  <!--{/if}-->
					  <!--{if $act eq 'TD'}-->
		<option value="TD" selected="selected">Top Defects</option>
					  <!--{else}-->
					  <option value="TD">Top Defects</option>
					  <!--{/if}-->
					</select>
					
					 	<select name="tbFactoryID" id="tbFactoryID">
                            <option value=''>====Select Factory====</option>
							<!--{if $tbFactoryID eq ''}-->
							<option value='' selected="selected">All Factory</option>
							<!--{else}-->
							<option value=''>All Factory</option>
							<!--{/if}-->
                           <!--{foreach from=$factory_list item=factory }-->
                            	<!--{if $tbFactoryID eq $factory.tbCompanyID}-->
							<option value='{$factory.tbCompanyID}' selected="selected">{$factory.tbNickName}</option>
								<!--{else}-->
								<option value='{$factory.tbCompanyID}'>{$factory.tbNickName}</option>
								<!--{/if}-->
                           <!--{/foreach}-->
                        </select>
			
                          <select name="pro_select" id="pro_select">
                            <option value=''>====Select Product====</option>
						   <!--{if $pro_select eq ''}-->
							<option value='' selected="selected">All Products</option>
						   <!--{else}-->
						   <option value=''>All Products</option>
						   <option value='{$pro_select}' selected="selected">{$pro_select}</option>
						   <!--{/if}-->
                           <!--{foreach from=$products_list item=pro }-->
                            <option value='{$pro.tbProductName}'>{$pro.tbProductName}</option>
                           <!--{/foreach}-->
                          </select>
			  <select name="start_year" id="start_year">
				  <!--{if $start_year eq ''}-->
				  <option value="{date('Y')}">{date('Y')}</option>
				  <!--{else}-->
				  <option value="{$start_year}" selected="selected">{$start_year}</option>
				  <!--{/if}-->
				  {section name=loop loop="2031" start="2010"}
				  <option value="{$smarty.section.loop.index}">{$smarty.section.loop.index}</option>
				  {/section}
			  </select>
              -
              <select name="start_month" id="start_month">
                  <!--{if $start_month eq ''}-->
				  <option value="{date('n')}">{date('n')}</option>
				  <!--{else}-->
				  <option value="{$start_month}" selected="selected">{$start_month}</option>
				  <!--{/if}-->
                  {section name=loop loop="13" start="1"}
				  <option value="{$smarty.section.loop.index}">{$smarty.section.loop.index}</option>
				  {/section}
              </select>
              -
              <select name="start_day" id="start_day">
                  <!--{if $start_day eq ''}-->
				  <option value="1">1</option>
				  <!--{else}-->
				  <option value="{$start_day}" selected="selected">{$start_day}</option>
				  <!--{/if}-->
                  {section name=loop loop="32" start="1"}
				  <option value="{$smarty.section.loop.index}">{$smarty.section.loop.index}</option>
				  {/section}
              </select>
              ~
              <select name="end_year" id="end_year">
                  <!--{if $end_year eq ''}-->
				  <option value="{date('Y')}">{date('Y')}</option>
				  <!--{else}-->
				  <option value="{$end_year}" selected="selected">{$end_year}</option>
				  <!--{/if}-->
				  {section name=loop loop="2030" start="2010"}
				  <option value="{$smarty.section.loop.index}">{$smarty.section.loop.index}</option>
				  {/section}
              </select>
              -
              <select name="end_month" id="end_emonth">
				  <!--{if $end_month eq ''}-->
				  <option value="{date('n')}">{date('n')}</option>
				  <!--{else}-->
				  <option value="{$end_month}" selected="selected">{$end_month}</option>
				  <!--{/if}-->
                  {section name=loop loop="13" start="1"}
				  <option value="{$smarty.section.loop.index}">{$smarty.section.loop.index}</option>
				  {/section}
              </select>
              -
              <select name="end_day" id="end_day">
				  <!--{if $end_day eq ''}-->
				  <option value="31">31</option>
				  <!--{else}-->
				  <option value="{$end_day}" selected="selected">{$end_day}</option>
				  <!--{/if}-->
                  {section name=loop loop="32" start="1"}
				  <option value="{$smarty.section.loop.index}">{$smarty.section.loop.index}</option>
				  {/section}
              </select>　
              <input type="submit" name="Submit" value="GO"> 
			  </div>
			</form>