function validateAddFactForm() 
{
	var frm = document.getElementById("frmAddFact");

	if (frm.txtFactTitle.value == "")
	{
		alert("You must provide the fact title");
		frm.txtFactTitle.focus();
		
		return false;
	}
	
	if (frm.txtFact.value == "")
	{
		alert("You must type the fact");
		frm.txtFact.focus();
		
		return false;
	}
	
	if (frm.cmbFactCategory.selectedIndex == 0)
	{
		alert("You must select a fact category");
		return false;
	}
	
	if (frm.cmbFactSubCategory.selectedIndex == 0)
	{
		alert("You must select a fact sub category");
		return false;
	}
	
	if (frm.txtSubmitterName.value == "")
	{
		alert("Please provide your name");
		frm.txtSubmitterName.focus();
		
		return false;
	}
	
    return true;
}

function confirmRemove(id)
{
	if (confirm('Are you sure you want to remove this fact?'))
	{
		window.location.href = 'admin.php?action=removeFact&factId=' + id;
	}
}
