var exit=true;
function openPopupWindow(popupUrl,windowName,features) { //v2.0
  window.open(popupUrl,windowName,features);
}

function unSetExit()
{
  exit=false;
  return (true);
}

function changeAreaOfStudy(form){
	for(i=form.level.length-1;i>0;i--){
		form.level.options[i] = null;
	}
	areaOfStudy = form.areaOfStudy.value;
	if(areaOfStudy=='') return;
	if(areaOfStudy=='education') {
		form.level.options[form.level.length] = new Option("Bachelor Degrees", "Bachelor");
		form.level.options[form.level.length] = new Option("Master Degrees", "Master");
		form.level.options[form.level.length] = new Option("Doctoral", "Doctorate");
	}
	else if(areaOfStudy=='general') {
		form.level.options[form.level.length] = new Option("Bachelor Degrees", "Bachelor");
		form.level.options[form.level.length] = new Option("Master Degrees", "Master");		
		form.level.options[form.level.length] = new Option("Certificates", "Certificate");
		form.level.options[form.level.length] = new Option("Associates", "Associate");
	}
	else if(areaOfStudy=='design') {
		form.level.options[form.level.length] = new Option("Bachelor Degrees", "Bachelor");
		form.level.options[form.level.length] = new Option("Certificates", "Certificate");
		form.level.options[form.level.length] = new Option("Associates", "Associate");
	}
	else if(areaOfStudy=='legal') {
		form.level.options[form.level.length] = new Option("Bachelor Degrees", "Bachelor");
		form.level.options[form.level.length] = new Option("Associates", "Associate");
	}
	else if(areaOfStudy=='trade') {
		form.level.options[form.level.length] = new Option("Certificates", "Certificate");
	}
	else if(areaOfStudy=='nursing') {
		form.level.options[form.level.length] = new Option("Bachelor Degrees", "Bachelor");
		form.level.options[form.level.length] = new Option("Master Degrees", "Master");		
	}
	else if(areaOfStudy=='culinary') {
		form.level.options[form.level.length] = new Option("Bachelor Degrees", "ALL");
		form.level.options[form.level.length] = new Option("Certificates", "ALL");	
		form.level.options[form.level.length] = new Option("Associates", "ALL");
	}
	else if(areaOfStudy=='liberal') {
		form.level.options[form.level.length] = new Option("Bachelor Degrees", "Bachelor");
		form.level.options[form.level.length] = new Option("Master Degrees", "Master");		
		form.level.options[form.level.length] = new Option("Certificates", "Certificate");
		form.level.options[form.level.length] = new Option("Associates", "Associate");
	}
	else if(areaOfStudy=='psychology') {
		form.level.options[form.level.length] = new Option("Bachelor Degrees", "Bachelor");
		form.level.options[form.level.length] = new Option("Master Degrees", "Master");
		form.level.options[form.level.length] = new Option("Associates", "Associate");
		form.level.options[form.level.length] = new Option("Doctoral", "Doctorate");
	}
	else {
		form.level.options[form.level.length] = new Option("Bachelor Degrees", "Bachelor");
		form.level.options[form.level.length] = new Option("Master Degrees", "Master");		
		form.level.options[form.level.length] = new Option("Certificates", "Certificate");
		form.level.options[form.level.length] = new Option("Associates", "Associate");
		form.level.options[form.level.length] = new Option("Doctoral", "Doctorate");
	}
}
