Module:Infobox road/browselinks
local p = {}
 local getArgs = require('Module:Arguments').getArgs
 local util = require(&quot;Module:Road data/util&quot;)
 local yesno = require('Module:Yesno')
 local routeModule = require(&quot;Module:Infobox road/route&quot;)
 local parserModule = require(&quot;Module:Road data/parser&quot;)
 local parser = parserModule.parser
 local format = mw.ustring.format
 local frame = mw.getCurrentFrame()
 
 local function country(args)
 	local state = args.state or args.province
 	local country
 	local countryModule = mw.loadData(&quot;Module:Road data/countrymask&quot;)
 	local country = args.country or countryModule[state]
 	
 	return country
 end
 
 local function the(args)
 	if country(args) == &quot;ALA&quot; or country(args) == &quot;BHS&quot; or country(args) == &quot;CAF&quot; or country(args) == &quot;COG&quot; or country(args) == &quot;COD&quot; or country(args) == &quot;COM&quot; or country(args) == &quot;CZE&quot; or country(args) == &quot;DOM&quot; or country(args) == &quot;FSM&quot; or country(args) == &quot;GMB&quot; or country(args) == &quot;IMN&quot; or country(args) == &quot;MDV&quot; or country(args) == &quot;MHL&quot; or country(args) == &quot;NLD&quot; or country(args) == &quot;PHL&quot; or country(args) == &quot;SLB&quot; or country(args) == &quot;ARE&quot; or country(args) == &quot;GBR&quot; or country(args) == &quot;USA&quot; then
 		return 'the'
 	else
 		return ''
 	end
 end
 
 local function africa(args)
 	return &quot;*'''[[Trans-African Highway network]]'''&quot;
 end
 
 local function asia(args)
 	return &quot;*'''[[Asian Highway Network]]'''&quot;
 end
 
 local function europe(args)
 	if args.type == &quot;Pan&quot; then
 		return &quot;*'''[[Pan-European corridors]]'''&quot;
 	else
 		return &quot;*'''[[International E-road network]]'''\n\n*[[List of A Class E-roads|A Class]]\n*[[List of B Class E-roads|B Class]]&quot;
 	end
 end
 
 local function browselinks(args)
 	local ISO = require('Module:ISO 3166')
 	local name = ISO.name({country(args)})
 	
 	if country(args) == '' or country(args) == 'YUG' or country(args) == nil then
 		return nil
 		
 	elseif country(args) == 'ASIA' then
 		return asia(args)
 		
 	elseif country(args) == 'EUR' then
 		return europe(args)
 		
 	elseif country(args) == 'TAH' then
 		return africa(args)
 		
 	elseif country(args) == 'ARE' then
 		return string.format(&quot;*'''[[Transport in %s %s]]'''\n\n*[[List of roads in Dubai|Roads in Dubai]]&quot;, the(args), name)
 		
 	elseif country(args) == 'AUS' then
 		local state = args.state or ''
 		local stateName = ISO.name({&quot;AUS-&quot; .. state})
 		local links = &quot;*'''[[Highways in Australia]]'''\n\n*[[National Highway (Australia)|National Highway]]\n*[[Freeways in Australia]]&quot;
 			if state == 'ACT' then
 				return links .. &quot;\n\n'''[[Road infrastructure in Canberra]]'''&quot;
 			elseif state == 'NSW' then
 				return links .. &quot;\n\n'''[[Highways in New South Wales]]'''&quot;
 			elseif state ~= '' then
 				return string.format(&quot;%s \n\n'''[[List of highways in %s|Highways in %s]]'''&quot;, links, stateName, stateName)
 			else
 				return links
 			end
 	
 	elseif country(args) == 'AUT' then
 		return &quot;*'''Highways of Austria'''\n\n*[[Autobahns of Austria|Autobahns]]\n*[[Autobahns of Austria#Schnellstraßen|Expressways]]\n*[[Landesstraße|State Roads]]&quot;
 		
 	elseif country(args) == 'BEL' then
 		return &quot;*'''Highways of Belgium'''\n\n*[[List of motorways in Belgium|Motorways]]\n*[[List of National Roads in Belgium|National Roads]]&quot;
 		
 	elseif country(args) == 'BRA' then
 		local state = args.state or ''
 		local stateName = ISO.name({&quot;BRA-&quot; .. state})
 		local links = &quot;*'''[[List of highways in Brazil|Highways in Brazil]]'''&quot;
 			if state == 'RS' or state == 'SP' then
 				return string.format(&quot;%s \n\n*[[List of state highways in %s|%s State Highways]]&quot;, links, stateName, stateName)
 			else
 				return links
 			end
 		
 	elseif country(args) == 'BRN' then
 		return &quot;*'''[[Brunei National Roads System]]'''&quot;
 		
 	elseif country(args) == 'CAN' then	
 		local province = args.province or ''
 		local stateName = ISO.name({&quot;CAN-&quot; .. province})
 		
 		local TCH
 			if args.type == 'TCH' and province == '' then
 				TCH = &quot;*'''[[Trans-Canada Highway]]'''\n\n*[[National Highway System (Canada)|National Highway System]]&quot;
 			elseif args.type == 'TCH' and province ~= '' then
 				TCH = &quot;*'''[[Trans-Canada Highway]]'''&quot;
 			else
 				TCH = ''
 			end
 			
 		local provinces
 			if province == '' then
 				provinces = ''
 			elseif province == 'NT' then
 				provinces = &quot;'''[[List of Northwest Territories highways|Northwest Territories highways]]'''&quot;
 			elseif province == 'YT' or province == 'YK' then
 				provinces = &quot;'''[[List of Yukon territorial highways|Territorial highways in Yukon]]'''&quot;
 			elseif province == 'NU' then
 				provinces = &quot;'''[[Highways in Nunavut]]'''&quot;
 			elseif province == 'BC' then
 				provinces = &quot;'''[[List of British Columbia provincial highways|British Columbia provincial highways]]'''&quot;
 			elseif province == 'NL' then
 				provinces = &quot;'''[[List of Newfoundland and Labrador highways|Highways in Newfoundland and Labrador]]'''&quot;
 			elseif province == 'QC' then
 				provinces = &quot;'''[[Highways in Quebec|Quebec provincial highways]]'''&quot;
 			elseif province == 'ON' then
 				if args.type == 'Fwy' or args.type == 'Hwy' or args.type == 'ON' or args.type == 'ON 1960' or args.type == 'Secondary' or args.type == 'Sec' or args.type == 'TCH' then
 					provinces = &quot;'''[[Ontario Provincial Highway Network|Ontario provincial highways]]'''&quot;
 				elseif args.type == 'CR' or args.type == 'DR' or args.type == 'MR' or args.type == 'RR' then
 					provinces = &quot;'''[[List of county roads in Ontario|County roads in Ontario]]'''&quot;
 				elseif args.type == 'Parkway' then
 					provinces = &quot;'''Parkways of the Great Lakes'''&quot;
 				elseif args.type == 'Toronto' then
 					provinces = &quot;'''Roads in Toronto'''&quot;
 				else
 					provinces = &quot;'''[[Roads in Ontario]]'''&quot;
 				end
 			else
 				provinces = string.format(&quot;'''[[List of %s provincial highways|Provincial highways in %s]]'''&quot;, stateName, stateName)
 			end
 				
 		local second
 			if province == 'YT' or province == 'YK' then
 				second = &quot;[[Miscellaneous Yukon roads|Miscellaneous]]&quot;
 			elseif province == 'MB' then
 				second = &quot;[[List of Winnipeg City Routes|Winnipeg City Routes]]&quot;	
 			elseif province == 'NB' then
 				second = &quot;[[List of former New Brunswick provincial highways|Former routes]]&quot;
 			elseif province == 'NS' then
 				second = &quot;[[100-series highways (Nova Scotia)|100-series]]&quot;
 			elseif province == 'QC' then
 				second = &quot;[[Autoroutes of Quebec|Autoroutes]]\n*[[List of Quebec provincial highways|List]]\n*[[List of former Quebec provincial highways|Former]]&quot;
 			elseif province == 'ON' then
 				if args.type == 'Fwy' or args.type == 'Hwy' or args.type == 'ON' or args.type == 'ON 1960' or args.type == 'Secondary' or args.type == 'Sec' or args.type == 'TCH' then
 					second = &quot;[[List of Ontario provincial highways|Current]]\n*[[List of former Ontario provincial highways|Former]]\n*[[400-series highways|400-series]]&quot;
 				elseif args.type == 'Parkway' then
 					second = &quot;[[Long Sault Parkway|Long Sault]]\n*[[Niagara Parkway|Niagara]]\n*[[St. Clair Parkway|St. Clair]]\n*[[Thousand Islands Parkway|1000 Islands]]\n\n*'''[[Roads in Ontario]]'''&quot;
 				elseif args.type == 'Toronto' then
 					second = &quot;[[List of north–south roads in Toronto|North–South]]\n*[[List of east–west roads in Toronto|East–West]]\n*[[List of diagonal roads in Toronto|Diagonal]]&quot;
 				else
 					second = ''
 				end
 			else
 				second = ''
 			end
 		
 		return string.format(&quot;%s\n\n*%s\n\n*%s&quot;, TCH, provinces, second)		
 
 	elseif country(args) == 'CHE' then
 		return &quot;*'''[[Transport in Switzerland]]'''\n\n*[[Motorways of Switzerland|Motorways]]&quot;
 		
 	elseif country(args) == 'CHN' then
 		local province = args.province or ''
 		local stateName = ISO.name({&quot;CHN-&quot; .. province})
 		local links
 			if args.type == &quot;Ex&quot; or args.type == &quot;Expwy&quot; then
 				links = &quot;*'''[[Expressways of China|National Trunk Highway System]]'''\n\n*[[List of primary NTHS Expressways|Primary]]\n*[[List of auxiliary NTHS Expressways|Auxiliary]]\n\n*[[China National Highways|National Highways]]\n*[[Transport in China]]&quot;
 			elseif args.type == &quot;G&quot; then
 				links = &quot;*'''[[Expressways of China|National Trunk Highway System]]'''\n\n*[[List of primary NTHS Expressways|Primary]]\n*[[List of auxiliary NTHS Expressways|Auxiliary]]&quot;
 			else
 				links = &quot;*'''[[Transport in China]]'''&quot;
 			end
 			
 			if province == 'BJ' or province == 'SH' or province == 'JS' or province == 'ZJ' or province == 'HA' or province == 'GD' then
 				return string.format(&quot;%s \n\n*'''[[Expressways of %s]]'''&quot;, links, stateName)
 			else
 				return links
 			end
 		
 	elseif country(args) == 'CRI' then
 		return &quot;*'''[[National Road Network of Costa Rica]]'''&quot;
 		
 	elseif country(args) == 'CYP' then
 		return &quot;*'''[[Motorways and roads in Cyprus]]'''&quot;
 		
 	elseif country(args) == 'DEU' then
 		if args.type == &quot;E&quot; then
 			return europe(args)
 		else
 			return &quot;*'''Roads in Germany'''\n\n*[[Autobahn]]s\n**[[List of autobahns in Germany|List]]\n*[[Bundesstraße|Federal]]\n**[[List of federal highways in Germany|List]]\n\n*[[Landesstraße|State]]\n*[[List of E-roads in Germany|E-roads]]&quot;
 		end
 		
 	elseif country(args) == 'ESP' then
 		local province = args.province or ''
 		local stateName = ISO.name({&quot;ESP-&quot; .. province})
 		local links
 			if args.type == &quot;E&quot; then
 				links = europe(args)
 			else
 				links = &quot;*'''[[Highways in Spain]]'''\n\n*[[List of autopistas and autovías in Spain|''Autopistas'' and ''autovías'']]\n*[[List of national roads in Spain|National Roads]]&quot;
 			end
 		
 		local community
 			if province ~= '' then
 				if province == 'B' or province == 'GI' or province == 'L' or province == 'T' then
 					community = &quot;'''[[List of primary highways in Catalonia|Primary Highways in Catalonia]]'''&quot;
 				elseif province == 'GC' or province == 'TF' then
 					community = &quot;'''[[Transport in the Canary Islands]]'''&quot;
 				elseif province == 'ML' then
 					community = &quot;'''[[Transport in Melilla]]'''&quot;
 				elseif province == 'M' or province == 'MD' then
 					community = &quot;'''[[Transport_in_Madrid#Road|Transport in the Community of Madrid]]'''&quot;
 				else
 					community = ''
 				end
 			else
 				community = ''
 			end
 		
 		return string.format(&quot;%s\n\n*%s&quot;, links, community)
 		
 	elseif country(args) == 'FIN' then
 		if args.type == &quot;E&quot; then
 			return europe(args)
 		else
 			return &quot;*'''[[Highways in Finland]]'''&quot;
 		end
 		
 	elseif country(args) == 'FRA' then
 		if args.type == &quot;E&quot; then
 			return europe(args)
 		else
 			return &quot;*'''Roads in France'''\n\n*[[Autoroutes of France|''Autoroutes'']]\n*[[Route nationale|''Routes nationales'']]&quot;
 		end
 		
 	elseif country(args) == 'GBR' or country(args) == 'ENG' or country(args) == 'SCT' or country(args) == 'WLS' then
 		if args.type == &quot;Roman&quot; then
 			return &quot;*'''[[Roman roads in Britannia]]'''&quot;
 		else
 			return &quot;*'''[[Roads in the United Kingdom]]'''\n\n*[[List_of_motorways_in_the_United_Kingdom|Motorways]]\n*[[List of roads zones in Great Britain|A and B road zones]]&quot;
 		end
 		
 	elseif country(args) == 'GEO' then
 		return &quot;*'''Roads in Georgia'''\n\n*[[List of roads in Georgia (country)#Roads of international importance|International Routes]]\n*[[List of roads in Georgia (country)#Roads of domestic importance|National Routes]]&quot;
 		
 	elseif country(args) == 'GHA' then
 		return &quot;*'''[[Ghana Road Network]]'''&quot;
 		
 	elseif country(args) == 'GIB' then
 		return &quot;*'''[[Streets in Gibraltar]]'''&quot;
 		
 	elseif country(args) == 'GRC' then
 		return &quot;*'''Highways in Greece'''\n\n*[[Motorways in Greece|Motorways]]\n*[[National Roads in Greece|National Roads]]&quot;
 		
 	elseif country(args) == 'HKG' then
 		return &quot;*'''[[Transport in Hong Kong]]'''\n\n*[[Hong Kong Strategic Route and Exit Number System|Routes]]\n*[[List of streets and roads in Hong Kong|Roads and Streets]]&quot;
 		
 	elseif country(args) == 'HUN' then
 		return &quot;*'''Roads in Hungary'''\n\n*[[Highways in Hungary|Highways]]\n*[[Roads in Hungary#Main roads|Main roads]]\n*[[Roads in Hungary#Local roads|Local roads]]&quot;
 		
 	elseif country(args) == 'IND' then
 		local state = args.state or ''
 		local stateName = ISO.name({&quot;IND-&quot; .. state})
 		local links = &quot;*'''[[Roads in India]]'''\n\n*[[Expressways of India|Expressways]]\n*[[National highways of India|National]]\n*[[State highways in India|State]]\n*[[Asian Highway Network|Asian]]&quot;
 			if state ~= '' then
 				return string.format(&quot;%s \n\n'''[[List of state highways in %s|State Highways in %s]]'''&quot;, links, stateName, stateName)
 			else
 				return links
 			end
 		
 	elseif country(args) == 'IRL' then
 		return &quot;*'''[[Roads in Ireland]]'''\n\n*[[Motorways in the Republic of Ireland|Motorways]]\n*[[National primary road|Primary]]\n*[[National secondary road|Secondary]]\n*[[Regional road (Ireland)|Regional]]&quot;
 		
 	elseif country(args) == 'IRN' then
 		return &quot;*'''[[List of highways in Iran|Highways in Iran]]'''\n\n*[[Freeways in Iran|Freeways]]&quot;
 		
 	elseif country(args) == 'ISR' then
 		return &quot;*'''[[Roads in Israel]]'''\n\n*[[List of highways in Israel|Highways]]&quot;
 		
 	elseif country(args) == 'ITA' then
 		return &quot;*'''Roads in Italy'''\n\n*[[Autostrade of Italy|''Autostrade'']]\n*[[State highway (Italy)|State]]\n*[[Regional road (Italy)|Regional]]\n*[[Provincial road (Italy)|Provincial]]&quot;
 		
 	elseif country(args) == 'JPN' then
 		return &quot;*'''[[National highways of Japan]]'''\n\n*[[Expressways of Japan]]&quot;
 		
 	elseif country(args) == 'KOR' then
 		return &quot;*'''[[Highway systems of South Korea]]'''\n\n*[[Expressways in South Korea|Expressways]]\n*[[National highways of South Korea|National]]\n*[[Local highways of South Korea|Local]]&quot;
 		
 	elseif country(args) == 'KOS' then -- this is not an official ISO code
 		return &quot;*'''[[Roads in Kosovo]]'''&quot;
 		
 	elseif country(args) == 'LKA' then
 		return &quot;*'''Roads in Sri Lanka'''\n\n*[[Expressways of Sri Lanka|Expressways]]\n*[[List of A-Grade highways in Sri Lanka|A-Grade]]\n*[[List of B-Grade highways in Sri Lanka|B-Grade]]&quot;
 		
 	elseif country(args) == 'LUX' then
 		return &quot;*'''[[List of motorways in Luxembourg|Motorways in Luxembourg]]'''&quot;
 		
 	elseif country(args) == 'LVA' then
 		return &quot;*'''[[List of National Roads in Latvia|National Roads in Latvia]]'''&quot;
 		
 	elseif country(args) == 'MEX' then
 		local state = args.state or ''
 		local stateName = ISO.name({&quot;MEX-&quot; .. state})
 		local links = &quot;*'''[[Mexican Federal Highway]]s'''\n\n*[[List of Mexican Federal Highways|List]]\n*[[List of Mexican autopistas|''Autopistas'']]&quot;
 			if state == 'SON' then
 				return string.format(&quot;%s \n\n'''[[List of highways in %s|State Highways in %s]]'''&quot;, links, stateName, stateName)
 			elseif state == 'DUR' then
 				return string.format(&quot;%s \n\n'''[[%s state highways|State Highways in %s]]'''&quot;, links, stateName, stateName)
 			else
 				return links
 			end
 		
 	elseif country(args) == 'MWI' then
 		return &quot;*'''[[Transport in Malawi]]'''\n\n*[[List of roads in Malawi|Roads]]&quot;
 		
 	elseif country(args) == 'MYS' then
 		return &quot;*'''[[List of expressways and highways in Malaysia|Highways in Malaysia]]'''\n\n*[[Malaysian Expressway System|Expressways]]\n*[[Malaysian Federal Roads System|Federal]]\n*[[Malaysian State Roads system|State]]&quot;
 		
 	elseif country(args) == 'NIR' then
 		return &quot;*'''[[Roads in Northern Ireland]]'''\n\n*[[List_of_motorways_in_the_United_Kingdom#Northern_Ireland|Motorways]]\n*[[List of A roads in Northern Ireland|A roads in Northern Ireland]]&quot;
 		
 	elseif country(args) == 'NLD' then
 		if args.type == &quot;E&quot; then
 			return europe(args)
 		else
 			return &quot;*'''[[Roads in the Netherlands]]'''\n\n*[[List of motorways in the Netherlands|Motorways]]\n*[[List of E-roads in the Netherlands|E-roads]]\n*[[List of provincial roads in the Netherlands|Provincial]]\n*[[List of city routes in the Netherlands|City routes]]&quot;
 		end
 		
 	elseif country(args) == 'NOR' then
 		if args.type == &quot;E&quot; then
 			return europe(args)
 		else
 			return &quot;*'''Roads in Norway'''\n\n*[[Norwegian national road|National Roads]]\n*[[Norwegian county road|County Roads]]&quot;
 		end
 		
 	elseif country(args) == 'NZL' then
 		return &quot;*'''[[New Zealand state highway network|New Zealand state highways]]'''\n\n*[[List of motorways and expressways in New Zealand|Motorways and expressways]]\n*[[List of New Zealand state highways|List]]&quot;
 		
 		
 	elseif country(args) == 'PHL' then
 		if args.type == &quot;AH&quot; then
 			return asia(args)
 		else
 			return &quot;*'''Roads in the Philippines'''\n\n*[[Philippine highway network|Highways]]\n*[[Philippine expressway network|Expressways]]\n**[[List of expressways in the Philippines|List]]&quot;
 		end
 		
 	elseif country(args) == 'POL' then
 		return &quot;*'''[[National roads in Poland]]'''\n\n*[[Voivodeship road]]s&quot;
 		
 	elseif country(args) == 'ROU' then
 		return &quot;*'''[[Roads in Romania]]'''\n\n*[[Highways in Romania|Highways]]&quot;
 		
 	elseif country(args) == 'RUS' then
 		return &quot;*'''[[Russian federal highways|Russian Federal Highways]]'''&quot;
 		
 	elseif country(args) == 'SGP' then
 		return &quot;*'''[[Expressways of Singapore]]'''&quot;
 		
 	elseif country(args) == 'SRB' then
 		return &quot;*'''[[Roads in Serbia]]'''\n\n*[[Motorways in Serbia|Motorways]]&quot;
 		
 	elseif country(args) == 'SWE' then
 		if args.type == &quot;E&quot; then
 			return europe(args)
 		else
 			return &quot;*'''Roads in Sweden'''\n\n*[[Swedish national road|National Roads]]\n*[[Swedish county road|County Roads]]&quot;
 		end
 		
 	elseif country(args) == 'THA' then
 		return &quot;*'''[[Thai highway network|Highways in Thailand]]'''\n\n*[[Thai motorway network|Motorways]]\n*[[Asian Highway Network|Asian Highways]]&quot;
 		
 	elseif country(args) == 'TUR' then
 		return &quot;*'''[[List of highways in Turkey|Highways in Turkey]]'''\n\n*[[Otoyol|Motorways]]\n**[[List of otoyol routes in Turkey|List]]\n*[[Turkish State Highway System|State Highways]]\n**[[List of highways in Turkey#State roads|List]]&quot;
 		
 	elseif country(args) == 'TWN' then
 		return &quot;*'''[[Highway system in Taiwan]]'''&quot;
 		
 	elseif country(args) == 'UKR' then
 		return &quot;*'''[[Roads in Ukraine]]'''\n\n*[[State Highways (Ukraine)|State Highways]]&quot;
 		
 	elseif country(args) == 'URY' then
 		return &quot;*'''[[National Routes of Uruguay]]'''&quot;
 		
 	elseif country(args) == 'USA' then
 		local state = args.state or ''
 		local stateName = ISO.name({&quot;USA-&quot; .. state})
 		
 		local national
 			if args.type == nil then
 				national = ''
 			elseif args.type == 'ADHS' then
 				national = &quot;*'''[[Appalachian Development Highway System]]'''&quot;
 			elseif args.type == 'FFH' or args.type == 'FH' or args.type == 'FR' or args.type == 'FH-named' then
 				national = &quot;*'''[[Forest Highway|Forest Highway System]]'''&quot;
 			elseif args.type == 'ISTEA' then
 				national = &quot;*'''[[Intermodal Surface Transportation Efficiency Act|High-Priority Corridors]]'''&quot;
 			elseif args.type == 'NER' then
 				national = &quot;*'''[[New England road marking system]]'''&quot;
 			elseif args.type == 'NHS' then
 				national = &quot;*'''[[National Highway System (United States)|National Highway System]]'''\n\n*[[Interstate Highway System|Interstate]]\n*[[Strategic Highway Network|STRAHNET]]&quot;
 			elseif args.type == 'NSB' or args.type == 'NFSB' or args.type == 'FSB' or args.type == 'Byway' or args.type == 'Npkwy' or args.type == 'GRR' or args.type == 'NTP' or args.type == 'BRP' or args.type == 'BCB' or args.type == 'Back Country' then
 				national = &quot;*'''[[Scenic byways in the United States|Scenic Byways]]'''\n\n*[[National Scenic Byway|National]]\n*[[National Forest Scenic Byway|National Forest]]\n*[[Bureau of Land Management Back Country Byway|BLM]]\n*[[National Parkway|NPS]]&quot;
 			elseif args.type == 'Post' or args.type == 'Postal' then
 				national = &quot;*'''[[Post_road#United_States|Post Roads in the United States]]'''&quot;
 			elseif args.type == 'Trail' or args.type == 'Albert Pike' or args.type == 'Arrowhead Trail' or args.type == 'Dixie' or args.type == 'Jackson' or args.type == 'Jefferson' or args.type == 'Jefferson Davis' or args.type == 'LCT' or args.type == 'Lincoln' or args.type == 'National' or args.type == 'Roosevelt' or args.type == 'Spanish' or args.type == 'National Old Trails Road' then
 				national = &quot;*'''[[Auto trail]]s'''&quot;
 			elseif args.type == 'Tour' then
 				national = &quot;*'''[[Great Lakes Circle Tour]]'''&quot;
 			elseif args.type == 'USBR' then
 				national = &quot;*'''[[United States Bicycle Route System]]'''\n\n*[[United States Bicycle Route System#List of routes and planned corridors|List]]&quot;
 			elseif string.match( args.type, &quot;^US&quot; ) == 'US' then
 				national = &quot;*'''[[United States Numbered Highway System]]'''\n\n*[[List of United States Numbered Highways|List]]\n*[[List of special routes of the United States Numbered Highway System|Special]]\n*[[List of divided U.S. Routes|Divided]]&quot;
 			elseif args.type == 'I' or args.type == 'Interstate' or args.type == 'I-named' or args.type == 'I' .. state or args.type == 'BL' or string.match( args.type, &quot;^BL&quot; ) == 'BL' or string.match( args.type, &quot;^Fut&quot; ) == 'Fut' or string.match( args.type, &quot;^IS&quot; ) == 'IS' or string.match( args.type, &quot;^I %d&quot; ) == 'I 1' or (state == 'OH' and args.type == 'Turnpike') then
 				national = &quot;*'''[[Interstate Highway System]]'''\n\n*[[List of Interstate Highways|Main]]\n*[[List of auxiliary Interstate Highways|Auxiliary]]\n*[[List of suffixed Interstate Highways|Suffixed]]\n*[[List of business routes of the Interstate Highway System|Business]]\n*[[List of future Interstate Highways|Future]]&quot;
 			else
 				national = ''
 			end
 			
 		local function routes(args)
 			local routes
 			if state == 'AL' or state == 'AZ' or state == 'CT' or state == 'IL' or state == 'ME' or state == 'NV' or state == 'NH' or state == 'NY' or state == 'OH' or state == 'PA' or state == 'TN' or state == 'WA' or state == 'WV' then
 				routes = &quot;state routes&quot;
 			elseif state == 'FL' or state == 'IN' or state == 'NM' then
 				routes =  &quot;state roads&quot;
 			elseif state == 'KY' or state == 'VA' then
 				routes =  &quot;primary state highways&quot;
 			elseif state == 'MI' then
 				routes =  &quot;state trunkline highways&quot;
 			elseif state == 'WI' then
 				routes =  &quot;state trunk highways&quot;
 			else
 				routes =  &quot;state highways&quot;
 			end
 			
 			return routes
 		end
 		
 		local function whoCallsThemRoutes(args)
 			local routes
 			if state == 'CA' or state == 'MS' or state == 'MO' or state == 'NV' or state == 'NH' or state == 'NJ' or state == 'NM' or state == 'NY' or state == 'OH' or state == 'PA' or state == 'WA' then
 				routes = &quot;Routes&quot;
 			else
 				routes =  &quot;Highways&quot;
 			end
 			
 			return routes
 		end
 			
 		local function three(args)
 			return string.format(&quot;[[List of Interstate Highways in %s|Interstate]]\n*[[List of U.S. %s in %s|US]]\n*[[List of %s in %s|State]]&quot;, stateName, whoCallsThemRoutes(args), stateName, routes(args), stateName ) 
 		end
 		
 		local function shs(args)
 			return string.format(&quot;*'''%s State Highway System'''\n\n*%s&quot;, stateName, three(args))
 		end
 		
 		local function shsLinked(args)
 			return string.format(&quot;*'''[[%s State Highway System]]'''\n\n*%s&quot;, stateName, three(args))
 		end
 		
 		local states
 			if state == '' then
 				states = ''
 			elseif state == 'AL' or state == 'ID' or state == 'ND' or state == 'WY' then
 				states = shs(args)
 			elseif state == 'AK' then
 				states = &quot;*'''[[List_of_Alaska Routes|Alaska Routes]]'''\n\n*[[List of Interstate Highways in Alaska|Interstate]]\n*[[Alaska's Scenic Byways|Scenic Byways]]&quot;
 			elseif state == 'AS' then
 				states = &quot;*'''[[List of highways in American Samoa|Highways in American Samoa]]'''&quot;
 			elseif state == 'AZ' then
 				states = string.format(&quot;%s\n*[[Unconstructed state routes in Arizona|Proposed]]\n*[[Former state routes in Arizona|Former]]&quot;, shs(args))
 			elseif state == 'AR' then
 				states = string.format(&quot;*'''[[Arkansas Highway System]]'''\n\n*%s\n*[[List of Arkansas state highway business_routes|Business]]\n*[[List of Arkansas state highway spurs|Spurs]]\n*[[List of suffixed Arkansas state highways|Suffixed]]\n*[[Arkansas Scenic Byways|Scenic]]\n*[[Arkansas Heritage Trail|Heritage]]&quot;, three(args))
 			elseif state == 'CA' then
 				if args.type == 'CR' then
 					states = &quot;*'''[[County routes in California]]'''&quot;
 				else
 					states = string.format(&quot;*'''[[State highways in California]]'''\n\n*%s\n*[[State Scenic Highway System (California)|Scenic]]\n*[[History of California's state highway system|History]]\n*[[List of state highways in California (pre-1964)|Pre&amp;#8209;1964]]\n*[[Unconstructed state highways in California|Unconstructed]]\n*[[Deleted state highways in California|Deleted]]\n*[[California Freeway and Expressway System|Freeways]]&quot;, three(args))
 				end
 			elseif state == 'CO' then
 				states = string.format(&quot;%s\n*[[List of Colorado Scenic and Historic Byways|Scenic]]&quot;, shs(args))
 			elseif state == 'CT' then
 				states = string.format(&quot;%s\n**[[List of Special Service Roads in Connecticut|SSR]]\n**[[List of State Roads in Connecticut|SR]]&quot;, shs(args))
 			elseif state == 'DE' then
 				states = &quot;*'''[[Delaware State Route System]]'''\n\n*[[List of numbered routes in Delaware|List]]\n*[[Delaware Byways|Byways]]&quot;
 			elseif state == 'DC' then
 				states = &quot;*'''[[Streets and highways of Washington, D.C.|Streets and Highways of Washington, DC]]'''\n\n*[[List of Interstate Highways in Washington, D.C.|Interstate]]\n*[[List of U.S. Highways in Washington, D.C.|US]]\n*[[List of numbered highways in Washington, D.C.|DC]]\n*[[List of state-named roadways in Washington, D.C.|State-Named Streets]]&quot;
 			elseif state == 'FL' then
 				local county = args.county or ''
 				if args.type == 'CR' and county ~= '' then
 					states = string.format(&quot;*'''[[County roads in Florida]]'''\n\n*[[List of county roads in %s County, Florida|County roads in %s County]]&quot;, county, county)
 				elseif args.type == 'CR' and county == '' then
 					states = &quot;*'''[[County roads in Florida]]'''&quot;
 				else
 					states = string.format(&quot;%s\n**[[List of former state roads in Florida|Former]]\n**[[State roads in Florida before 1945|Pre&amp;#8209;1945]]\n*[[List of toll roads in Florida|Toll]]\n*[[Florida Scenic Highways|Scenic]]&quot;, shsLinked(args))
 									end
 			elseif state == 'GA' then
 				states = &quot;*'''Georgia State Highway System'''\n\n*[[List of Interstate Highways in Georgia (U.S. state)|Interstate]]\n*[[List of U.S. Highways in Georgia (U.S. state)|US]]\n*[[List of state routes in Georgia (U.S. state)|State]]\n*\n*[[List of special state routes in Georgia (U.S. state)|Special]]&quot;
 			elseif state == 'GU' then
 				states = &quot;*'''[[List of highways in Guam|Guam Highways]]'''&quot;
 			elseif state == 'HI' then
 				states = &quot;*'''[[List of state highways in Hawaii|Routes in Hawaii]]'''&quot;
 			elseif state == 'IL' then
 				local county = args.county or ''
 				if args.type == 'CR' and county ~= '' then
 					states = string.format(&quot;*'''%s County Roads'''&quot;, county)
 				elseif args.type == 'CR' and county == '' then
 					states = &quot;*'''County roads in Illinois'''&quot;
 				else
 					states = string.format(&quot;%s\n*[[Illinois State Toll Highway Authority|Tollways]]&quot;, shsLinked(args))
 				end
 			elseif state == 'IN' then
 				local county = args.county or ''
 				if args.type == 'CR' and county ~= '' then
 					states = string.format(&quot;*'''%s County Roads'''&quot;, county)
 				elseif args.type == 'CR' and county == '' then
 					states = &quot;*'''County roads in Indiana'''&quot;
 				else
 					states = string.format(&quot;%s\n*[[Indiana Scenic Byways|Scenic]]&quot;, shs(args))
 				end
 			elseif state == 'IA' then
 				states = string.format(&quot;*'''[[Iowa Primary Highway System]]'''\n\n*%s\n*[[County roads in Iowa|Secondary]]\n*[[List of Iowa Scenic Byways|Scenic]]&quot;, three(args))
 			elseif state == 'KS' then
 				states = string.format(&quot;%s\n*[[List of Kansas state highway spurs|Spurs]]&quot;, shs(args))
 			elseif state == 'KY' then
 				states = string.format(&quot;%s\n*[[List of parkways and named highways in Kentucky|Parkways]]&quot;, shs(args))
 			elseif state == 'LA' then
 				local county = args.county or args.parish or ''
 				if args.type == 'PR' or args.type == 'CR' then
 					if county ~= '' then
 						states = string.format(&quot;*'''%s Parish Roads'''&quot;, county)
 					else
 						states = &quot;*'''Parish roads in Louisiana'''&quot;
 					end
 				else
 					states = string.format(&quot;%s\n*[[Louisiana Scenic Byways|Scenic]]&quot;, shs(args))
 				end
 			elseif state == 'ME' then
 				states = string.format(&quot;%s\n*[[List of auto trails in Maine|Auto trails]]\n*[[List of lettered highways in Maine|Lettered&amp;nbsp;highways]]&quot;, shsLinked(args))
 			elseif state == 'MD' then
 				local county = args.county or ''
 				if args.type == 'CR' and county ~= '' then
 					states = string.format(&quot;*''' County Roads in %s County'''&quot;, county)
 				elseif args.type == 'CR' and county == '' then
 					states = &quot;*'''County roads in Maryland'''&quot;
 				else
 					states = string.format(&quot;*'''[[Maryland highway system]]'''\n\n*%s\n*[[Maryland Scenic Byways|Scenic Byways]]&quot;, three(args))
 				end
 			elseif state == 'MA' or state == 'MS' then
 				states = string.format(&quot;%s&quot;, shsLinked(args))
 			elseif state == 'MI' then
 				local county = args.county or ''
 				if args.type == 'CR' and county ~= '' or args.type == 'NFSB' and county ~= '' then
 					states = string.format(&quot;*'''%s County Roads'''&quot;, county)
 				elseif args.type == 'CR' and county == '' or args.type == 'NFSB' and county == '' then
 					states = &quot;*'''County roads in Michigan'''&quot;
 				elseif args.type == 'CDH' then
 					states = &quot;*'''[[List of county-designated highways in Michigan|County-Designated Highways]]'''&quot;
 				else
 					states = string.format(&quot;*'''[[Michigan State Trunkline Highway System]]'''\n\n*%s\n*[[Pure Michigan Byway|Byways]]&quot;, three(args))
 				end
 			elseif state == 'MN' then
 				local county = args.county or ''
 				if args.type == 'CR' or args.type == 'CSAH' then
 					if county ~= '' then
 						states = string.format(&quot;*'''[[County roads in Minnesota|County roads of Minnesota]]'''\n\n*[[List of county roads in %s County, Minnesota|%s County]]&quot;, county, county)
 					else
 						states = &quot;*'''[[County roads in Minnesota|County roads of Minnesota]]'''&quot;
 					end
 				else
 					states = string.format(&quot;*'''Minnesota Trunk Highway System'''\n\n*%s\n*[[Legislative route (Minnesota)|Legislative route]]s&quot;, three(args))
 				end
 			elseif state == 'MO' then
 				states = string.format(&quot;%s\n*[[Missouri supplemental route|Supplemental]]&quot;, shsLinked(args))
 			elseif state == 'MT' then
 				states = string.format(&quot;*'''[[Montana Highway System]]'''\n\n*%s\n*[[List of secondary highways in Montana|Secondary]]&quot;, three(args))
 			elseif state == 'NE' then
 				states = string.format(&quot;%s\n*[[List of Nebraska Connecting Link, Spur, and Recreation Highways|Link]]\n*[[List of Nebraska Connecting Link, Spur, and Recreation Highways|Spur]]\n**[[List of state spur highways in Nebraska|State Spurs]]\n*[[List of Nebraska Connecting Link, Spur, and Recreation Highways|Recreation]]&quot;, shsLinked(args))
 			elseif state == 'NV' then
 				states = string.format(&quot;%s\n*\n*[[List of state routes in Nevada prior to 1976|Pre&amp;#8209;1976]]\n*[[List of Nevada Scenic Byways|Scenic]]&quot;, shs(args))
 			elseif state == 'NH' then
 				states = string.format(&quot;*'''[[New Hampshire Highway System]]'''\n\n*%s\n*[[List of turnpikes in New Hampshire|Turnpikes]]&quot;, three(args))
 			elseif state == 'NJ' then
 				local county = args.county or ''
 				if args.type == 'CR' then
 					if county ~= '' then
 						states = string.format(&quot;*'''[[List of county routes in %s County, New Jersey|County Routes in %s County]]'''\n\n*[[County routes in New Jersey|System]]\n*[[List of 500-series county routes in New Jersey|500-series routes]]&quot;, county, county)
 					else
 						states = &quot;*'''[[County routes in New Jersey]]'''\n\n*[[List of 500-series county routes in New Jersey|500-series routes]]&quot;
 					end
 				else
 					states = string.format(&quot;*'''[[State highways in New Jersey|New Jersey State Highway Routes]]'''\n\n*%s\n*[[New Jersey Scenic Byways|Scenic Byways]]&quot;, three(args))
 				end
 			elseif state == 'NM' then
 				states = string.format(&quot;%s\n*[[New Mexico Scenic and Historic Byway|Scenic]]&quot;, shs(args))
 			elseif state == 'NY' then
 				local county = args.county or ''
 				if args.type == 'CR' then
 					if county ~= '' then
 						states = string.format(&quot;*'''[[County routes in New York]]'''\n\n*[[List of county routes in %s County, New York|County Routes in %s County]]&quot;, county, county)
 					else
 						states = &quot;*'''[[County routes in New York]]'''&quot;
 					end
 				else
 					states = string.format(&quot;*'''[[Numbered highways in New York|New York Highways]]'''\n\n*%s\n*[[List of reference routes in New York|Reference]]\n*[[Parkways in New York|Parkways]]&quot;, three(args))
 				end
 			elseif state == 'NC' then
 				states = string.format(&quot;*'''[[North Carolina Highway System]]'''\n\n*%s\n*[[North Carolina Scenic Byways|Scenic]]&quot;, three(args))
 			elseif state == 'MP' then
 				states = &quot;*'''[[List of numbered highways in the Northern Mariana Islands|Northern Mariana Islands Highways]]'''&quot;
 			elseif state == 'OH' then
 				if args.type == 'CR' then
 					states = &quot;*'''[[County roads in Ohio]]'''&quot;
 				else
 					states = string.format(&quot;%s\n*[[Ohio Scenic Byway|Scenic]]&quot;, shs(args))
 				end
 			elseif state == 'OR' then
 				states = string.format(&quot;*'''[[State highways in Oregon|Oregon Highways]]'''\n\n*%s\n*[[List of named state highways in Oregon|Named]]\n*[[Oregon State Scenic Byways|Scenic]]&quot;, three(args))
 			elseif state == 'OK' then
 				states = string.format(&quot;%s\n*[[Turnpikes of Oklahoma|Turnpikes]]&quot;, shs(args))
 			elseif state == 'PA' then
 				states = string.format(&quot;*'''[[Pennsylvania State Route System]]'''\n\n*%s\n*[[Pennsylvania Scenic Byways|Scenic Byways]]\n*[[List of Legislative Routes in Pennsylvania|Legislative]]&quot;, three(args))
 			elseif state == 'PR' then
 				states = &quot;*'''[[Roads in Puerto Rico]]'''\n\n*[[List of highways in Puerto Rico|List]]&quot;
 			elseif state == 'RI' then
 				states = &quot;*'''[[Numbered routes in Rhode Island|Rhode Island Routes]]'''&quot;
 			elseif state == 'SC' then
 				states = string.format(&quot;%s\n*[[South Carolina Scenic Byways|Scenic]]&quot;, shsLinked(args))
 			elseif state == 'SD' then
 				states = string.format(&quot;*'''South Dakota State Trunk Highway System'''\n\n*%s&quot;, three(args))
 			elseif state == 'TN' then
 				states = string.format(&quot;*'''[[Tennessee State Route System|Tennessee State Routes]]'''\n\n*%s&quot;, three(args))
 			elseif state == 'TX' then
 				states = string.format(&quot;*'''[[Texas state highway system|Highways in Texas]]'''\n\n*%s\n*[[Toll roads in Texas|Toll]]\n*[[List of state highway loops in Texas|Loops]]\n*[[List of state highway spurs in Texas|Spurs]]\n*[[List of Farm to Market Roads in Texas|FM/RM]]\n*[[List of Park Roads in Texas|Park]]\n*[[List of Recreational Roads in Texas|Rec]]&quot;, three(args))
 			elseif state == 'UT' then
 				states = string.format(&quot;%s\n*\n*[[List of state highways serving Utah state parks and institutions|Minor]]\n*[[Utah Scenic Byways|Scenic]]&quot;, shs(args))
 			elseif state == 'VI' then
 				states = &quot;*'''[[List of United States Virgin Islands highways|USVI Highways]]'''&quot;
 			elseif state == 'VT' then
 				states = &quot;*'''[[List of state highways in Vermont|State highways in Vermont]]'''&quot;
 			elseif state == 'VA' then
 				states = &quot;*'''[[State highways in Virginia|Virginia Routes]]'''\n\n*[[List of Interstate Highways in Virginia|Interstate]]\n*[[List of U.S. Highways in Virginia|US]]\n*[[List of primary state highways in Virginia|Primary]]\n*[[List of secondary state highways in Virginia|Secondary]]\n*[[Virginia Byway|Byways]]\n*[[History of state highways in Virginia|History]]\n*[[Virginia HOT lanes|HOT lanes]]&quot;
 			elseif state == 'WA' then
 				states = string.format(&quot;*'''[[State highways in Washington]]'''\n\n*%s\n*[[Washington State Scenic and Recreational Highways|Scenic]]\n*[[List of Primary State Highways in Washington|Pre-1964]]\n*[[1964 state highway renumbering (Washington)|1964 renumbering]]\n*[[List of former state routes in Washington|Former]]&quot;, three(args))
 			elseif state == 'WV' then
 				local county = args.county or ''
 				if args.type == 'CR' then
 					if county ~= '' then
 						states = string.format(&quot;*'''[[List of county routes in West Virginia|County Routes in West Virginia]]'''\n\n*[[List of county routes in %s County, West Virginia|%s County Routes]]&quot;, county, county)
 					else
 						states = &quot;*'''[[List of county routes in West Virginia|County Routes in West Virginia]]'''&quot;
 					end
 				else
 					states = string.format(&quot;%s&quot;, shsLinked(args))
 				end
 			elseif state == 'WI' then
 				if args.type == 'CR' or args.type == 'CTH' then
 					states = &quot;*'''[[County Trunk Highways (Wisconsin)|County Trunk Highways]]'''&quot;
 				else
 					states = string.format(&quot;*'''[[Wisconsin State Trunk Highway System]]'''\n\n*%s\n*[[Wisconsin Scenic Byways|Scenic]]\n*[[Rustic Road (Wisconsin)|Rustic]]&quot;, three(args))
 				end
 			end
 			
 			return string.format(&quot;%s\n\n%s&quot;, national, states) 
 		
 	elseif country(args) == 'ZAF' then
 		return &quot;*'''[[Numbered routes of South Africa]]'''&quot;
 
 	elseif country(args) == 'ARG' or country(args) == 'BRB' or country(args) == 'CHL' or country(args) == 'PRY' then
 		return string.format(&quot;*'''[[List of highways in %s %s|Highways in %s %s]]'''&quot;, the(args), name, the(args), name)
 
 	elseif country(args) == 'BGD' or country(args) == 'IMN' or country(args) == 'ISL' or country(args) == 'MDG' or country(args) == 'NPL' or country(args) == 'UGA' then
 		return string.format(&quot;*'''[[List of roads in %s %s|Roads in %s %s]]'''&quot;, the(args), name, the(args), name)
 		
 	elseif country(args) == 'DNK' or country(args) == 'MNE' or country(args) == 'PRK' or country(args) == 'TUN' then
 		return string.format(&quot;*'''[[Transport in %s %s]]'''\n\n*[[Motorways in %s %s|Motorways]]&quot;, the(args), name, the(args), name)
 		
 	elseif country(args) == 'AZE' or country(args) == 'BLR' or country(args) == 'BLZ' or country(args) == 'CPV' or country(args) == 'CUB' or country(args) == 'JAM' or country(args) == 'KWT' or country(args) == 'MDA' or country(args) == 'PAK' or country(args) == 'PRT' then
 		return string.format(&quot;*'''[[Roads in %s %s]]'''&quot;, the(args), name)
 		
 	elseif country(args) == 'ALB' or country(args) == 'BGR' or country(args) == 'CZE' or country(args) == 'DOM' or country(args) == 'ECU' or country(args) == 'GUF' or country(args) == 'HRV' or country(args) == 'PER' or country(args) == 'SVK' or country(args) == 'SVN' or country(args) == 'VEN' then
 		return string.format(&quot;*'''[[Highways in %s %s]]'''&quot;, the(args), name)
 		
 	else
 		return string.format(&quot;*'''[[Transport in %s %s]]'''&quot;, the(args), name)
 	end
 end
 
 function p.browselinks(frame)
 	local args = getArgs(frame)
 	
 	if args.nobrowse ~= nil then
 		return nil
 	else
 		return browselinks(args)
 	end
 	
 end