function validate()
{
x=document.myChoices
zcode=x.zip.value
country=x.country_id.value
field = x.zip.value
submitOK="True"
if (country=="United States of America") 
{
	if (x.State.selectedIndex==0) 
		{
		alert("Please Enter your State")
		submitOK="False"
		}
	
	var valid = "0123456789-";
	var hyphencount = 0;
	if (field.length!=5 && field.length!=10) 
		{
		alert("Please enter your 5 digit or 5 digit+4 zip code.");
		return false;
		}
		
	for (var i=0; i < field.length; i++) 
	{
	temp = "" + field.substring(i, i+1);
	if (temp == "-") hyphencount++;
	if (valid.indexOf(temp) == "-1") 
		{
		alert("Invalid characters in your zip code.  Please try again.");
		return false;
		}
	if ((hyphencount > 1) || ((field.length==10) && ""+field.charAt(5)!="-")) 
		{
		alert("The hyphen character should be used with a properly formatted 5 digit+four zip code, like '12345-6789'.   Please try again.");
		return false;
		}
	}
	
}

if (submitOK=="False")
	{
	return false
	}
	
if (x.pgmopt1.selectedIndex==0) 
	{
		alert("Please Enter the Program and Area(s) of Interest");
		x.pgmopt1.focus();
		return false;
	}

if (x.pgmopt1.selectedIndex!=0 && x.interestopt1.selectedIndex==0) 
	{
		alert("Please Select your Area of Interest");
		x.interestopt1.focus();
		return false;
	}

if (x.pgmopt2.selectedIndex!=0 && x.interestopt2.selectedIndex==0) 
	{
		alert("Please Select your Area of Interest");
		x.interestopt2.focus();
		return false;
	}

if (x.pgmopt3.selectedIndex!=0 && x.interestopt3.selectedIndex==0) 
	{
		alert("Please Select your Area of Interest");
		x.interestopt3.focus();
		return false;
	}

if (x.heard_about.selectedIndex==0) 
	{
		alert("Please Enter the resource where you heard about Loyola");
		x.heard_about.focus();
		return false;
	}
else 
	{ return true;}
}