				function int_popup() {
					if (document.forms[0].country.selectedIndex > 1)
					{

						var alertstring = "Walden's programs best serve the needs of U.S. and Canadian Students, ";
						alertstring += "and U.S. Citizens and permanent residents living abroad.  ";
						alertstring += "If you would still like to request information from Walden,  ";
						alertstring += "please contact the school directly at (612) 338-7224.\n\n";
						alertstring += "You will now be redirected to our Search Help page. \n\n";
						alertstring += "If you feel you received this message in error, please hit the back button  ";
						alertstring += "when you arrive at the Search Help page.";

						alert(alertstring);
						return false;
					}
				}

				 function uscanada(fds){

						if (window.document.forms[0].State.selectedIndex > 63
							) {
								window.document.forms[0].country.selectedIndex  = 1;
						} else {
								window.document.forms[0].country.selectedIndex  = 0;
						}

				}

				function checkDigits (checkStr)
				{
				  var checkOK = "0123456789";
				  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;
				    }
				  }
				  return allValid;

				}

				//zip US
				function checkZipUS (strng) {
				    var error = "";

				    if (!(strng.length == 5 && checkDigits(strng)) ) {
					error = "US zip needs to be exactly 5 digits.\n";
				        return error;
				    }

				return error;
				}


				//zip Canada
				function checkZipCanada (strng) {
				    var error = "";

				    if (!(strng.length == 6) ) {
					error = "Canadian Post Code needs to be exactly 6 characters.\n";
				        return error;
				    }

				    if (strng.indexOf(" ") > -1) {
					error = "No space allowed in the zip code field.\n";
				        return error;
				    }

				    return error;
				}


				// email

				//function checkEmail (strng) {
				//	var error="";
				//	if (strng == "") {
				//	   error = "You didn't enter an email address.\n";
				//	}
				//	alert('');
				//    var emailFilter=/^.+@.+\..{2,3}$/;
				//    if (!(emailFilter.test(strng))) {
				//       error = "Please enter a valid email address. Must be in the format of xxxx@xxx.xxx\n";
				//    }
				//    else {
				//test email for illegal characters
				//       var illegalChars= /[\(\)\<\>\,\;\:\\\"\[\]]/
				//         if (strng.match(illegalChars)) {
				//          error = "The email address contains illegal characters.\n";
				//       }
				//    }
				//return error;
				//}



				// phone number - strip out delimiters and check for 10 digits

				function checkPhone (strng) {
				var error = "";
				if (strng == "") {
				   error = "You didn't enter a phone number.\n";
				}

				    var stripped = strng.replace(/[\(\)\.\-\ ]/g, ''); //strip out acceptable non-numeric characters
				    if (!(checkDigits(stripped))) {
				       error = "The phone number contains illegal characters.\n";
				       return error;
				    }


				    if (stripped.length < 10) {
					error = "The phone number is the wrong length. Make sure you included an area code.\n";
				        return error;
				    }
				return error;
				}

				function checkPhoneUS (strng) {
				var error = "";


				    error = checkAreaCodeUS(strng);

				    var stripped = strng.replace(/[\(\)\.\-\ ]/g, ''); //strip out acceptable non-numeric characters

				    if (!(stripped.length == 10)) {
					error = "You phone number needs to be exactly 10 digits.\n";
				        return error;
				    }

				return error;
				}

				function checkPhoneNA (strng) {
				var error = "";


				    var stripped = strng.replace(/[\(\)\.\-\ ]/g, ''); //strip out acceptable non-numeric characters

				    if (!(stripped.length == 10)) {
					error = "You phone number needs to be exactly 10 digits.\n";
				        return error;
				    }

				    error = checkAreaCodeNA(strng);
				return error;
				}



				// Area code of US phone number - strip out delimiters and check for 3 digits

				function checkAreaCodeUS (strng) {

				var codesexist = "201,202,203,205,206,207,208,209,210,212,213,214,215,216,217,218,219,224,225,228,229,231,234,239,240,242,246,248,251,252,253,254,256,260,262,264,267,268,269,270,276,281,284,";
				codesexist += "301,302,303,304,305,307,308,309,310,312,313,314,315,316,317,318,319,320,321,323,325,330,334,336,337,339,340,345,347,351,352,360,361,380,386,";
				codesexist += "401,402,404,405,406,407,408,409,410,412,413,414,415,417,419,423,425,430,432,434,435,440,441,443,445,469,470,473,475,478,479,480,484,";
				codesexist += "501,502,503,504,505,507,508,509,510,512,513,515,516,517,518,520,530,540,541,551,557,559,561,562,563,564,567,570,571,573,574,580,585,586,";
				codesexist += "601,602,603,605,606,607,608,609,610,612,614,615,616,617,618,619,620,623,626,630,631,636,641,646,649,650,651,660,661,662,664,670,671,678,682,689,";
				codesexist += "701,702,703,704,706,707,708,712,713,714,715,716,717,718,719,720,724,727,731,732,734,740,754,757,758,760,763,765,767,770,772,773,774,775,781,784,785,786,787,";
				codesexist += "800,801,802,803,804,805,806,808,810,812,813,814,815,816,817,818,828,830,831,832,835,843,845,847,848,850,856,857,858,859,860,862,863,864,865,866,868,869,870,876,877,878,888,";
				codesexist += "901,903,904,906,907,908,909,910,912,913,914,915,916,917,918,919,920,925,928,931,936,937,939,940,941,947,949,952,954,956,959,970,971,972,973,978,979,980,984,985,989";

				var areacodes = codesexist.split(",");
				    var error = "";
				    if (strng == "")
				    {
				       error = "You didn't enter a phone number.\n";
				       return error;
				    }
				    var stripped = strng.replace(/[\(\)\.\-\ ]/g, ''); //strip out acceptable non-numeric characters
				    if (!(checkDigits(stripped))) {
				       error = "The phone number contains illegal characters.\n";
				       return error;
				    }

				    var leaddigit = stripped.slice(0,1);

				    if ((leaddigit == "0" || leaddigit == "1" )) {
					error = "Make sure you start with an area code for the phone.  Do not start with '0' or '1'.\n";
				        return error;
				    }

				    var areacode = stripped.slice(0,3);
				    for (i = 0;  i < areacodes.length;  i++)
				    {
				        if (areacode == areacodes[i])
				        {
				          break;
				        }
				    }
				    if (i == areacodes.length){
					error = "The first 3 digits do not match a valid US area code.\n";
				        return error;
				    }

				    var nxxbad = "555,000";
				    var nxxcodes = nxxbad.split(",");
				    var nxxcode = stripped.slice(3,6);
				    for (i = 0;  i < nxxcodes.length;  i++)
				    {
				        if (nxxcode == nxxcodes[i])
				        {
				          break;
				        }
				    }
				    if (i < nxxcodes.length){
					error = "The 3 digits after area code in your phone number do not represent a valid exchange number.\n";
				        return error;
				    }


				    return error;
				}


				// Area code of North America phone number - strip out delimiters and check for 3 digits

				function checkAreaCodeNA (strng) {

				var codesexist = "201,202,203,204,205,206,207,208,209,210,212,213,214,215,216,217,218,219,224,225,227,228,229,231,234,239,240,242,246,248,250,251,252,253,254,256,260,262,264,267,268,269,270,276,281,283,284,289,";
				codesexist += "301,302,303,304,305,306,307,308,309,310,312,313,314,315,316,317,318,319,320,321,323,330,331,334,336,337,339,340,345,347,351,352,360,361,386,";
				codesexist += "401,402,403,404,405,406,407,408,409,410,412,413,414,415,416,417,418,419,423,424,425,434,435,440,441,443,445,450,464,469,470,473,475,478,479,480,484,";
				codesexist += "501,502,503,504,505,506,507,508,509,510,512,513,514,515,516,517,518,519,520,530,540,541,551,557,559,561,562,563,564,567,570,571,573,574,580,585,586,";
				codesexist += "601,602,603,604,605,606,607,608,609,610,612,613,614,615,616,617,618,619,620,623,626,630,631,636,641,646,647,649,650,651,660,661,662,664,667,670,671,678,682,";
				codesexist += "701,702,703,704,705,706,707,708,709,712,713,714,715,716,717,718,719,720,724,727,731,732,734,737,740,754,757,758,760,763,765,767,770,772,773,774,775,778,780,781,784,785,786,787,";
				codesexist += "800,801,802,803,804,805,806,807,808,809,810,812,813,814,815,816,817,818,819,828,830,831,832,835,843,845,847,848,850,856,857,858,859,860,862,863,864,865,866,867,868,869,870,872,876,877,878,888,";
				codesexist += "901,902,903,904,905,906,907,908,909,910,912,913,914,915,916,917,918,919,920,925,928,931,936,937,939,940,941,947,949,952,954,956,959,970,971,972,973,975,978,979,980,984,985,989";

				var areacodes = codesexist.split(",");
				    var error = "";
				    if (strng == "")
				    {
				       error = "You didn't enter a phone number.\n";
				       return error;
				    }
				    var stripped = strng.replace(/[\(\)\.\-\ ]/g, ''); //strip out acceptable non-numeric characters
				    if (!(checkDigits(stripped))) {
				       error = "The phone number contains illegal characters.\n";
				       return error;
				    }

				    var leaddigit = stripped.slice(0,1);

				    if ((leaddigit == "0" || leaddigit == "1" )) {
					error = "Make sure you start with an area code for the phone.  Do not start with '0' or '1'.\n";
				        return error;
				    }


				    var areacode = stripped.slice(0,3);
				    for (i = 0;  i < areacodes.length;  i++)
				    {
				        if (areacode == areacodes[i])
				        {
				          break;
				        }
				    }
				    if (i == areacodes.length){
					error = "The first 3 digits do not match a valid area code.\n";
				        return error;
				    }

				    var nxxbad = "555,000";
				    var nxxcodes = nxxbad.split(",");
				    var nxxcode = stripped.slice(3,6);
				    for (i = 0;  i < nxxcodes.length;  i++)
				    {
				        if (nxxcode == nxxcodes[i])
				        {
				          break;
				        }
				    }
				    if (i < nxxcodes.length){
					error = "The 3 digits after area code in your phone number do not represent a valid exchange number.\n";
				        return error;
				    }


				    return error;
				}

				function isEmailAddr(email)
				{
				  var result = false;
				  var theStr = new String(email);
				  var index = theStr.indexOf("@");
				  if (index > 0)
				  {
				    var pindex = theStr.indexOf(".",index);
				    if ((pindex > index+1) && (theStr.length > pindex+1))
					result = true;
				  }
				  return result;
				}

				function validRequired(formField,fieldLabel)
				{
					var result = true;

					if (formField.value == "")
					{
						alert('Please enter a value for the "' + fieldLabel +'" field.');
						formField.focus();
						result = false;
					}

					return result;
				}

				function validEmail(formField,fieldLabel,required)
				{
					var result = true;

					if (required && !validRequired(formField,fieldLabel))
						result = false;

					if (result && ((formField.value.length < 3) || !isEmailAddr(formField.value)) )
					{
						alert("Please enter a complete email address in the form: yourname@yourdomain.com");
						formField.focus();
						result = false;
					}

				  return result;

				}


				function validNum(formField,fieldLabel,required)
				{
					var result = true;

					if (required && !validRequired(formField,fieldLabel))
						result = false;

				 	if (result)
				 	{
				 		var num = parseInt(formField.value);
				 		if (isNaN(num))
				 		{
				 			alert('Please enter a number for the "' + fieldLabel +'" field.');
							formField.focus();
							result = false;
						}
					}

					return result;
				}


				function validateForm(theForm)
				{

				   var why="";
					if (document.forms[0].country.selectedIndex > 1)
					{

						var alertstring = "Walden's programs best serve the needs of U.S. and Canadian Students, ";
						alertstring += "and U.S. Citizens and permanent residents living abroad.  ";
						alertstring += "If you would still like to request information from Walden,  ";
						alertstring += "please contact the school directly at (612) 338-7224.\n\n";
						alert(alertstring);
						return false;
					}

					if (!validRequired(theForm.First_Name,"First Name"))
						return false;

					if (!validRequired(theForm.Last_Name,"Last Name"))
						return false;

					if (!validNum(theForm.Phone,"Home Phone Number"))
						return false;

						why = checkPhoneNA(theForm.Phone.value);
						if (why != "") {
							   alert(why);
							   theForm.Phone.focus();
							   return false;
						}

				if (!validNum(theForm.Phone2,"Work Phone Number"))
				return false;

						why = checkPhoneNA(theForm.Phone2.value);
						if (why != "") {
							   alert(why);
							   theForm.Phone2.focus();
							   return false;
						}

					if (!validEmail(theForm.Email,"Email Address",true))
						return false;
					why = checkEmail(theForm.Email.value);
					if (why != "") {
					       alert(why);
					       theForm.Email.focus();
					       return false;
				    }

					if (!validRequired(theForm.Address1,"Mailing Address"))
						return false;

					if (!validRequired(theForm.City,"City"))
						return false;

					//if (!validRequired(theForm.State,"State"))
					//	return false;
					if ( theForm.State.selectedIndex<=0 ) {
						alert("Please select a state.");
						theForm.State.focus();
						return false;
					}

					if (!validRequired(theForm.Zip,"Zip"))
						return false;
				  if (theForm.country.selectedIndex  == 0) {

						why = checkZipUS(theForm.Zip.value);
						if (why != "") {
							   alert(why);
							   theForm.Zip.focus();
							   return false;
						}

				   }

				  if (theForm.country.selectedIndex  == 1) {

						why = checkZipCanada(theForm.Zip.value);
						if (why != "") {
							   alert(why);
							   theForm.Zip.focus();
							   return false;
						}

				   }

					if ( theForm.OnyxSurvey_Question_17000004.selectedIndex<=0 ) {
						alert("Please select your Highest level of education");
						theForm.OnyxSurvey_Question_17000004.focus();
						return false;
					}

					if ( theForm.Goals.selectedIndex<=0 ) {
						alert("Please select your Program of Interest");
						theForm.Goals.focus();
						return false;
					}

					var theState = theForm.State.options[theForm.State.selectedIndex].value;
					if ( isMSEducation(theForm.Goals.options[theForm.Goals.selectedIndex].value) && (theState=='MA' || theState=='NC' || theState=='ND')) {
						alert ("Walden's MS in Education degree programs are not available to teachers in MA, NC or ND.");
						return false;
					}

					var theDiv = document.getElementById('MSEducation');
					if ( theDiv.style.display=='none' ) {
						theDiv.innerHTML="";
					} else {
						if ( theDiv.innerHTML!="" ) {
							if ( document.forms[0].OnyxSurvey_Question_1147[0].checked==false && document.forms[0].OnyxSurvey_Question_1147[1].checked==false && document.forms[0].OnyxSurvey_Question_1148[0].checked==false && document.forms[0].OnyxSurvey_Question_1148[1].checked==false) {
								theDiv.innerHTML="";
							} else {
								document.forms[0].iSurveyID.value="125"
							}
						}
					}

					return true;
				}

				function processGoals(theSelect){
					var theForm = document.forms[0];
					if ( theForm.OnyxSurvey_Question_17000004.selectedIndex<=0 ) {
						alert("Please select your Highest level of education");
						theSelect.options[0].selected=true;
						theForm.OnyxSurvey_Question_17000004.focus();
						return;
					}

					if ( theSelect.selectedIndex<=0 ) {
						return;
					}

					var giveAlert = 0;
					var theGoalPrefix = theSelect.options[theSelect.selectedIndex].value.substr(0,1)
					switch (theForm.OnyxSurvey_Question_17000004.options[theForm.OnyxSurvey_Question_17000004.selectedIndex].value){
						case "17000005" : //High School Diploma/GED
							giveAlert=1;
							break;
						case "17000006" : //Some college (0-44 credits)
							giveAlert=1;
							break;
						case "17000007" : //Some college (45-59 credits)
							if ( theGoalPrefix != 'B' ) {
								giveAlert=1;
							}
							break;
						case "17000008" : //Some college (60+ credits)
							if ( theGoalPrefix != 'B' ) {
								giveAlert=1;
							}
							break;
						case "17000009" : //AA/AS degree
							if ( theGoalPrefix != 'B' ) {
								giveAlert=1;
							}
							break;
						case "17000010" : //BA/BS degree
							if ( theGoalPrefix != 'B' && theGoalPrefix != 'M' ) {
								giveAlert=1;
							}
							break;
						case "17000011" : //Master's degree
							giveAlert=0;
							break;
						case "17000012" : //Ph.D. degree
							giveAlert=0;
							break;
						case "17000013" : //Post doctoral certificate
							giveAlert=0;
							break;
					}
					if ( giveAlert ) {
						alert('Your education level does not qualify you for the program that you seleced.');
						theSelect.options[0].selected=true;
						return;
					}

					toggleMSEducation(theSelect);
				}  // processGoals

				function toggleMSEducation(theSelect){
					var theDiv = document.getElementById('MSEducation');
					var interests = theSelect.options[theSelect.selectedIndex].value;
					if ( isMSEducation(interests) ) {
						theDiv.style.display='block';
					} else {
						if ( theDiv.innerHTML!="" ) {
							document.forms[0].OnyxSurvey_Question_1147[0].checked=false;
							document.forms[0].OnyxSurvey_Question_1147[1].checked=false;
							document.forms[0].OnyxSurvey_Question_1148[0].checked=false;
							document.forms[0].OnyxSurvey_Question_1148[1].checked=false;
						}
						theDiv.style.display='none';
					}
				}  // toggleMSEducation

				function checkEducationLevel(theField){
					var theForm = document.forms[0];
					theForm.Goals.selectedIndex=0;

					if ( theField.selectedIndex==1 || theField.selectedIndex==2 ) {
						var alertstring = "In order to apply for Walden University, you must \n";
						alertstring += "have completed at least 44 credit hours.\n";
						alertstring += "Please click \"OK\" and you will be redirected to find more programs. \n\n";
						alertstring += "If you feel you have reached this message in error, please click \"Cancel\" to \n"
						alertstring += "return to the form.\n";

						alert(alertstring);
						return false;
					}
					return true;
				}  // checkEducationLevel

				function isMSEducation(theValue){
					if (
							theValue=='M.E.GN' ||
							theValue=='MS.W1EDU.EDU.W1CA' ||
							theValue=='MS.W1EDU.EDU.W1EL' ||
							theValue=='MS.W1EDU.EDU.W1ER' ||
							theValue=='MS.W1EDU.EDU.W1IC' ||
							theValue=='MS.W1EDU.EDU.W1ML' ||
							theValue=='MS.W1EDU.EDU.W1LL' ||
							theValue=='MS.W1EDU.EDU.W1MA' ||
							theValue=='MS.W1EDU.EDU.W1SCI'
						 ) {
						return true;
					}

					return false;
				}  // isMSEducation


				function popUp(url) {
				sealWin=window.open(url,"win",'toolbar=0,location=0,directories=0,status=1,menubar=1,scrollbars=1,resizable=1,width=500,height=450');
				self.name = "mainWin";
				}
