// thumb rotate functions
var base_url = "http://www.sexfind.com";
var changing_thumbs = new Array();
function changeThumb(index, i, num_thumbs, thumb, attempt)
{
	if (changing_thumbs[index])
	{
		if ( i > num_thumbs )
		{
			i = 1;
		}			
		lthumb = new Image();
		lthumb.src = base_url + thumb + "_" + i + ".jpg";
		if ( lthumb.complete )
		{
			document.getElementById(index).src = base_url + thumb + "_" + i + ".jpg";
			i++;
			setTimeout("changeThumb('" + index + "'," + i + ", " + num_thumbs + ", '" + thumb + "', 1)", 300);
		}
		else
		{
			setTimeout("changeThumb('" + index + "'," + i + ", " + num_thumbs + ", '" + thumb + "', 1)", 20);
		}
	}
}	
function startThumbChange(index, num_thumbs, thumb)
{	
	changing_thumbs[index] = true;
	changeThumb(index, 1, 8, thumb, 1);
}
function endThumbChange(index, thumb)
{
	changing_thumbs[index] = false;
	document.getElementById(index).src = base_url + thumb;
}

// menu functions
function toggleFilters() {
	if(document.getElementById("filters").style.display == "none")
		document.getElementById("filters").style.display = "block";
	else
		document.getElementById("filters").style.display = "none";
}

function clearTextTop() {
	if(document.getElementById('ahd_username_top').value=='Username')
		document.getElementById('ahd_username_top').value = "";	
}
function clearPassTop() {
	if(document.getElementById('ahd_password_top').value=='Password')
		document.getElementById('ahd_password_top').value = "";
	document.getElementById('ahd_password_top').type = 'password';
}


