sorry, the syntax should read...
var ds1 = new Spry.Data.XMLDataSet("menu.php?detailid=<?php echo $_GET['detailid'] ?>", "items/item");
(missed out the echo)
also, in the code on menu.php, you still need to be filtering using the $_GET['detailid'] as before, only this time, it is being passed from the spry dataset.
hope this makes sense, (and better still, works !)