OK so if you add this javascript to your template:
PHP Code:
<script type="text/javascript">
function switch_id2(C,E)
{
var F = C.value;
if(F=="")
{
return;
}
var B = new String(window.location);
var A = new String("");
B=B.split("#");
if(B[1])
{
A = "#" + B[1];
}
B = B[0];
if(B.indexOf(E+"id=") != -1 && is_regexp)
{
var D=new RegExp(E + "id=\\d+&?");
B = B.replace(D, "");
}
if(B.indexOf("?") == -1)
{
B += "?";
}
else
{
lastchar = B.substr(B.length - 1);
if(lastchar != "&" && lastchar != "?")
{
B += "&";
}
}
window.location = B + E + "id=" + F + A;
}
</script>
And then change the calls in your code from switch_id to switch_id2 it will work.