Well, you've got:
Code:
For menuLoop = 1 to ScriptLoop
and then:
Code:
If MenuLoop = submenuLoop then
... "MenuLoop" should probably be "menuLoop"? Or is ASP not case sensitive with the var names?
Either way,
where is ScriptLoop set and what is it set to? Since that's your loop limit, that part is important.