Hmm... I'll try to take a closer look at this later. Right now, I'm pretty tired. One thing to point out though: you should never use the variable _x in scripts. The reason is, in commands like "count" and "foreach", the variable _x is used in a special way. So to avoid any confusion if you ever later use those commands, you should just make it a habit to never use _x as a variable. Try something more descriptive anyway, like _captive or something.
As for the switchmove, try switchmove "FXStandSurDown". Also, you can have the captive actually put his weapon down (so the player can pick it up) using the "action" command:
_unit action ["DROP WEAPON", _unit, 0, 0, (primaryweapon _unit)]
You should still use removeallweapons after that though, to get rid of grenades and such.
Oh yeah, and while you're at it, try my surrender script I wrote. Grab it here:
http://www.ofpec.com/editors/resource_view.php?id=679