<!--
function init()
{
	// Will erase default contents of box.
	document.frm.elements[0].focus();
}

function validate()
{

	if (document.frm.elements[0].style)
	{
		for (var i = 0; i < document.frm.elements.length; i++)
		{
			document.frm.elements[i].style.backgroundColor = '';
		}
		var styleok = true;
	}
	else
	{
		var styleok = false;
	}

	// Is it blank?
	if (document.frm.txtzip.value == '')
	{
		document.frm.txtzip.focus();
		document.frm.txtzip.select();

		if (styleok)
		{
			document.frm.txtzip.style.backgroundColor = 'red';
		}

		alert('Please enter a 5-digit zip code.');
		return;
	}


	// Is it all numbers.
	var validchars = '0123456789';
	var checkstring = document.frm.txtzip.value;
	for (i = 0;  i < checkstring.length;  i++)
	{
		if (validchars.indexOf(checkstring.charAt(i)) == -1)
		{
			document.frm.txtzip.focus();
			document.frm.txtzip.select();

			if (styleok)
			{
				document.frm.txtzip.style.backgroundColor = 'red';
			}

		alert('Please enter only numbers for the zip code.');
		return;

		}
	}

	// Is it less than 5 characters?
	if (document.frm.txtzip.value.length < 5)
	{
		document.frm.txtzip.focus();
		document.frm.txtzip.select();

		if (styleok)
		{
			document.frm.txtzip.style.backgroundColor = 'red';
		}

		alert('Please enter a 5-digit zip code.');
		return;
	}

	// Is it more than 5 characters?
	if (document.frm.txtzip.value.length > 5)
	{
		document.frm.txtzip.focus();
		document.frm.txtzip.select();

		if (styleok)
		{
			document.frm.txtzip.style.backgroundColor = 'red';
		}

		alert('Please enter a 5-digit zip code.');
		return;
	}

	window.open('','stores','width=600, height=480, scrollbars=yes');
	document.frm.submit();
}

//-->

