﻿function submitOnChange(oselect, reselectvalue)
{
    var selectedValue = oselect.options[oselect.selectedIndex].value;
    var i;
    for (i = 0; i < oselect.options.length; i++)
    {
        var coption = oselect.options[i];
        if (coption.value == reselectvalue)
        {
            oselect.selectedIndex = i;
            break;
        }
    }

    window.location = oselect.form.action + "?" + oselect.name + '=' + selectedValue;
}