function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function checkIfValid(theForm)
{
	var isChecked
	isChecked=false
	for (x=0;x<document.forms[0].length;x++)
	{
		if(document.forms[0].elements[x].checked)
		{
			isChecked=true
		}
	}
	var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzƒþŒŽšœžŸÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ0123456789-- \t\r\n\f";
	var checkStr = theForm.Zip.value;
	var allValid = true;
	for (i = 0;  i < checkStr.length;  i++)
	{
		ch = checkStr.charAt(i);
		for (j = 0;  j < checkOK.length;  j++)
		if (ch == checkOK.charAt(j))
			break;
		if (j == checkOK.length)
		{
			allValid = false;
			break;
		}
	}
	var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzƒþŒŽšœžŸÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ. \t\r\n\f";
	var checkStr = theForm.St.value;
	var allValid = true;
	for (i = 0;  i < checkStr.length;  i++)
	{
		ch = checkStr.charAt(i);
		for (j = 0;  j < checkOK.length;  j++)
		if (ch == checkOK.charAt(j))
		break;
		if (j == checkOK.length)
		{
			allValid = false;
			break;
		}
	}

	if (theForm.Name.value.length < 1)
	{
		alert("Please enter a value for the \"Name\" field.");
		theForm.Name.focus();
		return (false);
	}

	else if (theForm.Organization.value == "")
	{
		alert("Please enter a value for the \"Organization\" field.");
		theForm.Organization.focus();
		return (false);
	}

	else if (theForm.Organization.value.length < 1)
	{
		alert("Please enter at least 1 characters in the \"Organization\" field.");
		theForm.Organization.focus();
		return (false);
	}

	else if (theForm.Address.value == "")
	{
		alert("Please enter a value for the \"Address\" field.");
		theForm.Address.focus();
		return (false);
	}

	else if (theForm.Address.value.length < 1)
	{
		alert("Please enter at least 1 characters in the \"Address\" field.");
		theForm.Address.focus();
		return (false);
	}

	else if (theForm.City.value == "")
	{
		alert("Please enter a value for the \"City\" field.");
		theForm.City.focus();
		return (false);
	}

	else if (theForm.City.value.length < 1)
	{
		alert("Please enter at least 1 characters in the \"City\" field.");
		theForm.City.focus();
		return (false);
	}
	else if (theForm.St.value == "")
	{
		alert("Please select a \"State\".");
		theForm.St.focus();
		return (false);
	}
	else if (theForm.Zip.value == "")
	{
		alert("Please enter a value for the \"Zip\" field.");
		theForm.Zip.focus();
		return (false);
	}

	else if (theForm.Zip.value.length < 1)
	{
		alert("Please enter at least 1 characters in the \"Zip\" field.");
		theForm.Zip.focus();
		return (false);
	}

	else if (theForm.Zip.value.length > 10)
	{
		alert("Please enter at most 10 characters in the \"Zip\" field.");
		theForm.Zip.focus();
		return (false);
	}

	else if (!allValid)
	{
		alert("Please enter only letter, digit, whitespace and \"-\" characters in the \"Zip\" field.");
		theForm.Zip.focus();
		return (false);
	}

	else if (theForm.Phone.value == "")
	{
		alert("Please enter a value for the \"Phone\" field.");
		theForm.Phone.focus();
		return (false);
	}

	else if (theForm.Phone.value.length < 1)
	{
		alert("Please enter at least 1 characters in the \"Phone\" field.");
		theForm.Phone.focus();
		return (false);
	}

	else if (theForm.Email.value == "")
	{
		alert("Please enter a value for the \"Email\" field.");
		theForm.Email.focus();
		return (false);
	}

	else if (theForm.Email.value.length < 4)
	{
		alert("Please enter at least 4 characters in the \"Email\" field.");
		theForm.Email.focus();
		return (false);
	}
	//else if (!isChecked)
	//{
	//	alert("Please select at least one Product.");
	//	return false;
	//}
	else if (theForm.nodonors.value == "")
	{
		alert("Please enter a value for the \"Number of Children/Campers\" field.");
		theForm.nodonors.focus();
		return (false);
	}
	else
	  return true;
}


