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 == 'CA'){
		removeAllOptions(document.getElementById('selectProvince'));
		addOption('-Select From List-','');
		addOption('Alberta','AB');
		addOption('British Columbia','BC');
		addOption('Manitoba','MB');
		addOption('New Brunswick','NB');
		addOption('Newfoundland','NL');
		addOption('Nova Scotia','NS');
		addOption('Ontario','ON');
		addOption('Prince Edward Island','PE');
		addOption('Quebec','QC');
		addOption('Saskatchewan','SK');
		addOption('Yukon','YT');
		addOption('Northwest Territories','NT');
		addOption('Nunavut','NU');
		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','AL');
		addOption('Alaska','AK');
		addOption('Arizona','AZ');
		addOption('Arkansas','AR');
		addOption('California','CA');
		addOption('Colorado','CO');
		addOption('Connecticut','CT');
		addOption('Delaware','DE');
		addOption('District of Columbia','DC');
		addOption('Florida','FL');
		addOption('Georgia','GA');
		addOption('Hawaii','HI');
		addOption('Idaho','ID');
		addOption('Illinois','IL');
		addOption('Indiana','IN');
		addOption('Iowa','IA');
		addOption('Kansas','KS');
		addOption('Kentucky','KY');
		addOption('Louisiana','LA');
		addOption('Maine','MW');
		addOption('Maryland','MD');
		addOption('Massachusetts','MA');
		addOption('Michigan','MI');
		addOption('Minnesota','MN');
		addOption('Mississippi','MS');
		addOption('Missouri','MO');
		addOption('Montana','MT');
		addOption('Nebraska','NE');
		addOption('Nevada','NV');
		addOption('New Hampshire','NH');
		addOption('New Jersey','NJ');
		addOption('New Mexico','NM');
		addOption('New York','NY');
		addOption('North Carolina','NC');
		addOption('North Dakota','ND');
		addOption('Ohio','OH');
		addOption('Oklahoma','OK');
		addOption('Oregon','OR');
		addOption('Pennsylvania','PA');
		addOption('Rhode Island','RI');
		addOption('South Carolina','SC');
		addOption('South Dakota','SD');
		addOption('Tennessee','TN');
		addOption('Texas','TX');
		addOption('Utah','UT');
		addOption('Vermont','VT');
		addOption('Virginia','VA');
		addOption('Washington','WA');
		addOption('West Virginia','WV');
		addOption('Wisconsin','WI');
		addOption('Wyoming','WY');
		addOption('American Samoa','AS');
		addOption('Federated States of Micronesia','FM');
		addOption('Guam','GU');
			addOption('Marshall Islands','MH');
		addOption('Northern Mariana Islands','MP');
		addOption('Palau','PW');
				addOption('Puerto Rico','PR');
		addOption('Virgin Islands of the U.S.','VI');
	}
}