function validate()
{
	var minSelect = 2;
	var maxSelect = 4;
	var selectCount = 0;
	
	var inputCollection = document.frmProductList.getElementsByTagName("INPUT");
	for (var i=0; i<inputCollection.length; i++)
	{
		var currentInput = inputCollection[i];
		if (currentInput.type=="checkbox" && currentInput.name=="chkCompare" && currentInput.checked)
			selectCount++;
	}
	
	if (selectCount < minSelect)
	{
		alert("You must select at least " + minSelect.toString() + " products");
		return false;
	}
	
	if (selectCount > maxSelect)
	{
		alert("You have selected more than " + maxSelect.toString() + " products for comparison.");
		return false;
	}
	return true;

}

