function is_registerednurse()
{
	if(($F('program').length > 0) || ($F('hidden_program').length > 0)) 
	{
		var url = '/js/php/university-of-phoenix/is_registerednurse.php';
		//var typeValue = Form.getInputs('myform','radio','is_registerednurse').find(function(radio) { return radio.checked; }).value;
		//var typeValue = $('myform').serialize().toQueryParams()['is_registerednurse'] 

		//alert(typeValue);
		//var registeredObj = thisform.is_registerednurse.value;
		//alert($registeredObj);
		/*for (x in $F)
		{
			document.write($F[x] + "<br>");
		}*/
		var params = 'program=' + $F('program') + '&hidden_is_registerednurse=' + $F('hidden_is_registerednurse') + '&hidden_stat=' + $F('hidden_stat') + '&hidden_program=' + $F('hidden_program');
		//alert("is_registered nurse params: " + params);
		//document.getElementById('is_registerednurse').innerHTML = "";
		//document.getElementById("is_registerednurse").style.visibility = "hidden";
		//$('is_registerednurse').replace('<div id=\"is_registerednurse\"></div>');
		var ajax = new Ajax.Updater({success: 'is_registerednurse'},url,
  			{method: 'post', 
  			//insertion: Insertion.Top,
  			parameters: params, 
  			onFailure: reportError});
	}
}


function getPrograms()
{
	//if($F('zip').length = 5 && ($F('campusonline') == "campus" || $F('campusonline') == "online"))
	if($F('highesteducation') == "No High School" || $F('highesteducation') == "Graduating High School in 2009" || 
	   $F('highesteducation') == "Graduating High School in 2010" || $F('highesteducation') == "Graduating High School in 2011 or after")
	{
		alert("University of Phoenix is accepting information requests from potential students who already have a high school diploma or GED.  Please indicate that you have a high school diploma or GED or request information from a different school.");
		document.myform.highesteducation.focus();
	}
	var url = '/js/php/university-of-phoenix/getprograms.php';
	var params = 'zip=' + $F('zip') + '&areaofinterest=' + $F('areaofinterest') + '&highesteducation=' + $F('highesteducation') + '&hidden_program=' + $F('hidden_program');
	//alert("getPrograms params: " + params);
	//$('programs').replace('<td colspan=\"2\" id=programs></td>');
	//$('program').replace('<select name=\"program\" size=\"1\" id=\"program\" onchange=\"is_registerednurse();\" class=\"form_item\" style=\"width: 390px;\">');
	//document.getElementById("programs").style.visibility = "hidden";
	//document.getElementById('programs').innerHTML = "";
	var ajax = new Ajax.Updater({success: 'program'},url,
		{method: 'post',
		//insertion: Insertion.Top,
		parameters: params,
		onFailure: reportError});
}
function getAreasOfInterest()
{
	if($F('zip') != "")
	{
		var url = '/js/php/university-of-phoenix/getareasofinterest.php';
		var params = 'zip=' + $F('zip') + '&hidden_areaofinterest=' + $F('hidden_areaofinterest');
		var ajax = new Ajax.Updater({success: 'areaofinterest'},url,
  			{method: 'post',
  			//insertion: Insertion.Top,
  			parameters: params,
  			onFailure: reportError});	
	}
	//document.myform.state[document.myform.state.selectedIndex].value = 'AL';
}


function checkHighestEducation()
{
	if($F('highesteducation') == 'No High School')
	{
		alert("University of Phoenix is not currently accepting information requests from potential students who have not yet attained a high school diploma.  Please correct your highest level of education or request information from another school.");
		document.myform.highesteducation.focus();
		return false;
		
	}
}


function reportError(request) {
$F('cityResult') = "Error";

}