function removeAllOptions(selectbox){
	var i;
	for(i=selectbox.options.length-1;i>=0;i--){
		selectbox.remove(i);
	}
}

function addOption(text,value ){
	var optn = document.createElement('OPTION');
	optn.text = text;
	optn.value = value;
	document.getElementById('selectProvince').options.add(optn);
}

function swapOptions(param){
	if(param != 'none'){
		var val = param;
	}else{
		var val = document.getElementById('selectCountry').value;
	}
	if(val == 'Canada'){
		removeAllOptions(document.getElementById('selectProvince'));
		addOption('-Select From List-','');
		addOption('Alberta','Alberta');
		addOption('British Columbia','British Columbia');
		addOption('Manitoba','Manitoba');
		addOption('New Brunswick','New Brunswick');
		addOption('Newfoundland','Newfoundland');
		addOption('Nova Scotia','Nova Scotia');
		addOption('Ontario','Ontario');
		addOption('Prince Edward Island','Prince Edward Island');
		addOption('Quebec','Quebec');
		addOption('Saskatchewan','Saskatchewan');
		addOption('Yukon','Yukon');
		addOption('Northwest Territories','Northwest Territories');
		addOption('Nunavut','Nunavut');
		document.getElementById('selectProvince').setvalue = 'Alberta';
	}else if(val == 'United Kingdom'){
		removeAllOptions(document.getElementById('selectProvince'));
		addOption('-Select From List-','');
		addOption('Barking and Dagenham','Barking and Dagenham');
		addOption('Barnet','Barnet');
		addOption('Barnsley','Barnsley');
		addOption('Bath and North East Somerset','Bath and North East Somerset');
		addOption('Bedfordshire','Bedfordshire');
		addOption('Bexley','Bexley');
		addOption('Birmingham','Birmingham');
		addOption('Blackburn with Darwen','Blackburn with Darwen');
		addOption('Blackpool','Blackpool');
		addOption('Bolton','Bolton');
		addOption('Bournemouth','Bournemouth');
		addOption('Bracknell Forest','Bracknell Forest');
		addOption('Bradford','Bradford');
		addOption('Brent','Brent');
		addOption('Brighton and Hove','Brighton and Hove');
		addOption('City of Bristol','City of Bristol');
		addOption('Bromley','Bromley');
		addOption('Buckinghamshire','Buckinghamshire');
		addOption('Bury','Bury');
		addOption('Calderdale','Calderdale');
		addOption('Cambridgeshire','Cambridgeshire');
		addOption('Camden','Camden');
		addOption('Cheshire','Cheshire');
		addOption('Cornwall','Cornwall');
		addOption('Coventry','Coventry');
		addOption('Croydon','Croydon');
		addOption('Cumbria','Cumbria');
		addOption('Darlington','Darlington');
		addOption('Derby','Derby');
		addOption('Derbyshire','Derbyshire');
		addOption('Devon','Devon');
		addOption('Doncaster','Doncaster');
		addOption('Dorset','Dorset');
		addOption('Dudley','Dudley');
		addOption('Durham','Durham');
		addOption('Ealing','Ealing');
		addOption('East Riding of Yorkshire','East Riding of Yorkshire');
		addOption('East Sussex','East Sussex');
		addOption('Enfield','Enfield');
		addOption('Essex','Essex');
		addOption('Gateshead','Gateshead');
		addOption('Gloucestershire','Gloucestershire');
		addOption('Greenwich','Greenwich');
		addOption('Hackney','Hackney');
		addOption('Halton','Halton');
		addOption('Hammersmith and Fulham','Hammersmith and Fulham');
		addOption('Hampshire','Hampshire');
		addOption('Haringey','Haringey');
		addOption('Harrow','Harrow');
		addOption('Hartlepool','Hartlepool');
		addOption('Havering','Havering');
		addOption('Herefordshire','Herefordshire');
		addOption('Hertfordshire','Hertfordshire');
		addOption('Hillingdon','Hillingdon');
		addOption('Hounslow','Hounslow');
		addOption('Isle of Wight','Isle of Wight');
		addOption('Islington','Islington');
		addOption('Kensington and Chelsea','Kensington and Chelsea');
		addOption('Kent','Kent');
		addOption('City of Kingston upon Hull','City of Kingston upon Hull');
		addOption('Kingston upon Thames','Kingston upon Thames');
		addOption('Kirklees','Kirklees');
		addOption('Knowsley','Knowsley');
		addOption('Lambeth','Lambeth');
		addOption('Lancashire','Lancashire');
		addOption('Leeds','Leeds');
		addOption('Leicester','Leicester');
		addOption('Leicestershire','Leicestershire');
		addOption('Lewisham','Lewisham');
		addOption('Lincolnshire','Lincolnshire');
		addOption('Liverpool','Liverpool');
		addOption('City of London','City of London');
		addOption('Luton','Luton');
		addOption('Manchester','Manchester');
		addOption('Medway','Medway');
		addOption('Merton','Merton');
		addOption('Middlesbrough','Middlesbrough');
		addOption('Milton Keynes','Milton Keynes');
		addOption('Newcastle upon Tyne','Newcastle upon Tyne');
		addOption('Newham','Newham');
		addOption('Norfolk','Norfolk');
		addOption('Northamptonshire','Northamptonshire');
		addOption('North East Lincolnshire','North East Lincolnshire');
		addOption('North Lincolnshire','North Lincolnshire');
		addOption('North Somerset','North Somerset');
		addOption('North Tyneside','North Tyneside');
		addOption('Northumberland','Northumberland');
		addOption('North Yorkshire','North Yorkshire');
		addOption('Nottingham','Nottingham');
		addOption('Nottinghamshire','Nottinghamshire');
		addOption('Oldham','Oldham');
		addOption('Oxfordshire','Oxfordshire');
		addOption('Peterborough','Peterborough');
		addOption('Plymouth','Plymouth');
		addOption('Poole','Poole');
		addOption('Portsmouth','Portsmouth');
		addOption('Reading','Reading');
		addOption('Redbridge','Redbridge');
		addOption('Redcar and Cleveland','Redcar and Cleveland');
		addOption('Richmond upon Thames','Richmond upon Thames');
		addOption('Rochdale','Rochdale');
		addOption('Rotherham','Rotherham');
		addOption('Rutland','Rutland');
		addOption('Salford','Salford');
		addOption('Shropshire','Shropshire');
		addOption('Sandwell','Sandwell');
		addOption('Sefton','Sefton');
		addOption('Sheffield','Sheffield');
		addOption('Slough','Slough');
		addOption('Solihull','Solihull');
		addOption('Somerset','Somerset');
		addOption('Southampton','Southampton');
		addOption('Southend-on-Sea','Southend-on-Sea');
		addOption('South Gloucestershire','South Gloucestershire');
		addOption('South Tyneside','South Tyneside');
		addOption('Southwark','Southwark');
		addOption('St. Helens','St. Helens');
		addOption('Staffordshire','Staffordshire');
		addOption('Stockport','Stockport');
		addOption('Stockton-on-Tees','Stockton-on-Tees');
		addOption('Stoke-on-Trent','Stoke-on-Trent');
		addOption('Suffolk','Suffolk');
		addOption('Sunderland','Sunderland');
		addOption('Surrey','Surrey');
		addOption('Sutton','Sutton');
		addOption('Swindon','Swindon');
		addOption('Tameside','Tameside');
		addOption('Telford and Wrekin','Telford and Wrekin');
		addOption('Thurrock','Thurrock');
		addOption('Torbay','Torbay');
		addOption('Tower Hamlets','Tower Hamlets');
		addOption('Trafford','Trafford');
		addOption('Wakefield','Wakefield');
		addOption('Walsall','Walsall');
		addOption('Waltham Forest','Waltham Forest');
		addOption('Wandsworth','Wandsworth');
		addOption('Warrington','Warrington');
		addOption('Warwickshire','Warwickshire');
		addOption('West Berkshire','West Berkshire');
		addOption('Westminster','Westminster');
		addOption('West Sussex','West Sussex');
		addOption('Wigan','Wigan');
		addOption('Wiltshire','Wiltshire');
		addOption('Windsor and Maidenhead','Windsor and Maidenhead');
		addOption('Wirral','Wirral');
		addOption('Wokingham','Wokingham');
		addOption('Wolverhampton','Wolverhampton');
		addOption('Worcestershire','Worcestershire');
		addOption('York','York');
		addOption('Antrim','Antrim');
		addOption('Ards','Ards');
		addOption('Armagh','Armagh');
		addOption('Ballymena','Ballymena');
		addOption('Ballymoney','Ballymoney');
		addOption('Banbridge','Banbridge');
		addOption('Belfast','Belfast');
		addOption('Carrickfergus','Carrickfergus');
		addOption('Castlereagh','Castlereagh');
		addOption('Coleraine','Coleraine');
		addOption('Cookstown','Cookstown');
		addOption('Craigavon','Craigavon');
		addOption('Down','Down');
		addOption('Dungannon','Dungannon');
		addOption('Fermanagh','Fermanagh');
		addOption('Larne','Larne');
		addOption('Limavady','Limavady');
		addOption('Lisburn','Lisburn');
		addOption('Derry','Derry');
		addOption('Magherafelt','Magherafelt');
		addOption('Moyle','Moyle');
		addOption('Newry and Mourne','Newry and Mourne');
		addOption('Newtownabbey','Newtownabbey');
		addOption('North Down','North Down');
		addOption('Omagh','Omagh');
		addOption('Strabane','Strabane');
		addOption('Aberdeen City','Aberdeen City');
		addOption('Aberdeenshire','Aberdeenshire');
		addOption('Angus','Angus');
		addOption('Argyll and Bute','Argyll and Bute');
		addOption('Scottish Borders, The','Scottish Borders, The');
		addOption('Clackmannanshire','Clackmannanshire');
		addOption('Dumfries and Galloway','Dumfries and Galloway');
		addOption('Dundee City','Dundee City');
		addOption('East Ayrshire','East Ayrshire');
		addOption('East Dunbartonshire','East Dunbartonshire');
		addOption('East Lothian','East Lothian');
		addOption('East Renfrewshire','East Renfrewshire');
		addOption('Edinburgh, City of','Edinburgh, City of');
		addOption('Falkirk','Falkirk');
		addOption('Fife','Fife');
		addOption('Glasgow City','Glasgow City');
		addOption('Highland','Highland');
		addOption('Inverclyde','Inverclyde');
		addOption('Midlothian','Midlothian');
		addOption('Moray','Moray');
		addOption('North Ayrshire','North Ayrshire');
		addOption('North Lanarkshire','North Lanarkshire');
		addOption('Orkney Islands','Orkney Islands');
		addOption('Perth and Kinross','Perth and Kinross');
		addOption('Renfrewshire','Renfrewshire');
		addOption('Shetland Islands','Shetland Islands');
		addOption('South Ayrshire','South Ayrshire');
		addOption('South Lanarkshire','South Lanarkshire');
		addOption('Stirling','Stirling');
		addOption('West Dunbartonshire','West Dunbartonshire');
		addOption('Eilean Siar','Eilean Siar');
		addOption('West Lothian','West Lothian');
		addOption('Isle of Anglesey','Isle of Anglesey');
		addOption('Blaenau Gwent','Blaenau Gwent');
		addOption('Bridgend','Bridgend');
		addOption('Caerphilly','Caerphilly');
		addOption('Cardiff','Cardiff');
		addOption('Ceredigion','Ceredigion');
		addOption('Carmarthenshire','Carmarthenshire');
		addOption('Conwy','Conwy');
		addOption('Denbighshire','Denbighshire');
		addOption('Flintshire','Flintshire');
		addOption('Gwynedd','Gwynedd');
		addOption('Merthyr Tydfil','Merthyr Tydfil');
		addOption('Monmouthshire','Monmouthshire');
		addOption('Neath Port Talbot','Neath Port Talbot');
		addOption('Newport','Newport');
		addOption('Pembrokeshire','Pembrokeshire');
		addOption('Powys','Powys');
		addOption('Rhondda Cynon Taff','Rhondda Cynon Taff');
		addOption('Swansea','Swansea');
		addOption('Torfaen','Torfaen');
		addOption('The Vale of Glamorgan','The Vale of Glamorgan');
		addOption('Wrexham','Wrexham');
		
		/*addOption('Almondbury','Almondbury');
		addOption('Bingley','Bingley');
		addOption('Birstall','Birstall');
		addOption('Brighouse','Brighouse');
		addOption('Calder Valley','Calder Valley');
		addOption('Clifton','Clifton');
		addOption('Craven','Craven');
		addOption('Dewsbury','Dewsbury');
		addOption('Fixby','Fixby');
		addOption('Halifax','Halifax');
		addOption('Headingly','Headingly');
		addOption('Hipperholme','Hipperholme');
		addOption('Honley','Honley');
		addOption('Hove Edge','Hove Edge');
		addOption('Ilkley','Ilkley');
		addOption('Keighley','Keighley');
		addOption('Kildwick','Kildwick');
		addOption('Leeds','Leeds');
		addOption('Lightcliffe','Lightcliffe');
		addOption('Luddenden Dean','Luddenden Dean');
		addOption('Mirfield','Mirfield');
		addOption('Northowram','Northowram');
		addOption('Norwood Green','Norwood Green');
		addOption('Pateley Bridge','Pateley Bridge');
		addOption('Queensbury','Queensbury');
		addOption('Rastrick','Rastrick');
		addOption('Saltonstall','Saltonstall');
		addOption('Saddleworth','Saddleworth');
		addOption('Shelf','Shelf');
		addOption('Thornhill Briestfield','Thornhill Briestfield');
		addOption('Thornton by Bradford','Thornton by Bradford');
		addOption('Wath upon Dearne','Wath upon Dearne');
		addOption('West Riding','West Riding');
		addOption('Weston','Weston');
		addOption('Wetherby','Wetherby');*/
	}else if(val == 'Australia'){
		removeAllOptions(document.getElementById('selectProvince'));
		addOption('-Select From List-','');
		addOption('Australian Capital Territory','Australian Capital Territory');
		addOption('New South Wales','New South Wales');
		addOption('Northern Territory','Northern Territory');
		addOption('Queensland','Queensland');
		addOption('South Australia','South Australia');
		addOption('Tasmania','Tasmania');
		addOption('Victoria','Victoria');
		addOption('Western Australia','Western Australia');
	}else if(val == 'New Zealand'){
		removeAllOptions(document.getElementById('selectProvince'));
		addOption('None','None');
		/*addOption('Akaroa','Akaroa');
		addOption('Amuri','Amuri');
		addOption('Ashburton','Ashburton');
		addOption('Bay of Islands','Bay of Islands');
		addOption('Bruce','Bruce');
		addOption('Buller','Buller');
		addOption('Chatham Islands','Chatham Islands');
		addOption('Cheviot','Cheviot');
		addOption('Clifton','Clifton');
		addOption('Clutha','Clutha');
		addOption('Cook','Cook');
		addOption('Dannevirke','Dannevirke');
		addOption('Egmont','Egmont');
		addOption('Eketahuna','Eketahuna');
		addOption('Ellesmere','Ellesmere');
		addOption('Eltham','Eltham');
		addOption('Eyre','Eyre');
		addOption('Featherston','Featherston');
		addOption('Franklin','Franklin');
		addOption('Golden Bay','Golden Bay');
		addOption('Great Barrier Island','Great Barrier Island');
		addOption('Grey','Grey');
		addOption('Hauraki Plains','Hauraki Plains');
		addOption('Hawera','Hawera');
		addOption('Hawkes Bay','Hawkes Bay');
		addOption('Heathcote','Heathcote');
		addOption('Hobson','Hobson');
		addOption('Hokianga','Hokianga');
		addOption('Horowhenua','Horowhenua');*/
	}else if(val == 'United States'){
		removeAllOptions(document.getElementById('selectProvince'));
		addOption('-Select From List-','');
		addOption('Alabama','Alabama');
		addOption('Alaska','Alaska');
		addOption('Arizona','Arizona');
		addOption('Arkansas','Arkansas');
		addOption('California','California');
		addOption('Colorado','Colorado');
		addOption('Connecticut','Connecticut');
		addOption('Delaware','Delaware');
		addOption('District of Columbia','District of Columbia');
		addOption('Florida','Florida');
		addOption('Georgia','Georgia');
		addOption('Hawaii','Hawaii');
		addOption('Idaho','Idaho');
		addOption('Illinois','Illinois');
		addOption('Indiana','Indiana');
		addOption('Iowa','Iowa');
		addOption('Kansas','Kansas');
		addOption('Kentucky','Kentucky');
		addOption('Louisiana','Louisiana');
		addOption('Maine','Maine');
		addOption('Maryland','Maryland');
		addOption('Massachusetts','Massachusetts');
		addOption('Michigan','Michigan');
		addOption('Minnesota','Minnesota');
		addOption('Mississippi','Mississippi');
		addOption('Missouri','Missouri');
		addOption('Montana','Montana');
		addOption('Nebraska','Nebraska');
		addOption('Nevada','Nevada');
		addOption('New Hampshire','New Hampshire');
		addOption('New Jersey','New Jersey');
		addOption('New Mexico','New Mexico');
		addOption('New York','New York');
		addOption('North Carolina','North Carolina');
		addOption('North Dakota','North Dakota');
		addOption('Ohio','Ohio');
		addOption('Oklahoma','Oklahoma');
		addOption('Oregon','Oregon');
		addOption('Pennsylvania','Pennsylvania');
		addOption('Rhode Island','Rhode Island');
		addOption('South Carolina','South Carolina');
		addOption('South Dakota','South Dakota');
		addOption('Tennessee','Tennessee');
		addOption('Texas','Texas');
		addOption('Utah','Utah');
		addOption('Vermont','Vermont');
		addOption('Virginia','Virginia');
		addOption('Washington','Washington');
		addOption('West Virginia','West Virginia');
		addOption('Wisconsin','Wisconsin');
		addOption('Wyoming','Wyoming');
		addOption('American Samoa','American Samoa');
		addOption('Federated States of Micronesia','Federated States of Micronesia');
		addOption('Guam','Guam');
		addOption('Johnston Atoll','Johnston Atoll');
		addOption('Marshall Islands','Marshall Islands');
		addOption('Northern Mariana Islands','Northern Mariana Islands');
		addOption('Palau','Palau');
		addOption('Midway Islands','Midway Islands');
		addOption('Puerto Rico','Puerto Rico');
		addOption('U.S. Minor Outlying Islands','U.S. Minor Outlying Islands');
		addOption('Navassa Island','Navassa Island');
		addOption('Virgin Islands of the U.S.','Virgin Islands of the U.S.');
	}
}