function generateCart()
{
	$.ajax({
		type: "GET",
		url: "generateCart.php",
		success: function (html){
			$("#cartLink").html(html);
		}
	});
				
}

function updateCartBox()
{
	$.ajax({
		type: "GET",
		url: "addToCart.php",
		success: function (html){
				$("#properties").html(html);
				updateCartCount();
		}
	});	
}

function clearFields()
{
	document.getElementById('tax_year').selectedIndex = 0;
	document.getElementById('pay_status').selectedIndex = 0;
	document.getElementById('search_by').selectedIndex = 0;
	document.getElementById('record_type').selectedIndex = 0;
	document.getElementById('searchField').value = '';
}

function setValue(selectId, field)
{
	var countIndex = document.getElementById(selectId).selectedIndex;
	var count = document.getElementById(selectId).options[countIndex].value;
  
  	document.getElementById(field).value = count;
}

function verifySearchBy()
{
	if(document.getElementById('searchField').value == '')
	{
		alert('You must enter something to search by');
		return false;
	}
	return true;
}
