// JavaScript Document
function update_fos(current, curField)
{
	var selectbox = document.getElementById('applicationForm').field;
	var browser=navigator.appName;
	selectbox.options.length = 0;

	chosen = current;
	
//Management and Organizational Studies (Accounting, Global Commerce, Human Resources, Finance)
//Social Sciences (Economics, Finance, History, Political Science, Psychology, Sociology, Criminology)
//Arts (Catholic Studies, Dramatic Literature, English, French, Philosophy, Religious Studies) 
//Childhood and Social Institutions
//Social Work
//Social Justice and Peace

	
	if (chosen == "Undergrad_Kings") {
		if (curField == "Management and Organizational Studies")
			selectbox.options[selectbox.options.length] = new Option('Management and Organizational Studies','Management and Organizational Studies',0,1);
		else selectbox.options[selectbox.options.length] = new Option('Management and Organizational Studies','Management and Organizational Studies',0,0);
		
		if (curField == "Social Sciences")
			selectbox.options[selectbox.options.length] = new Option('Social Sciences','Social Sciences ',0,1);
		else selectbox.options[selectbox.options.length] = new Option('Social Sciences ','Social Sciences ',0,0);	
		
		if (curField == "Arts")
			selectbox.options[selectbox.options.length] = new Option('Arts','Arts',0,1);
		else selectbox.options[selectbox.options.length] = new Option('Arts','Arts',0,0);
		
		if (curField == "Childhood and Social Institutions")
			selectbox.options[selectbox.options.length] = new Option('Childhood and Social Institutions','Childhood and Social Institutions',0,1);
		else selectbox.options[selectbox.options.length] = new Option('Childhood and Social Institutions','Childhood and Social Institutions',0,0);	
	
		if (curField == "Social Work")
			selectbox.options[selectbox.options.length] = new Option('Social Work','Social Work',0,1);
		else selectbox.options[selectbox.options.length] = new Option('Social Work','Social Work',0,0);	
		
		if (curField == "Social Justice and Peace")
			selectbox.options[selectbox.options.length] = new Option('Social Justice and Peace','Social Justice and Peace',0,1);
		else selectbox.options[selectbox.options.length] = new Option('Social Justice and Peace','Social Justice and Peace',0,0);	
	} else if (chosen == "Undergrad_Brescia") {
		if (curField == "Management and Organizational Studies")
			selectbox.options[selectbox.options.length] = new Option('Management and Organizational Studies','Management and Organizational Studies',0,1);
		else selectbox.options[selectbox.options.length] = new Option('Management and Organizational Studies','Management and Organizational Studies',0,0);
		
		if (curField == "Social Sciences")
			selectbox.options[selectbox.options.length] = new Option('Social Sciences','Social Sciences ',0,1);
		else selectbox.options[selectbox.options.length] = new Option('Social Sciences ','Social Sciences ',0,0);	
		
		if (curField == "Arts")
			selectbox.options[selectbox.options.length] = new Option('Arts','Arts',0,1);
		else selectbox.options[selectbox.options.length] = new Option('Arts','Arts',0,0);
		
		if (curField == "Foods and Nutritional Sciences")
			selectbox.options[selectbox.options.length] = new Option('Foods and Nutritional Sciences','Foods and Nutritional Sciences',0,1);
		else selectbox.options[selectbox.options.length] = new Option('Foods and Nutritional Sciences','Foods and Nutritional Sciences',0,0);	
	
		if (curField == "Family Studies")
			selectbox.options[selectbox.options.length] = new Option('Family Studies','Family Studies',0,1);
		else selectbox.options[selectbox.options.length] = new Option('Family Studies','Family Studies',0,0);	
		
		if (curField == "Health Sciences")
			selectbox.options[selectbox.options.length] = new Option('Health Sciences','Health Sciences',0,1);
		else selectbox.options[selectbox.options.length] = new Option('Health Sciences','Health Sciences',0,0);	

		if (curField == "Kinesiology")
			selectbox.options[selectbox.options.length] = new Option('Kinesiology','Kinesiology',0,1);
		else selectbox.options[selectbox.options.length] = new Option('Kinesiology','Kinesiology',0,0);	
		
		if (curField == "Human Ecology")
			selectbox.options[selectbox.options.length] = new Option('Human Ecology','Human Ecology',0,1);
		else selectbox.options[selectbox.options.length] = new Option('Human Ecology','Human Ecology',0,0);	
		
		if (curField == "Preliminary Year")
			selectbox.options[selectbox.options.length] = new Option('Preliminary Year','Preliminary Year',0,1);
		else selectbox.options[selectbox.options.length] = new Option('Preliminary Year','Preliminary Year',0,0);	
		
	} else if (chosen == "Graduate_UWO") {
		if (curField == "Chemistry")
			selectbox.options[selectbox.options.length] = new Option('Chemistry','Chemistry',0,1);
		else selectbox.options[selectbox.options.length] = new Option('Chemistry','Chemistry',0,0);

		if (curField == "Computer Science")	
			selectbox.options[selectbox.options.length] = new Option('Computer Science','Computer Science',0,1);		
		else selectbox.options[selectbox.options.length] = new Option('Computer Science','Computer Science',0,0);		

		if (curField == "Engineering")	
			selectbox.options[selectbox.options.length] = new Option('Engineering','Engineering',0,1);
		else selectbox.options[selectbox.options.length] = new Option('Engineering','Engineering',0,0);

		if (curField == "Nursing")	
			selectbox.options[selectbox.options.length] = new Option('Nursing','Nursing',0,1);		
		else selectbox.options[selectbox.options.length] = new Option('Nursing','Nursing',0,0);		
	
	} else if (chosen == "Undergrad_UOIT") {

		if (curField == "Applied Health Sciences")
			selectbox.options[selectbox.options.length] = new Option('Applied Health Sciences','Applied Health Sciences',0,1);
		else selectbox.options[selectbox.options.length] = new Option('Applied Health Sciences','Applied Health Sciences',0,0);

		if (curField == "Applied and Industrial Mathematics")
			selectbox.options[selectbox.options.length] = new Option('Applied and Industrial Mathematics','Applied and Industrial Mathematics',0,1);
		else selectbox.options[selectbox.options.length] = new Option('Applied and Industrial Mathematics','Applied and Industrial Mathematics',0,0);

		if (curField == "Automotive Engineering")
			selectbox.options[selectbox.options.length] = new Option('Automotive Engineering','Automotive Engineering',0,1);
		else selectbox.options[selectbox.options.length] = new Option('Automotive Engineering','Automotive Engineering',0,0);
	
		if (curField == "Biological Science")
			selectbox.options[selectbox.options.length] = new Option('Biological Science','Biological Science',0,1);
		else selectbox.options[selectbox.options.length] = new Option('Biological Science','Biological Science',0,0);
	
		if (curField == "Chemistry")
			selectbox.options[selectbox.options.length] = new Option('Chemistry','Chemistry',0,1);
		else selectbox.options[selectbox.options.length] = new Option('Chemistry','Chemistry',0,0);
	
		if (curField == "Commerce")
			selectbox.options[selectbox.options.length] = new Option('Commerce','Commerce',0,1);
		else selectbox.options[selectbox.options.length] = new Option('Commerce','Commerce',0,0);

		if (curField == "Communication")
			selectbox.options[selectbox.options.length] = new Option('Communication','Communication',0,1);
		else selectbox.options[selectbox.options.length] = new Option('Communication','Communication',0,0);

		if (curField == "Computing Science")
			selectbox.options[selectbox.options.length] = new Option('Computing Science','Computing Science',0,1);
		else selectbox.options[selectbox.options.length] = new Option('Computing Science','Computing Science',0,0);
	
		
		if (curField == "Criminology")
			selectbox.options[selectbox.options.length] = new Option('Criminology','Criminology',0,1);
		else selectbox.options[selectbox.options.length] = new Option('Criminology','Criminology',0,0);	

		if (curField == "Digital Media")
			selectbox.options[selectbox.options.length] = new Option('Digital Media','Digital Media',0,1);
		else selectbox.options[selectbox.options.length] = new Option('Digital Media','Digital Media',0,0);	
	
		if (curField == "Education")
			selectbox.options[selectbox.options.length] = new Option('Education','Education',0,1);
		else selectbox.options[selectbox.options.length] = new Option('Education','Education',0,0);
	
		if (curField == "Electrical Engineering")
			selectbox.options[selectbox.options.length] = new Option('Electrical Engineering','Electrical Engineering',0,1);
		else selectbox.options[selectbox.options.length] = new Option('Electrical Engineering','Electrical Engineering',0,0);
	
		if (curField == "Energy Systems Engineering")
			selectbox.options[selectbox.options.length] = new Option('Energy Systems Engineering','Energy Systems Engineering',0,1);
		else selectbox.options[selectbox.options.length] = new Option('Energy Systems Engineering','Energy Systems Engineering',0,0);
	
		if (curField == "Forensic Science")
			selectbox.options[selectbox.options.length] = new Option('Forensic Science','Forensic Science',0,1);
		else selectbox.options[selectbox.options.length] = new Option('Forensic Science','Forensic Science',0,0);

		if (curField == "Game Development and Entrepreneurship")
			selectbox.options[selectbox.options.length] = new Option('Game Development and Entrepreneurship','Game Development and Entrepreneurship',0,1);
		else selectbox.options[selectbox.options.length] = new Option('Game Development and Entrepreneurship','Game Development and Entrepreneurship',0,0);	

		if (curField == "Health Physics and Radiation Science")
			selectbox.options[selectbox.options.length] = new Option('Health Physics and Radiation Science','Health Physics and Radiation Science',0,1);
		else selectbox.options[selectbox.options.length] = new Option('Health Physics and Radiation Science','Health Physics and Radiation Science',0,0);
	
		if (curField == "Health Sciences")
			selectbox.options[selectbox.options.length] = new Option('Health Sciences','Health Sciences',0,1);
		else selectbox.options[selectbox.options.length] = new Option('Health Sciences','Health Sciences',0,0);
	
		if (curField == "Information Technology")
			selectbox.options[selectbox.options.length] = new Option('Information Technology','Information Technology',0,1);
		else selectbox.options[selectbox.options.length] = new Option('Information Technology','Information Technology',0,0);

		if (curField == "Information Technology Security")
			selectbox.options[selectbox.options.length] = new Option('Information Technology Security','Information Technology Security',0,1);
		else selectbox.options[selectbox.options.length] = new Option('Information Technology Security','Information Technology Security',0,0);
		
		if (curField == "Kinesiology")
			selectbox.options[selectbox.options.length] = new Option('Kinesiology','Kinesiology',0,1);
		else selectbox.options[selectbox.options.length] = new Option('Kinesiology','Kinesiology',0,0);	

		if (curField == "Legal Studies")
			selectbox.options[selectbox.options.length] = new Option('Legal Studies','Legal Studies',0,1);
		else selectbox.options[selectbox.options.length] = new Option('Legal Studies','Legal Studies',0,0);	

		if (curField == "Life Sciences")
			selectbox.options[selectbox.options.length] = new Option('Life Sciences','Life Sciences',0,1);
		else selectbox.options[selectbox.options.length] = new Option('Life Sciences','Life Sciences',0,0);	

		if (curField == "Manufacturing Engineering")
			selectbox.options[selectbox.options.length] = new Option('Manufacturing Engineering','Manufacturing Engineering',0,1);
		else selectbox.options[selectbox.options.length] = new Option('Manufacturing Engineering','Manufacturing Engineering',0,0);
	
		if (curField == "Mechanical Engineering")
			selectbox.options[selectbox.options.length] = new Option('Mechanical Engineering','Mechanical Engineering',0,1);
		else selectbox.options[selectbox.options.length] = new Option('Mechanical Engineering','Mechanical Engineering',0,0);
	
		if (curField == "Medical Laboratory Science")
			selectbox.options[selectbox.options.length] = new Option('Medical Laboratory Science','Medical Laboratory Science',0,1);
		else selectbox.options[selectbox.options.length] = new Option('Medical Laboratory Science','Medical Laboratory Science',0,0);
	
		if (curField == "Nuclear Engineering")
			selectbox.options[selectbox.options.length] = new Option('Nuclear Engineering','Nuclear Engineering',0,1);
		else selectbox.options[selectbox.options.length] = new Option('Nuclear Engineering','Nuclear Engineering',0,0);
	
		if (curField == "Nursing")
			selectbox.options[selectbox.options.length] = new Option('Nursing','Nursing',0,1);
		else selectbox.options[selectbox.options.length] = new Option('Nursing','Nursing',0,0);

		if (curField == "Pharmaceutical Chemistry")
			selectbox.options[selectbox.options.length] = new Option('Pharmaceutical Chemistry','Pharmaceutical Chemistry',0,1);
		else selectbox.options[selectbox.options.length] = new Option('Pharmaceutical Chemistry','Pharmaceutical Chemistry',0,0);	

		if (curField == "Physical Science")
			selectbox.options[selectbox.options.length] = new Option('Physical Science','Physical Science',0,1);
		else selectbox.options[selectbox.options.length] = new Option('Physical Science','Physical Science',0,0);
	
		if (curField == "Physics")
			selectbox.options[selectbox.options.length] = new Option('Physics','Physics',0,1);
		else selectbox.options[selectbox.options.length] = new Option('Physics','Physics',0,0);

		if (curField == "Public and Social Policy")
			selectbox.options[selectbox.options.length] = new Option('Public and Social Policy','Public and Social Policy',0,1);
		else selectbox.options[selectbox.options.length] = new Option('Public and Social Policy','Public and Social Policy',0,0);	

		if (curField == "Software Engineering")
			selectbox.options[selectbox.options.length] = new Option('Software Engineering','Software Engineering',0,1);
		else selectbox.options[selectbox.options.length] = new Option('Software Engineering','Software Engineering',0,0);
	
	
	} else if (chosen == "Graduate_UOIT") {
		
		if (curField == "Applied Bioscience")
			selectbox.options[selectbox.options.length] = new Option('Applied Bioscience','Applied Bioscience',0,1);
		else selectbox.options[selectbox.options.length] = new Option('Applied Bioscience','Applied Bioscience',0,0);
		
		if (curField == "Automotive Engineering")
			selectbox.options[selectbox.options.length] = new Option('Automotive Engineering','Automotive Engineering',0,1);
		else selectbox.options[selectbox.options.length] = new Option('Automotive Engineering','Automotive Engineering',0,0);

		if (curField == "Business Administration")
			selectbox.options[selectbox.options.length] = new Option('Business Administration','Business Administration',0,1);
		else selectbox.options[selectbox.options.length] = new Option('Business Administration','Business Administration',0,0);

		if (curField == "Education")
			selectbox.options[selectbox.options.length] = new Option('Education','Education',0,1);
		else selectbox.options[selectbox.options.length] = new Option('Education','Education',0,0);

		if (curField == "Electrical and Computer Engineering")
			selectbox.options[selectbox.options.length] = new Option('Electrical and Computer Engineering','Electrical and Computer Engineering',0,1);
		else selectbox.options[selectbox.options.length] = new Option('Electrical and Computer Engineering','Electrical and Computer Engineering',0,0);

		if (curField == "Health Sciences")
			selectbox.options[selectbox.options.length] = new Option('Health Sciences','Health Sciences',0,1);
		else selectbox.options[selectbox.options.length] = new Option('Health Sciences','Health Sciences',0,0);
		
		if (curField == "Information Technology Security")
			selectbox.options[selectbox.options.length] = new Option('Information Technology Security','Information Technology Security',0,1);
		else selectbox.options[selectbox.options.length] = new Option('Information Technology Security','Information Technology Security',0,0);
		
		if (curField == "Materials Science")
			selectbox.options[selectbox.options.length] = new Option('Materials Science','Materials Science',0,1);
		else selectbox.options[selectbox.options.length] = new Option('Materials Science','Materials Science',0,0);
		
		if (curField == "Mechanical Engineering")
			selectbox.options[selectbox.options.length] = new Option('Mechanical Engineering','Mechanical Engineering',0,1);
		else selectbox.options[selectbox.options.length] = new Option('Mechanical Engineering','Mechanical Engineering',0,0);
		
		if (curField == "Modelling and Computational Science")
			selectbox.options[selectbox.options.length] = new Option('Modelling and Computational Science','Modelling and Computational Science',0,1);
		else selectbox.options[selectbox.options.length] = new Option('Modelling and Computational Science','Modelling and Computational Science',0,0);
		
		if (curField == "Nuclear Engineering")
			selectbox.options[selectbox.options.length] = new Option('Nuclear Engineering','Nuclear Engineering',0,1);
		else selectbox.options[selectbox.options.length] = new Option('Nuclear Engineering','Nuclear Engineering',0,0);
	} else if (chosen == "Undergrad_UWO") {
		if (curField == "Arts and Humanities")
			selectbox.options[selectbox.options.length] = new Option('Arts and Humanities','Arts and Humanities',0,1);
		else selectbox.options[selectbox.options.length] = new Option('Arts and Humanities','Arts and Humanities',0,0);		

		if (curField == "Engineering")	
			selectbox.options[selectbox.options.length] = new Option('Engineering','Engineering',0,1);
		else selectbox.options[selectbox.options.length] = new Option('Engineering','Engineering',0,0);
		
		if (curField == "Kinesiology")	
			selectbox.options[selectbox.options.length] = new Option('Kinesiology','Kinesiology',0,1);		
		else selectbox.options[selectbox.options.length] = new Option('Kinesiology','Kinesiology',0,0);
		
		if (curField == "Health Sciences")	
			selectbox.options[selectbox.options.length] = new Option('Health Sciences','Health Sciences',0,1);		
		else selectbox.options[selectbox.options.length] = new Option('Health Sciences','Health Sciences',0,0);
		
		if (curField == "Information and Media Studies")	
			selectbox.options[selectbox.options.length] = new Option('Information and Media Studies','Information and Media Studies',0,1);		
		else selectbox.options[selectbox.options.length] = new Option('Information and Media Studies','Information and Media Studies',0,0);
		
		if (curField == "Management and Organizational Studies")	
			selectbox.options[selectbox.options.length] = new Option('Management and Organizational Studies','Management and Organizational Studies',0,1);		
		else selectbox.options[selectbox.options.length] = new Option('Management and Organizational Studies','Management and Organizational Studies',0,0);
		
		if (curField == "Music")	
			selectbox.options[selectbox.options.length] = new Option('Music','Music',0,1);		
		else selectbox.options[selectbox.options.length] = new Option('Music','Music',0,0);
		
		if (curField == "Science")	
			selectbox.options[selectbox.options.length] = new Option('Science','Science',0,1);		
		else selectbox.options[selectbox.options.length] = new Option('Science','Science',0,0);

		if (curField == "Social Science")	
			selectbox.options[selectbox.options.length] = new Option('Social Science','Social Science',0,1);		
		else selectbox.options[selectbox.options.length] = new Option('Social Science','Social Science',0,0);	
	} else if (chosen == "College_Durham") {
		
		if (curField == "General Arts and Science")
			selectbox.options[selectbox.options.length] = new Option('General Arts and Science','General Arts and Science',0,1);
		else selectbox.options[selectbox.options.length] = new Option('General Arts and Science','General Arts and Science',0,0);
		
		if (curField == "Business")
			selectbox.options[selectbox.options.length] = new Option('Business','Business',0,1);
		else selectbox.options[selectbox.options.length] = new Option('Business','Business',0,0);	
		
		if (curField == "Business – Entrepreneurship and Small Business ")
			selectbox.options[selectbox.options.length] = new Option('Entrepreneurship and Small Business ','Entrepreneurship and Small Business ',0,1);
		else selectbox.options[selectbox.options.length] = new Option('Entrepreneurship and Small Business ','Entrepreneurship and Small Business ',0,0);	
		
		if (curField == "Chemical Laboratory Technician")
			selectbox.options[selectbox.options.length] = new Option('Chemical Laboratory Technician','Chemical Laboratory Technician',0,1);
		else selectbox.options[selectbox.options.length] = new Option('Chemical Laboratory Technician','Chemical Laboratory Technician',0,0);
		
		if (curField == "Computer Systems Technician")
			selectbox.options[selectbox.options.length] = new Option('Computer Systems Technician','Computer Systems Technician',0,1);
		else selectbox.options[selectbox.options.length] = new Option('Computer Systems Technician','Computer Systems Technician',0,0);
		
		if (curField == "Computer Programmer Analyst")
			selectbox.options[selectbox.options.length] = new Option('Computer Programmer Analyst','Computer Programmer Analyst',0,1);
		else selectbox.options[selectbox.options.length] = new Option('Computer Programmer Analyst','Computer Programmer Analyst',0,0);
		
		if (curField == "Biotechnology Technologist or Pharmaceutical ")
			selectbox.options[selectbox.options.length] = new Option('Biotechnology Technologist or Pharmaceutical ','Biotechnology Technologist or Pharmaceutical ',0,1);
		else selectbox.options[selectbox.options.length] = new Option('Biotechnology Technologist or Pharmaceutical ','Biotechnology Technologist or Pharmaceutical ',0,0);	
		
		if (curField == "Human Resources Management")
			selectbox.options[selectbox.options.length] = new Option('Human Resources Management','Human Resources Management',0,1);
		else selectbox.options[selectbox.options.length] = new Option('Human Resources Management','Human Resources Management',0,0);
		
		}
}

function update_campus(current, curField)
{
	var selectbox = document.getElementById('applicationForm').Campus;
	var browser=navigator.appName;
	selectbox.options.length = 0;
	
	var selectbox2 = document.getElementById('applicationForm').field;
	selectbox2.options.length = 0;
	
	chosen = current;
	
	
	//alert(chosen);
	//alert(curField);
	if (chosen == "ESL_and_undergrad") {
		selectbox.options[selectbox.options.length] = new Option('Select a Campus','',0,0);
		if (curField == "Undergrad_Kings")
			selectbox.options[selectbox.options.length] = new Option('King\'s at UWO','Undergrad_Kings',0,1); 
		else selectbox.options[selectbox.options.length] = new Option('King\'s at UWO','Undergrad_Kings',0,0);
		if (curField == "Undergrad_Brescia")
			selectbox.options[selectbox.options.length] = new Option('Brescia at UWO','Undergrad_Brescia',0,1);
		else selectbox.options[selectbox.options.length] = new Option('Brescia at UWO','Undergrad_Brescia',0,0);
		if (curField == "Undergrad_UOIT")
			selectbox.options[selectbox.options.length] = new Option('UOIT','Undergrad_UOIT',0,1);
		else selectbox.options[selectbox.options.length] = new Option('UOIT','Undergrad_UOIT',0,0);
		if (curField == "Undergrad_UWO")
			selectbox.options[selectbox.options.length] = new Option('UWO','Undergrad_UWO',0,1);
		else selectbox.options[selectbox.options.length] = new Option('UWO','Undergrad_UWO',0,0);
	} else if (chosen == "ESL_and_graduate") {
		selectbox.options[selectbox.options.length] = new Option('Select a Campus','',0,0);
		if (curField == "Graduate_UWO")
			selectbox.options[selectbox.options.length] = new Option('UWO','Graduate_UWO',0,1);
		else selectbox.options[selectbox.options.length] = new Option('UWO','Graduate_UWO',0,0);
		if (curField == "Graduate_UOIT")
			selectbox.options[selectbox.options.length] = new Option('UOIT','Graduate_UOIT',0,1);
		else selectbox.options[selectbox.options.length] = new Option('UOIT','Graduate_UOIT',0,0);	
		
	} else if (chosen == "ESL") {
		selectbox.options[selectbox.options.length] = new Option('Select a Campus','',0,0);
		if (curField == "London")
		 selectbox.options[selectbox.options.length] = new Option('London','London',0,1);
		else selectbox.options[selectbox.options.length] = new Option('London','London',0,0);
		if (curField == "Oshawa")
		 selectbox.options[selectbox.options.length] = new Option('Oshawa','Oshawa',0,1);
		else selectbox.options[selectbox.options.length] = new Option('Oshawa','Oshawa',0,0);
	} else if (chosen == "ESL_and_college") {
		selectbox.options[selectbox.options.length] = new Option('Select a Campus','',0,0);
		if (curField == "College_Durham")
			selectbox.options[selectbox.options.length] = new Option('Durham College','College_Durham',0,1);
		else selectbox.options[selectbox.options.length] = new Option('Durham College','College_Durham',0,0);
	}
	else
	{
		selectbox.options[0] = new Option('','',0,0);
	}
}
