function deleteCategory(catID)
{
	if(confirm('Are you sure you want to delete this category?'))
	{
		var xmlhttp=new GetXmlHttpObject();
		
		xmlhttp.onreadystatechange= function()
		{
			if (xmlhttp.readyState==4)
			{
				window.location.href="categories.php?delete=success"
			}
		}
	
		dt = new Date().getTime()
		
		xmlhttp.open("GET", 'app_code/deleteCategory.php?categoryID='+catID+"&dt="+dt, true);
		xmlhttp.send(null);
	}
}

function updateCategoryOrder(counter, catID)
{
	var xmlhttp=new GetXmlHttpObject();
	
	xmlhttp.onreadystatechange= function()
	{
		if (xmlhttp.readyState==4)
		{
			window.location.href="categories.php"
		}
	}

	dt = new Date().getTime()
	
	xmlhttp.open("GET", "app_code/updateCategoryOrder.php?order="+counter+"&categoryID="+catID+"&dt="+dt, true);
	xmlhttp.send(null);
}
