I also think the problem is coming from that stmenu.js i just have no ideas of how to fix that one... but if I take off the php code, and use only the include/.... the .js file is still loading on normal cre pages, only when the links are rewritten by magic, menu is not working anymore (.js not loaded)... and i have no more the non secure items problem...
without forgetting that ony IE is having this problem...