Well... I haven't seen ALL the code but I think I've found atleast one mistake in this code...
$page = getenv ("SCRIPT_NAME");
$page = basename ($page);
$page = str_replace (".php3", "", $page);
should really be
$page = getenv ("SCRIPT_NAME");
$page .= basename ($page);
$page .= str_replace (".php3", "", $page);
If you're adding basename($page) and the str_replace to $page which is getenv(scriptname)...
Try changing it, if it doesn't work, simply post again 🙂
I don't know about this thing right here:
$mymenu="<a href=$site_pages[$i].php3><span class=indexclass litUp1>$site_titles[$i]</a>";
Doesn't $mymenu have to be array for holding this? like $mymenu[] = "<a href...>"; ?
Whatever, maybe I'm fullofit... 🙂
Hope it helped, Arni