<div class="questionrow">
	<div class="question">Survey</div>
	<div class="answer">
		<input type="hidden" name="id" id="id" value="<?php echo $id; ?>"/>
		<?php
			if($survey_id == "")
				$survey_id = SURVY;
			
			if(SURVYFXD == 'Y')
			{
				echo '<input type="hidden" name="survey_id" id="survey_id" value="'.SURVY.'" />';
				echo SURVYTITLE;
			}
			else
			{
				$common->dropdown('sur_code', 'sur_title', 'custom_survey_master', '', 'sur_title', 'survey_id', $survey_id, 'class="required" onchange="return get_survey_location(this.value, \'location\', \'\');"');
			}
		?>
	</div>
</div>
<div class="clear_form">
</div>
<div class="questionrow">
	<div class="question">Coupons</div>
	<div class="answer">
		<input type="checkbox" name="cupn_chk" id="cupn_chk" value="Y" <?php echo $cupn_chk; ?> onclick="return enc_cupn(this.checked);" />
	</div>
</div>
<div class="clear_form">
</div>
<div class="questionrow">
	<div class="question">Incentive</div>
	<div class="answer">
		<input type="checkbox" name="incentive_chk" id="incentive_chk" value="Y" <?php echo $incentive_chk; ?> onclick="return enc_incentive(this.checked);" />
	</div>
</div>
<div class="clear_form">
</div>
<div class="questionrow">
	<br/>
	<table border="0" cellpadding="0" cellspacing="0" style="width: 100%; line-height: 40px;" id="dataTable" align="center">
		<tr>
			<td class="question_title" width="50%">&nbsp;</td>
			<td class="question_title">&nbsp;</td>
			<td class="question_title" align="center">Fixed</td>
		</tr>
		<tr>
			<td class="question_title">Financial Year</td>
			<td class="question">&nbsp;<select name="fy" id="fy" class="required">
					<option value="">Select</option>
					<?php
						$st_fncl_yr = 2010;
						$no_of_fncl_yr = date("Y")+1;
						for($i=$st_fncl_yr; $i<=$no_of_fncl_yr; $i++)
							echo '<option value="'.substr($i, -2).substr(($i+1), -2).'">'.$i.' - '.($i+1).'</option>';
					?>
				</select>
			</td>
			<td class="question" align="center">
				<input type="checkbox" name="fy_chk" id="fy_chk" value="Y" <?php echo $fy_chk; ?> style="display: none;" />
			</td>
		</tr>
		<tr style="display: none;">
			<td class="question_title">Reimbursement Voucher Prefix</td>
			<td class="question">&nbsp;<input type="text" name="reimbsmnt_vchr" id="reimbsmnt_vchr" value="<?php echo $reimbsmnt_vchr; ?>" />
			</td>
			<td class="question" align="center">
				<input type="checkbox" name="reimbsmnt_vchr_chk" id="reimbsmnt_vchr_chk" value="Y" <?php echo $reimbsmnt_vchr_chk; ?> />
			</td>
		</tr>
		<tr>
			<td class="question_title">Default Location</td>
			<td class="question" id="loc_row">&nbsp;<?php $common->dropdown('loc_code', 'loc_name', 'custom_location', '', 'loc_name', 'location', $location, 'class="required"'); ?></td>
			<td class="question" align="center">
				<input type="checkbox" name="location_chk" id="location_chk" value="Y" <?php echo $location_chk; ?> />
			</td>
		</tr>
		<tr id="cupn_cde_chk_row">
			<td class="question_title">Coupon code is Participant ID</td>
			<td class="question">&nbsp;
				<input type="checkbox" name="cupn_cde_chk" id="cupn_cde_chk" value="Y" <?php echo $cupn_cde_chk; ?> />
			</td>
			<td class="question">&nbsp;</td>
		</tr>
		<tr id="no_of_coupon_row">
			<td class="question_title">No of coupons per participant</td>
			<td class="question">&nbsp;<input type="text" name="no_of_coupon" id="no_of_coupon" value="<?php echo $no_of_coupon; ?>" /></td>
			<td class="question" align="center">
				<input type="checkbox" name="no_of_coupon_chk" id="no_of_coupon_chk" value="Y" <?php echo $no_of_coupon_chk; ?> />
			</td>
		</tr>
		<tr id="cupn_prd_row">
			<td class="question_title">Coupon Validity Period</td>
			<td class="question">&nbsp;<input type="text" name="cupn_prd" id="cupn_prd" value="<?php echo $cupn_prd; ?>" size="7" />
				<select name="prd_type" id="prd_type">
					<option value="">Select</option>
					<option value="1">Days</option>
					<option value="2">Weeks</option>
					<option value="3">Month</option>
					<option value="4">Year</option>
				</select>
				<script>
					select_checked('prd_type', '<?php echo $prd_type; ?>', "");
				</script>
			</td>
			<td class="question" align="center">
				<input type="checkbox" name="cupn_prd_chk" id="cupn_prd_chk" value="Y" <?php echo $cupn_prd_chk; ?> />
			</td>
		</tr>
		<tr id="incentive_amt_row">
			<td class="question_title">Incentive Amount</td>
			<td class="question">&nbsp;<input type="text" name="incentive_amt" id="incentive_amt" value="<?php echo $incentive_amt; ?>" style="text-align: right;" />
			</td>
			<td class="question" align="center">
				<input type="checkbox" name="incentive_amt_chk" id="incentive_amt_chk" value="Y" <?php echo $incentive_amt_chk; ?> />
			</td>
		</tr>
		<tr id="incentive_vchr_row" style="display: none;">
			<td class="question_title">Incentive Voucher Prefix</td>
			<td class="question">&nbsp;<input type="text" name="incentive_vchr" id="incentive_vchr" value="<?php echo $incentive_vchr; ?>" />
			</td>
			<td class="question" align="center" style="display: none;">
				<input type="checkbox" name="incentive_vchr_chk" id="incentive_vchr_chk" value="Y" <?php echo $incentive_vchr_chk; ?> />
			</td>
		</tr>
        <tr id="bio_ref_chk_row">
        	<td class="question_title">Bio-Metric Reference Required</td>
            <td class="question">&nbsp;
				<input type="checkbox" name="bio_ref_chk" id="bio_ref_chk" value="Y" <?php echo $bio_ref_chk; ?> />
			</td>
            <td class="question">&nbsp;</td>
        </tr>
        <tr id="sur_cmp_chk_row">
        	<td class="question_title">Survey Completion Required</td>
            <td class="question">&nbsp;
				<input type="checkbox" name="sur_cmp_chk" id="sur_cmp_chk" value="Y" <?php echo $sur_cmp_chk; ?> />
			</td>
            <td class="question">&nbsp;</td>
        </tr>
        <tr id="lab_req_chk_row">
        	<td class="question_title">Lab Request Required</td>
            <td class="question">&nbsp;
				<input type="checkbox" name="lab_req_chk" id="lab_req_chk" value="Y" <?php echo $lab_req_chk; ?> />
			</td>
            <td class="question">&nbsp;</td>
        </tr>
        <!-- added by vidhya on 30/11/17 -->
        <tr id=var_show_chk_row">
        	<td class="question_title">Show Coupon Variables</td>
            <td class="question">&nbsp;
				<input type="checkbox" name="var_show_chk" id="var_show_chk" value="Y" <?php echo $var_show_chk; ?> />
			</td>
            <td class="question">&nbsp;</td>
        </tr>
        
        <!-- added by vidhya on 08/12/17 -->
        <tr id=var_only_std_arm">
        	<td class="question_title">Only Standard Arm</td>
        	<td class="question">&nbsp;
				<input type="checkbox" name="var_std_arm" id="var_std_arm" value="Y" <?php echo $var_std_arm; ?> />
			</td>
        	<td class="question">&nbsp;</td>
        </tr>
	</table>
	<br/>
</div>
<div class="clear_form">
</div>
<div class="questionrow">
	<div style="padding: 5px;" align="center">
		<input type="submit" name="Submit" value="Submit" />
	</div>
</div>
<?php
	echo '<script language="javascript">';
		echo 'get_survey_location("'.$survey_id.'", "location", "'.$location.'");';
	if($fy != "")
		echo 'select_checked("fy", "'.$fy.'", "");';
	if($cupn_chk == "")
	{
		echo '$("#cupn_cde_chk_row").hide();';
		echo '$("#no_of_coupon_row").hide();';
		echo '$("#cupn_prd_row").hide();';
	}
	else
	{
		echo '$("#cupn_cde_chk_row").show();';
		echo '$("#no_of_coupon_row").show();';
		echo '$("#cupn_prd_row").show();';
	}
	if($incentive_chk == "")
	{
		echo '$("#incentive_amt_row").hide();';
		// echo '$("#incentive_vchr_row").hide();';
	}
	else
	{
		echo '$("#incentive_amt_row").show();';
		// echo '$("#incentive_vchr_row").show();';
	}
	echo '</script>';
?>