//Returns a random number between 0 and n
function getrandom(n) 
{
	i = Math.random()
	i = Math.round((i * 10000) % n)
	return i
}

function thumb_middle()
{
	index = getrandom(links.length-1)
	document.write("<A HREF='/ladies/",links[index].substring(0,6),".shtml' TARGET='",links[index],"'><IMG SRC='http://80.243.183.202/photo/thumbs/" + links[index].substring(0,1) + "/s_",links[index].substring(0,6),".jpg' width='75' height='100' ALT='Click to find out more about beautiful russian women' border=0></A>")
}

function thumb_left()
{
	index = getrandom(links.length-1)
	document.write("<A HREF='/ladies/",links[index].substring(0,6),".shtml' TARGET='",links[index],"'><IMG SRC='http://80.243.183.202/photo/thumbs/" + links[index].substring(0,1) + "/s_",links[index].substring(0,6),".jpg' width='75' height='100' align='left' ALT='Click to find out more about beautiful russian women' border=0></A>")
}

function thumb_right()
{
	index = getrandom(links.length-1)
	document.write("<A HREF='/ladies/",links[index].substring(0,6),".shtml' TARGET='",links[index],"'><IMG SRC='http://80.243.183.202/photo/thumbs/" + links[index].substring(0,1) + "/s_",links[index].substring(0,6),".jpg' width='75' height='100' align='right' ALT='Click to find out more about beautiful russian women' border=0></A>")
}

function thumb(index)
{
	if(index % 10 == 0)
	{
		document.write("<P>");
	}

	document.write("<A HREF='/ladies/",links[index].substring(0,6),".shtml' TARGET='",links[index],"'><IMG SRC='http://80.243.183.202/photo/thumbs/" + links[index].substring(0,1) + "/s_",links[index].substring(0,6),".jpg' width='75' height='100' ALT='Click to find out more about beautiful russian women' border=0></A>")
}

function display_all_thumbs()
{
	i = 0;
	max=links.length-1;

	document.write("<CENTER>");

	document.write("Displaying "+max+" ladies<P>");

	while (i < max)
	{
		thumb(i);
		i=i+1;
	}
	document.write("</CENTER>");
}

function display_thumbs(page,profiles)
{
	i = page*profiles;
	max = i+profiles;

	if (max>links.length-2)
	{
		max=links.length-1;
	}

	document.write("<CENTER>");
	while (i < max)
	{
		thumb(i);
		i=i+1;
	}
	document.write("</CENTER>");
}

