<script type="text/javascript">
            function switchsubmit(form, action){
                document.getElementsByName("action").item(0).value = action;
                form.submit();
            }
        </script>