fiscal year related leave calculation
<p>i'm creating a webpage showing the quarterly leaves available for an employee in a company. There is a dropdownlist for selecting the quarter of a financial year(April 1 to March 31).Dropdown contains the 4 quarters present in  the corresponding ongoing finacial year(ie.for the 2012-2013 fiscal year,the dropdown list shows:</p>

<ul>
<li>1/April/2012-30/June/2012(* 1st quarter)  </li>
<li>1/July/2012-30/September/2012(* 2nd quarter)  </li>
<li>1/October/2012-31/December/2012(* 3rd quarter)  </li>
<li>1/January/2013-31/March/2013(* 4th quarter))  </li>
</ul>

<p>when i select 1st quarter it shows the casual leave, sick leave, earned leave of the logged in employee in instantly creating textboxes.casual leave and sick leave added are constant for each quarter.but earned leave is different.earned leave calculated by toalworkedday in that quarter divided by 20.(ie,totalworkeddayinpreviousquarter/20).The quotient is earned leave and the reminder is the balance day.And the balance day is added with the next quarter's worked day when we selecting that quarter.and it continues in each quarters. I need to get the balance day value of each quarter after earned leave calculation of that quarter,in that page in hidden mode.</p>

<p>How can i implement it?</p>
