if(document.getElementById('whatbest'))
{
	var selectwhatbest = document.getElementById('whatbest');
	selectwhatbest.onchange = function()
	{
		if(selectwhatbest.value == '6') // Other (fill in blank)
		{
			document.getElementById('whatbestdiv').style.display = 'block';
		}
		else
		{
			document.getElementById('whatbestdiv').style.display = 'none';
			document.getElementById('whatbest_other').value = '';
		}
	}
}

if (document.getElementById('users'))
{
	var urows = document.getElementById('users').getElementsByTagName('tr');

	for (i = 1; i < urows.length; i++)
	{
		urows[i].onmouseover = function()
		{
			this.oldbg = this.style.backgroundColor;
			this.oldc = this.style.backgroundColor;
			this.style.backgroundColor = '#326DA3';
			this.style.color = '#FFFFFF';
			this.style.cursor = 'pointer';
		}
		
		urows[i].onmouseout = function()
		{
			this.style.backgroundColor = this.oldbg;
			this.style.color = this.oldc;
		}
		
		urows[i].onclick = function()
		{
			this.rid = this.id.substr(3, this.id.length);
			document.location.href = '/user/' + this.rid;
			return false;
		}
	}
}


if (document.getElementById('faq'))
{
	var urows = document.getElementById('faq').getElementsByTagName('tr');

	for (i = 0; i < urows.length; i++)
	{
		urows[i].onmouseover = function()
		{
			this.oldbg = this.style.backgroundColor;
			this.oldc = this.style.backgroundColor;
			this.style.backgroundColor = '#326DA3';
			this.style.color = '#FFFFFF';
			this.style.cursor = 'pointer';
		}
		
		urows[i].onmouseout = function()
		{
			this.style.backgroundColor = this.oldbg;
			this.style.color = this.oldc;
		}
		
		urows[i].onclick = function()
		{
			this.rid = this.id.substr(3, this.id.length);
			document.location.href =  this.rid;
			return false;
		}
	}
}

if (document.getElementById('kids'))
{
	var urows = document.getElementById('kids').getElementsByTagName('tr');

	for (i = 0; i < urows.length; i++)
	{
		urows[i].onmouseover = function()
		{
			this.oldbg = this.style.backgroundColor;
			this.oldc = this.style.backgroundColor;
			this.style.backgroundColor = '#326DA3';
			this.style.color = '#FFFFFF';
			this.style.cursor = 'pointer';
		}
		
		urows[i].onmouseout = function()
		{
			this.style.backgroundColor = this.oldbg;
			this.style.color = this.oldc;
		}
		
		urows[i].onclick = function()
		{
			this.rid = this.id.substr(3, this.id.length);
			document.location.href =  this.rid;
			return false;
		}
	}
}


if (document.getElementById('xkids'))
{
	var urows = document.getElementById('xkids').getElementsByTagName('tr');

	for (i = 0; i < urows.length; i++)
	{
		urows[i].onmouseover = function()
		{
			this.oldbg = this.style.backgroundColor;
			this.oldc = this.style.backgroundColor;
			this.style.backgroundColor = '#326DA3';
			this.style.color = '#FFFFFF';
			this.style.cursor = 'pointer';
		}
		
		urows[i].onmouseout = function()
		{
			this.style.backgroundColor = this.oldbg;
			this.style.color = this.oldc;
		}
		
		urows[i].onclick = function()
		{
			this.rid = this.id.substr(3, this.id.length);
			document.location.href =  this.rid;
			return false;
		}
	}
}

if (document.getElementById('test') && document.getElementById("map"))
{
	document.getElementById('test').onclick = function()
	{
		if (document.getElementById("map").style.display == 'block')
		{
			document.getElementById("map").style.display = 'none';
			GUnload();
		}
		else
		{
				
			load();
			document.getElementById("map").style.left = '225px';
			document.getElementById("map").style.display = 'block';
			
		}
		
		return false;
	}
}
	
