vFormName = 'mainform';
vState = 'state';

//FIELD NAME,DISPLAY NAME,TYPE
//TYPE (name,phone,zip,email,text,select)
vRequiredFields = '';
vRequiredFields += 'programcategory_main,Career Interest,select,';
vRequiredFields += 'programcategory_id,Career Path,select,';
vRequiredFields += 'school_type,Campus or Online,select,';
vRequiredFields += 'firstname,First Name,name,';
vRequiredFields += 'lastname,Last Name,name,';
vRequiredFields += 'address1,Address,text,';
vRequiredFields += 'city,City,text,';
vRequiredFields += 'state,State,select,';
vRequiredFields += 'zip,Zip,zip,';
vRequiredFields += 'country,Country,select,';
vRequiredFields += 'phone,Phone,phone,';
vRequiredFields += 'phone2,Work Phone,phoneNR,';
vRequiredFields += 'email,Email,email,';
vRequiredFields += 'gradmonth,Graduation Month,select,';
vRequiredFields += 'gradyear,Graduation Year,select,';
//vRequiredFields += 'dobmonth,Birth Month,select,';
//vRequiredFields += 'dobday,Birth Day,select,';
//vRequiredFields += 'dobyear,Birth Year,select';



//This function is used by Online Degree Info Searchboxes
//validates for zip, degree, and career variables
function Validate()
{
	if( document.form1.career.selectedIndex == 0 )
		{
			alert('Please select a Career Track.');
			return false;
	}
	//else if ( document.form1.career.selectedIndex != 0 && document.form1.degree.selectedIndex == 0 )
	//{
	//	alert('Please select a Career Focus.');
	//	return false;
	//}
	else if ( document.form1.zip.value == "" )
	{
		alert('Please fill out Zip/Postal Code.');
		return false;
	}
	else
	{
		return true;
	}
}

//this function changes the class for the search side by selection of the school_type radio 
function showSchoolTypeList()
{
	if( document.getElementById("school_typeC").checked == true )
	{
		pos = document.form1.degree.length;
		if(typeof(pos) != "undefined")
		{
			for(i = document.form1.degree.length-1; i >= 0;i--)
			{
					document.form1.degree.options[i] = null;
			}
		}

		pos = document.form1.career.length;
		if(typeof(pos) != "undefined")
		{
			for(i = document.form1.career.length-1; i >= 0;i--)
			{
					document.form1.career.options[i] = null;
			}
		}
		/*
		getCampusCareer();
		setCampusCareer();
		getCampusDegree();
		setCampusDegree();
		*/
		getCareer();
		setCareer();
		getDegree();
		setDegree();
		document.getElementById("form").className = "campus_client_type";
	}
	else
	{
		pos = document.form1.degree.length;
		if(typeof(pos) != "undefined")
		{
			for(i = document.form1.degree.length-1; i >= 0;i--)
			{
					document.form1.degree.options[i] = null;
			}
		}

		pos = document.form1.career.length;
		if(typeof(pos) != "undefined")
		{
			for(i = document.form1.career.length-1; i >= 0;i--)
			{
					document.form1.career.options[i] = null;
			}
		}
		
		getCareer();
		setCareer();
		getDegree();
		setDegree();
		document.getElementById("form").className = "online_client_type";
	}
}

function getDegreeList()
{
	//if( document.getElementById("school_typeC").checked == true )
	//{
	//	getCampusDegree();
	//}
	//else
	//{
		getDegree();
	//}
}

//this function switches the program lists for the browse side by selection of client_type radio
function showClientTypeList()
{
	if( document.getElementById("client_typeC").checked == true )
	{
		document.getElementById("online_client_type").style.display = "none";
		document.getElementById("campus_client_type").style.display = "block";
	}
	else if( document.getElementById("client_typeO").checked == true )
	{
		document.getElementById("online_client_type").style.display = "block";
		document.getElementById("campus_client_type").style.display = "none";		
	}
	else
	{
		document.getElementById("client_typeO").checked = true;
		document.getElementById("online_client_type").style.display = "block";
		document.getElementById("campus_client_type").style.display = "none";
	}
}
