/*
 * JS.MC_LIST.JS
 *
 * +======================================================================================================+
 * | A .js (javascript/jscript) for the control of specific data. (Function)
 * | Data specific to client. (Skirmish)
 * |
 * +======================================================================================================+
 * | Requires JAVASCRIPT version 1+
 * +------------------------------------------------------------------------------------------------------+
 * | Usage:
 * | ------
 * | Javascript requiring both dynamic and non-dynamic remote file calls for operational purposes.  
 * | 
 * +------------------------------------------------------------------------------------------------------+
 * | License:
 * | --------
 * | The contents of this file are subject to  
 * | Copyright (C) 2009 MC Web Design. All Rights Reserved. 
 * | You may look at our source code, but please observe source code copyrights.
 * | View our copyright statement for more information at www.mcwebdesign.co.uk 
 * | 
 * +======================================================================================================+
 *
 * @author  S.J.C
 * @link    http://www.mcwebdesign.co.uk
 * @version 1.0
 */ 

function fillCategory(){ 
// == VALUE - NAME LABEL ==
addOption(document.ddForm.firstChoice, "Eng", "England", "");
addOption(document.ddForm.firstChoice, "Sco", "Scotland", "");
addOption(document.ddForm.firstChoice, "Wal", "Wales", "");
}
function SelectSubCat(){
removeAllOptions(document.ddForm.secondChoice);
addOption(document.ddForm.secondChoice, "", "Select a County", "");

if(document.ddForm.firstChoice.value == 'Eng'){  // == AS VALUE ==
addOption(document.ddForm.secondChoice,"Bedfordshire", "Bedfordshire");
addOption(document.ddForm.secondChoice,"Berkshire", "Berkshire");
addOption(document.ddForm.secondChoice,"Buckinghamshire", "Buckinghamshire");
addOption(document.ddForm.secondChoice,"Cambridgeshire", "Cambridgeshire");
addOption(document.ddForm.secondChoice,"Cheshire", "Cheshire");
addOption(document.ddForm.secondChoice,"Cornwall", "Cornwall");
addOption(document.ddForm.secondChoice,"Cumberland", "Cumberland");
addOption(document.ddForm.secondChoice,"Derbyshire", "Derbyshire");
addOption(document.ddForm.secondChoice,"Devon", "Devon");
addOption(document.ddForm.secondChoice,"Dorset", "Dorset");
addOption(document.ddForm.secondChoice,"Durham", "Durham");
addOption(document.ddForm.secondChoice,"Essex", "Essex");
addOption(document.ddForm.secondChoice,"Gloucestershire", "Gloucestershire");
addOption(document.ddForm.secondChoice,"Hampshire", "Hampshire");
addOption(document.ddForm.secondChoice,"Herefordshire", "Herefordshire");
addOption(document.ddForm.secondChoice,"Hertfordshire", "Hertfordshire");
addOption(document.ddForm.secondChoice,"Huntingdonshire", "Huntingdonshire");
addOption(document.ddForm.secondChoice,"Kent", "Kent");
addOption(document.ddForm.secondChoice,"Lancashire", "Lancashire");
addOption(document.ddForm.secondChoice,"Leicestershire", "Leicestershire");
addOption(document.ddForm.secondChoice,"Lincolnshire", "Lincolnshire");
addOption(document.ddForm.secondChoice,"Middlesex", "Middlesex");
addOption(document.ddForm.secondChoice,"Norfolk", "Norfolk");
addOption(document.ddForm.secondChoice,"Northamptonshire", "Northamptonshire");
addOption(document.ddForm.secondChoice,"Northumberland", "Northumberland");
addOption(document.ddForm.secondChoice,"Nottinghamshire", "Nottinghamshire");
addOption(document.ddForm.secondChoice,"Oxfordshire", "Oxfordshire");
addOption(document.ddForm.secondChoice,"Rutland", "Rutland");
addOption(document.ddForm.secondChoice,"Shropshire", "Shropshire");
addOption(document.ddForm.secondChoice,"Somerset", "Somerset");
addOption(document.ddForm.secondChoice,"Staffordshire", "Staffordshire");
addOption(document.ddForm.secondChoice,"Suffolk", "Suffolk");
addOption(document.ddForm.secondChoice,"Surrey", "Surrey");
addOption(document.ddForm.secondChoice,"Sussex", "Sussex");
addOption(document.ddForm.secondChoice,"Warwickshire", "Warwickshire");
addOption(document.ddForm.secondChoice,"Westmorland", "Westmorland");
addOption(document.ddForm.secondChoice,"Wiltshire", "Wiltshire");
addOption(document.ddForm.secondChoice,"Worcestershire", "Worcestershire");
addOption(document.ddForm.secondChoice,"Yorkshire", "Yorkshire");
}
if(document.ddForm.firstChoice.value == 'Sco'){  // == AS VALUE ==
addOption(document.ddForm.secondChoice,"Aberdeenshire", "Aberdeenshire");
addOption(document.ddForm.secondChoice,"Angus", "Angus");
addOption(document.ddForm.secondChoice,"Argyllshire", "Argyllshire");
addOption(document.ddForm.secondChoice,"Ayrshire", "Ayrshire");
addOption(document.ddForm.secondChoice,"Banffshire", "Banffshire");
addOption(document.ddForm.secondChoice,"Berwickshire", "Berwickshire");
addOption(document.ddForm.secondChoice,"Buteshire", "Buteshire");
addOption(document.ddForm.secondChoice,"Cromartyshire", "Cromartyshire");
addOption(document.ddForm.secondChoice,"Caithness", "Caithness");
addOption(document.ddForm.secondChoice,"Clackmannanshire", "Clackmannanshire");
addOption(document.ddForm.secondChoice,"Dumfriesshire", "Dumfriesshire");
addOption(document.ddForm.secondChoice,"Dunbartonshire", "Dunbartonshire");
addOption(document.ddForm.secondChoice,"EastLothian", "East Lothian");
addOption(document.ddForm.secondChoice,"Fife", "Fife");
addOption(document.ddForm.secondChoice,"Inverness-shire", "Inverness-shire");
addOption(document.ddForm.secondChoice,"Kincardineshire", "Kincardineshire");
addOption(document.ddForm.secondChoice,"Kinross-shire", "Kinross-shire");
addOption(document.ddForm.secondChoice,"Kirkcudbrightshire", "Kirkcudbrightshire");
addOption(document.ddForm.secondChoice,"Lanarkshire", "Lanarkshire");
addOption(document.ddForm.secondChoice,"Midlothian", "Midlothian");
addOption(document.ddForm.secondChoice,"Morayshire", "Morayshire");
addOption(document.ddForm.secondChoice,"Nairnshire", "Nairnshire");
addOption(document.ddForm.secondChoice,"Orkney", "Orkney");
addOption(document.ddForm.secondChoice,"Peeblesshire", "Peeblesshire");
addOption(document.ddForm.secondChoice,"Perthshire", "Perthshire");
addOption(document.ddForm.secondChoice,"Renfrewshire", "Renfrewshire");
addOption(document.ddForm.secondChoice,"Ross-shire", "Ross-shire");
addOption(document.ddForm.secondChoice,"Roxburghshire", "Roxburghshire");
addOption(document.ddForm.secondChoice,"Selkirkshire", "Selkirkshire");
addOption(document.ddForm.secondChoice,"Shetland", "Shetland");
addOption(document.ddForm.secondChoice,"Stirlingshire", "Stirlingshire");
addOption(document.ddForm.secondChoice,"Sutherland", "Sutherland");
addOption(document.ddForm.secondChoice,"WestLothian", "West Lothian");
addOption(document.ddForm.secondChoice,"Wigtownshire", "Wigtownshire");
}
if(document.ddForm.firstChoice.value == 'Wal'){  // == AS VALUE ==
addOption(document.ddForm.secondChoice,"Anglesey", "Anglesey - Sir Fon");
addOption(document.ddForm.secondChoice,"Brecknockshire", "Brecknockshire - Sir Frycheiniog");
addOption(document.ddForm.secondChoice,"Caernarfonshire", "Caernarfonshire - Sir Gaernarfon");
addOption(document.ddForm.secondChoice,"Carmarthenshire", "Carmarthenshire - Sir Gaerfyrddin");
addOption(document.ddForm.secondChoice,"Cardiganshire", "Cardiganshire - Ceredigion");
addOption(document.ddForm.secondChoice,"Denbighshire", "Denbighshire - Sir Ddinbych");
addOption(document.ddForm.secondChoice,"Flintshire", "Flintshire - Sir Fflint");
addOption(document.ddForm.secondChoice,"Glamorgan", "Glamorgan - Morgannwg");
addOption(document.ddForm.secondChoice,"Merioneth", "Merioneth - Meirionnydd");
addOption(document.ddForm.secondChoice,"Monmouthshire", "Monmouthshire - Sir Fynwy");
addOption(document.ddForm.secondChoice,"Montgomeryshire", "Montgomeryshire - Sir Drefaldwyn");
addOption(document.ddForm.secondChoice,"Pembrokeshire", "Pembrokeshire - Sir Benfro");
addOption(document.ddForm.secondChoice,"Radnorshire", "Radnorshire - Sir Faesyfed");
}
}
function removeAllOptions(selectbox){
	var i;
	for(i=selectbox.options.length-1;i>=0;i--){
		//selectbox.options.remove(i);
		selectbox.remove(i);
	}
}
function addOption(selectbox, value, text){
	var optn = document.createElement("OPTION");
	optn.text = text;
	optn.value = value;
	selectbox.options.add(optn);
}
