Javascript Select Option not updating
<p>I have a dropdown which when an option is selected it needs to populate an input value with the value of the option selected only its not working as in nothings changing, Could anybody see and explain why going of my code? </p>

<pre><code> &lt;select id="corr_sel" onchange="updatecredoff();"&gt; 
    &lt;option value="1"&gt;1&lt;/option&gt;
    &lt;option value="2"&gt;2&lt;/option&gt;
    &lt;option value="3"&gt;3&lt;/option&gt;
    &lt;option value="4"&gt;4&lt;/option&gt;
    &lt;option value="5"&gt;5&lt;/option&gt;
    &lt;option value="6"&gt;6&lt;/option&gt;
    &lt;option value="7"&gt;7&lt;/option&gt;
    &lt;option value="8"&gt;8&lt;/option&gt;
    &lt;option value="9"&gt;9&lt;/option&gt;
    &lt;option value="10"&gt;10&lt;/option&gt;
 &lt;/select&gt;

&lt;div id="cr_off"&gt;&lt;?php echo $user_curr_coff;?&gt;&lt;/div&gt;

function updatecredoff() {
    if(value == 1) {
        document.getElementById("corr_sel").value = '1';
        document.getElementById("cr_off").innerHTML = '1';
        }
    else if(value == 2) {
        document.getElementById("corr_sel").value = '2';
        document.getElementById("cr_off").innerHTML = '2';
        }
    else if(value == 3) {
        document.getElementById("corr_sel").value = '3';
        document.getElementById("cr_off").innerHTML = '3';
        }
    else if(value == 4) {
        document.getElementById("corr_sel").value = '4';
        document.getElementById("cr_off").innerHTML = '4';
        }
    else if(value == 5) {
        document.getElementById("corr_sel").value = '5';
        document.getElementById("cr_off").innerHTML = '5';
        }
    else if(value == 6) {
        document.getElementById("corr_sel").value = '6';
        document.getElementById("cr_off").innerHTML = '6';
        }
    else if(value == 7) {           
        document.getElementById("corr_sel").value = '7';
        document.getElementById("cr_off").innerHTML = '7';
        }
    else if(value == 8) {
        document.getElementById("corr_sel").value = '8';
        document.getElementById("cr_off").innerHTML = '8';
        }
    else if(value == 9) {
        document.getElementById("corr_sel").value = '9';
        document.getElementById("cr_off").innerHTML = '9';
        }
    else {
        document.getElementById("corr_sel").value = '10';
        document.getElementById("cr_off").innerHTML = '10';
    }
    };
</code></pre>
