You declared a variable called "query" (that isn't being used) early and outside of any function, then it looks like you've defined the variable "dquery" only within the scope of the complefunc argument for the first cascade dropdowns call (dquery won't be available outside that scope). Based on where you're using that variable, you need to define it outside of the SPServices calls. If you rename "query" at the top to "dquery", it will probably work.
Geoff
Geoff