I'm stumped at the moment. I'm currently designing a webring for commercial use, so right now I'm running a demo version on my website using various pages of my own website as "members" of the example ring. So far, it almost works flawlessly, only there's one problem.

The last website in the ring isn't working right. When I hit the "random" button from that page, sometimes it only refreshed that page (suggesting my "idcurrentsite" function is messed up somehow). When I hit the "next" button, it skips the first ring page and goes to the second, and when I hit the "previous" button it only refreshes the current page. I can't figure out why it's only doing that with this one webpage; the webring works fine on all other member pages. Could you guys take a look at the code below and help me out? (You can go to the members[3] website and use the ring there to recreate the problem.)

<!--- hide script from old browsers
var members = new Array(4);
members[0] = "http://www.angelfire.com/realm/angelicknight/projects.htm";
members[1] = "http://www.angelfire.com/realm/angelicknight/exbus1.html";
members[2] = "http://www.angelfire.com/realm/angelicknight/jamesfun.htm";
members[3] = "http://www.angelfire.com/super2/stuffstore";
var maxmembers = members.length-1;
var place = 0;

function load(i)
{
location.href=members[i]
}


function idcurrentsite()
{
thisURL=document.URL.toLowerCase();
for(i=0; i<=maxmembers; i++)
{
if(thisURL==members[i])
place=i;
}
}

function randomgo()
{
idcurrentsite();
var a = Math.floor(Math.random()*members.length)
if(place==a)
randomgo();
else
{
location.href = members[a];
}
}

function gonext()
{
idcurrentsite();
if(place==maxmembers)
place=0;
else
place=place+1;
load(place);
}

function goprev()
{
idcurrentsite();
if(place==0)
place=maxmembers;
else
place=place-1;
load(place);
}

function golist()
{
location.href = "http://www.angelfire.com/realm/angelicknight/projects/list.html";
}
//end hiding script from old browsers --->