function emptyList( box ) {
while ( box.options.length ) box.options[0] = null;
}

function fillList( box, arr ) {
for ( i = 0; i < arr[0].length; i++ ) {
option = new Option( arr[0][i], arr[1][i] );
box.options[box.length] = option;
}
box.selectedIndex=0;
}

function changeList( box ) {
list = lists[box.options[box.selectedIndex].value];
emptyList( box.form.county );
fillList( box.form.county, list );
}

var lists = new Array();

lists['Select']    = new Array();
lists['Select'][0] = new Array('Select Above First');
lists['Select'][1] = new Array('');

lists['England']    = new Array();
lists['England'][0] = new Array('Bedfordshire','Berkshire','Buckinghamshire','Cambridgeshire','Cheshire','City of Bristol','Cornwall','Cumbria (The Lakes)','Derbyshire','Devon (All)','Devon (South)','Devon (North)','Dorset','Durham','East Sussex','East Yorkshire','Essex','Gloucestershire','Greater London','Greater Manchester','Hampshire','Herefordshire','Hertfordshire','Isle of Man','Isle of Wight','Kent','Lancashire','Leicestershire','Lincolnshire','Merseyside','Norfolk','North Yorkshire','Northamptonshire','Northumberland','Nottinghamshire','Oxfordshire','Rutland','Shropshire','Somerset','South Yorkshire','Staffordshire','Suffolk','Surrey','Tyne and Wear','Warwickshire','West Midlands','West Sussex','West Yorkshire','Wiltshire','Worcestershire');
lists['England'][1] = new Array('Bedfordshire','Berkshire','Buckinghamshire','Cambridgeshire','Cheshire','City of Bristol','Cornwall','Cumbria','Derbyshire','Devon','Devon (south)','Devon (north)','Dorset','Durham','East Sussex','East Yorkshire','Essex','Gloucestershire','Greater London','Greater Manchester','Hampshire','Herefordshire','Hertfordshire','Isle of Man','Isle of Wight','Kent','Lancashire','Leicestershire','Lincolnshire','Merseyside','Norfolk','North Yorkshire','Northamptonshire','Northumberland','Nottinghamshire','Oxfordshire','Rutland','Shropshire','Somerset','South Yorkshire','Staffordshire','Suffolk','Surrey','Tyne and Wear','Warwickshire','West Midlands','West Sussex','West Yorkshire','Wiltshire','Worcestershire');

lists['Scotland']    = new Array();
lists['Scotland'][0] = new Array('Aberdeen City','Aberdeenshire','Angus','Argyll and Bute','Borders','City of Edinburgh','City of Glasgow','Clackmannanshire','Dumfries and Galloway','Dundee City','East Ayrshire','East Dunbartonshire','East Lothian','East Renfrewshire','Falkirk','Fife','Highland','Inverclyde','Mid Lothian','Moray','North Ayrshire','North Lanarkshire','Perth and Kinross','Renfrewshire','South Ayrshire','South Lanarkshire','Stirling','West Dunbartonshire','West Lothian','Western Isles');
lists['Scotland'][1] = new Array('Aberdeen City','Aberdeenshire','Angus','Argyll and Bute','Borders','City of Edinburgh','City of Glasgow','Clackmannanshire','Dumfries and Galloway','Dundee City','East Ayrshire','East Dunbartonshire','East Lothian','East Renfrewshire','Falkirk','Fife','Highland','Inverclyde','Mid Lothian','Moray','North Ayrshire','North Lanarkshire','Perth and Kinross','Renfrewshire','South Ayrshire','South Lanarkshire','Stirling','West Dunbartonshire','West Lothian','Western Isles');

lists['Wales']    = new Array();
lists['Wales'][0] = new Array('Carmarthenshire','Ceredigion','Conwy','Denbighshire','Gwynedd','Flintshire','Wrexham','Isle of Anglesey','Glamorgan','Monmouthshire','Pembrokeshire','Powys');
lists['Wales'][1] = new Array('Carmarthenshire','Ceredigion','Conwy','Denbighshire','Gwynedd','Flintshire','Wrexham','Isle of Anglesey','Glamorgan','Monmouthshire','Pembrokeshire','Powys');

lists['Northern Ireland']    = new Array();
lists['Northern Ireland'][0] = new Array('Antrim','Armagh','Down','Fermanagh','Londonderry','Tyrone');
lists['Northern Ireland'][1] = new Array('Antrim','Armagh','Down','Fermanagh','Londonderry','Tyrone');

lists['Rep. of Ireland']    = new Array();
lists['Rep. of Ireland'][0] = new Array('Carlow','Cavan','Clare','Cork','Donegal','Dublin','Galway','Kerry','Kildare','Kilkenny','Laois','Leitrim','Limerick','Longford','Louth','Mayo','Meath','Monaghan','Offaly','Roscommon','Sligo','Tipperary','Waterford','Westmeath','Wexford','Wicklow');
lists['Rep. of Ireland'][1] = new Array('Carlow','Cavan','Clare','Cork','Donegal','Dublin','Galway','Kerry','Kildare','Kilkenny','Laois','Leitrim','Limerick','Longford','Louth','Mayo','Meath','Monaghan','Offaly','Roscommon','Sligo','Tipperary','Waterford','Westmeath','Wexford','Wicklow');

lists['Islands']    = new Array();
lists['Islands'][0] = new Array('Guernsey','Jersey','Isle of Arran','Isle of Barra','Isle of Benbecula','Isle of Bute','Alderney','Isle of Coll','Isle of Colonsay','Isle of Cumbrae','Isle of Gigha','Isle of Harris','Isle of Iona','The Shetland Isles','Isle of Islay','Isle of Jura','Isle of Lewis','Isle of Man','Isle of Mull','Isle of North Uist','The Orkney Isles','The Scilly Isles','Isle of Skye','Isle of South Uist','Isle of Tiree','Isle of Wight');
lists['Islands'][1] = new Array('Guernsey','Jersey','Isle of Arran','Isle of Barra','Isle of Benbecula','Isle of Bute','Alderney','Isle of Coll','Isle of Colonsay','Isle of Cumbrae','Isle of Gigha','Isle of Harris','Isle of Iona','The Shetland Isles','Isle of Islay','Isle of Jura','Isle of Lewis','Isle of Man','Isle of Mull','Isle of North Uist','The Orkney Isles','The Scilly Isles','Isle of Skye','Isle of South Uist','Isle of Tiree','Isle of Wight');
