javascript bug in firefox with string manipulation
<p>I have the following function in javascript. It works in every browser except firefox. There seems to be some problems with the substring keyword in this browser.</p>

<pre><code>function EvalMonthYear() {

    var RawMonth = $.trim( $('#MonthList').val() );
    var SpacePosition = RawMonth.lastIndexOf(' ') + 1;

    var TheYear = $.trim(RawMonth.substring(SpacePosition, RawMonth.lenght));
    var TheMonth = IndexOfMonth($.trim(RawMonth.substring(0, SpacePosition)));
};
</code></pre>

<p>MonthList contains a month/year string such as January 2011 or May 2009. The goal is to fill the variables TheYear and TheMonth so that it works in every browser.</p>

<p>If you've run into this problem and can think of a good solution this would be helpful.</p>

<p>Thanks.</p>
