request for a small help with javascript
<p>The following code validates the number of days of month depending on the month selected in the form. The month values start from Jan to Dec, days from 1 to 31 and year from 1900 to 2010. I am trying to make a very small change, I want to add the very first option in each of the three drop down boxes, a blank select option or for example a dash. so that the month drop down's first option is - instead of Jan. For this purpose, I'm adding following line in each drop down.</p>

<pre><code>&lt;option value=""&gt; - &lt;/option&gt;
</code></pre>

<p>But by adding this, it does not show the number of days of January and February correctly (it shows 1 day less than it should). This is some javascript problem, but I don't understand what is wrong. I shall be so thankful if you can help me with it.
Here's complete code for HTML, Javascript and php to populate the form.</p>

<pre><code>&lt;?php
$monthOptions = '';
$dayOptions = '';
$yearOptions = '';
 for($month=1; $month&lt;=12; $month++){
    $monthName = date("M", mktime(0, 0, 0, $month));
    $monthOptions .= "&lt;option value=\"{$month}\"&gt;{$monthName}&lt;/option&gt;\n";
} for($day=1; $day&lt;=31; $day++){
    $dayOptions .= "&lt;option value=\"{$day}\"&gt;{$day}&lt;/option&gt;\n";
} for($year=1900; $year&lt;=2010; $year++){
    $yearOptions .= "&lt;option value=\"{$year}\"&gt;{$year}&lt;/option&gt;\n";
}
?&gt;
&lt;html&gt;
&lt;head&gt;
&lt;script type="text/javascript"&gt;

function updateDays()
{
    //Create variables needed
    var monthSel = document.getElementById('month');
    var daySel   = document.getElementById('day');
    var yearSel  = document.getElementById('year');
    var monthVal = monthSel.value;
    var yearVal  = yearSel.value;

    //Determine the number of days in the month/year
    var daysInMonth = 31;
    if (monthVal==2){
        daysInMonth = (yearVal%4==0 &amp;&amp; (yearVal%100!=0 || yearVal%400==0)) ? 29 : 28;
    } else if (monthVal==4 || monthVal==6 || monthVal==9 || monthVal==11) {
        daysInMonth = 30;
    }   
    //Add/remove options from days select list as needed
    if(daySel.options.length &gt; daysInMonth){   //Remove excess days, if needed
        daySel.options.length = daysInMonth;
    } while (daySel.options.length != daysInMonth){   //Add additional days, if needed
        daySel.options[daySel.length] = new Option(daySel.length+1, daySel.length+1, false);
    }   
    return;
}

&lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;
Birthdate:&lt;br /&gt;
&lt;select name="month" id="month" onchange="updateDays();"&gt;
&lt;?php echo $monthOptions; ?&gt;
&lt;/select&gt;

&lt;select name="day" id="day"&gt;
&lt;?php echo $dayOptions; ?&gt;
&lt;/select&gt;

&lt;select name="year" id="year" onchange="updateDays();"&gt;
&lt;?php echo $yearOptions; ?&gt;
&lt;/select&gt;

&lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>Thanks for any help.</p>
