function fValidate(frmFormRef)
{
	var num = frmFormRef.elements.length;
	var selected = false, nNumChecked = 0;

	for (var i=0; i<num; i++)
	{
		if (frmFormRef.elements[i].name == 'NHC')
		{
			selected = true;
			nNumChecked++;
		}
	}
	if (selected == false)
	{
		alert ('You must select at least one plan to proceed to the Ordering section.  Please go back to the Nursing Home Select page and choose between 1 and 3 Nursing Homes before clicking the Ordering Watermark. ');
		return false;
	}
//	if ((nNumChecked > 20) && (nNumChecked <= 30))
//	{
//		bLimitContinue = confirm('You have selected ' + nNumChecked + ' Nursing Homes.  If too many Nursing Homes are included in the booklet, it may make it more difficult to interpret the available information; therefore, we recommend narrowing the selection as much as possible.  The recommended maximum number of Nursing Homes per order is 20, however the system allows up to 30 Nursing Homes per order to be selected. Click \'Cancel\' to narrow your selection or click \'OK\' to continue.');
//		if (bLimitContinue == true)
//		{
//		return true;
//		}
//		else
//		{
//		return false;
//		}
//	}
//	if (nNumChecked > 30)
//	{
//		alert ('You have selected ' + nNumChecked + ' Nursing Homes.  The maximum number of Nursing Homes that can be ordered is 30.  Please go back to the Nursing Home Select page and choose between 1 and 30 Nursing Homes before clicking the Ordering Watermark.');
//		return false;
//	}
	return true;
}

function fGoToOrdering(frmPageForm)
{
	if (fValidate(frmPageForm) == true)
	{
		frmPageForm.action = '/Ordering/Warning.asp';
		frmPageForm.submit();
		//return true;
	}
	else
	{
		//return false;
	}

}
