// JavaScript Document
function nomore()
{
var IntPath=document.form2.specify;
var TheOptions=IntPath.options.length;

document.form2.specify.options.length=0;

	IntPath.options[IntPath.options.length]=new Option('Not applicable','N/A');
	
}

function department()
{
var IntPath=document.form2.specify;
var TheOptions=IntPath.options.length;

document.form2.specify.options.length=0;

	IntPath.options[IntPath.options.length]=new Option('Choose the subject','No Subject chosen');
	IntPath.options[IntPath.options.length]=new Option('English','English');
	IntPath.options[IntPath.options.length]=new Option('Maths','Maths');
	IntPath.options[IntPath.options.length]=new Option('Science','Science');
	IntPath.options[IntPath.options.length]=new Option('Humantities','Humanities');
	IntPath.options[IntPath.options.length]=new Option('Technology - includes Art','Technolgy');
	IntPath.options[IntPath.options.length]=new Option('ICT','ICT');
	IntPath.options[IntPath.options.length]=new Option('Perfomance Arts','PerfArts');
	IntPath.options[IntPath.options.length]=new Option('Modern Languages','MFL');

}

function tutor()
{
var IntPath=document.form2.specify;
var TheOptions=IntPath.options.length;

document.form2.specify.options.length=0;

	IntPath.options[IntPath.options.length]=new Option('Chose the tutor group','Not Given');
	IntPath.options[IntPath.options.length]=new Option('7JJ','7JJ');
	IntPath.options[IntPath.options.length]=new Option('7JO','7JO');
	IntPath.options[IntPath.options.length]=new Option('7JH','7JH');
	IntPath.options[IntPath.options.length]=new Option('7JN','7JN');
	IntPath.options[IntPath.options.length]=new Option('7BB','7BB');
	IntPath.options[IntPath.options.length]=new Option('7BE','7BE');
	IntPath.options[IntPath.options.length]=new Option('7BN','7BN');
	IntPath.options[IntPath.options.length]=new Option('7BT','7BT');
	IntPath.options[IntPath.options.length]=new Option('8JJ','8JJ');
	IntPath.options[IntPath.options.length]=new Option('8JO','8JO');
	IntPath.options[IntPath.options.length]=new Option('8JH','8JH');
	IntPath.options[IntPath.options.length]=new Option('8JN','8JN');
	IntPath.options[IntPath.options.length]=new Option('8BB','8BB');
	IntPath.options[IntPath.options.length]=new Option('8BE','8BE');
	IntPath.options[IntPath.options.length]=new Option('8BN','8BN');
	IntPath.options[IntPath.options.length]=new Option('8BT','8BT');
	IntPath.options[IntPath.options.length]=new Option('9JJ','9JJ');
	IntPath.options[IntPath.options.length]=new Option('9JO','9JO');
	IntPath.options[IntPath.options.length]=new Option('9JH','9JH');
	IntPath.options[IntPath.options.length]=new Option('9JN','9JN');
	IntPath.options[IntPath.options.length]=new Option('9BB','9BB');
	IntPath.options[IntPath.options.length]=new Option('9BE','9BE');
	IntPath.options[IntPath.options.length]=new Option('9BN','9BN');
	IntPath.options[IntPath.options.length]=new Option('9BT','9BT');
	IntPath.options[IntPath.options.length]=new Option('10JJ','10JJ');
	IntPath.options[IntPath.options.length]=new Option('10JO','10JO');
	IntPath.options[IntPath.options.length]=new Option('10JH','10JH');
	IntPath.options[IntPath.options.length]=new Option('10JN','10JN');
	IntPath.options[IntPath.options.length]=new Option('10BB','10BB');
	IntPath.options[IntPath.options.length]=new Option('10BE','10BE');
	IntPath.options[IntPath.options.length]=new Option('10BN','10BN');
	IntPath.options[IntPath.options.length]=new Option('10BT','10BT');
	IntPath.options[IntPath.options.length]=new Option('11JJ','11JJ');
	IntPath.options[IntPath.options.length]=new Option('11JO','11JO');
	IntPath.options[IntPath.options.length]=new Option('11JH','11JH');
	IntPath.options[IntPath.options.length]=new Option('11JN','11JN');
	IntPath.options[IntPath.options.length]=new Option('11BB','11BB');
	IntPath.options[IntPath.options.length]=new Option('11BE','11BE');
	IntPath.options[IntPath.options.length]=new Option('11BN','11BN');
	IntPath.options[IntPath.options.length]=new Option('11BT','11BT');
	IntPath.options[IntPath.options.length]=new Option('Year 12','Y12');
	IntPath.options[IntPath.options.length]=new Option('Year 13','Y13');

}

function hoy()
{
var IntPath=document.form2.specify;
var TheOptions=IntPath.options.length;

document.form2.specify.options.length=0;

	IntPath.options[IntPath.options.length]=new Option('Chose the Guidance Leader','none chosen');
	IntPath.options[IntPath.options.length]=new Option('Year 7','GL 7');
	IntPath.options[IntPath.options.length]=new Option('Year 8','GL 8');
	IntPath.options[IntPath.options.length]=new Option('Year 9','GL 9');
	IntPath.options[IntPath.options.length]=new Option('Year 10','GL 10');
	IntPath.options[IntPath.options.length]=new Option('Year 11','GL 11');
	IntPath.options[IntPath.options.length]=new Option('Sixth Form','GL 12/13');
	
}

function web()
{
var IntPath=document.form2.specify;
var TheOptions=IntPath.options.length;

document.form2.specify.options.length=0;

	IntPath.options[IntPath.options.length]=new Option('Choose an option','none chosen');
	IntPath.options[IntPath.options.length]=new Option('Feedback','Feedback');
	IntPath.options[IntPath.options.length]=new Option('Idea','Idea');
	IntPath.options[IntPath.options.length]=new Option('Site Problem','Site Problem');
	IntPath.options[IntPath.options.length]=new Option('Dead Link','Dead Link');
	IntPath.options[IntPath.options.length]=new Option('Other','Other');

}

function checkform() {
	var errmsgs = ""
	var cbok = "false"
	var rok = "false"

	if (document.form2.from.value == "") {
		errmsgs += "Please enter your name.\n";
	}
	
	if (document.form2.returnemail.value == "") {
		errmsgs += "Please enter your email address.\n";
	}
	
	for (var i=0; i < document.form2.person.length; i++) { 
		if (document.form2.person[i].checked) {
			cbok = "true";
		}
	}
	
	if (cbok == "false") {
		errmsgs +=  "Please tell us if you are a student, parent, teacher etc.\n";
	}
	
	if (document.form2.person[6].checked) {
		if (document.form2.other.value == "") {
			errmsgs += "Please tell us who you are if you are not a student, parent, teacher etc.\n";
		}
	} 
	
	for (var i=0; i < document.form2.reach.length; i++) { 
		if (document.form2.reach[i].checked) {
			rok = "true";
		}
	}
	
	if (rok == "false") {
		errmsgs += "Please tell us who you are trying to reach.\n";
	}
	
	if ((document.form2.specify.options[document.form2.specify.selectedIndex].value == "Waiting for a response" || document.form2.specify.options[0].selected) && document.form2.specify.options[document.form2.specify.selectedIndex].value != "N/A") {
		errmsgs +=  "Please tell us specifically who you are trying to reach.\n";
	}
	
	if (document.form2.message.value == "") {
		errmsgs += "Please enter your message.\n";
	}
	
	if (errmsgs == "") {
		document.form2.submit();
	} else {
		alert(errmsgs); return;
	}

}
