<script>
    function enablemonths(){

	document.getElementById("rowAmount").style.display = "";
}
function disablemonths()
{
    document.getElementById("rowAmount").style.display = "none";
}
</script>
<?php
if($this->SelectPlans->vPlantype=="O")
        {
$display="none";
        }

?>
<div  style="color:green;" >
<?php echo  $this->message; ?>
</div>

<!-- Plan Listing -->
<div class="comm_content_block">
<h3>Edit Listing</h3>
<div class="comm_box">
 <h4>Edit Plan</h4>
 <form name="frmEditPlan" id="frmEditPlan" method="post" action="<?php echo ConfigUrl::base(); ?>index/updateplans/<?php echo $this->SelectPlans->nPlanId ; ?>">
    
     <table border="0" cellpadding="0" cellspacing="0"  class="form_tbls" width="100%" >
 <tr>
        <th valign="top" width="30%"> Plan Name:</th>
        <td>
        <input type="text" class="txt_area" id="txtFname" name="txtFname" value="<?php echo stripslashes($this->SelectPlans->vPlanName);?>"/>
        </td>
</tr>
<tr>
    <th valign="top"> Billing Type:</th>
        <td>
         <input type="radio" id="radPlanPeriodtype" name="radPlanPeriodtype" value="O" <?php if( ($this->SelectPlans->vPlantype=="O")){ echo " CHECKED ";} ?>  onClick="disablemonths();">&nbsp;One Time
	 &nbsp;&nbsp;&nbsp;
         <input type="radio" id="radPlanPeriodtype"  name="radPlanPeriodtype" value="M"  <?php if(($this->SelectPlans->vPlantype=="M")){ echo " CHECKED ";} ?> onClick="enablemonths();">&nbsp;Monthly
        </td>
</tr>
 <tr  id="rowAmount" style="display:<?php echo $display?>">

            <th>Monthly </th>

            <td><select name="months" class="selectbox">
                    <?php for($i=0;$i<25;$i++){  ?>
                    <option value="<?php echo $i; ?>"<?php if( ($this->SelectPlans->vPlanDuration==$i)){ echo " selected ";} ?> ><?php echo $i;  ?></option>
                    <?php }?>
                </select>
            </td>
	</tr>
 <tr>
				<th>Amount (USD) *</th>
			  	<td>
			  		<input name="txtAnnualCharge" class="textbox" type="text" size="10" maxlength="8" value="<?php echo htmlentities($this->SelectPlans->vPlanAmount);?>">
				</td>
</tr>
<tr>
        <th valign="top"> Status:</th>
       <td>
			  		<input type="radio" id="statustype" name="statustype" value="E" <?php if($this->SelectPlans->vPlanStatus=='E' ){echo 'checked';}?>  >&nbsp;ACTIVE
					<input type="radio" id="statustype" name="statustype" value="D" <?php if($this->SelectPlans->vPlanStatus=='D'){echo 'checked';}?> >
					   &nbsp;INACTIVE
				</td>
    </tr>
     <tr>
    <th>&nbsp;</th>
    <td valign="top">
			<input type="button"  value="Back" name="cancel" class="btn_styles" onclick="window.location ='<?php echo ConfigUrl::base()?>index/listPlans'"/>
            <input type="submit"  value="Submit" name="btnProfile" class="btn_styles"/>
    </td>
    </tr>
     </table>
 </form>
 </div>
</div>