function fillCountry(){ addOption(document.drop_list.country, 'United Kingdom', 'United Kingdom');} function SelectSubCounty(){ removeAllOptions(document.drop_list.subcounty); if(document.drop_list.country.value == 'United Kingdom'){addOption(document.drop_list.subcounty,'Bedfordshire', 'Bedfordshire');addOption(document.drop_list.subcounty,'Berkshire', 'Berkshire');addOption(document.drop_list.subcounty,'Buckinghamshire', 'Buckinghamshire');addOption(document.drop_list.subcounty,'Cambridgeshire', 'Cambridgeshire');addOption(document.drop_list.subcounty,'Channel Islands', 'Channel Islands');addOption(document.drop_list.subcounty,'Cheshire', 'Cheshire');addOption(document.drop_list.subcounty,'Cleveland', 'Cleveland');addOption(document.drop_list.subcounty,'Cornwall', 'Cornwall');addOption(document.drop_list.subcounty,'Cumbria', 'Cumbria');addOption(document.drop_list.subcounty,'Darlington', 'Darlington');addOption(document.drop_list.subcounty,'Derbyshire', 'Derbyshire');addOption(document.drop_list.subcounty,'Devon', 'Devon');addOption(document.drop_list.subcounty,'Dorset', 'Dorset');addOption(document.drop_list.subcounty,'Durham', 'Durham');addOption(document.drop_list.subcounty,'East Sussex', 'East Sussex');addOption(document.drop_list.subcounty,'Essex', 'Essex');addOption(document.drop_list.subcounty,'Gateshead', 'Gateshead');addOption(document.drop_list.subcounty,'Gloucestershire', 'Gloucestershire');addOption(document.drop_list.subcounty,'Greater Manchester', 'Greater Manchester');addOption(document.drop_list.subcounty,'Hampshire', 'Hampshire');addOption(document.drop_list.subcounty,'Herefordshire', 'Herefordshire');addOption(document.drop_list.subcounty,'Hertfordshire', 'Hertfordshire');addOption(document.drop_list.subcounty,'Isle of Man', 'Isle of Man');addOption(document.drop_list.subcounty,'Isle of Wight', 'Isle of Wight');addOption(document.drop_list.subcounty,'Kent', 'Kent');addOption(document.drop_list.subcounty,'Lancashire', 'Lancashire');addOption(document.drop_list.subcounty,'Leicestershire', 'Leicestershire');addOption(document.drop_list.subcounty,'Lincolnshire', 'Lincolnshire');addOption(document.drop_list.subcounty,'London', 'London');addOption(document.drop_list.subcounty,'lsle of Scilly', 'lsle of Scilly');addOption(document.drop_list.subcounty,'Merseyside', 'Merseyside');addOption(document.drop_list.subcounty,'Norfolk', 'Norfolk');addOption(document.drop_list.subcounty,'North Yorkshire', 'North Yorkshire');addOption(document.drop_list.subcounty,'Northamptonshire', 'Northamptonshire');addOption(document.drop_list.subcounty,'Northumberland', 'Northumberland');addOption(document.drop_list.subcounty,'Nottinghamshire', 'Nottinghamshire');addOption(document.drop_list.subcounty,'Oxfordshire', 'Oxfordshire');addOption(document.drop_list.subcounty,'Seaham', 'Seaham');addOption(document.drop_list.subcounty,'Shropshire', 'Shropshire');addOption(document.drop_list.subcounty,'Somerset', 'Somerset');addOption(document.drop_list.subcounty,'South Yorkshire', 'South Yorkshire');addOption(document.drop_list.subcounty,'Staffordshire', 'Staffordshire');addOption(document.drop_list.subcounty,'Suffolk', 'Suffolk');addOption(document.drop_list.subcounty,'Sunderland', 'Sunderland');addOption(document.drop_list.subcounty,'Surrey', 'Surrey');addOption(document.drop_list.subcounty,'Teesport', 'Teesport');addOption(document.drop_list.subcounty,'Tyne & Wear', 'Tyne & Wear');addOption(document.drop_list.subcounty,'Warwickshire', 'Warwickshire');addOption(document.drop_list.subcounty,'Washington', 'Washington');addOption(document.drop_list.subcounty,'West Midlands', 'West Midlands');addOption(document.drop_list.subcounty,'West Sussex', 'West Sussex');addOption(document.drop_list.subcounty,'West Yorkshire', 'West Yorkshire');addOption(document.drop_list.subcounty,'Wiltshire', 'Wiltshire');addOption(document.drop_list.subcounty,'Worcestershire', 'Worcestershire');} } ////////////////// 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); }