//Copyright © 2000 PAULGRANT.CA
//http://actionfigurechecklist.com

function DoBrowse(oForm)
{
	if(!oForm)
		return false;

	var oUser	= oForm.txtUsernameBrowse;
	if(!oUser)
		return false;

	if(oUser.value == "")
	{
		oUser.focus();
		return false;
	}

	return true;
}

function DoLocation(oForm)
{
	if(!oForm)
		return false;

	var oLocation	= oForm.txtLocation;
	if(!oLocation)
		return false;

	if(oLocation.value == "")
	{
		oLocation.focus();
		return false;
	}

	if(!gbWebTV)
	{
		var re = /\W/g;
		oLocation.value = oLocation.value.replace(re, "_");
	}

	var iTribeId	= 1;
	var oTribe		= oForm.Tribe;
	if((oTribe != null) && (oTribe.value > 0))
		iTribeId	= oTribe.value;

	document.location = "ChecklistDirectory.php?Tribe=" + iTribeId + "&Location=" + oLocation.value;

	return true;
}

function DoSort(oForm)
{
	if(!oForm)
		return false;

	var oSort = oForm.selSort;
	if((!oSort) || (oSort.selectedIndex < 0))
		return false;

	var iSort	= oSort.options[ oSort.selectedIndex ].value;
	if(!iSort)
		iSort = 0;

	var sQuery = QS_ex("Sort");

	document.location = "ChecklistDirectory.php?" + sQuery + "&Sort=" + iSort;

	return true;
}

//End
