Pass two values from option select to javascript function
<p>I have a working tax calculator that I need to add one more piece to. For input C, I need there to be two known values associated with the town the user selects. Then, I need those values to be plugged into the Calculate function in different places, but only one of the values in one place in Calculate2. Something like:  </p>

<pre><code>&lt;select name="input_C" id="input_C"&gt;
&lt;option value="value1,value2"&gt;Acworth&lt;/option&gt;
&lt;/select&gt;

function Calculate(Atext, Btext, Ctext_value1, Ctext_value2, form)
{
    var A = parseFloat(Atext);
    var B = parseFloat(Btext);
    var C_1 = parseFloat(Ctext_value1);
    var C_2 = parseFloat(Ctext_value2);
    form.Answer.value = ((B/C_1)-A)*C_2;
}

function Calculate2(Atext, Ctext_value2, Dtext, form)
{
    var A = parseFloat(Atext);
    var C_2 = parseFloat(Ctext_value2);
    var D = parseFloat(Dtext);
    form.Answer.value = D-((A*C_2)/1000);
}
</code></pre>

<p>But I can't figure out how to pass both values and associate them correctly?</p>

<p>The code below works, but is obviously missing having two values associated with <code>input_C</code>. I'm sure I need to add something else to the <code>document.getElementById("input_C").value</code>, in addition to other changes...</p>

<pre><code>function compute() {
    var A = document.getElementById("input_A").value;   
    var B = document.getElementById("input_B").value;
    var C = document.getElementById("input_C").value;
    var D = document.getElementById("input_D").value;

    if (B != "" &amp;&amp; D != "") {
        alert("You may only enter either an Assessment or Annual Taxes.");
    } else if (A =="" &amp;&amp; B =="" &amp;&amp; D =="") {
        alert("You must select your town, enter a Market Value, and either an Assessment or     Annual Taxes to calcuate..");
    } else if (C =="999") {
        alert("You must select your town.");
    } else if (A =="") {
        alert("You must enter a Market Value.");
    } else if (B != "" &amp;&amp; C !="") {
        Calculate(A, B, C, document.getElementById("overtax"));
    } else if (D != "" &amp;&amp; C !="") {
        Calculate2(A, C, D, document.getElementById("overtax"));
    } else {
        alert("You must select your town, enter a Market Value, and either an Assessment or     Annual Taxes to calcuate.");
   }
}

function Calculate(Atext, Btext, Ctext, form)
{
    var A = parseFloat(Atext);
    var B = parseFloat(Btext);
    var C = parseFloat(Ctext);
    form.Answer.value = ((B-A)*C)/1000;
}

function Calculate2(Atext, Ctext, Dtext, form)
{
    var A = parseFloat(Atext);
    var C = parseFloat(Ctext);
    var D = parseFloat(Dtext);
    form.Answer.value = D-((A*C)/1000);
}


&lt;FORM NAME="Calculator" METHOD="post" id="overtax"&gt;
    &lt;P&gt;City/Town:
        &lt;select name="input_C" id="input_C"&gt;
            &lt;option value="999"&gt;Select Your City/Town&lt;/option&gt;
            &lt;option value="20.55"&gt;Acworth&lt;/option&gt;
        &lt;/select&gt;
    &lt;/P&gt;
    &lt;P&gt;Market Value: &lt;INPUT TYPE=TEXT NAME="input_A" id="input_A" SIZE=10     onblur="this.value=this.value.replace(/,/g,'')"&gt; &lt;span class="directions"&gt;Please enter what you believe your property is worth in today's market&lt;/span&gt;&lt;/P&gt;
    &lt;P&gt;Assessment: &lt;INPUT TYPE=TEXT NAME="input_B" id="input_B" SIZE=10 onblur="this.value=this.value.replace(/,/g,'')"&gt; &lt;span class="directions"&gt;Located on your property tax bill or assessment card&lt;/span&gt;&lt;/P&gt;
    &lt;P&gt;OR&lt;/P&gt;
    &lt;P&gt;Annual Taxes: &lt;INPUT TYPE=TEXT NAME="input_D" id="input_D" SIZE=10 onblur="this.value=this.value.replace(/,/g,'')"&gt; &lt;span class="directions"&gt;Located on your property tax bill or assessment card&lt;/span&gt;&lt;/P&gt;

    &lt;P&gt;&lt;INPUT TYPE="button" VALUE="Calculate" name="AddButton" onclick="compute();" /&gt;&lt;/P&gt;
</code></pre>
