//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://83.170.115.133/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://83.170.115.133/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://83.170.115.133/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 % 8 == 0)
	{
		document.write("<P>");
	}
	document.write("<A HREF='/ladies/",links[index].substring(0,6),".shtml' TARGET='",links[index],"'><IMG SRC='http://83.170.115.133/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-1)
	{
		max=links.length;
	}
	document.write("<CENTER>");
	while (i < max)
	{
		thumb(i);
		i=i+1;
	}
	document.write("</CENTER>");
}

function picture(index)
{
	if(index % 2 == 0)
	{
		document.write("<P>");	}
	document.write("<A HREF='/ladies/",links[index].substring(0,6),".shtml' TARGET='",links[index],"'><IMG SRC='http://83.170.115.133/photo/" + links[index].substring(0,1) + "/",links[index],".jpg' ALT='Click to find out more about beautiful russian women' border=0></A>")
}

function display_pictures(page,profiles)
{
	i = page*profiles;
	max = i+profiles;
	if (max>links.length-1)
	{
		max=links.length;
	}
	document.write("<CENTER>");
	while (i < max)
	{
		picture(i);
		i=i+1;
	}
	document.write("</CENTER>");
}

function large_picture()
{
	index = getrandom(large_pictures.length-1);
	document.write("<A HREF='/ladies/",large_pictures[index].substring(0,6),".shtml' TARGET='",large_pictures[index],"'><IMG SRC='http://83.170.115.133/photo/" + large_pictures[index].substring(0,1) + "/",large_pictures[index],".jpg' align='right' ALT='Click to find out more about beautiful russian women' border=0 ></A>")
}

function age(n)
{
	document.write("<a href='/cgi-bin/angel.pl?advancedengine=1&age_sel=",n,"&age1_sel=",n,"&child_sel=-1&height_sel=-1&height1_sel=-1&weight_sel=-1&weight1_sel=-1&eye_sel=-1&hair_sel=-1&languages_sel=-1&zodiac_sel=-1&mari_sel=-1&extra=&neWindow=0&previewMode=0&previewLines=20&action=search&searchcondition=24'>",n,"</a> ");
}

function city(town,desc)
{
	document.write("<a href='/cgi-bin/angel.pl?advancedengine=1&age_sel=-1&age1_sel=-1&child_sel=-1&height_sel=-1&height1_sel=-1&weight_sel=-1&weight1_sel=-1&eye_sel=-1&hair_sel=-1&languages_sel=-1&zodiac_sel=-1&mari_sel=-1&FC=",town,"&neWindow=0&previewMode=0&previewLines=20&action=search&searchcondition=4'>",desc,"</a> ");
}

function country(place,desc)
{
	document.write("<a href='/cgi-bin/angel.pl?advancedengine=1&age_sel=-1&age1_sel=-1&child_sel=-1&height_sel=-1&height1_sel=-1&weight_sel=-1&weight1_sel=-1&eye_sel=-1&hair_sel=-1&languages_sel=-1&zodiac_sel=-1&mari_sel=-1&extra=",place,"&neWindow=0&previewMode=0&previewLines=20&action=search&searchcondition=24'>",desc,"</a> ");
}

function language(n,desc)
{
	document.write("<a href='/cgi-bin/angel.pl?advancedengine=1&age_sel=-1&age1_sel=-1&child_sel=-1&height_sel=-1&height1_sel=-1&weight_sel=-1&weight1_sel=-1&eye_sel=-1&hair_sel=-1&languages_sel=",n,"&zodiac_sel=-1&mari_sel=-1&extra=&neWindow=0&previewMode=0&previewLines=20&action=search&searchcondition=24'>",desc,"</a> ");
}
