//this function is used to swap between elements

function swap(combo,index1, index2)
{
	var savedValue=combo.options[index1].value;
	var savedText=combo.options[index1].text;

	combo.options[index1].value=combo.options[index2].value;
	combo.options[index1].text=combo.options[index2].text;

	combo.options[index2].value=savedValue;
	combo.options[index2].text=savedText;
}

//moves options from one selection box (combo box) to another
//removes the all selected options from one combo box and adds them to the second combo box

function MoveElements(FromCombo,ToCombo)
{
	var to_remove_counter=0; //number of options that were removed (num selected options)

	//move selected options to right select box (to)
	for (var i=0;i<FromCombo.options.length;i++)
	{
		if (FromCombo.options[i].selected==true)
		{
			var addtext=FromCombo.options[i].text;
			var addvalue=FromCombo.options[i].value;
			ToCombo.options[ToCombo.options.length]=new Option(addtext,addvalue);
			FromCombo.options[i].selected=false;
			++to_remove_counter;
		}
		else
		{
			FromCombo.options[i-to_remove_counter].selected=false;
			FromCombo.options[i-to_remove_counter].text=FromCombo.options[i].text;
			FromCombo.options[i-to_remove_counter].value=FromCombo.options[i].value;
		}
	}

	//now cleanup the last remaining options 
	var numToLeave=FromCombo.options.length-to_remove_counter;
	for (i=FromCombo.options.length-1;i>=numToLeave;i--) 
	{ 
		FromCombo.options[i]=null;
	}
}

function localauthority (name, flas) {
	this.name = name
	this.flas = flas
}

	localauths = new Array(208)
	localauths[0] = new localauthority("Aberdeen", "S8401")	
	localauths[1] = new localauthority("Aberdeenshire", "S8402")	
	localauths[2] = new localauthority("Angus", "S8801")	
	localauths[3] = new localauthority("Argyll and Bute", "S8701")	
	localauths[4] = new localauthority("Barking and Dagenham", "E5030")	
	localauths[5] = new localauthority("Barnet", "E5031")	
	localauths[6] = new localauthority("Barnsley", "E4401")	
	localauths[7] = new localauthority("Bath and North East Somerset", "E0101")	
	localauths[8] = new localauthority("Bedfordshire", "E0221")	
	localauths[9] = new localauthority("Belfast", "N9001")	
	localauths[10] = new localauthority("Bexley", "E5032")	
	localauths[11] = new localauthority("Birmingham", "E4601")	
	localauths[12] = new localauthority("Blackburn with Darwen", "E2301")	
	localauths[13] = new localauthority("Blackpool", "E2302")	
	localauths[14] = new localauthority("Blaenau Gwent", "W7201")	
	localauths[15] = new localauthority("Bolton", "E4201")	
	localauths[16] = new localauthority("Bournemouth", "E1202")	
	localauths[17] = new localauthority("Bracknell Forest", "E0301")	
	localauths[18] = new localauthority("Bradford", "E4701")	
	localauths[19] = new localauthority("Brent", "E5033")	
	localauths[20] = new localauthority("Bridgend", "W7401")	
	localauths[21] = new localauthority("Brighton and Hove", "E1401")	
	localauths[22] = new localauthority("Bristol", "E0102")	
	localauths[23] = new localauthority("Bromley", "E5034")	
	localauths[24] = new localauthority("Buckinghamshire", "E0421")	
	localauths[25] = new localauthority("Bury", "E4202")	
	localauths[26] = new localauthority("Caerphilly", "W7402")	
	localauths[27] = new localauthority("Calderdale", "E4702")	
	localauths[28] = new localauthority("Cambridgeshire", "E0521")	
	localauths[29] = new localauthority("Camden", "E5011")	
	localauths[30] = new localauthority("Cardiff", "W7601")	
	localauths[31] = new localauthority("Carmarthenshire", "W7102")	
	localauths[32] = new localauthority("Ceredigion", "W7101")	
	localauths[33] = new localauthority("Cheshire", "E0621")	
	localauths[34] = new localauthority("Clackmannanshire", "S8101")	
	localauths[35] = new localauthority("Conwy", "W7301")	
	localauths[36] = new localauthority("Cornwall", "E0820")	
	localauths[37] = new localauthority("Corporation of London", "E5010")	
	localauths[38] = new localauthority("Coventry", "E4602")	
	localauths[39] = new localauthority("Croydon", "E5035")	
	localauths[40] = new localauthority("Cumbria", "E0920")	
	localauths[41] = new localauthority("Darlington", "E1301")	
	localauths[42] = new localauthority("Denbighshire", "W7001")	
	localauths[43] = new localauthority("Derby", "E1001")	
	localauths[44] = new localauthority("Derbyshire", "E1021")	
	localauths[45] = new localauthority("Devon", "E1121")	
	localauths[46] = new localauthority("Doncaster", "E4402")	
	localauths[47] = new localauthority("Dorset", "E1221")	
	localauths[48] = new localauthority("Dudley", "E4603")	
	localauths[49] = new localauthority("Dumfries and Galloway", "S8201")	
	localauths[50] = new localauthority("Dundee", "S8802")	
	localauths[51] = new localauthority("Durham", "E1321")	
	localauths[52] = new localauthority("Ealing", "E5036")	
	localauths[53] = new localauthority("East Ayrshire", "S8704")	
	localauths[54] = new localauthority("East Dunbartonshire", "S8705")	
	localauths[55] = new localauthority("East Lothian", "S8601")	
	localauths[56] = new localauthority("East Renfrewshire", "S8706")	
	localauths[57] = new localauthority("East Riding of Yorkshire", "E2001")	
	localauths[58] = new localauthority("East Sussex", "E1421")	
	localauths[59] = new localauthority("Edinburgh", "S8602")	
	localauths[60] = new localauthority("Eilean Siar", "S8903")	
	localauths[61] = new localauthority("Enfield", "E5037")	
	localauths[62] = new localauthority("Essex", "E1521")	
	localauths[63] = new localauthority("Falkirk", "S8102")	
	localauths[64] = new localauthority("Fife", "S8301")	
	localauths[65] = new localauthority("Flintshire", "W7002")	
	localauths[66] = new localauthority("Gateshead", "E4501")	
	localauths[67] = new localauthority("Glasgow", "S8702")	
	localauths[68] = new localauthority("Gloucestershire", "E1620")	
	localauths[69] = new localauthority("Greenwich", "E5012")	
	localauths[70] = new localauthority("Gwynedd", "W7303")	
	localauths[71] = new localauthority("Hackney", "E5013")	
	localauths[72] = new localauthority("Halton", "E0601")	
	localauths[73] = new localauthority("Hammersmith and Fulham", "E5014")	
	localauths[74] = new localauthority("Hampshire", "E1721")	
	localauths[75] = new localauthority("Haringey", "E5038")	
	localauths[76] = new localauthority("Harrow", "E5039")	
	localauths[77] = new localauthority("Hartlepool", "E0701")	
	localauths[78] = new localauthority("Havering", "E5040")	
	localauths[79] = new localauthority("Herefordshire", "E1801")	
	localauths[80] = new localauthority("Hertfordshire", "E1920")	
	localauths[81] = new localauthority("Highland", "S8501")	
	localauths[82] = new localauthority("Hillingdon", "E5041")	
	localauths[83] = new localauthority("Hounslow", "E5042")	
	localauths[84] = new localauthority("Inverclyde", "S8707")	
	localauths[85] = new localauthority("Isle of Anglesey", "W7302")	
	localauths[86] = new localauthority("Isle of Wight", "E2101")	
	localauths[87] = new localauthority("Islington", "E5015")	
	localauths[88] = new localauthority("Kensington and Chelsea", "E5016")	
	localauths[89] = new localauthority("Kent", "E2221")	
	localauths[90] = new localauthority("Kingston upon Hull", "E2002")	
	localauths[91] = new localauthority("Kingston upon Thames", "E5043")	
	localauths[92] = new localauthority("Kirklees", "E4703")	
	localauths[93] = new localauthority("Knowsley", "E4301")	
	localauths[94] = new localauthority("Lambeth", "E5017")	
	localauths[95] = new localauthority("Lancashire", "E2321")	
	localauths[96] = new localauthority("Leeds", "E4704")	
	localauths[97] = new localauthority("Leicester", "E2401")	
	localauths[98] = new localauthority("Leicestershire", "E2421")	
	localauths[99] = new localauthority("Lewisham", "E5018")	
	localauths[100] = new localauthority("Lincolnshire", "E2520")	
	localauths[101] = new localauthority("Liverpool", "E4302")	
	localauths[102] = new localauthority("Luton", "E0201")	
	localauths[103] = new localauthority("Manchester", "E4203")	
	localauths[104] = new localauthority("Medway", "E2201")	
	localauths[105] = new localauthority("Merthyr Tydfil", "W7403")	
	localauths[106] = new localauthority("Merton", "E5044")	
	localauths[107] = new localauthority("Middlesbrough", "E0702")	
	localauths[108] = new localauthority("Midlothian", "S8603")	
	localauths[109] = new localauthority("Milton Keynes", "E0401")	
	localauths[110] = new localauthority("Monmouthshire", "W7202")	
	localauths[111] = new localauthority("Moray", "S8403")	
	localauths[112] = new localauthority("Neath Port Talbot", "W7701")	
	localauths[113] = new localauthority("Newcastle upon Tyne", "E4502")	
	localauths[114] = new localauthority("Newham", "E5045")	
	localauths[115] = new localauthority("Newport", "W7203")	
	localauths[116] = new localauthority("Norfolk", "E2620")	
	localauths[117] = new localauthority("North Ayrshire", "S8709")	
	localauths[118] = new localauthority("North East Lincolnshire", "E2003")	
	localauths[119] = new localauthority("North Eastern Education and Library Board", "N9991")	
	localauths[120] = new localauthority("North Lanarkshire", "S8708")	
	localauths[121] = new localauthority("North Lincolnshire", "E2004")	
	localauths[122] = new localauthority("North Somerset", "E0104")	
	localauths[123] = new localauthority("North Tyneside", "E4503")	
	localauths[124] = new localauthority("North Yorkshire", "E2721")	
	localauths[125] = new localauthority("Northamptonshire", "E2820")	
	localauths[126] = new localauthority("Northumberland", "E2920")	
	localauths[127] = new localauthority("Nottingham", "E3001")	
	localauths[128] = new localauthority("Nottinghamshire", "E3021")	
	localauths[129] = new localauthority("Oldham", "E4204")	
	localauths[130] = new localauthority("Orkney", "S8901")	
	localauths[131] = new localauthority("Oxfordshire", "E3120")	
	localauths[132] = new localauthority("Pembrokeshire", "W7103")	
	localauths[133] = new localauthority("Perth and Kinross", "S8803")	
	localauths[134] = new localauthority("Peterborough", "E0501")	
	localauths[135] = new localauthority("Plymouth", "E1101")	
	localauths[136] = new localauthority("Poole", "E1201")	
	localauths[137] = new localauthority("Portsmouth", "E1701")	
	localauths[138] = new localauthority("Powys", "W7501")	
	localauths[139] = new localauthority("Reading", "E0303")	
	localauths[140] = new localauthority("Redbridge", "E5046")	
	localauths[141] = new localauthority("Redcar and Cleveland", "E0703")	
	localauths[142] = new localauthority("Renfrewshire", "S8712")	
	localauths[143] = new localauthority("Rhondda Cynon Taff", "W7404")	
	localauths[144] = new localauthority("Richmond upon Thames", "E5047")	
	localauths[145] = new localauthority("Rochdale", "E4205")	
	localauths[146] = new localauthority("Rotherham", "E4403")	
	localauths[147] = new localauthority("Rutland", "E2402")	
	localauths[148] = new localauthority("Salford", "E4206")	
	localauths[149] = new localauthority("Sandwell", "E4604")	
	localauths[150] = new localauthority("Scottish Borders", "S8001")	
	localauths[151] = new localauthority("Sefton", "E4304")	
	localauths[152] = new localauthority("Sheffield", "E4404")	
	localauths[153] = new localauthority("Shetland", "S8902")	
	localauths[154] = new localauthority("Shropshire", "E3221")	
	localauths[155] = new localauthority("Slough", "E0304")	
	localauths[156] = new localauthority("Solihull", "E4605")	
	localauths[157] = new localauthority("Somerset", "E3320")	
	localauths[158] = new localauthority("South Ayrshire", "S8710")	
	localauths[159] = new localauthority("South Eastern Education and Library Board", "N9992")	
	localauths[160] = new localauthority("South Gloucestershire", "E0103")	
	localauths[161] = new localauthority("South Lanarkshire", "S8711")	
	localauths[162] = new localauthority("South Tyneside", "E4504")	
	localauths[163] = new localauthority("Southampton", "E1702")	
	localauths[164] = new localauthority("Southend on Sea", "E1501")	
	localauths[165] = new localauthority("Southern Education and Library Board", "N9993")	
	localauths[166] = new localauthority("Southwark", "E5019")	
	localauths[167] = new localauthority("St Helens", "E4303")	
	localauths[168] = new localauthority("Staffordshire", "E3421")	
	localauths[169] = new localauthority("Stirling", "S8103")	
	localauths[170] = new localauthority("Stockport", "E4207")	
	localauths[171] = new localauthority("Stockton on Tees", "E0704")	
	localauths[172] = new localauthority("Stoke on Trent", "E3401")	
	localauths[173] = new localauthority("Suffolk", "E3520")	
	localauths[174] = new localauthority("Sunderland", "E4505")	
	localauths[175] = new localauthority("Surrey", "E3620")	
	localauths[176] = new localauthority("Sutton", "E5048")	
	localauths[177] = new localauthority("Swansea", "W7702")	
	localauths[178] = new localauthority("Swindon", "E3901")	
	localauths[179] = new localauthority("Tameside", "E4208")	
	localauths[180] = new localauthority("Telford and Wrekin", "E3201")	
	localauths[181] = new localauthority("Thurrock", "E1502")	
	localauths[182] = new localauthority("Torbay", "E1102")	
	localauths[183] = new localauthority("Torfaen", "W7204")	
	localauths[184] = new localauthority("Tower Hamlets", "E5020")	
	localauths[185] = new localauthority("Trafford", "E4209")	
	localauths[186] = new localauthority("Vale of Glamorgan", "W7602")	
	localauths[187] = new localauthority("Wakefield", "E4705")	
	localauths[188] = new localauthority("Walsall", "E4606")	
	localauths[189] = new localauthority("Waltham Forest", "E5049")	
	localauths[190] = new localauthority("Wandsworth", "E5021")	
	localauths[191] = new localauthority("Warrington", "E0602")	
	localauths[192] = new localauthority("Warwickshire", "E3720")	
	localauths[193] = new localauthority("West Berkshire", "E0302")	
	localauths[194] = new localauthority("West Dunbartonshire", "S8703")	
	localauths[195] = new localauthority("West Lothian", "S8604")	
	localauths[196] = new localauthority("West Sussex", "E3820")	
	localauths[197] = new localauthority("Western Education and Library Board", "N9994")	
	localauths[198] = new localauthority("Westminster", "E5022")	
	localauths[199] = new localauthority("Wigan", "E4210")	
	localauths[200] = new localauthority("Wiltshire", "E3921")	
	localauths[201] = new localauthority("Windsor and Maidenhead", "E0305")	
	localauths[202] = new localauthority("Wirral", "E4305")	
	localauths[203] = new localauthority("Wokingham", "E0306")	
	localauths[204] = new localauthority("Wolverhampton", "E4607")	
	localauths[205] = new localauthority("Worcestershire", "E1821")	
	localauths[206] = new localauthority("Wrexham", "W7003")	
	localauths[207] = new localauthority("York", "E2701")	


function setflascode(nnform1) {
	i = nnform1.localauthority.selectedIndex
	j = i - 1
	nnform1.flascode.value = localauths[j].flas
	nnform1.authorityname.value = localauths[j].name
}

function setcomparatorgroup(nnform1) {
	if (nnform1.localauthority.value == "CL") {
		setflascode(nnform1)
		nnform1.right_select.options.length = 1	
		nnform1.right_select.options[0].value = "'CL'"
		nnform1.right_select.options[0].text = "City of London"
		nnform1.left_select.options.length = 9
		nnform1.left_select.options[0].value = "'IL'"
		nnform1.left_select.options[0].text = "Inner London Boroughs"
		nnform1.left_select.options[1].value = "'OL'"
		nnform1.left_select.options[1].text = "Outer London Boroughs"
		nnform1.left_select.options[2].value = "'MD'"
		nnform1.left_select.options[2].text = "Metropolitan Districts"
		nnform1.left_select.options[3].value = "'EC'"
		nnform1.left_select.options[3].text = "County Councils"
		nnform1.left_select.options[4].value = "'EU'"
		nnform1.left_select.options[4].text = "English Unitary Authorities"
		nnform1.left_select.options[5].value = "'WU'"
		nnform1.left_select.options[5].text = "Welsh Unitary Authorities"
		nnform1.left_select.options[6].value = "'SU'"
		nnform1.left_select.options[6].text = "Scottish Unitary Authorities"
		nnform1.left_select.options[7].value = "'SI'"
		nnform1.left_select.options[7].text = "Scottish Island Councils"
		nnform1.left_select.options[8].value = "'NI'"
		nnform1.left_select.options[8].text = "Northern Ireland Education & Library Boards"
	} else if (nnform1.localauthority.value == "IL") {
		setflascode(nnform1)
		nnform1.right_select.options.length = 1	
		nnform1.right_select.options[0].value = "'IL'"
		nnform1.right_select.options[0].text = "Inner London Boroughs"
		nnform1.left_select.options.length = 9
		nnform1.left_select.options[0].value = "'CL'"
		nnform1.left_select.options[0].text = "City of London"
		nnform1.left_select.options[1].value = "'OL'"
		nnform1.left_select.options[1].text = "Outer London Boroughs"
		nnform1.left_select.options[2].value = "'MD'"
		nnform1.left_select.options[2].text = "Metropolitan Districts"
		nnform1.left_select.options[3].value = "'EC'"
		nnform1.left_select.options[3].text = "County Councils"
		nnform1.left_select.options[4].value = "'EU'"
		nnform1.left_select.options[4].text = "English Unitary Authorities"
		nnform1.left_select.options[5].value = "'WU'"
		nnform1.left_select.options[5].text = "Welsh Unitary Authorities"
		nnform1.left_select.options[6].value = "'SU'"
		nnform1.left_select.options[6].text = "Scottish Unitary Authorities"
		nnform1.left_select.options[7].value = "'SI'"
		nnform1.left_select.options[7].text = "Scottish Island Councils"
		nnform1.left_select.options[8].value = "'NI'"
		nnform1.left_select.options[8].text = "Northern Ireland Education & Library Boards"
	} else if (nnform1.localauthority.value == "OL") {
		setflascode(nnform1)
		nnform1.right_select.options.length = 1	
		nnform1.right_select.options[0].value = "'OL'"
		nnform1.right_select.options[0].text = "Outer London Boroughs"
		nnform1.left_select.options.length = 9
		nnform1.left_select.options[0].value = "'CL'"
		nnform1.left_select.options[0].text = "City of London"
		nnform1.left_select.options[1].value = "'IL'"
		nnform1.left_select.options[1].text = "Inner London Boroughs"
		nnform1.left_select.options[2].value = "'MD'"
		nnform1.left_select.options[2].text = "Metropolitan Districts"
		nnform1.left_select.options[3].value = "'EC'"
		nnform1.left_select.options[3].text = "County Councils"
		nnform1.left_select.options[4].value = "'EU'"
		nnform1.left_select.options[4].text = "English Unitary Authorities"
		nnform1.left_select.options[5].value = "'WU'"
		nnform1.left_select.options[5].text = "Welsh Unitary Authorities"
		nnform1.left_select.options[6].value = "'SU'"
		nnform1.left_select.options[6].text = "Scottish Unitary Authorities"
		nnform1.left_select.options[7].value = "'SI'"
		nnform1.left_select.options[7].text = "Scottish Island Councils"
		nnform1.left_select.options[8].value = "'NI'"
		nnform1.left_select.options[8].text = "Northern Ireland Education & Library Boards"
	} else if (nnform1.localauthority.value == "MD") {
		setflascode(nnform1)
		nnform1.right_select.options.length = 1	
		nnform1.right_select.options[0].value = "'MD'"
		nnform1.right_select.options[0].text = "Metropolitan Districts"
		nnform1.left_select.options.length = 9
		nnform1.left_select.options[0].value = "'CL'"
		nnform1.left_select.options[0].text = "City of London"
		nnform1.left_select.options[1].value = "'IL'"
		nnform1.left_select.options[1].text = "Inner London Boroughs"
		nnform1.left_select.options[2].value = "'OL'"
		nnform1.left_select.options[2].text = "Outer London Boroughs"
		nnform1.left_select.options[3].value = "'EC'"
		nnform1.left_select.options[3].text = "County Councils"
		nnform1.left_select.options[4].value = "'EU'"
		nnform1.left_select.options[4].text = "English Unitary Authorities"
		nnform1.left_select.options[5].value = "'WU'"
		nnform1.left_select.options[5].text = "Welsh Unitary Authorities"
		nnform1.left_select.options[6].value = "'SU'"
		nnform1.left_select.options[6].text = "Scottish Unitary Authorities"
		nnform1.left_select.options[7].value = "'SI'"
		nnform1.left_select.options[7].text = "Scottish Island Councils"
		nnform1.left_select.options[8].value = "'NI'"
		nnform1.left_select.options[8].text = "Northern Ireland Education & Library Boards"
	} else if (nnform1.localauthority.value == "EC") {
		setflascode(nnform1)
		nnform1.right_select.options.length = 1	
		nnform1.right_select.options[0].value = "'EC'"
		nnform1.right_select.options[0].text = "County Councils"
		nnform1.left_select.options.length = 9
		nnform1.left_select.options[0].value = "'CL'"
		nnform1.left_select.options[0].text = "City of London"
		nnform1.left_select.options[1].value = "'IL'"
		nnform1.left_select.options[1].text = "Inner London Boroughs"
		nnform1.left_select.options[2].value = "'OL'"
		nnform1.left_select.options[2].text = "Outer London Boroughs"
		nnform1.left_select.options[3].value = "'MD'"
		nnform1.left_select.options[3].text = "Metropolitan Districts"
		nnform1.left_select.options[4].value = "'EU'"
		nnform1.left_select.options[4].text = "English Unitary Authorities"
		nnform1.left_select.options[5].value = "'WU'"
		nnform1.left_select.options[5].text = "Welsh Unitary Authorities"
		nnform1.left_select.options[6].value = "'SU'"
		nnform1.left_select.options[6].text = "Scottish Unitary Authorities"
		nnform1.left_select.options[7].value = "'SI'"
		nnform1.left_select.options[7].text = "Scottish Island Councils"
		nnform1.left_select.options[8].value = "'NI'"
		nnform1.left_select.options[8].text = "Northern Ireland Education & Library Boards"
	} else if (nnform1.localauthority.value == "EU") {
		setflascode(nnform1)
		nnform1.right_select.options.length = 1	
		nnform1.right_select.options[0].value = "'EU'"
		nnform1.right_select.options[0].text = "English Unitary Authorities"
		nnform1.left_select.options.length = 9
		nnform1.left_select.options[0].value = "'CL'"
		nnform1.left_select.options[0].text = "City of London"
		nnform1.left_select.options[1].value = "'IL'"
		nnform1.left_select.options[1].text = "Inner London Boroughs"
		nnform1.left_select.options[2].value = "'OL'"
		nnform1.left_select.options[2].text = "Outer London Boroughs"
		nnform1.left_select.options[3].value = "'MD'"
		nnform1.left_select.options[3].text = "Metropolitan Districts"
		nnform1.left_select.options[4].value = "'EC'"
		nnform1.left_select.options[4].text = "County Councils"
		nnform1.left_select.options[5].value = "'WU'"
		nnform1.left_select.options[5].text = "Welsh Unitary Authorities"
		nnform1.left_select.options[6].value = "'SU'"
		nnform1.left_select.options[6].text = "Scottish Unitary Authorities"
		nnform1.left_select.options[7].value = "'SI'"
		nnform1.left_select.options[7].text = "Scottish Island Councils"
		nnform1.left_select.options[8].value = "'NI'"
		nnform1.left_select.options[8].text = "Northern Ireland Education & Library Boards"
	} else if (nnform1.localauthority.value == "WU") {
		setflascode(nnform1)
		nnform1.right_select.options.length = 1	
		nnform1.right_select.options[0].value = "'WU'"
		nnform1.right_select.options[0].text = "Welsh Unitary Authorities"
		nnform1.left_select.options.length = 9
		nnform1.left_select.options[0].value = "'CL'"
		nnform1.left_select.options[0].text = "City of London"
		nnform1.left_select.options[1].value = "'IL'"
		nnform1.left_select.options[1].text = "Inner London Boroughs"
		nnform1.left_select.options[2].value = "'OL'"
		nnform1.left_select.options[2].text = "Outer London Boroughs"
		nnform1.left_select.options[3].value = "'MD'"
		nnform1.left_select.options[3].text = "Metropolitan Districts"
		nnform1.left_select.options[4].value = "'EC'"
		nnform1.left_select.options[4].text = "County Councils"
		nnform1.left_select.options[5].value = "'EU'"
		nnform1.left_select.options[5].text = "English Unitary Authorities"
		nnform1.left_select.options[6].value = "'SU'"
		nnform1.left_select.options[6].text = "Scottish Unitary Authorities"
		nnform1.left_select.options[7].value = "'SI'"
		nnform1.left_select.options[7].text = "Scottish Island Councils"
		nnform1.left_select.options[8].value = "'NI'"
		nnform1.left_select.options[8].text = "Northern Ireland Education & Library Boards"
	} else if (nnform1.localauthority.value == "SU") {
		setflascode(nnform1)
		nnform1.right_select.options.length = 1	
		nnform1.right_select.options[0].value = "'SU'"
		nnform1.right_select.options[0].text = "Scottish Unitary Authorities"
		nnform1.left_select.options.length = 9
		nnform1.left_select.options[0].value = "'CL'"
		nnform1.left_select.options[0].text = "City of London"
		nnform1.left_select.options[1].value = "'IL'"
		nnform1.left_select.options[1].text = "Inner London Boroughs"
		nnform1.left_select.options[2].value = "'OL'"
		nnform1.left_select.options[2].text = "Outer London Boroughs"
		nnform1.left_select.options[3].value = "'MD'"
		nnform1.left_select.options[3].text = "Metropolitan Districts"
		nnform1.left_select.options[4].value = "'EC'"
		nnform1.left_select.options[4].text = "County Councils"
		nnform1.left_select.options[5].value = "'EU'"
		nnform1.left_select.options[5].text = "English Unitary Authorities"
		nnform1.left_select.options[6].value = "'WU'"
		nnform1.left_select.options[6].text = "Welsh Unitary Authorities"
		nnform1.left_select.options[7].value = "'SI'"
		nnform1.left_select.options[7].text = "Scottish Island Councils"
		nnform1.left_select.options[8].value = "'NI'"
		nnform1.left_select.options[8].text = "Northern Ireland Education & Library Boards"
	} else if (nnform1.localauthority.value == "SI") {
		setflascode(nnform1)
		nnform1.right_select.options.length = 1	
		nnform1.right_select.options[0].value = "'SI'"
		nnform1.right_select.options[0].text = "Scottish Island Councils"
		nnform1.left_select.options.length = 9
		nnform1.left_select.options[0].value = "'CL'"
		nnform1.left_select.options[0].text = "City of London"
		nnform1.left_select.options[1].value = "'IL'"
		nnform1.left_select.options[1].text = "Inner London Boroughs"
		nnform1.left_select.options[2].value = "'OL'"
		nnform1.left_select.options[2].text = "Outer London Boroughs"
		nnform1.left_select.options[3].value = "'MD'"
		nnform1.left_select.options[3].text = "Metropolitan Districts"
		nnform1.left_select.options[4].value = "'EC'"
		nnform1.left_select.options[4].text = "County Councils"
		nnform1.left_select.options[5].value = "'EU'"
		nnform1.left_select.options[5].text = "English Unitary Authorities"
		nnform1.left_select.options[6].value = "'WU'"
		nnform1.left_select.options[6].text = "Welsh Unitary Authorities"
		nnform1.left_select.options[7].value = "'SU'"
		nnform1.left_select.options[7].text = "Scottish Unitary Authorities"
		nnform1.left_select.options[8].value = "'NI'"
		nnform1.left_select.options[8].text = "Northern Ireland Education & Library Boards"
	} else if (nnform1.localauthority.value == "NI") {
		setflascode(nnform1)
		nnform1.right_select.options.length = 1	
		nnform1.right_select.options[0].value = "'NI'"
		nnform1.right_select.options[0].text = "Northern Ireland Education & Library Boards"
		nnform1.left_select.options.length = 9
		nnform1.left_select.options[0].value = "'CL'"
		nnform1.left_select.options[0].text = "City of London"
		nnform1.left_select.options[1].value = "'IL'"
		nnform1.left_select.options[1].text = "Inner London Boroughs"
		nnform1.left_select.options[2].value = "'OL'"
		nnform1.left_select.options[2].text = "Outer London Boroughs"
		nnform1.left_select.options[3].value = "'MD'"
		nnform1.left_select.options[3].text = "Metropolitan Districts"
		nnform1.left_select.options[4].value = "'EC'"
		nnform1.left_select.options[4].text = "County Councils"
		nnform1.left_select.options[5].value = "'EU'"
		nnform1.left_select.options[5].text = "English Unitary Authorities"
		nnform1.left_select.options[6].value = "'WU'"
		nnform1.left_select.options[6].text = "Welsh Unitary Authorities"
		nnform1.left_select.options[7].value = "'SU'"
		nnform1.left_select.options[7].text = "Scottish Unitary Authorities"
		nnform1.left_select.options[8].value = "'SI'"
		nnform1.left_select.options[8].text = "Scottish Island Councils"
	} else {
		setflascode(nnform1)
		nnform1.left_select.options.length = 10
		nnform1.left_select.options[0].value = "'CL'"
		nnform1.left_select.options[0].text = "City of London"
		nnform1.left_select.options[1].value = "'IL'"
		nnform1.left_select.options[1].text = "Inner London Boroughs"
		nnform1.left_select.options[2].value = "'OL'"
		nnform1.left_select.options[2].text = "Outer London Boroughs"
		nnform1.left_select.options[3].value = "'MD'"
		nnform1.left_select.options[3].text = "Metropolitan Districts"
		nnform1.left_select.options[4].value = "'EC'"
		nnform1.left_select.options[4].text = "County Councils"
		nnform1.left_select.options[5].value = "'EU'"
		nnform1.left_select.options[5].text = "English Unitary Authorities"
		nnform1.left_select.options[6].value = "'WU'"
		nnform1.left_select.options[6].text = "Welsh Unitary Authorities"
		nnform1.left_select.options[7].value = "'SU'"
		nnform1.left_select.options[7].text = "Scottish Unitary Authorities"
		nnform1.left_select.options[8].value = "'SI'"
		nnform1.left_select.options[8].text = "Scottish Island Councils"
		nnform1.left_select.options[9].value = "'NI'"
		nnform1.left_select.options[9].value = "Northern Ireland Education & Library Boards"
	}
}

function doReset() {
	nnform1.left_select.options.length = 0
	nnform1.right_select.options.length = 0
}

function doSubmit() {
	for (var i = 0; i < nnform1.right_select.length; i++) {
		nnform1.right_select.options[i].selected=true
	}
}

