function invalidcheck() {
	var date = new Date();
	var thisYear = date.getFullYear();
	var program = document.Entry.program.options[document.Entry.program.selectedIndex].text;
	var level = document.Entry.level_of_education;

	//Hasn't selected LOE
	if (level.selectedIndex == 0) {
		level.focus();
		alert('You must selected a level of education');
		return false;
	}
	
	//Is Associates Degree
	if (program.indexOf("Associate") > -1 || program.indexOf("AAS") > -1 || program.indexOf("A.A.S") > -1 || program.indexOf("A.B.A") > -1 || program.indexOf("Certificate") > -1 || program == "Post-Bac Cert - Proj Mgmt Plan") {
		if (level.selectedIndex == 1) {
			//alert ('You must have at least a highschool diploma or GED for this program');	
			level.focus();
			invalidPop('no_highschool');
			return false;
		}
	}

	//Is Bachelors Degree
	if (program.indexOf("Bachelor") > -1 || program.indexOf("B.B.A") > -1 || program.indexOf("B.S") > -1 || program.indexOf("BHSA") > -1 || program == "BS - Psychology") {
		if (level.selectedIndex < 4) {
			//alert ('You must have at least a highschool diploma or GED for this program');	
			level.focus();
			invalidPop('need_associates');
			return false;
		}	
	}

	//Is Masters/MBA Degree
	if (program.indexOf("Master") > -1 || program.indexOf("M.B.A") > -1 || program.indexOf("MBA") > -1 || program == "MS - Info Systems") {
		if (level.selectedIndex < 2) {
			//alert ('You must have at least a bachelors degree for this program');	
			level.focus();
			invalidPop('bach_for_mast');
			return false;
		}	
	}

	//Is Doctoral Degree
	if (program.indexOf("Ph.D") > -1 || program.indexOf("Doctor") > -1) {
		if (level.selectedIndex < 6) {
			//alert ('You must have at least a masters degree for this program');	
			level.focus();
			invalidPop('mast_for_dr');
			return false;
		}		
	}

	return true;
}
	


function checkForm()
{
	var program = document.Entry.program.options[document.Entry.program.selectedIndex].value;
	var expected_start_date = document.Entry.expected_start_date.options[document.Entry.expected_start_date.selectedIndex].value;
	var degree_obtained = document.Entry.degree_obtained.options[document.Entry.degree_obtained.selectedIndex].value;

	//Program checker			
	if ((program=="0"))
		{
		alert("\nYou must select a program.");
		document.Entry.program.focus();
		return false;
		} 
	
	//check the basic info
	var state = CheckBasicInfo();
	if(state == false){
		return false;
	}


	//expected_start_date checker			
	if ((expected_start_date=="0"))
		{
		alert("\nYou must select your expected start date.");
		document.Entry.expected_start_date.focus();
		return false;
		} 

	if ( invalidcheck() == false ) { return false; } 

	//degree_obtained checker			
	if ((degree_obtained=="0"))
		{
		alert("\nYou must select what year your degree was obtained");
		document.Entry.degree_obtained.focus();
		return false;
		} 

	setBool();
	// Pressnall Dupe Stopper
	if ( typeof ( formSubmission ) == "number" ){
		  return false;
		}
	formSubmission = 1;
}


















var hidden_questions_prev = 0;

function changefocus(focustype) {
	if (focustype == "alert")
	{
		focusclass = 'focusalert';
	} else {
		focusclass = 'focuslight';
	}
	
	if (document.Entry.program.value == 0)
		{
			document.getElementById('f_program').className=focusclass;
			document.getElementById('f_zip').className='unfocuslight';
			document.getElementById('f_contact').className='unfocuslight';
		} else if (document.Entry.program.value != 0  && document.Entry.zip.value.length < 5) {
			document.getElementById('f_program').className='unfocuslight';
			document.getElementById('f_zip').className=focusclass;
			document.getElementById('f_contact').className='unfocuslight';
		}
		 else if (document.Entry.program.value != 0 && document.Entry.zip.value != '')
		{
		  document.getElementById('f_program').className='unfocuslight';
		  document.getElementById('f_zip').className='unfocuslight';
		  document.getElementById('f_contact').className=focusclass;
		}
}

function changeDetails() {
	if (document.Entry.program.value == 0) {
	updateDetails('default_details');
	}
	else {
	var lookid = document.Entry.program.value;
	lookid = "d_" + document.Entry.program.value;
	updateDetails(lookid);
	}
}
// Switch the graphics.... graphics will have to be created 
// update your cases accordingly and name your images/graphic_file.jpg / gifs accordingly.
// See default case for the default graphic.
function updateDetails(textid) {
	if (current_details != textid)
	{
	switch (textid)
	{
		case 'd_Information Technology Emphasis in Network Management/Microsoft, B.S.':
			document.images["img1"].src = "images/degrees_tech.jpg";
			break;
		// This is the default top right graphic, even if you remove all the cases above
		// and don't swap out the grahics, you'll at least need this default....
		default:
			document.images["img1"].src = "images/degrees_default.jpg";
		break;
	}
	/*
		#########################################################################################
		### Smitty Fade control. You should not have to modify this but you may have to modify
		### the colors outlined below for degree_info3 / degree_info2 / degree_info3
		### to have the appropriate blend look good for your form colors.
		#########################################################################################
	*/
	document.getElementById('degree_details').innerHTML=document.getElementById(textid).innerHTML;
	resetDegreeLinks('c_' + textid);
	document.getElementById('degree_details').className='degree_info4';
		setTimeout("document.getElementById('degree_details').className='degree_info3'",200);
		setTimeout("document.getElementById('degree_details').className='degree_info2'",250);
		setTimeout("document.getElementById('degree_details').className='degree_info'",300);
	current_details=textid;
	updateDetails(textid);
	}
}
function selectProgram(program_id) {
	if (program_id != document.Entry.program.value)
	{
		document.Entry.program.value = program_id;
		resetDegreeLinks('c_d_' + program_id);
		document.Entry.zip.focus();
		changefocus('focuslight');
	}
	
}
var current_details = 0;






// unhides extra fields
function display_extras()	{
	var program = document.Entry.program.options[document.Entry.program.selectedIndex].value;
}

	


