<?php
// tz_places.php
// RJM Programming 
// December, 2016
// Place information regarding nominated TimeZones and Country Codes
// Thanks to ...
// //php.net/manual/en/datetimezone.getlocation.php
// //stackoverflow.com/questions/17842003/php-intl-country-code-2-chars-to-country-name
  
// Use URL like ./tz_places.php?upto= to populate arrays below ...
$nearname=["Africa/Abidjan","Africa/Accra","Africa/Addis_Ababa","Africa/Algiers","Africa/Asmara","Africa/Bamako","Africa/Bangui","Africa/Banjul","Africa/Bissau","Africa/Blantyre","Africa/Brazzaville","Africa/Bujumbura","Africa/Cairo","Africa/Casablanca","Africa/Ceuta","Africa/Conakry","Africa/Dakar","Africa/Dar_es_Salaam","Africa/Djibouti","Africa/Douala","Africa/El_Aaiun","Africa/Freetown","Africa/Gaborone","Africa/Harare","Africa/Johannesburg","Africa/Juba","Africa/Kampala","Africa/Khartoum","Africa/Kigali","Africa/Kinshasa","Africa/Lagos","Africa/Libreville","Africa/Lome","Africa/Luanda","Africa/Lubumbashi","Africa/Lusaka","Africa/Malabo","Africa/Maputo","Africa/Maseru","Africa/Mbabane","Africa/Mogadishu","Africa/Monrovia","Africa/Nairobi","Africa/Ndjamena","Africa/Niamey","Africa/Nouakchott","Africa/Ouagadougou","Africa/Porto-Novo","Africa/Sao_Tome","Africa/Tripoli","Africa/Tunis","Africa/Windhoek","America/Adak","America/Anchorage","America/Anguilla","America/Antigua","America/Araguaina","America/Argentina/Buenos_Aires","America/Argentina/Catamarca","America/Argentina/Cordoba","America/Argentina/Jujuy","America/Argentina/La_Rioja","America/Argentina/Mendoza","America/Argentina/Rio_Gallegos","America/Argentina/Salta","America/Argentina/San_Juan","America/Argentina/San_Luis","America/Argentina/Tucuman","America/Argentina/Ushuaia","America/Aruba","America/Asuncion","America/Atikokan","America/Bahia","America/Bahia_Banderas","America/Barbados","America/Belem","America/Belize","America/Blanc-Sablon","America/Boa_Vista","America/Bogota","America/Boise","America/Cambridge_Bay","America/Campo_Grande","America/Cancun","America/Caracas","America/Cayenne","America/Cayman","America/Chicago","America/Chihuahua","America/Costa_Rica","America/Creston","America/Cuiaba","America/Curacao","America/Danmarkshavn","America/Dawson","America/Dawson_Creek","America/Denver","America/Detroit","America/Dominica","America/Edmonton","America/Eirunepe","America/El_Salvador","America/Fort_Nelson","America/Fortaleza","America/Glace_Bay","America/Godthab","America/Goose_Bay","America/Grand_Turk","America/Grenada","America/Guadeloupe","America/Guatemala","America/Guayaquil","America/Guyana","America/Halifax","America/Havana","America/Hermosillo","America/Indiana/Indianapolis","America/Indiana/Knox","America/Indiana/Marengo","America/Indiana/Petersburg","America/Indiana/Tell_City","America/Indiana/Vevay","America/Indiana/Vincennes","America/Indiana/Winamac","America/Inuvik","America/Iqaluit","America/Jamaica","America/Juneau","America/Kentucky/Louisville","America/Kentucky/Monticello","America/Kralendijk","America/La_Paz","America/Lima","America/Los_Angeles","America/Lower_Princes","America/Maceio","America/Managua","America/Manaus","America/Marigot","America/Martinique","America/Matamoros","America/Mazatlan","America/Menominee","America/Merida","America/Metlakatla","America/Mexico_City","America/Miquelon","America/Moncton","America/Monterrey","America/Montevideo","America/Montserrat","America/Nassau","America/New_York","America/Nipigon","America/Nome","America/Noronha","America/North_Dakota/Beulah","America/North_Dakota/Center","America/North_Dakota/New_Salem","America/Ojinaga","America/Panama","America/Pangnirtung","America/Paramaribo","America/Phoenix","America/Port-au-Prince","America/Port_of_Spain","America/Porto_Velho","America/Puerto_Rico","America/Punta_Arenas","America/Rainy_River","America/Rankin_Inlet","America/Recife","America/Regina","America/Resolute","America/Rio_Branco","America/Santarem","America/Santiago","America/Santo_Domingo","America/Sao_Paulo","America/Scoresbysund","America/Sitka","America/St_Barthelemy","America/St_Johns","America/St_Kitts","America/St_Lucia","America/St_Thomas","America/St_Vincent","America/Swift_Current","America/Tegucigalpa","America/Thule","America/Thunder_Bay","America/Tijuana","America/Toronto","America/Tortola","America/Vancouver","America/Whitehorse","America/Winnipeg","America/Yakutat","America/Yellowknife","Antarctica/Casey","Antarctica/Davis","Antarctica/DumontDUrville","Antarctica/Macquarie","Antarctica/Mawson","Antarctica/McMurdo","Antarctica/Palmer","Antarctica/Rothera","Antarctica/Syowa","Antarctica/Troll","Antarctica/Vostok","Arctic/Longyearbyen","Asia/Aden","Asia/Almaty","Asia/Amman","Asia/Anadyr","Asia/Aqtau","Asia/Aqtobe","Asia/Ashgabat","Asia/Atyrau","Asia/Baghdad","Asia/Bahrain","Asia/Baku","Asia/Bangkok","Asia/Barnaul","Asia/Beirut","Asia/Bishkek","Asia/Brunei","Asia/Chita","Asia/Choibalsan","Asia/Colombo","Asia/Damascus","Asia/Dhaka","Asia/Dili","Asia/Dubai","Asia/Dushanbe","Asia/Famagusta","Asia/Gaza","Asia/Hebron","Asia/Ho_Chi_Minh","Asia/Hong_Kong","Asia/Hovd","Asia/Irkutsk","Asia/Jakarta","Asia/Jayapura","Asia/Jerusalem","Asia/Kabul","Asia/Kamchatka","Asia/Karachi","Asia/Kathmandu","Asia/Khandyga","Asia/Kolkata","Asia/Krasnoyarsk","Asia/Kuala_Lumpur","Asia/Kuching","Asia/Kuwait","Asia/Macau","Asia/Magadan","Asia/Makassar","Asia/Manila","Asia/Muscat","Asia/Nicosia","Asia/Novokuznetsk","Asia/Novosibirsk","Asia/Omsk","Asia/Oral","Asia/Phnom_Penh","Asia/Pontianak","Asia/Pyongyang","Asia/Qatar","Asia/Qyzylorda","Asia/Riyadh","Asia/Sakhalin","Asia/Samarkand","Asia/Seoul","Asia/Shanghai","Asia/Singapore","Asia/Srednekolymsk","Asia/Taipei","Asia/Tashkent","Asia/Tbilisi","Asia/Tehran","Asia/Thimphu","Asia/Tokyo","Asia/Tomsk","Asia/Ulaanbaatar","Asia/Urumqi","Asia/Ust-Nera","Asia/Vientiane","Asia/Vladivostok","Asia/Yakutsk","Asia/Yangon","Asia/Yekaterinburg","Asia/Yerevan","Atlantic/Azores","Atlantic/Bermuda","Atlantic/Canary","Atlantic/Cape_Verde","Atlantic/Faroe","Atlantic/Madeira","Atlantic/Reykjavik","Atlantic/South_Georgia","Atlantic/St_Helena","Atlantic/Stanley","Australia/Adelaide","Australia/Brisbane","Australia/Broken_Hill","Australia/Currie","Australia/Darwin","Australia/Eucla","Australia/Hobart","Australia/Lindeman","Australia/Lord_Howe","Australia/Melbourne","Australia/Perth","Australia/Sydney","Europe/Amsterdam","Europe/Andorra","Europe/Astrakhan","Europe/Athens","Europe/Belgrade","Europe/Berlin","Europe/Bratislava","Europe/Brussels","Europe/Bucharest","Europe/Budapest","Europe/Busingen","Europe/Chisinau","Europe/Copenhagen","Europe/Dublin","Europe/Gibraltar","Europe/Guernsey","Europe/Helsinki","Europe/Isle_of_Man","Europe/Istanbul","Europe/Jersey","Europe/Kaliningrad","Europe/Kiev","Europe/Kirov","Europe/Lisbon","Europe/Ljubljana","Europe/Luxembourg","Europe/Madrid","Europe/Malta","Europe/Mariehamn","Europe/Minsk","Europe/Monaco","Europe/Moscow","Europe/Oslo","Europe/Paris","Europe/Podgorica","Europe/Prague","Europe/Riga","Europe/Rome","Europe/Samara","Europe/San_Marino","Europe/Sarajevo","Europe/Saratov","Europe/Simferopol","Europe/Skopje","Europe/Sofia","Europe/Stockholm","Europe/Tallinn","Europe/Tirane","Europe/Ulyanovsk","Europe/Uzhgorod","Europe/Vaduz","Europe/Vatican","Europe/Vienna","Europe/Vilnius","Europe/Volgograd","Europe/Warsaw","Europe/Zagreb","Europe/Zaporozhye","Europe/Zurich","Indian/Antananarivo","Indian/Chagos","Indian/Christmas","Indian/Cocos","Indian/Comoro","Indian/Kerguelen","Indian/Mahe","Indian/Maldives","Indian/Mauritius","Indian/Mayotte","Indian/Reunion","Pacific/Apia","Pacific/Auckland","Pacific/Bougainville","Pacific/Chatham","Pacific/Chuuk","Pacific/Easter","Pacific/Efate","Pacific/Enderbury","Pacific/Fakaofo","Pacific/Fiji","Pacific/Funafuti","Pacific/Galapagos","Pacific/Gambier","Pacific/Guadalcanal","Pacific/Guam","Pacific/Honolulu","Pacific/Kiritimati","Pacific/Kosrae","Pacific/Kwajalein","Pacific/Majuro","Pacific/Marquesas","Pacific/Midway","Pacific/Nauru","Pacific/Niue","Pacific/Norfolk","Pacific/Noumea","Pacific/Pago_Pago","Pacific/Palau","Pacific/Pitcairn","Pacific/Pohnpei","Pacific/Port_Moresby","Pacific/Rarotonga","Pacific/Saipan","Pacific/Tahiti","Pacific/Tarawa","Pacific/Tongatapu","Pacific/Wake","Pacific/Wallis","Australia/Perth","Antarctica/Troll","Asia/Chita","Asia/Khandyga","Asia/Srednekolymsk","Asia/Ust-Nera","Europe/Busingen","Pacific/Bougainville","America/Fort_Nelson","Asia/Atyrau","Asia/Barnaul","Asia/Famagusta","Asia/Tomsk","Europe/London","America/Punta_Arenas","America/Santa_Isabel","Asia/Rangoon","Pacific/Johnston","Asia/Tskhinvali","Africa/Juba","America/Nuuk","Asia/Qostanay",""];
$nearlatitude=["5.31666","5.55","9.03333","36.78333","15.33333","12.65","4.36666","13.46666","11.85","-15.78334","-4.26667","-3.38334","30.05","33.65","35.88333","9.51666","14.66666","-6.8","11.6","4.05","27.15","8.5","-24.65001","-17.83334","-26.25","4.85","0.31666","15.6","-1.95","-4.3","6.45","0.38333","6.13333","-8.8","-11.66667","-15.41667","3.75","-25.96667","-29.46667","-26.3","2.06666","6.3","-1.28334","12.11666","13.51666","18.1","12.36666","6.48333","0.33333","32.9","36.8","-22.56667","51.88","61.21805","18.2","17.05","-7.2","-34.6","-28.46667","-31.4","-24.18334","-29.43334","-32.88334","-51.63334","-24.78334","-31.53334","-33.31667","-26.81667","-54.8","12.5","-25.26667","48.75861","-12.98334","20.8","13.1","-1.45","17.5","51.41666","2.81666","4.6","43.61361","69.11388","-20.45","21.08333","10.5","4.93333","19.3","41.85","28.63333","9.93333","49.1","-15.58334","12.18333","76.76666","64.06666","59.76666","39.73916","42.33138","15.3","53.55","-6.66667","13.7","58.8","-3.71667","46.19999","64.18333","53.33333","21.46666","12.05","16.23333","14.63333","-2.16667","6.8","44.65","23.13333","29.06666","39.76833","41.29583","38.37555","38.49194","37.95305","38.74777","38.67722","41.05138","68.34972","63.73333","17.96805","58.30194","38.25416","36.82972","12.15083","-16.5","-12.05","34.05222","18.05138","-9.66667","12.15","-3.13334","18.06666","14.6","25.83333","23.21666","45.10777","20.96666","55.12694","19.4","47.05","46.1","25.66666","-34.90917","16.71666","25.08333","40.71416","49.01666","64.50111","-3.85","47.26416","47.11638","46.845","29.56666","8.96666","66.13333","5.83333","33.44833","18.53333","10.65","-8.76667","18.46833","-53.15","48.71666","62.81666","-8.05","50.4","74.69555","-9.96667","-2.43334","-33.45","18.46666","-23.53334","70.48333","57.17638","17.88333","47.56666","17.3","14.01666","18.35","13.15","50.28333","14.1","76.56666","48.38333","32.53333","43.65","18.45","49.26666","60.71666","49.88333","59.54694","62.44999","-66.28334","-68.58334","-66.66667","-54.5","-67.6","-77.83334","-64.8","-67.56667","-69.00612","-72.01139","-78.40001","78","12.75","43.25","31.95","64.75","44.51666","50.28333","37.95","47.11666","33.35","26.38333","40.38333","13.75","53.36666","33.88333","42.9","4.93333","52.05","48.06666","6.93333","33.5","23.71666","-8.55","25.3","38.58333","35.11666","31.5","31.53333","10.75","22.28333","48.01666","52.26666","-6.16667","-2.53334","31.78055","34.51666","53.01666","24.86666","27.71666","62.65638","22.53333","56.01666","3.16666","1.55","29.33333","22.23333","59.56666","-5.11667","14.58333","23.6","35.16666","53.75","55.03333","55","51.21666","11.55","-0.033339999999995","39.01666","25.28333","44.8","24.63333","46.96666","39.66666","37.55","31.23333","1.28333","67.46666","25.05","41.33333","41.71666","35.66666","27.46666","35.65444","56.5","47.91666","43.8","64.56027","17.96666","43.16666","62","16.78333","56.85","40.18333","37.73333","32.28333","28.1","14.91666","62.01666","32.63333","64.15","-54.26667","-15.91667","-51.70001","-34.91667","-27.46667","-31.95","-39.93334","-12.46667","-31.71667","-42.88334","-20.26667","-31.55","-37.81667","-31.95","-33.86667","52.36666","42.5","46.35","37.96666","44.83333","52.5","48.15","50.83333","44.43333","47.5","47.69999","47","55.66666","53.33333","36.13333","49.45472","60.16666","54.15","41.01666","49.18361","54.71666","50.43333","58.6","38.71666","46.05","49.6","40.4","35.9","60.1","53.9","43.69999","55.75583","59.91666","48.86666","42.43333","50.08333","56.94999","41.9","53.19999","43.91666","43.86666","51.56666","44.94999","41.98333","42.68333","59.33333","59.41666","41.33333","54.33333","48.61666","47.15","41.90222","48.21666","54.68333","48.73333","52.25","45.8","47.83333","47.38333","-18.91667","-7.33334","-10.41667","-12.16667","-11.68334","-49.35278","-4.66667","4.16666","-20.16667","-12.78334","-20.86667","-13.83334","-36.86667","-6.21667","-43.95","7.41666","-27.15","-17.66667","-3.13334","-9.36667","-18.13334","-8.51667","-0.90000000000001","-23.13334","-9.53334","13.46666","21.30694","1.86666","5.31666","9.08333","7.15","-9","28.21666","-0.51667","-19.01667","-29.05","-22.26667","-14.26667","7.33333","-25.06667","6.96666","-9.5","-21.23334","15.2","-17.53334","1.41666","-21.16667","19.28333","-13.3","-31.95","-72.01139","52.05","62.65638","67.46666","64.56027","47.69999","-6.21667","58.8","47.11666","53.36666","35.11666","56.5","51.5074","-53.15","30.3","16.78333","16.75","42.2215","32.3250","64.18333","53.19999"," "];
$nearlongitude=["-4.03334","-0.21666999999999","38.7","3.05","38.88333","-8","18.58333","-16.65","-15.58334","35","15.28333","29.36666","31.25","-7.58334","-5.31667","-13.71667","-17.43334","39.28333","43.15","9.7","-13.2","-13.25","25.91666","31.05","28","31.61666","32.41666","32.53333","30.06666","15.3","3.4","9.45","1.21666","13.23333","27.46666","28.28333","8.78333","32.58333","27.5","31.1","45.36666","-10.78334","36.81666","15.05","2.11666","-15.95","-1.51667","2.61666","6.73333","13.18333","10.18333","17.1","-176.65806","-149.90028","-63.06667","-61.8","-48.2","-58.45","-65.78334","-64.18334","-65.3","-66.85","-68.81667","-69.21667","-65.41667","-68.51667","-66.35","-65.21667","-68.3","-69.96667","-57.66667","-91.62167","-38.51667","-105.25","-59.61667","-48.48334","-88.2","-57.11667","-60.66667","-74.08334","-116.2025","-105.05278","-54.61667","-86.76667","-66.93334","-52.33334","-81.38334","-87.65","-106.08334","-84.08334","-116.51667","-56.08334","-69","-18.66667","-139.41667","-120.23334","-104.98417","-83.04584","-61.4","-113.46667","-69.86667","-89.2","-122.7","-38.5","-59.95","-51.73334","-60.41667","-71.13334","-61.75","-61.53334","-90.51667","-79.83334","-58.16667","-63.6","-82.36667","-110.96667","-86.15806","-86.625","-86.34473","-87.27862","-86.76139","-85.06723","-87.52862","-86.60306","-133.71667","-68.46667","-76.79334","-134.41973","-85.75945","-84.84917","-68.27667","-68.15","-77.05","-118.24278","-63.04723","-35.71667","-86.28334","-60.01667","-63.08334","-61.08334","-97.5","-106.41667","-87.61417","-89.61667","-131.57639","-99.15001","-56.33334","-64.78334","-100.31667","-56.2125","-62.21667","-77.35","-74.00639","-88.26667","-165.40639","-32.41667","-101.77778","-101.29917","-101.41084","-104.41667","-79.53334","-65.73334","-55.16667","-112.07334","-72.33334","-61.51667","-63.9","-66.10612","-70.91667","-94.56667","-92.08306","-34.9","-104.65001","-94.82917","-67.8","-54.86667","-70.66667","-69.9","-46.61667","-21.96667","-135.30195","-62.85","-52.71667","-62.71667","-61","-64.93334","-61.23334","-107.83334","-87.21667","-68.78334","-89.25","-117.01667","-79.38334","-64.61667","-123.11667","-135.05001","-97.15001","-139.72723","-114.35","110.51666","77.96666","140.01666","158.95","62.88333","166.6","-64.1","-68.13334","39.59","2.535","106.89999","16","45.2","76.95","35.93333","177.48333","50.26666","57.16666","58.38333","51.93333","44.41666","50.58333","49.85","100.51666","83.75","35.5","74.6","114.91666","113.46666","114.5","79.85","36.3","90.41666","125.58333","55.3","68.8","33.95","34.46666","35.095","106.66666","114.14999","91.64999","104.33333","106.8","140.7","35.22388","69.2","158.65","67.05","85.31666","135.55388","88.36666","92.83333","101.7","110.33333","47.98333","113.58333","150.8","119.39999","121","58.58333","33.36666","87.11666","82.91666","73.4","51.35","104.91666","109.33333","125.75","51.53333","65.46666","46.71666","142.7","66.8","126.96666","121.46666","103.85","153.71666","121.5","69.3","44.81666","51.43333","89.64999","139.74472","84.96666","106.88333","87.58333","143.22666","102.6","131.93333","129.66666","96.16666","60.6","44.5","-25.66667","-64.76667","-15.4","-23.51667","-6.76667","-16.9","-21.85","-36.53334","-5.7","-57.85","138.58333","153.03333","141.45","143.86666","130.83333","128.86666","147.31666","149","159.08333","144.96666","115.85","151.21666","4.9","1.51666","48.05","23.71666","20.5","13.36666","17.11666","4.33333","26.1","19.08333","8.68333","28.83333","12.58333","-6.25","-5.35","-2.53612","24.96666","-4.46667","28.96666","-2.10667","20.5","30.51666","49.65","-9.13334","14.51666","6.15","-3.68334","14.51666","19.95","27.56666","7.38333","37.61777","10.75","2.33333","19.26666","14.43333","24.1","12.48333","50.15","12.46666","18.41666","46.03333","34.1","21.43333","23.31666","18.05","24.75","19.83333","48.4","22.3","9.51666","12.45305","16.33333","25.31666","44.41666","21","15.96666","35.16666","8.53333","47.51666","72.41666","105.71666","96.91666","43.26666","70.2175","55.46666","73.5","57.5","45.23333","55.46666","-171.73334","174.76666","155.56666","-176.55001","151.78333","-109.43334","168.41666","-171.08334","-171.23334","178.41666","179.21666","-89.6","-134.95","160.2","144.75","-157.85834","-157.33334","162.98333","167.33333","171.2","-139.5","-177.36667","166.91666","-169.91667","167.96666","166.45","-170.7","134.48333","-130.08334","158.21666","147.16666","-159.76667","145.75","-149.56667","173","-175.16667","166.61666","-176.16667","115.85","2.535","113.46666","135.55388","153.71666","143.22666","8.68333","155.56666","-122.7","51.93333","83.75","33.95","84.96666","-0.1278","-70.91667","-114.86667","96.16666","-169.51667","43.9644","35.2202","-51.73334","63.61666","  "];
$abbrname=["GMT","GMT","EAT","CET","EAT","GMT","WAT","GMT","GMT","CAT","WAT","CAT","EET","WEST","CEST","GMT","GMT","EAT","EAT","WAT","WEST","GMT","CAT","CAT","SAST","EAT","EAT","CAT","CAT","WAT","WAT","WAT","GMT","WAT","CAT","CAT","WAT","CAT","SAST","SAST","EAT","GMT","EAT","WAT","WAT","GMT","GMT","WAT","WAT","EET","CET","CAT","HDT","AKDT","AST","AST","-03","-03","-03","-03","-03","-03","-03","-03","-03","-03","-03","-03","-03","AST","-04","EST","-03","CDT","AST","-03","CST","AST","-04","-05","MDT","MDT","-04","EST","-04","-03","EST","CDT","MDT","CST","MST","-04","AST","GMT","PDT","MST","MDT","EDT","AST","MDT","-05","CST","MST","-03","ADT","-02","ADT","EDT","AST","AST","CST","-05","-04","ADT","CDT","MST","EDT","CDT","EDT","EDT","CDT","EDT","EDT","EDT","MDT","EDT","EST","AKDT","EDT","EDT","AST","-04","-05","PDT","AST","-03","CST","-04","AST","AST","CDT","MDT","CDT","CDT","AKDT","CDT","-02","ADT","CDT","-03","AST","EDT","EDT","EDT","AKDT","-02","CDT","CDT","CDT","MDT","EST","EDT","-03","MST","EDT","AST","-04","AST","-03","CDT","CDT","-03","CST","CDT","-05","-03","-04","AST","-03","+00","AKDT","AST","NDT","AST","AST","AST","AST","CST","CST","ADT","EDT","PDT","EDT","AST","PDT","PDT","CDT","AKDT","MDT","+08","+07","+10","+11","+05","NZST","-03","-03","+03","+02","+06","CEST","+03","+06","EEST","+12","+05","+05","+05","+05","+03","+03","+04","+07","+07","EEST","+06","+08","+09","+08","+0530","EEST","+06","+09","+04","+05","EEST","EEST","EEST","+07","HKT","+07","+08","WIB","WIT","IDT","+0430","+12","PKT","+0545","+09","IST","+07","+08","+08","+03","CST","+11","WITA","+08","+04","EEST","+07","+07","+06","+05","+07","WIB","KST","+03","+06","+03","+11","+05","KST","CST","+08","+11","CST","+05","+04","+0430","+06","JST","+07","+08","+06","+10","+07","+10","+09","+0630","+05","+04","+00","ADT","WEST","-01","WEST","WEST","GMT","-02","GMT","-03","ACST","AEST","ACST","AEST","ACST","+0845","AEST","AEST","+1030","AEST","AWST","AEST","CEST","CEST","+04","EEST","CEST","CEST","CEST","CEST","EEST","CEST","CEST","EEST","CEST","IST","CEST","BST","EEST","BST","+03","BST","EET","EEST","+03","WEST","CEST","CEST","CEST","CEST","EEST","+03","CEST","MSK","CEST","CEST","CEST","CEST","EEST","CEST","+04","CEST","CEST","+04","MSK","CEST","EEST","CEST","EEST","CEST","+04","EEST","CEST","CEST","CEST","EEST","+03","CEST","CEST","EEST","CEST","EAT","+06","+07","+0630","EAT","+05","+04","+05","+04","EAT","+04","+13","NZST","+11","+1245","+10","-06","+11","+13","+13","+12","+12","-06","-09","+11","ChST","HST","+14","+11","+12","+12","-0930","SST","+12","-11","+11","+11","SST","+09","-08","+11","+10","-10","ChST","-10","+12","+13","+12","+12","AWST","+02","+09","+09","+11","+10","CEST","+11","MST","+05","+07","EEST","+07","BST","-03","PDT","MMT","HST","+04","+02","-03","+06","   "];
$nearcc=["CI","GH","ET","DZ","ER","ML","CF","GM","GW","MW","CG","BI","EG","MA","ES","GN","SN","TZ","DJ","CM","EH","SL","BW","ZW","ZA","SS","UG","SD","RW","CD","NG","GA","TG","AO","CD","ZM","GQ","MZ","LS","SZ","SO","LR","KE","TD","NE","MR","BF","BJ","ST","LY","TN","NA","US","US","AI","AG","BR","AR","AR","AR","AR","AR","AR","AR","AR","AR","AR","AR","AR","AW","PY","CA","BR","MX","BB","BR","BZ","CA","BR","CO","US","CA","BR","MX","VE","GF","KY","US","MX","CR","CA","BR","CW","GL","CA","CA","US","US","DM","CA","BR","SV","CA","BR","CA","GL","CA","TC","GD","GP","GT","EC","GY","CA","CU","MX","US","US","US","US","US","US","US","US","CA","CA","JM","US","US","US","BQ","BO","PE","US","SX","BR","NI","BR","MF","MQ","MX","MX","US","MX","US","MX","PM","CA","MX","UY","MS","BS","US","CA","US","BR","US","US","US","MX","PA","CA","SR","US","HT","TT","BR","PR","CL","CA","CA","BR","CA","CA","BR","BR","CL","DO","BR","GL","US","BL","CA","KN","LC","VI","VC","CA","HN","GL","CA","MX","CA","VG","CA","CA","CA","US","CA","AQ","AQ","AQ","AU","AQ","AQ","AQ","AQ","AQ","AQ","AQ","SJ","YE","KZ","JO","RU","KZ","KZ","TM","KZ","IQ","BH","AZ","TH","RU","LB","KG","BN","RU","MN","LK","SY","BD","TL","AE","TJ","CY","PS","PS","VN","HK","MN","RU","ID","ID","IL","AF","RU","PK","NP","RU","IN","RU","MY","MY","KW","MO","RU","ID","PH","OM","CY","RU","RU","RU","KZ","KH","ID","KP","QA","KZ","SA","RU","UZ","KR","CN","SG","RU","TW","UZ","GE","IR","BT","JP","RU","MN","CN","RU","LA","RU","RU","MM","RU","AM","PT","BM","ES","CV","FO","PT","IS","GS","SH","FK","AU","AU","AU","AU","AU","AU","AU","AU","AU","AU","AU","AU","NL","AD","RU","GR","RS","DE","SK","BE","RO","HU","DE","MD","DK","IE","GI","GG","FI","IM","TR","JE","RU","UA","RU","PT","SI","LU","ES","MT","AX","BY","MC","RU","NO","FR","ME","CZ","LV","IT","RU","SM","BA","RU","RU","MK","BG","SE","EE","AL","RU","UA","LI","VA","AT","LT","RU","PL","HR","UA","CH","MG","IO","CX","CC","KM","TF","SC","MV","MU","YT","RE","WS","NZ","PG","NZ","FM","CL","VU","KI","TK","FJ","TV","EC","PF","SB","GU","US","KI","FM","MH","MH","PF","UM","NR","NU","NF","NC","AS","PW","PN","FM","PG","CK","MP","PF","KI","TO","UM","WF","AU","AQ","RU","RU","RU","RU","DE","PG","CA","KZ","RU","CY","RU","UK","CL","OS","SS","    "];

$backstyle='';
$backfullstyle='';
$backop='';
$backyour='';

if (isset($_GET['countrycode'])) {
  $backyour='your';
  $backstyle='background:linear-gradient(rgba(255,255,255,0.7),rgba(255,255,255,0.7)),URL("//www.rjmprogramming.com.au/PHP/GeoChart/image_chart.php?ccode=' . $_GET['countrycode'] . '");background-size:cover;';
  $backfullstyle=' style=background:linear-gradient(rgba(255,255,255,0.7),rgba(255,255,255,0.7)),URL("//www.rjmprogramming.com.au/PHP/GeoChart/image_chart.php?ccode=' . $_GET['countrycode'] . '");background-size:cover;';  
  $backfullstyle=' style=background:linear-gradient(rgba(255,255,255,0.7),rgba(255,255,255,0.7)),URL("//www.rjmprogramming.com.au/PHP/GeoChart/image_chart.php?ccode=' . $_GET['countrycode'] . '");background-size:cover;><script type=text/javascript> function youralert(iny) { var yans=prompt(iny, iny); if (yans != null) { if (yans == iny) {    window.open("//www.timezoneconverter.com/cgi-bin/zoneinfo?tz=" + yans.split("Nearest ")[1].split(" ")[0],"_blank","top=50,left=50,width=600,height=600");    window.open("//www.rjmprogramming.com.au/HTMLCSS/colour_wheel.html?mode=" + yans.split("Nearest ")[1].split(" ")[0],"_blank","top=65,left=65,width=600,height=900");      }  }  } </script';  
  $backop='opacity:0.7;';
}


$lri="ABCDEFGHIJKLMNOPQRSTUVWXYZ";
$predri="127462,127463,127464,127465,127466,127467,127468,127469,127470,127471,127472,127473,127474,127475,127476,127477,127478,127479,127480,127481,127482,127483,127484,127485,127486,127487";
$dri=explode(",", $predri);

$aqagain="";
$defw="556";
$defh="347";
$ugb='';
if (isset($_GET['bigtz'])) {
  $ugb=urldecode($_GET['bigtz']);
  if (isset($_GET['isgmt'])) {
    $ugb="GMT";
  }
} else {
  $ugb='0';
}
$dayofweek="Sunday";
$gmthris=12;
$gmthhris=12;
$gmtminis=0;
$bestemojiclass="";
$thisemojiclass="";
$bestemojicodepoint=128347;
$thisemojicodepoint=128347;
$pd="";
if (isset($_GET['plusdiv'])) {
  $pd=urldecode($_GET['plusdiv']);
}

$lastnonutc="";
$lastTime="";
$rightnow="";
$ourtzn="";
if (isset($_GET['tzname'])) {
    $ourtzn=urldecode($_GET['tzname']);
} else if (isset($_POST['tzname'])) {
    $ourtzn=urldecode($_POST['tzname']);
}

$finalmapform="";
$finalmapiframe="<iframe src='about:blank' style='display:none;width:500px;height:500px;margin-top:-300;margin-left:-500;' id='fmfmap' name='fmfmap'></iframe>";
$gmtdatetimeis="";
$onloadbits="";
$fromto="";
$kcnt="";
$bcol=["gray", "yellow", "pink", "lightblue", "lightgreen", "silver", "lightgray", "orange", "olive", "white"];
$mapurl="//www.rjmprogramming.com.au/PHP/Map/map.php?title=Places&onclick=y&label=['Lat',&value='Lon','Name']&data=,[0.0000,0.0000,~Timbuktu~]";
$iam='1';
if (isset($_GET['x'])) {
  $finalmapform="<form id=\"ffmfmap\" onsubmit=\"document.getElementById('fmfmap').style.display='inline'; return true;\" style=\"display:none;\" target=\"fmfmap\" action=\"//www.rjmprogramming.com.au/PHP/Map/map.php\" method=\"POST\"><input type=\"hidden\" value=\"Time Zone Places\" name=\"title\"></input><input type=\"hidden\" name=\"wlink\" id=\"topwlink\" value=\"\"></input><input type=\"hidden\" value=\"['Lat',\" name=\"label\"></input><div id=topdgmtoff></div><input type=\"hidden\" value=\"'Lon','Name']\" name=\"value\"></input><input type='hidden' name='wouldlikeyoutoseekpermission' id='topwouldlikeyoutoseekpermission' value=''></input><input type=\"hidden\" value=\"\" name=\"data\" id=\"topdata\"></input><input type=\"hidden\" value=\"y\" name=\"onclick\"></input><input id=\"topsmapif\" type=\"submit\" value=\"Show\" style=\"display:none;\"></input></form> <scr" . "ipt type='text/javascript'> function topdoc() { document.getElementById('topsmapif').click(); }  </scr" . "ipt>";
}
if (isset($_POST['iam'])) {
  $iam=$_POST['iam'];
} else if (isset($_GET['iam'])) {
  $iam=$_GET['iam'];
} else {
  $finalmapform="<form id=\"ffmfmap\" onsubmit=\"document.getElementById('fmfmap').style.display='inline'; return true;\" style=\"display:none;\" target=\"fmfmap\" action=\"//www.rjmprogramming.com.au/PHP/Map/map.php\" method=\"POST\"><input type=\"hidden\" value=\"Time Zone Places\" name=\"title\"></input><input type=\"hidden\" name=\"wlink\" id=\"topwlink\" value=\"\"></input><input type=\"hidden\" value=\"['Lat',\" name=\"label\"></input><div id=topdgmtoff></div><input type=\"hidden\" value=\"'Lon','Name']\" name=\"value\"></input><input type='hidden' name='wouldlikeyoutoseekpermission' id='topwouldlikeyoutoseekpermission' value=''></input><input type=\"hidden\" value=\"\" name=\"data\" id=\"topdata\"></input><input type=\"hidden\" value=\"y\" name=\"onclick\"></input><input id=\"topsmapif\" type=\"submit\" value=\"Show\" style=\"display:none;\"></input></form> <scr" . "ipt type='text/javascript'> function topdoc() { document.getElementById('topsmapif').click(); }  </scr" . "ipt>";
}
if ($iam == "1") {
  //$prefinalmapform="<form id=\"ffmfmap\" onsubmit=\"document.getElementById('fmfmap').style.display='inline'; return true;\" style=\"display:none;\" target=\"fmfmap\" action=\"//www.rjmprogramming.com.au/PHP/Map/map.php\" method=\"POST\"><input type=\"hidden\" value=\"Time Zone Places\" name=\"title\"></input><input type=\"hidden\" name=\"wlink\" id=\"topwlink\" value=\"\"></input><input type=\"hidden\" value=\"['Lat',\" name=\"label\"></input><div id=topdgmtoff></div><input type=\"hidden\" value=\"'Lon','Name']\" name=\"value\"></input><input type='hidden' name='wouldlikeyoutoseekpermission' id='topwouldlikeyoutoseekpermission' value=''></input><input type=\"hidden\" value=\"\" name=\"data\" id=\"topdata\"></input><input type=\"hidden\" value=\"y\" name=\"onclick\"></input><input id=\"topsmapif\" type=\"submit\" value=\"Show\" style=\"display:none;\"></input></form> function topdoc() { document.getElementById('topsmapif').click(); } ";
  //$finalmapform="<sc" . "ipt type='text/javascript'> parent.document.body.innerHTML+=\"" . $finalmapiframe . $prefinalmapform . "\"; </scr" . "ipt>";

  $finalmapform="<form id=\"ffmfmap\" onsubmit=\"document.getElementById('fmfmap').style.display='inline'; return true;\" style=\"display:none;\" target=\"fmfmap\" action=\"//www.rjmprogramming.com.au/PHP/Map/map.php\" method=\"POST\"><input type=\"hidden\" value=\"Time Zone Places\" name=\"title\"></input><input type=\"hidden\" name=\"wlink\" id=\"topwlink\" value=\"\"></input><input type=\"hidden\" value=\"['Lat',\" name=\"label\"></input><div id=topdgmtoff></div><input type=\"hidden\" value=\"'Lon','Name']\" name=\"value\"></input><input type='hidden' name='wouldlikeyoutoseekpermission' id='topwouldlikeyoutoseekpermission' value=''></input><input type=\"hidden\" value=\"\" name=\"data\" id=\"topdata\"></input><input type=\"hidden\" value=\"y\" name=\"onclick\"></input><input id=\"topsmapif\" type=\"submit\" value=\"Show\" style=\"display:none;\"></input></form> <scr" . "ipt type='text/javascript'> function topdoc() { document.getElementById('topsmapif').click(); }  </scr" . "ipt>";

}
$nextis=1 + $iam;
$hprefix="";
$hsuffix="";

$otherform="";

$indt="now";
$udateis = localtimefromtogmt($indt, "Australi" . "a/Perth", "UTC");

$times="Time";
if (isset($_GET['bigtz'])) {
  $aqagain="\n setInterval(afteraqlast, 1000); \n";
  $times="<form id=\"xffmfmap\" onsubmit=\" var suffis=''; afteraqlast(); if (window.opener) { if (window.opener.document.getElementById('bigtzrepos')) { suffis=aqlast(window.opener.document.getElementById('bigtzrepos').innerHTML);   } else { suffis=aqlast(document.getElementById('bigtzrepos').innerHTML); document.getElementById('xffmfmap').target='_blank';  } } if (parent.docdiv && suffis != ' ') {  document.getElementById('xtopdata').value=aqlast((parent.docdiv.innerHTML + suffis).replace(/\,\,/g,','));  } else { document.getElementById('xtopdata').value=aqlast((document.getElementById('bigtzrepos').innerHTML + suffis).replace(/\,\,/g,','));  document.getElementById('xffmfmap').target='_blank';   } afteraq(); if (eval('' + encodeURIComponent(document.getElementById('xtopdata').value).length) < 600) {   return falsedom(); } else { heightsandtype('xffmfmap');   return true; }\" style=\"display:none;\" target=\"_top\" action=\"//www.rjmprogramming.com.au/PHP/Map/map.php\" method=\"POST\"><input type=\"hidden\" value=\"TimeZone Offset " . $ugb . " Hours\" name=\"title\"></input><input type=\"hidden\" value=\"['Lat',\" name=\"label\"></input><input type=\"hidden\" value=\"'Lon','Name']\" name=\"value\"></input><input type='hidden' name='wouldlikeyoutoseekpermission' id='topwouldlikeyoutoseekpermission' value=''></input><input type=\"hidden\" value=\"\" name=\"data\" id=\"xtopdata\"></input><input type=\"hidden\" value=\"" . $defw . "\" name=\"width\" id=\"xwidth\"></input><input type=\"hidden\" value=\"" . $defh . "\" name=\"height\" id=\"xheight\"></input><input type=\"hidden\" value=\"y\" name=\"onclick\"></input><input type=\"hidden\" value=\"country\" name=\"country\"></input><input type=\"hidden\" value=\"popularity\" name=\"popularity\"></input> <input id=xaregeographicals type=\"hidden\" value=\"Y\" name=\"aregeographicals\"></input><input type=\"hidden\" value=\"Y\" name=\"areplaces\"></input><input id=\"mappost\" type=\"submit\" value=\"Show\" style=\"display:none;\"></input><input name=geo id=\"amappost\" type=\"submit\" value=\"Show\" style=\"display:none;\"></input><input name=geo16681141 id=\"bmappost\" type=\"submit\" value=\"Show\" style=\"display:none;\"></input><input name=geo55603470 id=\"cmappost\" name=geo type=\"submit\" value=\"Show\" style=\"display:none;\"></input></form><a target=_top id=amappos onclick=\"defw=-556; defh=-347; afteraqlast(); afteraq(); document.getElementById('mappost').click();\" style='cursor:pointer;text-decoration:underline;' title='TimeZone Offset " . $ugb . " Hours Map Chart'>T</a><a target=_top id=bmappos onclick=\"defw=556; defh=347; afteraqlast(); afteraq();  document.getElementById('amappost').click();\" style='cursor:pointer;text-decoration:underline;' title='TimeZone Offset " . $ugb . " Hours Geo Chart 556x347'>i</a><a target=_top id=dmappos onclick=\"defw=1668; defh=1141; afteraqlast(); afteraq();  document.getElementById('bmappost').click();\" style='cursor:pointer;text-decoration:underline;' title='TimeZone Offset " . $ugb . " Hours Geo Chart 1668x1141'>m</a><a target=_top id=dmappos onclick=\"defw=5560; defh=3470; document.getElementById('cmappost').click();\" style='cursor:pointer;text-decoration:underline;' title='TimeZone Offset " . $ugb . " Hours Geo Chart 5560x3470'>e</a>";
}


if ($iam == "1" && !isset($_POST['iam']) && !isset($_GET['iam'])) {
  $otherform="<br><br><iframe id=nearestif name=nearestif style=display:none; src=about:none></iframe><div id=nearest></div><form target=nearestif action=./tz_places.php method=GET style=background-color:#f0f0f0;>Place: <input onblur=\" if (this.value.length > 0) { document.getElementById('nearestif').src=perhapsfillin('./tz_places.php?latitude=&longitude=&place=' + encodeURIComponent(this.value));  } \" type=text id=nplace name=place value=></input> Latitude: <input type=number id=latitude name=latitude value=0.0000 max=90.0000 min=-90.0000 step=0.0001></input> Longitude: <input type=number id=longitude name=longitude value=0.0000 max=180.0000 min=-180.0000 step=0.0001></input><br><input style=background-color:orange; type=submit id=inearest value='Nearest TimeZone Places'></input></form>";
  $hprefix="<h1>" . $times . "<div style=display:inline; id=getmegmt title='" . $gmtdatetimeis . "' class='emoji" . $bestemojiclass . "' onclick=emojistuff(this);>&#" . $bestemojicodepoint . ";</div>Zone Places</h1><h3>RJM Programming <a target=_blank title=Restart href='./tz_places.php'>-</a> December, 2016</h3><h4>Thanks to <a target=_blank title='//php.net/manual/en/datetimezone.getlocation.php' href='//php.net/manual/en/datetimezone.getlocation.php'>//php.net/manual/en/datetimezone.getlocation.php</a> and <br><a target=_blank title='//stackoverflow.com/questions/17842003/php-intl-country-code-2-chars-to-country-name' href='//stackoverflow.com/questions/17842003/php-intl-country-code-2-chars-to-country-name'>//stackoverflow.com/questions/17842003/php-intl-country-code-2-chars-to-country-name</a> and <br><a target=_blank title=//php.net/manual/en/function.timezone-identifiers-list.php href=//php.net/manual/en/function.timezone-identifiers-list.php>//php.net/manual/en/function.timezone-identifiers-list.php</a> and <br><a target=_blank title=HTTP://www.timezoneconverter.com/ href=HTTP://www.timezoneconverter.com/>HTTP://www.timezoneconverter.com/</a></h4><table border=20 id=tbt><tbody><tr><td id=td1>" . $finalmapiframe;
  for ($ii=2; $ii<10; $ii++) {
    $hsuffix.="</td><td style=width:600px; id='td" . $ii . "'><a class='round' id='a" . $ii . "' style='background-color:lightgreen;text-decoration:underline;cursor:pointer;' onclick='newiframe(" . $ii . ");'>+" . $ii . "</a>";
  }
  $hsuffix.="</td></tr></tbody></table>";
  $fromto="&nbsp;&nbsp;<select onchange=mapselchange(this); style=display:none;position:absolute;top:40px;left:300px; id=fromto title='From/To functionality'><option value=''>Optionally select a From/To set of interest below ...</option></select>";
  $onloadbits=" setTimeout(checkmailbox,3000); ";
} else if ($iam == "1") {
  $otherform="<br><br><iframe id=nearestif name=nearestif style=display:none; src=about:none></iframe><div id=nearest></div><form target=nearestif action=./tz_places.php method=GET style=background-color:#f0f0f0;>Place: <input onblur=\" if (this.value.length > 0) { document.getElementById('nearestif').src=perhapsfillin('./tz_places.php?latitude=&longitude=&place=' + encodeURIComponent(this.value));  } \" type=text id=nplace name=place name=place value=></input> Latitude: <input type=number id=latitude name=latitude value=0.0000 max=90.0000 min=-90.0000 step=0.0001></input> Longitude: <input type=number id=longitude name=longitude value=0.0000 max=180.0000 min=-180.0000 step=0.0001></input><br><input style=background-color:orange; type=submit id=inearest value='Nearest TimeZone Places'></input></form>";
  $hprefix="<h1>" . $times . "<div style=display:inline; id=getmegmt title='" . $gmtdatetimeis . "' class='emoji" . $bestemojiclass . "' onclick=emojistuff(this);>&#" . $bestemojicodepoint . ";</div>Zone Places</h1><h3>RJM Programming <a target=_blank title=Restart href='./tz_places.php'>-</a> December, 2016</h3><h4>Thanks to <a target=_blank title='//php.net/manual/en/datetimezone.getlocation.php' href='//php.net/manual/en/datetimezone.getlocation.php'>//php.net/manual/en/datetimezone.getlocation.php</a> and <br><a target=_blank title='//stackoverflow.com/questions/17842003/php-intl-country-code-2-chars-to-country-name' href='//stackoverflow.com/questions/17842003/php-intl-country-code-2-chars-to-country-name'>//stackoverflow.com/questions/17842003/php-intl-country-code-2-chars-to-country-name</a> and <br><a target=_blank title=//php.net/manual/en/function.timezone-identifiers-list.php href=//php.net/manual/en/function.timezone-identifiers-list.php>//php.net/manual/en/function.timezone-identifiers-list.php</a> and <br><a target=_blank title=HTTP://www.timezoneconverter.com/ href=HTTP://www.timezoneconverter.com/>HTTP://www.timezoneconverter.com/</a></h4>" . "<table border=20 id=tbt><tbody><tr><td id=td1>" . $finalmapiframe;
  for ($ii=2; $ii<10; $ii++) {
    $hsuffix.="</td><td style=width:600px; id='td" . $ii . "'><a class='round' id='a" . $ii . "' style='background-color:lightgreen;text-decoration:underline;cursor:pointer;' onclick='newiframe(" . $ii . ");'>+" . $ii . "</a>";
  }
  $hsuffix.="</td></tr></tbody></table>";
  $fromto="&nbsp;&nbsp;<select onchange=mapselchange(this); style=display:none;position:absolute;top:40px;left:300px; id=fromto title='From/To functionality'><option value=''>Optionally select a From/To set of interest below ...</option></select>";
  $onloadbits=" setTimeout(checkmailbox,3000); ";
} else {
  $hprefix="" . $finalmapiframe; //"<table><tbody><tr><td>";
  $hsuffix=""; //"</td><td id='td" . $nextis . "'><a id='a" . $nextis . "' style='text-decoration:underline;cursor:pointer;' onclick='newiframe(" . $nextis . ");'>+" . $nextis . "</a></td></tr></tbody></table>";
}



$iso_country_codes=['AF','Afghanistan',
'AX','Aland Islands',
'AL','Albania',
'DZ','Algeria',
'AS','American Samoa',
'AD','Andorra',
'AO','Angola',
'AI','Anguilla',
'AQ','Antarctica',
'AG','Antigua and Barbuda',
'AR','Argentina',
'AM','Armenia',
'AW','Aruba',
'AU','Australia',
'AT','Austria',
'AZ','Azerbaijan',
'BS','Bahamas the',
'BH','Bahrain',
'BD','Bangladesh',
'BB','Barbados',
'BY','Belarus',
'BE','Belgium',
'BZ','Belize',
'BJ','Benin',
'BM','Bermuda',
'BT','Bhutan',
'BO','Bolivia',
'BA','Bosnia and Herzegovina',
'BW','Botswana',
'BV','Bouvet Island (Bouvetoya)',
'BR','Brazil',
'IO','British Indian Ocean Territory (Chagos Archipelago)',
'VG','British Virgin Islands',
'BN','Brunei Darussalam',
'BG','Bulgaria',
'BF','Burkina Faso',
'BI','Burundi',
'KH','Cambodia',
'CM','Cameroon',
'CA','Canada',
'CV','Cape Verde',
'KY','Cayman Islands',
'CF','Central African Republic',
'TD','Chad',
'CL','Chile',
'CN','China',
'CX','Christmas Island',
'CC','Cocos (Keeling) Islands',
'CO','Colombia',
'KM','Comoros the',
'CD','Congo',
'CG','Congo the',
'CK','Cook Islands',
'CR','Costa Rica',
'CI','Cote d`Ivoire',
'HR','Croatia',
'CU','Cuba',
'CW','Curaçao',
'CY','Cyprus',
'CZ','Czech Republic',
'DK','Denmark',
'DJ','Djibouti',
'DM','Dominica',
'DO','Dominican Republic',
'EC','Ecuador',
'EG','Egypt',
'SV','El Salvador',
'GQ','Equatorial Guinea',
'ER','Eritrea',
'EE','Estonia',
'ET','Ethiopia',
'FO','Faroe Islands',
'FK','Falkland Islands (Malvinas)',
'FJ','Fiji the Fiji Islands',
'FI','Finland',
'FR','France, French Republic',
'GF','French Guiana',
'PF','French Polynesia',
'TF','French Southern Territories',
'GA','Gabon',
'GM','Gambia the',
'GE','Georgia',
'DE','Germany',
'GH','Ghana',
'GI','Gibraltar',
'GR','Greece',
'GL','Greenland',
'GD','Grenada',
'GP','Guadeloupe',
'GU','Guam',
'GT','Guatemala',
'GG','Guernsey',
'GN','Guinea',
'GW','Guinea-Bissau',
'GY','Guyana',
'HT','Haiti',
'HM','Heard Island and McDonald Islands',
'VA','Holy See (Vatican City State)',
'HN','Honduras',
'HK','Hong Kong',
'HU','Hungary',
'IS','Iceland',
'IN','India',
'ID','Indonesia',
'IR','Iran',
'IQ','Iraq',
'IE','Ireland',
'IM','Isle of Man',
'IL','Israel',
'IT','Italy',
'JM','Jamaica',
'JP','Japan',
'JE','Jersey',
'JO','Jordan',
'KZ','Kazakhstan',
'KE','Kenya',
'KI','Kiribati',
'KP','Korea',
'KR','Korea',
'XK','Kosovo',
'KW','Kuwait',
'KG','Kyrgyz Republic',
'LA','Laos',
'LV','Latvia',
'LB','Lebanon',
'LS','Lesotho',
'LR','Liberia',
'LY','Libyan Arab Jamahiriya',
'LI','Liechtenstein',
'LT','Lithuania',
'LU','Luxembourg',
'MO','Macao',
'MK','Macedonia',
'MG','Madagascar',
'MW','Malawi',
'MY','Malaysia',
'MV','Maldives',
'ML','Mali',
'MT','Malta',
'MH','Marshall Islands',
'MQ','Martinique',
'MR','Mauritania',
'MU','Mauritius',
'YT','Mayotte',
'MX','Mexico',
'FM','Micronesia',
'MD','Moldova',
'MC','Monaco',
'MN','Mongolia',
'ME','Montenegro',
'MS','Montserrat',
'MA','Morocco',
'MZ','Mozambique',
'MM','Myanmar',
'NA','Namibia',
'NR','Nauru',
'NP','Nepal',
'AN','Netherlands Antilles',
'NL','Netherlands the',
'NC','New Caledonia',
'NZ','New Zealand',
'NI','Nicaragua',
'NE','Niger',
'NG','Nigeria',
'NU','Niue',
'NF','Norfolk Island',
'MP','Northern Mariana Islands',
'NO','Norway',
'OM','Oman',
'PK','Pakistan',
'PW','Palau',
'PS','Palestinian Territory',
'PA','Panama',
'PG','Papua New Guinea',
'PY','Paraguay',
'PE','Peru',
'PH','Philippines',
'PN','Pitcairn Islands',
'PL','Poland',
'PT','Portugal, Portuguese Republic',
'PR','Puerto Rico',
'QA','Qatar',
'RE','Reunion',
'RO','Romania',
'RU','Russian Federation',
'RW','Rwanda',
'BL','Saint Barthelemy',
'SH','Saint Helena',
'KN','Saint Kitts and Nevis',
'LC','Saint Lucia',
'MF','Saint Martin',
'PM','Saint Pierre and Miquelon',
'VC','Saint Vincent and the Grenadines',
'WS','Samoa',
'SM','San Marino',
'ST','Sao Tome and Principe',
'SA','Saudi Arabia',
'SN','Senegal',
'RS','Serbia',
'SC','Seychelles',
'SL','Sierra Leone',
'SG','Singapore',
'SK','Slovakia (Slovak Republic)',
'SI','Slovenia',
'SB','Solomon Islands',
'SO','Somalia, Somali Republic',
'ZA','South Africa',
'GS','South Georgia and the South Sandwich Islands',
'OS','South Ossetia',
'SS','South Sudan',
'ES','Spain',
'LK','Sri Lanka',
'SD','Sudan',
'SR','Suriname',
'SJ','Svalbard & Jan Mayen Islands',
'SZ','Swaziland',
'SE','Sweden',
'CH','Switzerland, Swiss Confederation',
'SY','Syrian Arab Republic',
'TW','Taiwan',
'TJ','Tajikistan',
'TZ','Tanzania',
'TH','Thailand',
'TL','Timor-Leste',
'TG','Togo',
'TK','Tokelau',
'TO','Tonga',
'TT','Trinidad and Tobago',
'TN','Tunisia',
'TR','Turkey',
'TM','Turkmenistan',
'TC','Turks and Caicos Islands',
'TV','Tuvalu',
'UG','Uganda',
'UA','Ukraine',
'AE','United Arab Emirates',
'GB','United Kingdom',
'US','United States of America',
'UM','United States Minor Outlying Islands',
'VI','United States Virgin Islands',
'UY','Uruguay, Eastern Republic of',
'UZ','Uzbekistan',
'VU','Vanuatu',
'VE','Venezuela',
'VN','Vietnam',
'WF','Wallis and Futuna',
'EH','Western Sahara',
'YE','Yemen',
'ZM','Zambia',
'ZW','Zimbabwe'];

$sellong='<select id=sellong onchange=document.getElementById("isellong").value=this.value;><option value="">Optionally Select Country of Interest below ...</option>
<option value="AF">Afghanistan</option>
<option value="AX">Aland Islands</option>
<option style=display:none; value="ax">Åland</option>
<option value="AL">Albania</option>
<option value="DZ">Algeria</option>
<option value="AS">American Samoa</option>
<option value="AD">Andorra</option>
<option value="AO">Angola</option>
<option value="AI">Anguilla</option>
<option value="AQ">Antarctica</option>
<option value="AG">Antigua and Barbuda</option>
<option value="AR">Argentina</option>
<option value="AM">Armenia</option>
<option style=display:none; value="am">Republic of Artsakh</font>
<option value="AW">Aruba</option>
<option value="AU">Australia</option>
<option value="AT">Austria</option>
<option value="AZ">Azerbaijan</option>
<option value="BS">Bahamas the</option>
<option style=display:none; value="bs">The Bahamas</option>
<option value="BH">Bahrain</option>
<option value="BD">Bangladesh</option>
<option value="BB">Barbados</option>
<option value="BY">Belarus</option>
<option value="BE">Belgium</option>
<option value="BZ">Belize</option>
<option value="BJ">Benin</option>
<option value="BM">Bermuda</option>
<option value="BT">Bhutan</option>
<option value="BO">Bolivia</option>
<option value="BA">Bosnia and Herzegovina</option>
<option value="BW">Botswana</option>
<option value="BV">Bouvet Island (Bouvetoya)</option>
<option value="BR">Brazil</option>
<option value="IO">British Indian Ocean Territory (Chagos Archipelago)</option>
<option style=display:none; value="id">British Indian Ocean Territory</option>
<option value="VG">British Virgin Islands</option>
<option value="BN">Brunei Darussalam</option>
<option style=display:none; value="bn">Brunei</option>
<option value="BG">Bulgaria</option>
<option value="BF">Burkina Faso</option>
<option value="BI">Burundi</option>
<option value="KH">Cambodia</option>
<option value="CM">Cameroon</option>
<option value="CA">Canada</option>
<option value="CV">Cape Verde</option>
<option value="KY">Cayman Islands</option>
<option value="CF">Central African Republic</option>
<option value="TD">Chad</option>
<option value="CL">Chile</option>
<option value="CN">China</option>
<option value="CX">Christmas Island</option>
<option value="CC">Cocos (Keeling) Islands</option>
<option style=display:none; value="cc">Keeling</option>
<option value="CO">Colombia</option>
<option value="KM">Comoros the</option>
<option style=display:none; value="km">Comoros</option>
<option value="CD">Congo</option>
<option style=display:none; value="cd">Democratic Republic of the Congo</option>
<option value="CG">Congo the</option>
<option style=display:none; value="cg">Republic of the Congo</option>
<option value="CK">Cook Islands</option>
<option value="CR">Costa Rica</option>
<option value="CI">Cote d`Ivoire</option>
<option style=display:none; value="ci">Ivory Coast</option>
<option value="HR">Croatia</option>
<option value="CU">Cuba</option>
<option value="CW">Curaçao</font>
<option value="CY">Cyprus</option>
<option value="CZ">Czech Republic</option>
<option value="DK">Denmark</option>
<option value="DJ">Djibouti</option>
<option value="DM">Dominica</option>
<option value="DO">Dominican Republic</option>
<option value="EC">Ecuador</option>
<option value="EG">Egypt</option>
<option value="SV">El Salvador</option>
<option value="GQ">Equatorial Guinea</option>
<option value="ER">Eritrea</option>
<option value="EE">Estonia</option>
<option value="ET">Ethiopia</option>
<option value="FO">Faroe Islands</option>
<option value="FK">Falkland Islands (Malvinas)</option>
<option style=display:none; value="fk">Falkland Islands</option>
<option value="FJ">Fiji the Fiji Islands</option>
<option style=display:none; value="fj">Fiji</option>
<option value="FI">Finland</option>
<option value="FR">France, French Republic</option>
<option style=display:none; value="fr">France</option>
<option value="GF">French Guiana</option>
<option value="PF">French Polynesia</option>
<option value="TF">French Southern Territories</option>
<option value="GA">Gabon</option>
<option value="GM">Gambia the</option>
<option style=display:none; value="gm">The Gambia</option>
<option value="GE">Georgia</option>
<option value="DE">Germany</option>
<option style=display:none; value="de">West Germany</option>
<option value="GH">Ghana</option>
<option value="GI">Gibraltar</option>
<option value="GR">Greece</option>
<option value="GL">Greenland</option>
<option value="GD">Grenada</option>
<option value="GP">Guadeloupe</option>
<option value="GU">Guam</option>
<option value="GT">Guatemala</option>
<option value="GG">Guernsey</option>
<option value="GN">Guinea</option>
<option value="GW">Guinea-Bissau</option>
<option value="GY">Guyana</option>
<option value="HT">Haiti</option>
<option value="HM">Heard Island and McDonald Islands</option>
<option value="VA">Holy See (Vatican City State)</option>
<option style=display:none; value="va">Vatican City</option>
<option value="HN">Honduras</option>
<option style=display:none; value="hn">Constitution of Honduras</option>
<option value="HK">Hong Kong</option>
<option value="HU">Hungary</option>
<option value="IS">Iceland</option>
<option value="IN">India</option>
<option value="ID">Indonesia</option>
<option value="IR">Iran</option>
<option value="IQ">Iraq</option>
<option value="IE">Ireland</option>
<option style=display:none; value="ie">Republic of Ireland</option>
<option value="IM">Isle of Man</option>
<option value="IL">Israel</option>
<option value="IT">Italy</option>
<option value="JM">Jamaica</option>
<option value="JP">Japan</option>
<option value="JE">Jersey</option>
<option value="JO">Jordan</option>
<option value="KZ">Kazakhstan</option>
<option value="KE">Kenya</option>
<option value="KI">Kiribati</option>
<option value="KP">Korea</option>
<option style=display:none; value="kp">North Korea</option>
<option value="KR">Korea</option>
<option style=display:none; value="kr">South Korea</option>
<option value="XK">Kosovo</option>
<option value="KW">Kuwait</option>
<option value="KG">Kyrgyz Republic</option>
<option style=display:none; value="kg">Kyrgyzstan</option>
<option value="LA">Lao</option>
<option style=display:none; value="la">Laos</option>
<option value="LV">Latvia</option>
<option value="LB">Lebanon</option>
<option value="LS">Lesotho</option>
<option value="LR">Liberia</option>
<option value="LY">Libyan Arab Jamahiriya</option>
<option style=display:none; value="ly">Libya</option>
<option value="LI">Liechtenstein</option>
<option value="LT">Lithuania</option>
<option value="LU">Luxembourg</option>
<option value="MO">Macao</option>
<option value="MK">Macedonia</option>
<option style=display:none; value="mk">North Macedonia</option>
<option value="MG">Madagascar</option>
<option value="MW">Malawi</option>
<option value="MY">Malaysia</option>
<option value="MV">Maldives</option>
<option value="ML">Mali</option>
<option value="MT">Malta</option>
<option value="MH">Marshall Islands</option>
<option value="MQ">Martinique</option>
<option value="MR">Mauritania</option>
<option value="MU">Mauritius</option>
<option value="YT">Mayotte</option>
<option value="MX">Mexico</option>
<option value="FM">Micronesia</option>
<option style=display:none; value="fm">Federated States of Micronesia</option>
<option value="MD">Moldova</option>
<option value="MC">Monaco</option>
<option style=display:none; value="mc">Constitution of Monaco</option>
<option value="MN">Mongolia</option>
<option value="ME">Montenegro</option>
<option value="MS">Montserrat</option>
<option value="MA">Morocco</option>
<option value="MZ">Mozambique</option>
<option value="MM">Myanmar</option>
<option style=display:none; value="mm">Burma</option>
<option value="NA">Namibia</option>
<option value="NR">Nauru</option>
<option value="NP">Nepal</option>
<option value="AN">Netherlands Antilles</option>
<option value="NL">Netherlands the</option>
<option style=display:none; value="nl">Netherlands</option>
<option style=display:none; value="Nl">The Netherlands</option>
<option value="NC">New Caledonia</option>
<option value="NZ">New Zealand</option>
<option value="NI">Nicaragua</option>
<option value="NE">Niger</option>
<option value="NG">Nigeria</option>
<option value="NU">Niue</option>
<option value="NF">Norfolk Island</option>
<option value="MP">Northern Mariana Islands</option>
<option value="NO">Norway</option>
<option value="OM">Oman</option>
<option value="PK">Pakistan</option>
<option value="PW">Palau</option>
<option value="PS">Palestinian Territory</option>
<option value="PA">Panama</option>
<option value="PG">Papua New Guinea</option>
<option value="PY">Paraguay</option>
<option value="PE">Peru</option>
<option value="PH">Philippines</option>
<option value="PN">Pitcairn Islands</option>
<option value="PL">Poland</option>
<option value="PT">Portugal, Portuguese Republic</option>
<option style=display:none; value="pt">Portugal</option>
<option value="PR">Puerto Rico</option>
<option value="QA">Qatar</option>
<option value="RE">Reunion</option>
<option value="RO">Romania</option>
<option value="RU">Russian Federation</option>
<option style=display:none; value="ru">Russia</option>
<option value="RW">Rwanda</option>
<option value="BL">Saint Barthelemy</option>
<option style=display:none; value="bl">Saint Barthélemy</option>
<option value="SH">Saint Helena</option>
<option value="KN">Saint Kitts and Nevis</option>
<option value="LC">Saint Lucia</option>
<option value="MF">Saint Martin</option>
<option style=display:none; value="mf">Sint Maarten</option>
<option value="PM">Saint Pierre and Miquelon</option>
<option value="VC">Saint Vincent and the Grenadines</option>
<option value="WS">Samoa</option>
<option value="SM">San Marino</option>
<option value="ST">Sao Tome and Principe</option>
<option style=display:none; alue="st">São Tomé and Príncipe</option>
<option value="SA">Saudi Arabia</option>
<option value="SN">Senegal</option>
<option value="RS">Serbia</option>
<option value="SC">Seychelles</option>
<option value="SL">Sierra Leone</option>
<option value="SG">Singapore</option>
<option value="SK">Slovakia (Slovak Republic)</option>
<option style=display:none; value="sk">Slovakia</option>
<option value="SI">Slovenia</option>
<option value="SB">Solomon Islands</option>
<option value="SO">Somalia, Somali Republic</option>
<option style=display:none; value="so">Somaliland</option>
<option style=display:none; value="So">Somalia</option>
<option value="ZA">South Africa</option>
<option value="GS">South Georgia and the South Sandwich Islands</option>
<option value="OS">South Ossetia</option>
<option value="SS">South Sudan</option>
<option value="ES">Spain</option>
<option value="LK">Sri Lanka</option>
<option value="SD">Sudan</option>
<option value="SR">Suriname</option>
<option value="SJ">Svalbard & Jan Mayen Islands</option>
<option value="SZ">Swaziland</option>
<option style=display:none; value="sz">Eswatini</option>
<option value="SE">Sweden</option>
<option value="CH">Switzerland, Swiss Confederation</option>
<option style=display:none; value="ch">Switzerland</option>
<option value="SY">Syrian Arab Republic</option>
<option style=display:none; value="sy">Syria</option>
<option value="TW">Taiwan</option>
<option value="TJ">Tajikistan</option>
<option value="TZ">Tanzania</option>
<option value="TH">Thailand</option>
<option value="TL">Timor-Leste</option>
<option style=display:none; value="tl">East Timor</option>
<option value="TG">Togo</option>
<option value="TK">Tokelau</option>
<option value="TO">Tonga</option>
<option value="TT">Trinidad and Tobago</option>
<option value="TN">Tunisia</option>
<option value="TR">Turkey</option>
<option value="TM">Turkmenistan</option>
<option value="TC">Turks and Caicos Islands</option>
<option value="TV">Tuvalu</option>
<option value="UG">Uganda</option>
<option value="UA">Ukraine</option>
<option value="AE">United Arab Emirates</option>
<option value="GB">United Kingdom</option>
<option value="US">United States of America</option>
<option style=display:nonel value="us">United States</option>
<option value="UM">United States Minor Outlying Islands</option>
<option value="VI">United States Virgin Islands</option>
<option value="UY">Uruguay, Eastern Republic of</option>
<option style=display:none; value="uy">Uruguay</option>
<option value="UZ">Uzbekistan</option>
<option value="VU">Vanuatu</option>
<option value="VE">Venezuela</option>
<option value="VN">Vietnam</option>
<option value="WF">Wallis and Futuna</option>
<option value="EH">Western Sahara</option>
<option value="YE">Yemen</option>
<option value="ZM">Zambia</option>
<option value="ZW">Zimbabwe</option>
</select> ... <br>or, 2 letter ISO Country Code <input style=width:80px; name=iso onblur=document.getElementById("sellong").value=this.value; id=isellong type=text value=""></input><div style=display:inline; id=disellong class=emoji onclick=emojistuff(this);>&#128249;</div><br>';



if (isset($_POST['infillflag'])) {
  $scriss="";
  $scrisslater="";
  $clist=str_replace('+',' ',urldecode($_POST['infillflag']));
  $sls=explode("</option>", $sellong);
  $clists=explode("(", $clist);
  for ($iv=1; $iv<sizeof($clists); $iv++) {
    $inctyis=explode('"', explode(')', $clists[$iv])[0])[0];
    $thistcc='  ';
    if (strpos($inctyis, "Saint Barth") !== false) { $thistcc="BL"; }
    if (strpos($clists[$iv], "Gustavia") !== false) { $thistcc="BL"; }
    if (strpos(trim($clists[-1 + $iv]),"Mariehamn") !== false) { $thistcc="AX"; }
    if (strpos($inctyis, " and Pr") !== false) { $thistcc="ST"; }
    if (strpos(trim($clists[-1 + $iv]),"Willemstad") !== false) { $thistcc="CW"; }      
    if (strpos($sellong, '">' . $inctyis . '<') !== false) {
      $thistcc=strtoupper(substr(explode('">' . $inctyis . '<', $sellong)[0],-2,2));
    } else {
      $ws=explode(' ', $inctyis);
      $fndis=false;
      $fsofar='">' . $ws[0]; 
      for ($ij=1; $ij<sizeof($ws); $ij++) {
        if (!$fndis && sizeof(explode($fsofar, $sellong)) == 2) {
          $fndis=true;
          $thistcc=strtoupper(substr(explode('">' . $fsofar, $sellong)[0],-2,2));
        } 
        $fsofar.=' ' . $ws[$ij];
      }
    }  
    if (trim($thistcc) != "") {
     if (strpos($inctyis, ",") === false) {
      $preinctyis="(";
      if (strpos($inctyis, "Saint Barth") !== false) { $inctyis="lemy"; $preinctyis=""; }
      $scriss.="\n parent.document.getElementById('txtHint').innerHTML=parent.document.getElementById('txtHint').innerHTML.replace('" . $preinctyis . $inctyis . ")', '" .$preinctyis . $inctyis . " ' + orflag('" . $thistcc . "') + ')'); \n";
      $scrisslater.="\n parent.document.getElementById('ssug').innerHTML=parent.document.getElementById('ssug').innerHTML.replace('" . $preinctyis . $inctyis . ")<', '" . $preinctyis . $inctyis . " ' + orflag('" . $thistcc . "') + ')<'); \n";
     }
    }
  }
  echo "<html><head><scr" . "ipt type=text/javascript> 
  var dri=['127462','127463','127464','127465','127466','127467','127468','127469','127470','127471','127472','127473','127474','127475','127476','127477','127478','127479','127480','127481','127482','127483','127484','127485','127486','127487']; 
  var lri='ABCDEFGHIJKLMNOPQRSTUVWXYZ'; 
   
  if (!String.fromCodePoint) {   // thanks to http://xahlee.info/js/js_unicode_code_point.html
    // ES6 Unicode Shims 0.1 , © 2012 Steven Levithan , MIT License
    String.fromCodePoint = function fromCodePoint () {
        var chars = [], point, offset, units, i;
        for (i = 0; i < arguments.length; ++i) {
            point = arguments[i];
            offset = point - 0x10000;
            units = point > 0xFFFF ? [0xD800 + (offset >> 10), 0xDC00 + (offset & 0x3FF)] : [point];
            chars.push(String.fromCharCode.apply(null, units));
        }
        return chars.join('');
    } }

    function orflag(thiscc) {
      var ccsuff='', ccchar=' ', cde='';
      for (var iccsuff=0; iccsuff<thiscc.length; iccsuff++) {
        ccchar=thiscc.substring(iccsuff, eval(1 + eval('' + iccsuff))).toUpperCase();
        ccsuff+=String.fromCodePoint(dri[eval('' + lri.indexOf(ccchar))]); //'&#' + dri[eval('' + lri.indexOf(ccchar))] + ';';
        cde='.';
      }
      return ccsuff;
    }

    function dostuff() { " . $scriss . "} function dostufflater() { " . $scrisslater . "} </scr" . "ipt></head><body onload=\" if (parent.document.getElementById('txtHint')) { dostuff(); setTimeout(dostufflater, 1000); } \"></body></html>";
  exit;
}

if (isset($_GET['quicktzcountryclarification'])) {
try {
         $contis="";
         $ooctycode="";
         $codeis="";
         $wlook="";
         if (strpos($_GET['quicktzcountryclarification'], "/") !== false) {
         $tzis=str_replace("+","_",$_GET['quicktzcountryclarification']);
         //$ootz = new DateTimeZone($tzis);
         if (!isset($_GET['continent'])) {
         $contis=explode("/", $tzis)[0];
         } else {
         $contis=$_GET['continent'];
         }
         } else {
         $tzis=str_replace("+","_",urldecode($_GET['quicktzcountryclarification']));
         //$ootz = new DateTimeZone($tzis);
         if (!isset($_GET['continent'])) {
         $contis=explode("/", $tzis)[0];
         } else {
         $contis=str_replace("+","_",urldecode($_GET['continent']));
         }
         }
         $timezones = array(str_replace(" ","_",$tzis)); //array($tzis);
         foreach ($timezones as $otz) {
           $ootz = new DateTimeZone($otz);
           //echo "prehere";
           $oocloc=$ootz->getLocation(); 
           //$ooctrycode=print_r($oocloc,true);
           //echo "here";
           $ooctrycode=$oocloc['country_code'];
           //echo "ooctrycode=" . $ooctrycode;
           $codeis=$ooctrycode;
         }
         if ($ooctrycode != "") {
         $codeis=$ooctrycode;
         if (strpos($sellong, '"' . $ooctrycode . '">') !== false) {
           $ooz=explode('"' . $ooctrycode . '">', $sellong);
           $wlook=str_replace("_"," ",explode("/",$tzis)[-1 + sizeof(explode("/",$tzis))]);
           for ($ipo=(-2 + sizeof(explode("/",$tzis))); $ipo>=1; $ipo--) {
             $wlook.="," . str_replace("_"," ",explode("/",$tzis)[$ipo]);
           }
           $ooctrycode=str_replace("/"," ",str_replace(","," ",explode("<",$ooz[1])[0]));
           if (strpos($wlook,("," . str_replace("_"," ",$ooctrycode))) === false) $wlook.="," . str_replace("_"," ",$ooctrycode);
         }
         $dok=true;
         if (isset($_GET['vscode'])) {
           if ($codeis != $_GET['vscode']) {
             $dok=false;
             echo "<!doctype html><html><body onload=\"   if (parent.document.getElementById('xplace')) {  parent.document.getElementById('xplace').value='';  }   \"></body></html>";
           }
         }
         if (isset($_GET['vscountry'])) {
           if (strpos(("~" . $ooctrycode), ("~" . str_replace("+"," ",urldecode($_GET['vscountry'])))) === false) {
             $dok=false;
             echo "<!doctype html><html><body onload=\"  if (parent.document.getElementById('xplace')) {  parent.document.getElementById('xplace').value='';  }   \"></body></html>";
           }
         }
         if ($dok) echo "<!doctype html><html><body onload=\"  if (top.document.getElementById('igcrest')) { if (top.document.getElementById('igcrest').value.length == 0) { top.document.getElementById('igcrest').value='%20[~" . $codeis . "~,66]%20';  } else if (top.document.getElementById('igcrest').value.indexOf('%20[~" . $codeis . "~,66]%20') == -1) {  top.document.getElementById('igcrest').value=top.document.getElementById('igcrest').value + ',%20[~" . $codeis . "~,66]%20'; }  } if (top.document.getElementById('place'))  { top.document.getElementById('place').value='" . $wlook . "';  top.document.getElementById('place').title+=' (" . $codeis . ") ' + ' (" . $contis . ")';  top.document.getElementById('shour').value=' ';    }  if (parent.document.getElementById('xplace')) {  parent.document.getElementById('xplace').value='" . $wlook . "'; parent.document.getElementById('xplace').title+=' (" . $codeis . ") ' + ' (" . $contis . ")';  }     \"></body></html>";
         } else if (isset($_GET['vscode']) || isset($_GET['vscountry'])) {
             echo "<!doctype html><html><body onload=\"  if (parent.document.getElementById('xplace')) {  parent.document.getElementById('xplace').value='';  }   \"></body></html>";
         }
         exit;
} catch (Exception $e) {
         exit;
}
}


function country_code_to_country( $code ) {
    global $dri, $lri;
    $code = strtoupper($code);
    $country = '';
    if( $code == 'AF' ) $country = 'Afghanistan';
    if( $code == 'AX' ) $country = 'Aland Islands';
    if( $code == 'AL' ) $country = 'Albania';
    if( $code == 'DZ' ) $country = 'Algeria';
    if( $code == 'AS' ) $country = 'American Samoa';
    if( $code == 'AD' ) $country = 'Andorra';
    if( $code == 'AO' ) $country = 'Angola';
    if( $code == 'AI' ) $country = 'Anguilla';
    if( $code == 'AQ' ) $country = 'Antarctica';
    if( $code == 'AG' ) $country = 'Antigua and Barbuda';
    if( $code == 'AR' ) $country = 'Argentina';
    if( $code == 'AM' ) $country = 'Armenia';
    if( $code == 'AW' ) $country = 'Aruba';
    if( $code == 'AU' ) $country = 'Australia';
    if( $code == 'AT' ) $country = 'Austria';
    if( $code == 'AZ' ) $country = 'Azerbaijan';
    if( $code == 'BS' ) $country = 'Bahamas the';
    if( $code == 'BH' ) $country = 'Bahrain';
    if( $code == 'BD' ) $country = 'Bangladesh';
    if( $code == 'BB' ) $country = 'Barbados';
    if( $code == 'BY' ) $country = 'Belarus';
    if( $code == 'BE' ) $country = 'Belgium';
    if( $code == 'BZ' ) $country = 'Belize';
    if( $code == 'BJ' ) $country = 'Benin';
    if( $code == 'BM' ) $country = 'Bermuda';
    if( $code == 'BT' ) $country = 'Bhutan';
    if( $code == 'BO' ) $country = 'Bolivia';
    if( $code == 'BA' ) $country = 'Bosnia and Herzegovina';
    if( $code == 'BW' ) $country = 'Botswana';
    if( $code == 'BV' ) $country = 'Bouvet Island (Bouvetoya)';
    if( $code == 'BR' ) $country = 'Brazil';
    if( $code == 'IO' ) $country = 'British Indian Ocean Territory (Chagos Archipelago)';
    if( $code == 'VG' ) $country = 'British Virgin Islands';
    if( $code == 'BN' ) $country = 'Brunei Darussalam';
    if( $code == 'BG' ) $country = 'Bulgaria';
    if( $code == 'BF' ) $country = 'Burkina Faso';
    if( $code == 'BI' ) $country = 'Burundi';
    if( $code == 'KH' ) $country = 'Cambodia';
    if( $code == 'CM' ) $country = 'Cameroon';
    if( $code == 'CA' ) $country = 'Canada';
    if( $code == 'CV' ) $country = 'Cape Verde';
    if( $code == 'KY' ) $country = 'Cayman Islands';
    if( $code == 'CF' ) $country = 'Central African Republic';
    if( $code == 'TD' ) $country = 'Chad';
    if( $code == 'CL' ) $country = 'Chile';
    if( $code == 'CN' ) $country = 'China';
    if( $code == 'CX' ) $country = 'Christmas Island';
    if( $code == 'CC' ) $country = 'Cocos (Keeling) Islands';
    if( $code == 'CO' ) $country = 'Colombia';
    if( $code == 'KM' ) $country = 'Comoros the';
    if( $code == 'CD' ) $country = 'Congo';
    if( $code == 'CG' ) $country = 'Congo the';
    if( $code == 'CK' ) $country = 'Cook Islands';
    if( $code == 'CR' ) $country = 'Costa Rica';
    if( $code == 'CI' ) $country = 'Cote d`Ivoire';
    if( $code == 'HR' ) $country = 'Croatia';
    if( $code == 'CU' ) $country = 'Cuba';
    if( $code == 'CW' ) $country = 'Curaçao';
    if( $code == 'CY' ) $country = 'Cyprus';
    if( $code == 'CZ' ) $country = 'Czech Republic';
    if( $code == 'DK' ) $country = 'Denmark';
    if( $code == 'DJ' ) $country = 'Djibouti';
    if( $code == 'DM' ) $country = 'Dominica';
    if( $code == 'DO' ) $country = 'Dominican Republic';
    if( $code == 'EC' ) $country = 'Ecuador';
    if( $code == 'EG' ) $country = 'Egypt';
    if( $code == 'SV' ) $country = 'El Salvador';
    if( $code == 'GQ' ) $country = 'Equatorial Guinea';
    if( $code == 'ER' ) $country = 'Eritrea';
    if( $code == 'EE' ) $country = 'Estonia';
    if( $code == 'ET' ) $country = 'Ethiopia';
    if( $code == 'FO' ) $country = 'Faroe Islands';
    if( $code == 'FK' ) $country = 'Falkland Islands (Malvinas)';
    if( $code == 'FJ' ) $country = 'Fiji the Fiji Islands';
    if( $code == 'FI' ) $country = 'Finland';
    if( $code == 'FR' ) $country = 'France, French Republic';
    if( $code == 'GF' ) $country = 'French Guiana';
    if( $code == 'PF' ) $country = 'French Polynesia';
    if( $code == 'TF' ) $country = 'French Southern Territories';
    if( $code == 'GA' ) $country = 'Gabon';
    if( $code == 'GM' ) $country = 'Gambia the';
    if( $code == 'GE' ) $country = 'Georgia';
    if( $code == 'DE' ) $country = 'Germany';
    if( $code == 'GH' ) $country = 'Ghana';
    if( $code == 'GI' ) $country = 'Gibraltar';
    if( $code == 'GR' ) $country = 'Greece';
    if( $code == 'GL' ) $country = 'Greenland';
    if( $code == 'GD' ) $country = 'Grenada';
    if( $code == 'GP' ) $country = 'Guadeloupe';
    if( $code == 'GU' ) $country = 'Guam';
    if( $code == 'GT' ) $country = 'Guatemala';
    if( $code == 'GG' ) $country = 'Guernsey';
    if( $code == 'GN' ) $country = 'Guinea';
    if( $code == 'GW' ) $country = 'Guinea-Bissau';
    if( $code == 'GY' ) $country = 'Guyana';
    if( $code == 'HT' ) $country = 'Haiti';
    if( $code == 'HM' ) $country = 'Heard Island and McDonald Islands';
    if( $code == 'VA' ) $country = 'Holy See (Vatican City State)';
    if( $code == 'HN' ) $country = 'Honduras';
    if( $code == 'HK' ) $country = 'Hong Kong';
    if( $code == 'HU' ) $country = 'Hungary';
    if( $code == 'IS' ) $country = 'Iceland';
    if( $code == 'IN' ) $country = 'India';
    if( $code == 'ID' ) $country = 'Indonesia';
    if( $code == 'IR' ) $country = 'Iran';
    if( $code == 'IQ' ) $country = 'Iraq';
    if( $code == 'IE' ) $country = 'Ireland';
    if( $code == 'IM' ) $country = 'Isle of Man';
    if( $code == 'IL' ) $country = 'Israel';
    if( $code == 'IT' ) $country = 'Italy';
    if( $code == 'JM' ) $country = 'Jamaica';
    if( $code == 'JP' ) $country = 'Japan';
    if( $code == 'JE' ) $country = 'Jersey';
    if( $code == 'JO' ) $country = 'Jordan';
    if( $code == 'KZ' ) $country = 'Kazakhstan';
    if( $code == 'KE' ) $country = 'Kenya';
    if( $code == 'KI' ) $country = 'Kiribati';
    if( $code == 'KP' ) $country = 'Korea';
    if( $code == 'KR' ) $country = 'Korea';
    if( $code == 'XK' ) $country = 'Kosovo';
    if( $code == 'KW' ) $country = 'Kuwait';
    if( $code == 'KG' ) $country = 'Kyrgyz Republic';
    if( $code == 'LA' ) $country = 'Lao';
    if( $code == 'LV' ) $country = 'Latvia';
    if( $code == 'LB' ) $country = 'Lebanon';
    if( $code == 'LS' ) $country = 'Lesotho';
    if( $code == 'LR' ) $country = 'Liberia';
    if( $code == 'LY' ) $country = 'Libyan Arab Jamahiriya';
    if( $code == 'LI' ) $country = 'Liechtenstein';
    if( $code == 'LT' ) $country = 'Lithuania';
    if( $code == 'LU' ) $country = 'Luxembourg';
    if( $code == 'MO' ) $country = 'Macao';
    if( $code == 'MK' ) $country = 'Macedonia';
    if( $code == 'MG' ) $country = 'Madagascar';
    if( $code == 'MW' ) $country = 'Malawi';
    if( $code == 'MY' ) $country = 'Malaysia';
    if( $code == 'MV' ) $country = 'Maldives';
    if( $code == 'ML' ) $country = 'Mali';
    if( $code == 'MT' ) $country = 'Malta';
    if( $code == 'MH' ) $country = 'Marshall Islands';
    if( $code == 'MQ' ) $country = 'Martinique';
    if( $code == 'MR' ) $country = 'Mauritania';
    if( $code == 'MU' ) $country = 'Mauritius';
    if( $code == 'YT' ) $country = 'Mayotte';
    if( $code == 'MX' ) $country = 'Mexico';
    if( $code == 'FM' ) $country = 'Micronesia';
    if( $code == 'MD' ) $country = 'Moldova';
    if( $code == 'MC' ) $country = 'Monaco';
    if( $code == 'MN' ) $country = 'Mongolia';
    if( $code == 'ME' ) $country = 'Montenegro';
    if( $code == 'MS' ) $country = 'Montserrat';
    if( $code == 'MA' ) $country = 'Morocco';
    if( $code == 'MZ' ) $country = 'Mozambique';
    if( $code == 'MM' ) $country = 'Myanmar';
    if( $code == 'NA' ) $country = 'Namibia';
    if( $code == 'NR' ) $country = 'Nauru';
    if( $code == 'NP' ) $country = 'Nepal';
    if( $code == 'AN' ) $country = 'Netherlands Antilles';
    if( $code == 'NL' ) $country = 'Netherlands the';
    if( $code == 'NC' ) $country = 'New Caledonia';
    if( $code == 'NZ' ) $country = 'New Zealand';
    if( $code == 'NI' ) $country = 'Nicaragua';
    if( $code == 'NE' ) $country = 'Niger';
    if( $code == 'NG' ) $country = 'Nigeria';
    if( $code == 'NU' ) $country = 'Niue';
    if( $code == 'NF' ) $country = 'Norfolk Island';
    if( $code == 'MP' ) $country = 'Northern Mariana Islands';
    if( $code == 'NO' ) $country = 'Norway';
    if( $code == 'OM' ) $country = 'Oman';
    if( $code == 'PK' ) $country = 'Pakistan';
    if( $code == 'PW' ) $country = 'Palau';
    if( $code == 'PS' ) $country = 'Palestinian Territory';
    if( $code == 'PA' ) $country = 'Panama';
    if( $code == 'PG' ) $country = 'Papua New Guinea';
    if( $code == 'PY' ) $country = 'Paraguay';
    if( $code == 'PE' ) $country = 'Peru';
    if( $code == 'PH' ) $country = 'Philippines';
    if( $code == 'PN' ) $country = 'Pitcairn Islands';
    if( $code == 'PL' ) $country = 'Poland';
    if( $code == 'PT' ) $country = 'Portugal, Portuguese Republic';
    if( $code == 'PR' ) $country = 'Puerto Rico';
    if( $code == 'QA' ) $country = 'Qatar';
    if( $code == 'RE' ) $country = 'Reunion';
    if( $code == 'RO' ) $country = 'Romania';
    if( $code == 'RU' ) $country = 'Russian Federation';
    if( $code == 'RW' ) $country = 'Rwanda';
    if( $code == 'BL' ) $country = 'Saint Barthelemy';
    if( $code == 'SH' ) $country = 'Saint Helena';
    if( $code == 'KN' ) $country = 'Saint Kitts and Nevis';
    if( $code == 'LC' ) $country = 'Saint Lucia';
    if( $code == 'MF' ) $country = 'Saint Martin';
    if( $code == 'PM' ) $country = 'Saint Pierre and Miquelon';
    if( $code == 'VC' ) $country = 'Saint Vincent and the Grenadines';
    if( $code == 'WS' ) $country = 'Samoa';
    if( $code == 'SM' ) $country = 'San Marino';
    if( $code == 'ST' ) $country = 'Sao Tome and Principe';
    if( $code == 'SA' ) $country = 'Saudi Arabia';
    if( $code == 'SN' ) $country = 'Senegal';
    if( $code == 'RS' ) $country = 'Serbia';
    if( $code == 'SC' ) $country = 'Seychelles';
    if( $code == 'SL' ) $country = 'Sierra Leone';
    if( $code == 'SG' ) $country = 'Singapore';
    if( $code == 'SK' ) $country = 'Slovakia (Slovak Republic)';
    if( $code == 'SI' ) $country = 'Slovenia';
    if( $code == 'SB' ) $country = 'Solomon Islands';
    if( $code == 'SO' ) $country = 'Somalia, Somali Republic';
    if( $code == 'ZA' ) $country = 'South Africa';
    if( $code == 'GS' ) $country = 'South Georgia and the South Sandwich Islands';
    if( $code == 'OS' ) $country = 'South Ossetia';
    if( $code == 'SS' ) $country = 'South Sudan';
    if( $code == 'ES' ) $country = 'Spain';
    if( $code == 'LK' ) $country = 'Sri Lanka';
    if( $code == 'SD' ) $country = 'Sudan';
    if( $code == 'SR' ) $country = 'Suriname';
    if( $code == 'SJ' ) $country = 'Svalbard & Jan Mayen Islands';
    if( $code == 'SZ' ) $country = 'Swaziland';
    if( $code == 'SE' ) $country = 'Sweden';
    if( $code == 'CH' ) $country = 'Switzerland, Swiss Confederation';
    if( $code == 'SY' ) $country = 'Syrian Arab Republic';
    if( $code == 'TW' ) $country = 'Taiwan';
    if( $code == 'TJ' ) $country = 'Tajikistan';
    if( $code == 'TZ' ) $country = 'Tanzania';
    if( $code == 'TH' ) $country = 'Thailand';
    if( $code == 'TL' ) $country = 'Timor-Leste';
    if( $code == 'TG' ) $country = 'Togo';
    if( $code == 'TK' ) $country = 'Tokelau';
    if( $code == 'TO' ) $country = 'Tonga';
    if( $code == 'TT' ) $country = 'Trinidad and Tobago';
    if( $code == 'TN' ) $country = 'Tunisia';
    if( $code == 'TR' ) $country = 'Turkey';
    if( $code == 'TM' ) $country = 'Turkmenistan';
    if( $code == 'TC' ) $country = 'Turks and Caicos Islands';
    if( $code == 'TV' ) $country = 'Tuvalu';
    if( $code == 'UG' ) $country = 'Uganda';
    if( $code == 'UA' ) $country = 'Ukraine';
    if( $code == 'AE' ) $country = 'United Arab Emirates';
    if( $code == 'GB' ) $country = 'United Kingdom';
    if( $code == 'US' ) $country = 'United States of America';
    if( $code == 'UM' ) $country = 'United States Minor Outlying Islands';
    if( $code == 'VI' ) $country = 'United States Virgin Islands';
    if( $code == 'UY' ) $country = 'Uruguay, Eastern Republic of';
    if( $code == 'UZ' ) $country = 'Uzbekistan';
    if( $code == 'VU' ) $country = 'Vanuatu';
    if( $code == 'VE' ) $country = 'Venezuela';
    if( $code == 'VN' ) $country = 'Vietnam';
    if( $code == 'WF' ) $country = 'Wallis and Futuna';
    if( $code == 'EH' ) $country = 'Western Sahara';
    if( $code == 'YE' ) $country = 'Yemen';
    if( $code == 'ZM' ) $country = 'Zambia';
    if( $code == 'ZW' ) $country = 'Zimbabwe';
    if( $country == '') $country = $code;
    if (isset($_GET['ntztontz'])) {
           $pref=' ';
           for ($ijk=0; $ijk<strlen($code); $ijk++) {
            for ($ilk=0; $ilk<sizeof($dri); $ilk++) {
             if (substr(substr(strtolower($lri),$ilk),0,1) == substr(substr(strtolower($code),$ijk),0,1)) {
               $pref.="&#" . $dri[$ilk] . ";";
             }
            }
           }
           $country.=$pref;
    }
    return trim($country);
} 


function find_nearest() {
  global $nearname, $nearlatitude, $nearlongitude, $pd, $backfullstyle, $backstyle, $backop, $backyour;
  $best1=-1;
  $best2=-1;
  $best3=-1;
  $latlongdistsquared=-1.0;
  $latlongdistsquaredtwo=-1.0;
  $latlongdistsquaredthree=-1.0;
  $gcddistsquared=-1.0;
  $gcddistsquaredtwo=-1.0;
  $gcddistsquaredthree=-1.0;
  $gcddistsquaredll="";
  $gcddistsquaredtwoll="";
  $gcddistsquaredthreell="";
  if (isset($_GET['latitude']) && isset($_GET['place']) && isset($_GET['longitude'])) {
   if ($_GET['latitude'] == '' && $_GET['longitude'] == '') {
    if (urldecode($_GET['place']) != '') {
      $huh=file_get_contents("http://www.google.com.au/search?q=" . urlencode(urldecode($_GET['place'])) . "+latitude");
      // IigAMAI"><div class="_XWk">33.8688° S, 151.2093° E</div>
      // /www.distancesto.com/coordinates/au/sydney-nsw-latitude-longitude/history/3571.html&amp;sa=U&amp;ved=0ahUKEwjkx_er1P_QAhXJnZQKHRZrD84QFggtMAQ&amp;usg=AFQjCNEcVCnwSmFGVx0FkHV9rFtk1p99Ug"><b>Sydney</b> NSW <b>Latitude</b> and Longitude - Distance Calculator</a></h3><div class="s"><div class="kv" style="margin-bottom:2px"><cite>https://www.distancesto.com/.../au/<b>sydney</b>-nsw-<b>latitude</b>.../3571.html</cite><div class="_nBb"><div style="display:inline" onclick="google.sham(this);" aria-expanded="false" aria-haspopup="true" tabindex="0" data-ved="0ahUKEwjkx_er1P_QAhXJnZQKHRZrD84Q7B0ILjAE"><span class="_O0"></span></div><div style="display:none" class="am-dropdown-menu" role="menu" tabindex="-1"><ul><li class="_Ykb"><a class="_Zkb" href="/url?q=//webcache.googleusercontent.com/search%3Fq%3Dcache:rfrLxd2wUBEJ:https://www.distancesto.com/coordinates/au/sydney-nsw-latitude-longitude/history/3571.html%252BSydney%2Blatitude%26hl%3Den%26ct%3Dclnk&amp;sa=U&amp;ved=0ahUKEwjkx_er1P_QAhXJnZQKHRZrD84QIAgwMAQ&amp;usg=AFQjCNGD1jX5jtc_7pfR53zdPFMdqAJZHQ">Cached</a></li></ul></div></div></div><span class="st"><b>Sydney</b> NSW <b>Latitude</b> and Longitude. The <b>latitude</b> for <b>Sydney</b> NSW, Australia is: -<br>33.8674869 and the longitude is: 151.20699020000006.</span>
      $hbits=explode(" S, ", $huh);
      if (sizeof($hbits) >= 2) {
       $latsofar=substr(trim(explode(">", $hbits[0])[-1 + sizeof(explode(">", $hbits[0]))]),0,(strlen(trim(explode(">", $hbits[0])[-1 + sizeof(explode(">", $hbits[0]))])) - 1));
       $latsofar=-$latsofar;
       $longsofar=substr(trim(explode(" ", $hbits[1])[0]),0,(strlen(trim(explode(" ", $hbits[1])[0])) - 1));
       if (substr(explode(" ", $hbits[1])[1], 0, 1) == "W") $longsofar=-$longsofar;
       echo "<!doctype html><html><head><scr" . "ipt type='text/javascript'> function lookoutfortop() { if (top.document.getElementById('nearest')) {  top.document.getElementById('latitude').value=\"" . $latsofar . "\";  top.document.getElementById('longitude').value=\"" . $longsofar . "\";  } else { document.body.innerHTML=\"" . $latsofar . "," . $longsofar . "\";   }  } </scr" . "ipt></head><body onload='lookoutfortop();'" . $backfullstyle . ">" . $pd . "</body></html>";  
       exit;
      } else {
       $hbits=explode(" N, ", $huh);
       if (sizeof($hbits) >= 2) {
        $latsofar=substr(trim(explode(">", $hbits[0])[-1 + sizeof(explode(">", $hbits[0]))]),0,(strlen(trim(explode(">", $hbits[0])[-1 + sizeof(explode(">", $hbits[0]))])) - 1));
        $longsofar=substr(trim(explode(" ", $hbits[1])[0]),0,(strlen(trim(explode(" ", $hbits[1])[0])) - 1));
        if (substr(explode(" ", $hbits[1])[1], 0, 1) == "W") $longsofar=-$longsofar;
        echo "<!doctype html><html><head><scr" . "ipt type='text/javascript'> function lookoutfortop() { if (top.document.getElementById('nearest')) {  top.document.getElementById('latitude').value=\"" . $latsofar . "\";  top.document.getElementById('longitude').value=\"" . $longsofar . "\";  } else { document.body.innerHTML=\"" . $latsofar . "," . $longsofar . "\";   }  } </scr" . "ipt></head><body onload='lookoutfortop();'" . $backfullstyle . ">" . $pd . "</body></html>";  
        exit;
       }
      }
    }
   } else {
    if (sizeof($nearname) > 1) {
      for ($ij=0; $ij<(-1 + sizeof($nearname)); $ij++) {
          $testit="";
          try {  // new test for invalid time zones that will reject invalid ones
            $testtz = new DateTimeZone($nearname[$ij]);
            } catch(Exception $tyuhgz) {
            $testit="bad";
            $nearlatitude[$ij]=8976.0;
            $nearlongitude[$ij]=98765.78;
          }
        if ($latlongdistsquared < 0.0) {
          $latlongdistsquared=($nearlatitude[$ij] - floatval(urldecode($_GET['latitude']))) * ($nearlatitude[$ij] - floatval(urldecode($_GET['latitude']))) + ($nearlongitude[$ij] - floatval(urldecode($_GET['longitude']))) * ($nearlongitude[$ij] - floatval(urldecode($_GET['longitude'])));
          $best1=$ij;
        } else {
          $thisll=($nearlatitude[$ij] - floatval(urldecode($_GET['latitude']))) * ($nearlatitude[$ij] - floatval(urldecode($_GET['latitude']))) + ($nearlongitude[$ij] - floatval(urldecode($_GET['longitude']))) * ($nearlongitude[$ij] - floatval(urldecode($_GET['longitude'])));
          if ($thisll < $latlongdistsquared) {
            if ($best2 < 0) {
              $latlongdistsquaredtwo=$latlongdistsquared;
              $best2=$best1;
              $best1=$ij;
              $latlongdistsquared=$thisll;
            } else {
              $latlongdistsquaredthree=$latlongdistsquaredtwo;
              $latlongdistsquaredtwo=$latlongdistsquared;
              $best3=$best2;
              $best2=$best1;
              $best1=$ij;
              $latlongdistsquared=$thisll;
            } 
          } else if ($thisll < $latlongdistsquaredtwo) {
              $latlongdistsquaredthree=$latlongdistsquaredtwo;
              $best3=$best2;
              $best2=$ij;
              $latlongdistsquaredtwo=$thisll;
          } else if ($thisll < $latlongdistsquaredthree) {
              $best3=$ij;
              $latlongdistsquaredthree=$thisll;
          }
        }
      }
      $coffs=[0,0,0];
      if ($gcddistsquared >= 0.0) {
        $ret="<select id='snearest' style='" . $backop . "position:absolute;top:70px;left:350px;' onchange=' " . $backyour . "alert(this.options[this.selectedIndex].title + String.fromCharCode(32) + this.options[this.selectedIndex].text); '><option title='' value=''>Please see Nearest TimeZone Places below ...</option></select>";
        $retmore="<select id='snearest' style='" . $backop . "position:absolute;top:70px;left:350px;' onchange=' " . $backyour . "alert(this.options[this.selectedIndex].title + String.fromCharCode(32) + this.options[this.selectedIndex].text); '><option title='' value=''>Please see Nearest TimeZone Places below ...</option></select>";
        $otz = new DateTimeZone("UTC"); // "Europe/London"
        $frombad="Tskhinvali"; // "youllneverfindthis";
        $tobad="Tbilisi";
        if (strpos($namename[$best1], "/Tskhinvali") !== false) {
          try {
            $tz = new DateTimeZone($nearname[$best1]);
           $frombad="youllneverfindthis"; } catch(Exception $tyuhg) {
            $frombad="Tskhinvali";
          }
        }
        $tz = new DateTimeZone(str_replace($frombad,$tobad,$nearname[$best1]));
        $origin_dt = new DateTime("now", $otz);
        $remote_dt = new DateTime("now", $tz);
        $dayofweek = $remote_dt->format('N') . " onclick=\"if (confirm('" . $remote_dt->format('D Y-m-d H:i:s') . "')) { window.open('//www.rjmprogramming.com.au/HTMLCSS/colour_wheel.html?mode=~/~', '_blank', 'top=100,left=100,width=800,height=800'); };\"";
        $cloc = $tz->getLocation(); $ctrycode = $cloc['country_code'];  $offset = ($tz->getOffset($remote_dt) - $otz->getOffset($origin_dt)) / 3600;
        if ($offset < 0) {
          $coffset=$offset;
        } else {
          $coffset="+" . $offset;
        }
        
  if ($pd != "") {
        
          $ppd='<br><a target="_blank" style="background-color:pink;" href="//www.rjmprogramming.com.au/HTMLCSS/other_side_of_the_world.htm?place=' . urlencode($nearname[$best1]) . '&altplace=&altplacethree=" title="WeatherViaOtherSideOfTheWorld">' . $nearname[$best1] . " in " . country_code_to_country($ctrycode) . " is " . $gcddistsquared / 1000.0 . "km (" . $coffset . ") from " . urldecode($_GET['place']) . '</a><br><div';
          if ($gcddistsquaredtwo >= 0.0) $ppd=str_replace("&altplace=", "&altplace=" . urlencode($nearname[$best2]), $ppd);
          if ($gcddistsquaredthree >= 0.0) $ppd=str_replace("&altplacethree=", "&altplacethree=" . urlencode($nearname[$best3]), $ppd);
          $pd=substr($pd,0,1) . str_replace('<div', $ppd, substr($pd,1));
          
          if ($gcddistsquaredtwo >= 0.0) {
          $ppd='<br><a target="_blank" style="background-color:pink;" href="//www.rjmprogramming.com.au/HTMLCSS/other_side_of_the_world.htm?place=' . urlencode($nearname[$best2]) . '&altplace=&altplacethree=" title="WeatherViaOtherSideOfTheWorld">' . $nearname[$best2] . " in " . country_code_to_country($ctrycode) . " is " . $gcddistsquaredtwo / 1000.0 . "km from " . urldecode($_GET['place']) . '</a><br><div';
          $ppd=str_replace("&altplace=", "&altplace=" . urlencode($nearname[$best1]), $ppd);
          if ($gcddistsquaredthree >= 0.0) $ppd=str_replace("&altplacethree=", "&altplacethree=" . urlencode($nearname[$best3]), $ppd);
          $pd=substr($pd,0,1) . str_replace('<div', $ppd, substr($pd,1));
          }
          
          if ($gcddistsquaredthree >= 0.0) {
          $ppd='<br><a target="_blank" style="background-color:pink;" href="//www.rjmprogramming.com.au/HTMLCSS/other_side_of_the_world.htm?place=' . urlencode($nearname[$best3]) . '&altplace=&altplacethree=" title="WeatherViaOtherSideOfTheWorld">' . $nearname[$best3] . " in " . country_code_to_country($ctrycode) . " is " . $gcddistsquaredthree / 1000.0 . "km from " . urldecode($_GET['place']) . '</a><br><div';
          $ppd=str_replace("&altplace=", "&altplace=" . urlencode($nearname[$best1]), $ppd);
          $ppd=str_replace("&altplacethree=", "&altplacethree=" . urlencode($nearname[$best2]), $ppd);
          $pd=substr($pd,0,1) . str_replace('<div', $ppd, substr($pd,1));
          }
          echo "<!doctype html><html><body onload=\"if (('' + top.document.URL).replace('/countries.','/regions.').indexOf('/regions.') != -1) { if (document.getElementById('snearest')) { document.getElementById('snearest').style.left='0px';   }   }\" style='background-color:yellow;" . $backstyle . "'><h1>Nearest Timezones ... RJM Programming ... April, 2018 ... <a target=_blank title='Thanks to ...' href='//php.net/manual/en/datetimezone.getlocation.php'>//php.net/manual/en/datetimezone.getlocation.php</a></h1><br><br><br>" . $pd . $ret . "</body></html>";
          exit;
  }
          
        $ret=str_replace("</select>", "<option title='Nearest' value='" . $nearname[$best1] . "' data-cc='" . $ctrycode . "'>" . $nearname[$best1] . " in " . country_code_to_country($ctrycode) . " is " . $gcddistsquared / 1000.0 . "km (" . $coffset . ") from " . urldecode($_GET['place']) . "</option></select>");
        $retmore=str_replace("</select>", "<option " . $gcddistsquaredll . " title='Nearest' value='" . $nearname[$best1] . "' data-cc='" . $ctrycode . "'>" . $nearname[$best1] . " in " . country_code_to_country($ctrycode) . " is " . $gcddistsquared / 1000.0 . "km (" . $coffset . ") from " . urldecode($_GET['place']) . "</option></select>");
        if ($gcddistsquaredtwo >= 0.0) $ret=str_replace("</select>", "<option title='Next Nearest' value='" . $nearname[$best2] . "' data-cc='" . $ctrycode . "'>" . $nearname[$best2] . " in " . country_code_to_country($ctrycode) . " is " . $gcddistsquaredtwo / 1000.0 . "km from " . urldecode($_GET['place']) . " (" . urldecode($_GET['latitude']) . "," . urldecode($_GET['longitude']) .  ")</option></select>", $ret);
        if ($gcddistsquaredtwo >= 0.0) $retmore=str_replace("</select>", "<option " . $gcddistsquaredtwoll . " title='Next Nearest' value='" . $nearname[$best2] . "' data-cc='" . $ctrycode . "'>" . $nearname[$best2] . " in " . country_code_to_country($ctrycode) . " is " . $gcddistsquaredtwo / 1000.0 . "km from " . urldecode($_GET['place']) . " (" . urldecode($_GET['latitude']) . "," . urldecode($_GET['longitude']) .  ")</option></select>", $retmore);
        if ($gcddistsquaredthree >= 0.0) $ret=str_replace("</select>", "<option title='Third Nearest' value='" . $nearname[$best3] . "' data-cc='" . $ctrycode . "'>" . $nearname[$best3] . " in " . country_code_to_country($ctrycode) . " is " . $gcddistsquaredthree / 1000.0 . "km from " . urldecode($_GET['place']) . " (" . urldecode($_GET['latitude']) . "," . urldecode($_GET['longitude']) .  ")</option></select>", $ret);
        if ($gcddistsquaredthree >= 0.0) $retmore=str_replace("</select>", "<option " . $gcddistsquaredthreell . " title='Third Nearest' value='" . $nearname[$best3] . "' data-cc='" . $ctrycode . "'>" . $nearname[$best3] . " in " . country_code_to_country($ctrycode) . " is " . $gcddistsquaredthree / 1000.0 . "km from " . urldecode($_GET['place']) . " (" . urldecode($_GET['latitude']) . "," . urldecode($_GET['longitude']) .  ")</option></select>", $retmore);
        echo "<!doctype html><html><head><scr" . "ipt type='text/javascript' src='/HTMLCSS/countries.js?rand=" . rand(0,16756453) . "'></scr" . "ipt><scr" . "ipt type='text/javascript'> function lookoutfortop() { if (parent.document.getElementById('getmell')) { parent.document.getElementById('nearest').innerHTML=\"" . $pd . $retmore . "\";  } else if (top.document.getElementById('nearest')) {  if (top.document.getElementById('getmell')) { top.document.getElementById('nearest').innerHTML=\"" . $pd . $retmore . "\";  } else { top.document.getElementById('nearest').innerHTML=\"" . $pd . $ret . "\"; } top.window.scrollTo(0,0);  } else { if (top.document.getElementById('getmell')) { document.body.innerHTML=tzagain(\"" . $pd . $retmore . "\");  } else {  document.body.innerHTML=tzagain(\"" . $pd . str_replace(':70px;',':0px;',str_replace(':350px;',':0px;',$ret)) . "\"); }  }  if (('' + top.document.URL).replace('/countries.','/regions.').indexOf('/regions.') != -1) { if (document.getElementById('snearest')) { document.getElementById('snearest').style.left='0px';   }   } } </scr" . "ipt></head><body onload=' lookoutfortop();'" . $backfullstyle . ">" . $pd . $ret . "</body></html>";  //$ret;
        exit;
      } else if ($latlongdistsquared >= 0.0) {
        //echo $latlongdistsquared . " " . $latlongdistsquaredtwo;
        //exit;
        $ret="<select size=2 id='snearest' style='" . $backop . "position:absolute;top:70px;left:350px;' onchange=' " . $backyour . "alert(this.options[this.selectedIndex].title + String.fromCharCode(32) + this.options[this.selectedIndex].text); '><option title='' value=''>Please see Nearest TimeZone Places below ...</option></select>";
        $retmore="<select size=2 id='snearest' style='" . $backop . "position:absolute;top:70px;left:350px;' onchange=' " . $backyour . "alert(this.options[this.selectedIndex].title + String.fromCharCode(32) + this.options[this.selectedIndex].text); '><option title='' value=''>Please see Nearest TimeZone Places below ...</option></select>";
        $gcddistsquared=great_circle_distance(floatval(urldecode($_GET['latitude'])), floatval(urldecode($_GET['longitude'])), $nearlatitude[$best1], $nearlongitude[$best1]);
        $gcddistsquaredll=" data-ll='(" . $nearlatitude[$best1] . ',' . $nearlongitude[$best1] . ")' ";
        $otz = new DateTimeZone("UTC"); // "Europe/London"
        $frombad="Tskhinvali"; // "youllneverfindthis";
        $tobad="Tbilisi";
        if (strpos($namename[$best1], "/Tskhinvali") !== false) {
          try {
            $tz = new DateTimeZone($nearname[$best1]);
           $frombad="youllneverfindthis"; } catch(Exception $tyuhg) {
            $frombad="Tskhinvali";
          }
        }
        $tz = new DateTimeZone(str_replace($frombad,$tobad,$nearname[$best1]));
        $origin_dt = new DateTime("now", $otz);
        $remote_dt = new DateTime("now", $tz);
        $dayofweek = $remote_dt->format('N') . " onclick=\"if (confirm('" . $remote_dt->format('D Y-m-d H:i:s') . "')) { window.open('//www.rjmprogramming.com.au/HTMLCSS/colour_wheel.html?mode=~/~', '_blank', 'top=100,left=100,width=800,height=800'); };\"";
        $cloc = $tz->getLocation(); $ctrycode = $cloc['country_code'];  $offset = ($tz->getOffset($remote_dt) - $otz->getOffset($origin_dt)) / 3600;
        if ($offset < 0) {
          $coffset=$offset;
        } else {
          $coffset="+" . $offset;
        }
        if ($latlongdistsquaredtwo >= 0.0) {
          $ret=str_replace(" size=2 ", " size=3 ", $ret);
          $retmore=str_replace(" size=2 ", " size=3 ", $retmore);
          $gcddistsquaredtwo=great_circle_distance(floatval(urldecode($_GET['latitude'])), floatval(urldecode($_GET['longitude'])), $nearlatitude[$best2], $nearlongitude[$best2]);
          $gcddistsquaredtwoll=" data-ll='(" . $nearlatitude[$best2] . ',' . $nearlongitude[$best2] . ")' ";
          if ($latlongdistsquaredthree >= 0.0) {
            $ret=str_replace(" size=3 ", " size=4 ", $ret);
            $retmore=str_replace(" size=3 ", " size=4 ", $retmore);
            $gcddistsquaredthree=great_circle_distance(floatval(urldecode($_GET['latitude'])), floatval(urldecode($_GET['longitude'])), $nearlatitude[$best3], $nearlongitude[$best3]);
            $gcddistsquaredthreell=" data-ll='(" . $nearlatitude[$best3] . ',' . $nearlongitude[$best3] . ")' ";
            if ($gcddistsquared <= $gcddistsquaredtwo && $gcddistsquared <= $gcddistsquaredthree) {
              $ret=str_replace("</select>", "<option title='Nearest' value='" . $nearname[$best1] . "' data-cc='" . $ctrycode . "'>" . $nearname[$best1] . " in " . country_code_to_country($ctrycode) . " is " . $gcddistsquared / 1000.0 . "km (" . $coffset . ") from " . urldecode($_GET['place']) . " (" . urldecode($_GET['latitude']) . "," . urldecode($_GET['longitude']) .  ")</option></select>", $ret);
              $retmore=str_replace("</select>", "<option " . $gcddistsquaredll . " title='Nearest' value='" . $nearname[$best1] . "' data-cc='" . $ctrycode . "'>" . $nearname[$best1] . " in " . country_code_to_country($ctrycode) . " is " . $gcddistsquared / 1000.0 . "km (" . $coffset . ") from " . urldecode($_GET['place']) . " (" . urldecode($_GET['latitude']) . "," . urldecode($_GET['longitude']) .  ")</option></select>", $retmore);
  
              if ($gcddistsquaredtwo <= $gcddistsquaredthree) {
        $otz = new DateTimeZone("UTC"); // "Europe/London"
        $frombad="Tskhinvali"; // "youllneverfindthis";
        $tobad="Tbilisi";
        if (strpos($namename[$best2], "/Tskhinvali") !== false) {
          try {
            $tz = new DateTimeZone($nearname[$best2]);
           $frombad="youllneverfindthis"; } catch(Exception $tyuhg) {
            $frombad="Tskhinvali";
          }
        }
        $tz = new DateTimeZone(str_replace($frombad,$tobad,$nearname[$best2]));
        $origin_dt = new DateTime("now", $otz);
        $remote_dt = new DateTime("now", $tz);
        $dayofweek = $remote_dt->format('N') . " onclick=\"if (confirm('" . $remote_dt->format('D Y-m-d H:i:s') . "')) { window.open('//www.rjmprogramming.com.au/HTMLCSS/colour_wheel.html?mode=~/~', '_blank', 'top=100,left=100,width=800,height=800'); };\"";
        $cloc = $tz->getLocation(); $ctrycode = $cloc['country_code'];  $offset = ($tz->getOffset($remote_dt) - $otz->getOffset($origin_dt)) / 3600;
        if ($offset < 0) {
          $coffset=$offset;
        } else {
          $coffset="+" . $offset;
        }
               $ret=str_replace("</select>", "<option title='Next Nearest' value='" . $nearname[$best2] . "' data-cc='" . $ctrycode . "'>" . $nearname[$best2] . " in " . country_code_to_country($ctrycode) . " is " . $gcddistsquaredtwo / 1000.0 . "km (" . $coffset . ") from " . urldecode($_GET['place']) . " (" . urldecode($_GET['latitude']) . "," . urldecode($_GET['longitude']) .  ")</option></select>", $ret);
               $retmore=str_replace("</select>", "<option " . $gcddistsquaredtwoll . " title='Next Nearest' value='" . $nearname[$best2] . "' data-cc='" . $ctrycode . "'>" . $nearname[$best2] . " in " . country_code_to_country($ctrycode) . " is " . $gcddistsquaredtwo / 1000.0 . "km (" . $coffset . ") from " . urldecode($_GET['place']) . " (" . urldecode($_GET['latitude']) . "," . urldecode($_GET['longitude']) .  ")</option></select>", $retmore);
        $otz = new DateTimeZone("UTC"); // "Europe/London"
        $frombad="Tskhinvali"; // "youllneverfindthis";
        $tobad="Tbilisi";
        if (strpos($namename[$best3], "/Tskhinvali") !== false) {
          try {
            $tz = new DateTimeZone(str_replace($frombad,$tobad,$nearname[$best3]));
           $frombad="youllneverfindthis"; } catch(Exception $tyuhg) {
            $frombad="Tskhinvali";
          }
        }
        $tz = new DateTimeZone($nearname[$best3]);
        $origin_dt = new DateTime("now", $otz);
        $remote_dt = new DateTime("now", $tz);
        $dayofweek = $remote_dt->format('N') . " onclick=\"if (confirm('" . $remote_dt->format('D Y-m-d H:i:s') . "')) { window.open('//www.rjmprogramming.com.au/HTMLCSS/colour_wheel.html?mode=~/~', '_blank', 'top=100,left=100,width=800,height=800'); };\"";
        $cloc = $tz->getLocation(); $ctrycode = $cloc['country_code'];  $offset = ($tz->getOffset($remote_dt) - $otz->getOffset($origin_dt)) / 3600;
        if ($offset < 0) {
          $coffset=$offset;
        } else {
          $coffset="+" . $offset;
        }
               $ret=str_replace("</select>", "<option title='Third Nearest' value='" . $nearname[$best3] . "' data-cc='" . $ctrycode . "'>" . $nearname[$best3] . " in " . country_code_to_country($ctrycode) . " is " . $gcddistsquaredthree / 1000.0 . "km (" . $coffset . ") from " . urldecode($_GET['place']) . " (" . urldecode($_GET['latitude']) . "," . urldecode($_GET['longitude']) .  ")</option></select>", $ret);
               $retmore=str_replace("</select>", "<option " . $gcddistsquaredthreell . " title='Third Nearest' value='" . $nearname[$best3] . "' data-cc='" . $ctrycode . "'>" . $nearname[$best3] . " in " . country_code_to_country($ctrycode) . " is " . $gcddistsquaredthree / 1000.0 . "km (" . $coffset . ") from " . urldecode($_GET['place']) . " (" . urldecode($_GET['latitude']) . "," . urldecode($_GET['longitude']) .  ")</option></select>", $retmore);
              } else {
        $otz = new DateTimeZone("UTC"); // "Europe/London"
        $frombad="Tskhinvali"; // "youllneverfindthis";
        $tobad="Tbilisi";
        if (strpos($namename[$best3], "/Tskhinvali") !== false) {
          try {
            $tz = new DateTimeZone(str_replace($frombad,$tobad,$nearname[$best3]));
           $frombad="youllneverfindthis"; } catch(Exception $tyuhg) {
            $frombad="Tskhinvali";
          }
        }
        $tz = new DateTimeZone($nearname[$best3]);
        $origin_dt = new DateTime("now", $otz);
        $remote_dt = new DateTime("now", $tz);
        $dayofweek = $remote_dt->format('N') . " onclick=\"if (confirm('" . $remote_dt->format('D Y-m-d H:i:s') . "')) { window.open('//www.rjmprogramming.com.au/HTMLCSS/colour_wheel.html?mode=~/~', '_blank', 'top=100,left=100,width=800,height=800'); };\"";
        $cloc = $tz->getLocation(); $ctrycode = $cloc['country_code'];  $offset = ($tz->getOffset($remote_dt) - $otz->getOffset($origin_dt)) / 3600;
        if ($offset < 0) {
          $coffset=$offset;
        } else {
          $coffset="+" . $offset;
        }
               $ret=str_replace("</select>", "<option title='Next Nearest' value='" . $nearname[$best3] . "' data-cc='" . $ctrycode . "'>" . $nearname[$best3] . " in " . country_code_to_country($ctrycode) . " is " . $gcddistsquaredthree / 1000.0 . "km (" . $coffset . ") from " . urldecode($_GET['place']) . " (" . urldecode($_GET['latitude']) . "," . urldecode($_GET['longitude']) .  ")</option></select>", $ret);
               $retmore=str_replace("</select>", "<option " . $gcddistsquaredthreell . " title='Next Nearest' value='" . $nearname[$best3] . "' data-cc='" . $ctrycode . "'>" . $nearname[$best3] . " in " . country_code_to_country($ctrycode) . " is " . $gcddistsquaredthree / 1000.0 . "km (" . $coffset . ") from " . urldecode($_GET['place']) . " (" . urldecode($_GET['latitude']) . "," . urldecode($_GET['longitude']) .  ")</option></select>", $retmore);
        $otz = new DateTimeZone("UTC"); // "Europe/London"
        $frombad="Tskhinvali"; // "youllneverfindthis";
        $tobad="Tbilisi";
        if (strpos($namename[$best2], "/Tskhinvali") !== false) {
          try {
            $tz = new DateTimeZone($nearname[$best2]);
           $frombad="youllneverfindthis"; } catch(Exception $tyuhg) {
            $frombad="Tskhinvali";
          }
        }
        $tz = new DateTimeZone(str_replace($frombad,$tobad,$nearname[$best2]));
        $origin_dt = new DateTime("now", $otz);
        $remote_dt = new DateTime("now", $tz);
        $dayofweek = $remote_dt->format('N') . " onclick=\"if (confirm('" . $remote_dt->format('D Y-m-d H:i:s') . "')) { window.open('//www.rjmprogramming.com.au/HTMLCSS/colour_wheel.html?mode=~/~', '_blank', 'top=100,left=100,width=800,height=800'); };\"";
        $cloc = $tz->getLocation(); $ctrycode = $cloc['country_code'];  $offset = ($tz->getOffset($remote_dt) - $otz->getOffset($origin_dt)) / 3600;
        if ($offset < 0) {
          $coffset=$offset;
        } else {
          $coffset="+" . $offset;
        }
               $ret=str_replace("</select>", "<option title='Third Nearest' value='" . $nearname[$best2] . "' data-cc='" . $ctrycode . "'>" . $nearname[$best2] . " in " . country_code_to_country($ctrycode) . " is " . $gcddistsquaredtwo / 1000.0 . "km (" . $coffset . ") from " . urldecode($_GET['place']) . " (" . urldecode($_GET['latitude']) . "," . urldecode($_GET['longitude']) .  ")</option></select>", $ret);
               $retmore=str_replace("</select>", "<option " . $gcddistsquaredtwoll . " title='Third Nearest' value='" . $nearname[$best2] . "' data-cc='" . $ctrycode . "'>" . $nearname[$best2] . " in " . country_code_to_country($ctrycode) . " is " . $gcddistsquaredtwo / 1000.0 . "km (" . $coffset . ") from " . urldecode($_GET['place']) . " (" . urldecode($_GET['latitude']) . "," . urldecode($_GET['longitude']) .  ")</option></select>", $retmore);
              }

           } else if ($gcddistsquaredtwo <= $gcddistsquared && $gcddistsquaredtwo <= $gcddistsquaredthree) {
        $otz = new DateTimeZone("UTC"); // "Europe/London"
        $frombad="Tskhinvali"; // "youllneverfindthis";
        $tobad="Tbilisi";
        if (strpos($namename[$best2], "/Tskhinvali") !== false) {
          try {
            $tz = new DateTimeZone($nearname[$best2]);
           $frombad="youllneverfindthis"; } catch(Exception $tyuhg) {
            $frombad="Tskhinvali";
          }
        }
        $tz = new DateTimeZone(str_replace($frombad,$tobad,$nearname[$best2]));
        $origin_dt = new DateTime("now", $otz);
        $remote_dt = new DateTime("now", $tz);
        $dayofweek = $remote_dt->format('N') . " onclick=\"if (confirm('" . $remote_dt->format('D Y-m-d H:i:s') . "')) { window.open('//www.rjmprogramming.com.au/HTMLCSS/colour_wheel.html?mode=~/~', '_blank', 'top=100,left=100,width=800,height=800'); };\"";
        $cloc = $tz->getLocation(); $ctrycode = $cloc['country_code'];  $offset = ($tz->getOffset($remote_dt) - $otz->getOffset($origin_dt)) / 3600;
        if ($offset < 0) {
          $coffset=$offset;
        } else {
          $coffset="+" . $offset;
        }
              $ret=str_replace("</select>", "<option title='Nearest' value='" . $nearname[$best2] . "' data-cc='" . $ctrycode . "'>" . $nearname[$best2] . " in " . country_code_to_country($ctrycode) . " is " . $gcddistsquaredtwo / 1000.0 . "km (" . $coffset . ") from " . urldecode($_GET['place']) . " (" . urldecode($_GET['latitude']) . "," . urldecode($_GET['longitude']) .  ")</option></select>", $ret);
              $retmore=str_replace("</select>", "<option " . $gcddistsquaredtwoll . " title='Nearest' value='" . $nearname[$best2] . "' data-cc='" . $ctrycode . "'>" . $nearname[$best2] . " in " . country_code_to_country($ctrycode) . " is " . $gcddistsquaredtwo / 1000.0 . "km (" . $coffset . ") from " . urldecode($_GET['place']) . " (" . urldecode($_GET['latitude']) . "," . urldecode($_GET['longitude']) .  ")</option></select>", $retmore);
 
              if ($gcddistsquared <= $gcddistsquaredthree) {
        $otz = new DateTimeZone("UTC"); // "Europe/London"
        $frombad="Tskhinvali"; // "youllneverfindthis";
        $tobad="Tbilisi";
        if (strpos($namename[$best1], "/Tskhinvali") !== false) {
          try {
            $tz = new DateTimeZone($nearname[$best1]);
           $frombad="youllneverfindthis"; } catch(Exception $tyuhg) {
            $frombad="Tskhinvali";
          }
        }
        $tz = new DateTimeZone(str_replace($frombad,$tobad,$nearname[$best1]));
        $origin_dt = new DateTime("now", $otz);
        $remote_dt = new DateTime("now", $tz);
        $dayofweek = $remote_dt->format('N') . " onclick=\"if (confirm('" . $remote_dt->format('D Y-m-d H:i:s') . "')) { window.open('//www.rjmprogramming.com.au/HTMLCSS/colour_wheel.html?mode=~/~', '_blank', 'top=100,left=100,width=800,height=800'); };\"";
        $cloc = $tz->getLocation(); $ctrycode = $cloc['country_code'];  $offset = ($tz->getOffset($remote_dt) - $otz->getOffset($origin_dt)) / 3600;
        if ($offset < 0) {
          $coffset=$offset;
        } else {
          $coffset="+" . $offset;
        }
               $ret=str_replace("</select>", "<option title='Next Nearest' value='" . $nearname[$best1] . "' data-cc='" . $ctrycode . "'>" . $nearname[$best1] . " in " . country_code_to_country($ctrycode) . " is " . $gcddistsquared / 1000.0 . "km (" . $coffset . ") from " . urldecode($_GET['place']) . " (" . urldecode($_GET['latitude']) . "," . urldecode($_GET['longitude']) .  ")</option></select>", $ret);
               $retmore=str_replace("</select>", "<option " . $gcddistsquaredll . " title='Next Nearest' value='" . $nearname[$best1] . "' data-cc='" . $ctrycode . "'>" . $nearname[$best1] . " in " . country_code_to_country($ctrycode) . " is " . $gcddistsquared / 1000.0 . "km (" . $coffset . ") from " . urldecode($_GET['place']) . " (" . urldecode($_GET['latitude']) . "," . urldecode($_GET['longitude']) .  ")</option></select>", $retmore);
        $otz = new DateTimeZone("UTC"); // "Europe/London"
        $frombad="Tskhinvali"; // "youllneverfindthis";
        $tobad="Tbilisi";
        if (strpos($namename[$best3], "/Tskhinvali") !== false) {
          try {
            $tz = new DateTimeZone($nearname[$best3]);
           $frombad="youllneverfindthis"; } catch(Exception $tyuhg) {
            $frombad="Tskhinvali";
          }
        }
        $tz = new DateTimeZone(str_replace($frombad,$tobad,$nearname[$best3]));
        $origin_dt = new DateTime("now", $otz);
        $remote_dt = new DateTime("now", $tz);
        $dayofweek = $remote_dt->format('N') . " onclick=\"if (confirm('" . $remote_dt->format('D Y-m-d H:i:s') . "')) { window.open('//www.rjmprogramming.com.au/HTMLCSS/colour_wheel.html?mode=~/~', '_blank', 'top=100,left=100,width=800,height=800'); };\"";
        $cloc = $tz->getLocation(); $ctrycode = $cloc['country_code'];  $offset = ($tz->getOffset($remote_dt) - $otz->getOffset($origin_dt)) / 3600;
        if ($offset < 0) {
          $coffset=$offset;
        } else {
          $coffset="+" . $offset;
        }
               $ret=str_replace("</select>", "<option title='Third Nearest' value='" . $nearname[$best3] . "' data-cc='" . $ctrycode . "'>" . $nearname[$best3] . " in " . country_code_to_country($ctrycode) . " is " . $gcddistsquaredthree / 1000.0 . "km (" . $coffset . ") from " . urldecode($_GET['place']) . " (" . urldecode($_GET['latitude']) . "," . urldecode($_GET['longitude']) .  ")</option></select>", $ret);
               $retmore=str_replace("</select>", "<option " . $gcddistsquaredthreell . " title='Third Nearest' value='" . $nearname[$best3] . "' data-cc='" . $ctrycode . "'>" . $nearname[$best3] . " in " . country_code_to_country($ctrycode) . " is " . $gcddistsquaredthree / 1000.0 . "km (" . $coffset . ") from " . urldecode($_GET['place']) . " (" . urldecode($_GET['latitude']) . "," . urldecode($_GET['longitude']) .  ")</option></select>", $retmore);
              } else {
        $otz = new DateTimeZone("UTC"); // "Europe/London"
        $frombad="Tskhinvali"; // "youllneverfindthis";
        $tobad="Tbilisi";
        if (strpos($namename[$best3], "/Tskhinvali") !== false) {
          try {
            $tz = new DateTimeZone($nearname[$best3]);
           $frombad="youllneverfindthis"; } catch(Exception $tyuhg) {
            $frombad="Tskhinvali";
          }
        }
        $tz = new DateTimeZone(str_replace($frombad,$tobad,$nearname[$best3]));
        $origin_dt = new DateTime("now", $otz);
        $remote_dt = new DateTime("now", $tz);
        $dayofweek = $remote_dt->format('N') . " onclick=\"if (confirm('" . $remote_dt->format('D Y-m-d H:i:s') . "')) { window.open('//www.rjmprogramming.com.au/HTMLCSS/colour_wheel.html?mode=~/~', '_blank', 'top=100,left=100,width=800,height=800'); };\"";
        $cloc = $tz->getLocation(); $ctrycode = $cloc['country_code'];  $offset = ($tz->getOffset($remote_dt) - $otz->getOffset($origin_dt)) / 3600;
        if ($offset < 0) {
          $coffset=$offset;
        } else {
          $coffset="+" . $offset;
        }
               $ret=str_replace("</select>", "<option title='Next Nearest' value='" . $nearname[$best3] . "' data-cc='" . $ctrycode . "'>" . $nearname[$best3] . " in " . country_code_to_country($ctrycode) . " is " . $gcddistsquaredthree / 1000.0 . "km (" . $coffset . ") from " . urldecode($_GET['place']) . " (" . urldecode($_GET['latitude']) . "," . urldecode($_GET['longitude']) .  ")</option></select>", $ret);
               $retmore=str_replace("</select>", "<option " . $gcddistsquaredthreell . " title='Next Nearest' value='" . $nearname[$best3] . "' data-cc='" . $ctrycode . "'>" . $nearname[$best3] . " in " . country_code_to_country($ctrycode) . " is " . $gcddistsquaredthree / 1000.0 . "km (" . $coffset . ") from " . urldecode($_GET['place']) . " (" . urldecode($_GET['latitude']) . "," . urldecode($_GET['longitude']) .  ")</option></select>", $retmore);
        $otz = new DateTimeZone("UTC"); // "Europe/London"
        $frombad="Tskhinvali"; // "youllneverfindthis";
        $tobad="Tbilisi";
        if (strpos($namename[$best1], "/Tskhinvali") !== false) {
          try {
            $tz = new DateTimeZone($nearname[$best1]);
           $frombad="youllneverfindthis"; } catch(Exception $tyuhg) {
            $frombad="Tskhinvali";
          }
        }
        $tz = new DateTimeZone(str_replace($frombad,$tobad,$nearname[$best1]));
        $origin_dt = new DateTime("now", $otz);
        $remote_dt = new DateTime("now", $tz);
        $dayofweek = $remote_dt->format('N') . " onclick=\"if (confirm('" . $remote_dt->format('D Y-m-d H:i:s') . "')) { window.open('//www.rjmprogramming.com.au/HTMLCSS/colour_wheel.html?mode=~/~', '_blank', 'top=100,left=100,width=800,height=800'); };\"";
        $cloc = $tz->getLocation(); $ctrycode = $cloc['country_code'];  $offset = ($tz->getOffset($remote_dt) - $otz->getOffset($origin_dt)) / 3600;
        if ($offset < 0) {
          $coffset=$offset;
        } else {
          $coffset="+" . $offset;
        }
               $ret=str_replace("</select>", "<option title='Third Nearest' value='" . $nearname[$best1] . "' data-cc='" . $ctrycode . "'>" . $nearname[$best1] . " in " . country_code_to_country($ctrycode) . " is " . $gcddistsquared / 1000.0 . "km (" . $coffset . ") from " . urldecode($_GET['place']) . " (" . urldecode($_GET['latitude']) . "," . urldecode($_GET['longitude']) .  ")</option></select>", $ret);
               $retmore=str_replace("</select>", "<option " . $gcddistsquaredll . " title='Third Nearest' value='" . $nearname[$best1] . "' data-cc='" . $ctrycode . "'>" . $nearname[$best1] . " in " . country_code_to_country($ctrycode) . " is " . $gcddistsquared / 1000.0 . "km (" . $coffset . ") from " . urldecode($_GET['place']) . " (" . urldecode($_GET['latitude']) . "," . urldecode($_GET['longitude']) .  ")</option></select>", $retmore);
              }

 
 
            } else {
        $otz = new DateTimeZone("UTC"); // "Europe/London"
        $frombad="Tskhinvali"; // "youllneverfindthis";
        $tobad="Tbilisi";
        if (strpos($namename[$best3], "/Tskhinvali") !== false) {
          try {
            $tz = new DateTimeZone($nearname[$best3]);
           $frombad="youllneverfindthis"; } catch(Exception $tyuhg) {
            $frombad="Tskhinvali";
          }
        }
        $tz = new DateTimeZone(str_replace($frombad,$tobad,$nearname[$best3]));
        $origin_dt = new DateTime("now", $otz);
        $remote_dt = new DateTime("now", $tz);
        $dayofweek = $remote_dt->format('N') . " onclick=\"if (confirm('" . $remote_dt->format('D Y-m-d H:i:s') . "')) { window.open('//www.rjmprogramming.com.au/HTMLCSS/colour_wheel.html?mode=~/~', '_blank', 'top=100,left=100,width=800,height=800'); };\"";
        $cloc = $tz->getLocation(); $ctrycode = $cloc['country_code'];  $offset = ($tz->getOffset($remote_dt) - $otz->getOffset($origin_dt)) / 3600;
        if ($offset < 0) {
          $coffset=$offset;
        } else {
          $coffset="+" . $offset;
        }
              $ret=str_replace("</select>", "<option title='Nearest' value='" . $nearname[$best3] . "' data-cc='" . $ctrycode . "'>" . $nearname[$best3] . " in " . country_code_to_country($ctrycode) . " is " . $gcddistsquaredthree / 1000.0 . "km (" . $coffset . ") from " . urldecode($_GET['place']) . " (" . urldecode($_GET['latitude']) . "," . urldecode($_GET['longitude']) .  ")</option></select>", $ret);
              $retmore=str_replace("</select>", "<option " . $gcddistsquaredthreell . " title='Nearest' value='" . $nearname[$best3] . "' data-cc='" . $ctrycode . "'>" . $nearname[$best3] . " in " . country_code_to_country($ctrycode) . " is " . $gcddistsquaredthree / 1000.0 . "km (" . $coffset . ") from " . urldecode($_GET['place']) . " (" . urldecode($_GET['latitude']) . "," . urldecode($_GET['longitude']) .  ")</option></select>", $retmore);
              if ($gcddistsquared <= $gcddistsquaredtwo) {
        $otz = new DateTimeZone("UTC"); // "Europe/London"
        $frombad="Tskhinvali"; // "youllneverfindthis";
        $tobad="Tbilisi";
        if (strpos($namename[$best1], "/Tskhinvali") !== false) {
          try {
            $tz = new DateTimeZone($nearname[$best1]);
           $frombad="youllneverfindthis"; } catch(Exception $tyuhg) {
            $frombad="Tskhinvali";
          }
        }
        $tz = new DateTimeZone(str_replace($frombad,$tobad,$nearname[$best1]));
        $origin_dt = new DateTime("now", $otz);
        $remote_dt = new DateTime("now", $tz);
        $cloc = $tz->getLocation(); $ctrycode = $cloc['country_code'];  $offset = ($tz->getOffset($remote_dt) - $otz->getOffset($origin_dt)) / 3600;
        $dayofweek = $remote_dt->format('N') . " onclick=\"if (confirm('" . $remote_dt->format('D Y-m-d H:i:s') . "')) { window.open('//www.rjmprogramming.com.au/HTMLCSS/colour_wheel.html?mode=~/~', '_blank', 'top=100,left=100,width=800,height=800'); };\"";
        if ($offset < 0) {
          $coffset=$offset;
        } else {
          $coffset="+" . $offset;
        }
               $ret=str_replace("</select>", "<option title='Next Nearest' value='" . $nearname[$best1] . "' data-cc='" . $ctrycode . "'>" . $nearname[$best1] . " in " . country_code_to_country($ctrycode) . " is " . $gcddistsquared / 1000.0 . "km (" . $coffset . ") from " . urldecode($_GET['place']) . " (" . urldecode($_GET['latitude']) . "," . urldecode($_GET['longitude']) .  ")</option></select>", $ret);
               $retmore=str_replace("</select>", "<option " . $gcddistsquaredll . " title='Next Nearest' value='" . $nearname[$best1] . "' data-cc='" . $ctrycode . "'>" . $nearname[$best1] . " in " . country_code_to_country($ctrycode) . " is " . $gcddistsquared / 1000.0 . "km (" . $coffset . ") from " . urldecode($_GET['place']) . " (" . urldecode($_GET['latitude']) . "," . urldecode($_GET['longitude']) .  ")</option></select>", $retmore);
        $otz = new DateTimeZone("UTC"); // "Europe/London"
        $frombad="Tskhinvali"; // "youllneverfindthis";
        $tobad="Tbilisi";
        if (strpos($namename[$best2], "/Tskhinvali") !== false) {
          try {
            $tz = new DateTimeZone($nearname[$best2]);
           $frombad="youllneverfindthis"; } catch(Exception $tyuhg) {
            $frombad="Tskhinvali";
          }
        }
        $tz = new DateTimeZone(str_replace($frombad,$tobad,$nearname[$best2]));
        $origin_dt = new DateTime("now", $otz);
        $remote_dt = new DateTime("now", $tz);
        $dayofweek = $remote_dt->format('N') . " onclick=\"if (confirm('" . $remote_dt->format('D Y-m-d H:i:s') . "')) { window.open('//www.rjmprogramming.com.au/HTMLCSS/colour_wheel.html?mode=~/~', '_blank', 'top=100,left=100,width=800,height=800'); };\"";
        $cloc = $tz->getLocation(); $ctrycode = $cloc['country_code'];  $offset = ($tz->getOffset($remote_dt) - $otz->getOffset($origin_dt)) / 3600;
        if ($offset < 0) {
          $coffset=$offset;
        } else {
          $coffset="+" . $offset;
        }
               $ret=str_replace("</select>", "<option title='Third Nearest' value='" . $nearname[$best2] . "' data-cc='" . $ctrycode . "'>" . $nearname[$best2] . " in " . country_code_to_country($ctrycode) . " is " . $gcddistsquaredtwo / 1000.0 . "km (" . $coffset . ") from " . urldecode($_GET['place']) . " (" . urldecode($_GET['latitude']) . "," . urldecode($_GET['longitude']) .  ")</option></select>", $ret);
               $retmore=str_replace("</select>", "<option " . $gcddistsquaredtwoll . " title='Third Nearest' value='" . $nearname[$best2] . "' data-cc='" . $ctrycode . "'>" . $nearname[$best2] . " in " . country_code_to_country($ctrycode) . " is " . $gcddistsquaredtwo / 1000.0 . "km (" . $coffset . ") from " . urldecode($_GET['place']) . " (" . urldecode($_GET['latitude']) . "," . urldecode($_GET['longitude']) .  ")</option></select>", $retmore);
              } else {
        $otz = new DateTimeZone("UTC"); // "Europe/London"
        $frombad="Tskhinvali"; // "youllneverfindthis";
        $tobad="Tbilisi";
        if (strpos($namename[$best2], "/Tskhinvali") !== false) {
          try {
            $tz = new DateTimeZone($nearname[$best2]);
           $frombad="youllneverfindthis"; } catch(Exception $tyuhg) {
            $frombad="Tskhinvali";
          }
        }
        $tz = new DateTimeZone(str_replace($frombad,$tobad,$nearname[$best2]));
        $origin_dt = new DateTime("now", $otz);
        $remote_dt = new DateTime("now", $tz);
        $dayofweek = $remote_dt->format('N') . " onclick=\"if (confirm('" . $remote_dt->format('D Y-m-d H:i:s') . "')) { window.open('//www.rjmprogramming.com.au/HTMLCSS/colour_wheel.html?mode=~/~', '_blank', 'top=100,left=100,width=800,height=800'); };\"";
        $cloc = $tz->getLocation(); $ctrycode = $cloc['country_code'];  $offset = ($tz->getOffset($remote_dt) - $otz->getOffset($origin_dt)) / 3600;
        if ($offset < 0) {
          $coffset=$offset;
        } else {
          $coffset="+" . $offset;
        }
               $ret=str_replace("</select>", "<option title='Next Nearest' value='" . $nearname[$best2] . "' data-cc='" . $ctrycode . "'>" . $nearname[$best2] . " in " . country_code_to_country($ctrycode) . " is " . $gcddistsquaredtwo / 1000.0 . "km (" . $coffset . ") from " . urldecode($_GET['place']) . " (" . urldecode($_GET['latitude']) . "," . urldecode($_GET['longitude']) .  ")</option></select>", $ret);
               $retmore=str_replace("</select>", "<option " . $gcddistsquaredtwoll . " title='Next Nearest' value='" . $nearname[$best2] . "' data-cc='" . $ctrycode . "'>" . $nearname[$best2] . " in " . country_code_to_country($ctrycode) . " is " . $gcddistsquaredtwo / 1000.0 . "km (" . $coffset . ") from " . urldecode($_GET['place']) . " (" . urldecode($_GET['latitude']) . "," . urldecode($_GET['longitude']) .  ")</option></select>", $retmore);
        $otz = new DateTimeZone("UTC"); // "Europe/London"
        $frombad="Tskhinvali"; // "youllneverfindthis";
        $tobad="Tbilisi";
        if (strpos($namename[$best1], "/Tskhinvali") !== false) {
          try {
            $tz = new DateTimeZone($nearname[$best1]);
           $frombad="youllneverfindthis"; } catch(Exception $tyuhg) {
            $frombad="Tskhinvali";
          }
        }
        $tz = new DateTimeZone(str_replace($frombad,$tobad,$nearname[$best1]));
        $origin_dt = new DateTime("now", $otz);
        $remote_dt = new DateTime("now", $tz);
        $dayofweek = $remote_dt->format('N') . " onclick=\"if (confirm('" . $remote_dt->format('D Y-m-d H:i:s') . "')) { window.open('//www.rjmprogramming.com.au/HTMLCSS/colour_wheel.html?mode=~/~', '_blank', 'top=100,left=100,width=800,height=800'); };\"";
        $cloc = $tz->getLocation(); $ctrycode = $cloc['country_code'];  $offset = ($tz->getOffset($remote_dt) - $otz->getOffset($origin_dt)) / 3600;
        if ($offset < 0) {
          $coffset=$offset;
        } else {
          $coffset="+" . $offset;
        }
               $ret=str_replace("</select>", "<option title='Third Nearest' value='" . $nearname[$best1] . "' data-cc='" . $ctrycode . "'>" . $nearname[$best1] . " in " . country_code_to_country($ctrycode) . " is " . $gcddistsquared / 1000.0 . "km (" . $coffset . ") from " . urldecode($_GET['place']) . " (" . urldecode($_GET['latitude']) . "," . urldecode($_GET['longitude']) .  ")</option></select>", $ret);
               $retmore=str_replace("</select>", "<option " . $gcddistsquaredll . " title='Third Nearest' value='" . $nearname[$best1] . "' data-cc='" . $ctrycode . "'>" . $nearname[$best1] . " in " . country_code_to_country($ctrycode) . " is " . $gcddistsquared / 1000.0 . "km (" . $coffset . ") from " . urldecode($_GET['place']) . " (" . urldecode($_GET['latitude']) . "," . urldecode($_GET['longitude']) .  ")</option></select>", $retmore);
              }
            }
          } else if ($gcddistsquared <= $gcddistsquaredtwo) {
        $otz = new DateTimeZone("UTC"); // "Europe/London"
        $frombad="Tskhinvali"; // "youllneverfindthis";
        $tobad="Tbilisi";
        if (strpos($namename[$best1], "/Tskhinvali") !== false) {
          try {
            $tz = new DateTimeZone($nearname[$best1]);
           $frombad="youllneverfindthis"; } catch(Exception $tyuhg) {
            $frombad="Tskhinvali";
          }
        }
        $tz = new DateTimeZone(str_replace($frombad,$tobad,$nearname[$best1]));
        $origin_dt = new DateTime("now", $otz);
        $remote_dt = new DateTime("now", $tz);
        $dayofweek = $remote_dt->format('N') . " onclick=\"if (confirm('" . $remote_dt->format('D Y-m-d H:i:s') . "')) { window.open('//www.rjmprogramming.com.au/HTMLCSS/colour_wheel.html?mode=~/~', '_blank', 'top=100,left=100,width=800,height=800'); };\"";
        $cloc = $tz->getLocation(); $ctrycode = $cloc['country_code'];  $offset = ($tz->getOffset($remote_dt) - $otz->getOffset($origin_dt)) / 3600;
        if ($offset < 0) {
          $coffset=$offset;
        } else {
          $coffset="+" . $offset;
        }
            $ret=str_replace("</select>", "<option title='Nearest' value='" . $nearname[$best1] . "' data-cc='" . $ctrycode . "'>" . $nearname[$best1] . " in " . country_code_to_country($ctrycode) . " is " . $gcddistsquared / 1000.0 . "km (" . $coffset . ") from " . urldecode($_GET['place']) . " (" . urldecode($_GET['latitude']) . "," . urldecode($_GET['longitude']) .  ")</option></select>", $ret);
            $retmore=str_replace("</select>", "<option " . $gcddistsquaredll . " title='Nearest' value='" . $nearname[$best1] . "' data-cc='" . $ctrycode . "'>" . $nearname[$best1] . " in " . country_code_to_country($ctrycode) . " is " . $gcddistsquared / 1000.0 . "km (" . $coffset . ") from " . urldecode($_GET['place']) . " (" . urldecode($_GET['latitude']) . "," . urldecode($_GET['longitude']) .  ")</option></select>", $retmore);
        $otz = new DateTimeZone("UTC"); // "Europe/London"
        $frombad="Tskhinvali"; // "youllneverfindthis";
        $tobad="Tbilisi";
        if (strpos($namename[$best2], "/Tskhinvali") !== false) {
          try {
            $tz = new DateTimeZone($nearname[$best2]);
           $frombad="youllneverfindthis"; } catch(Exception $tyuhg) {
            $frombad="Tskhinvali";
          }
        }
        $tz = new DateTimeZone(str_replace($frombad,$tobad,$nearname[$best2]));
        $origin_dt = new DateTime("now", $otz);
        $remote_dt = new DateTime("now", $tz);
        $dayofweek = $remote_dt->format('N') . " onclick=\"if (confirm('" . $remote_dt->format('D Y-m-d H:i:s') . "')) { window.open('//www.rjmprogramming.com.au/HTMLCSS/colour_wheel.html?mode=~/~', '_blank', 'top=100,left=100,width=800,height=800'); };\"";
        $cloc = $tz->getLocation(); $ctrycode = $cloc['country_code'];  $offset = ($tz->getOffset($remote_dt) - $otz->getOffset($origin_dt)) / 3600;
        if ($offset < 0) {
          $coffset=$offset;
        } else {
          $coffset="+" . $offset;
        }
            $ret=str_replace("</select>", "<option title='Next Nearest' value='" . $nearname[$best2] . "' data-cc='" . $ctrycode . "'>" . $nearname[$best2] . " in " . country_code_to_country($ctrycode) . " is " . $gcddistsquaredtwo / 1000.0 . "km (" . $coffset . ") from " . urldecode($_GET['place']) . " (" . urldecode($_GET['latitude']) . "," . urldecode($_GET['longitude']) .  ")</option></select>", $ret);
            $retmore=str_replace("</select>", "<option " . $gcddistsquaredtwoll . " title='Next Nearest' value='" . $nearname[$best2] . "' data-cc='" . $ctrycode . "'>" . $nearname[$best2] . " in " . country_code_to_country($ctrycode) . " is " . $gcddistsquaredtwo / 1000.0 . "km (" . $coffset . ") from " . urldecode($_GET['place']) . " (" . urldecode($_GET['latitude']) . "," . urldecode($_GET['longitude']) .  ")</option></select>", $retmore);
          } else {
        $otz = new DateTimeZone("UTC"); // "Europe/London"
        $frombad="Tskhinvali"; // "youllneverfindthis";
        $tobad="Tbilisi";
        if (strpos($namename[$best2], "/Tskhinvali") !== false) {
          try {
            $tz = new DateTimeZone($nearname[$best2]);
           $frombad="youllneverfindthis"; } catch(Exception $tyuhg) {
            $frombad="Tskhinvali";
          }
        }
        $tz = new DateTimeZone(str_replace($frombad,$tobad,$nearname[$best2]));
        $origin_dt = new DateTime("now", $otz);
        $remote_dt = new DateTime("now", $tz);
        $dayofweek = $remote_dt->format('N') . " onclick=\"if (confirm('" . $remote_dt->format('D Y-m-d H:i:s') . "')) { window.open('//www.rjmprogramming.com.au/HTMLCSS/colour_wheel.html?mode=~/~', '_blank', 'top=100,left=100,width=800,height=800'); };\"";
        $cloc = $tz->getLocation(); $ctrycode = $cloc['country_code'];  $offset = ($tz->getOffset($remote_dt) - $otz->getOffset($origin_dt)) / 3600;
        if ($offset < 0) {
          $coffset=$offset;
        } else {
          $coffset="+" . $offset;
        }
            $ret=str_replace("</select>", "<option title='Nearest' value='" . $nearname[$best2] . "' data-cc='" . $ctrycode . "'>" . $nearname[$best2] . " in " . country_code_to_country($ctrycode) . " is " . $gcddistsquaredtwo / 1000.0 . "km (" . $coffset . ") from " . urldecode($_GET['place']) . " (" . urldecode($_GET['latitude']) . "," . urldecode($_GET['longitude']) .  ")</option></select>", $ret);
            $retmore=str_replace("</select>", "<option " . $gcddistsquaredtwoll . " title='Nearest' value='" . $nearname[$best2] . "' data-cc='" . $ctrycode . "'>" . $nearname[$best2] . " in " . country_code_to_country($ctrycode) . " is " . $gcddistsquaredtwo / 1000.0 . "km (" . $coffset . ") from " . urldecode($_GET['place']) . " (" . urldecode($_GET['latitude']) . "," . urldecode($_GET['longitude']) .  ")</option></select>", $retmore);
        $otz = new DateTimeZone("UTC"); // "Europe/London"
        $frombad="Tskhinvali"; // "youllneverfindthis";
        $tobad="Tbilisi";
        if (strpos($namename[$best1], "/Tskhinvali") !== false) {
          try {
            $tz = new DateTimeZone($nearname[$best1]);
           $frombad="youllneverfindthis"; } catch(Exception $tyuhg) {
            $frombad="Tskhinvali";
          }
        }
        $tz = new DateTimeZone(str_replace($frombad,$tobad,$nearname[$best1]));
        $origin_dt = new DateTime("now", $otz);
        $remote_dt = new DateTime("now", $tz);
        $dayofweek = $remote_dt->format('N') . " onclick=\"if (confirm('" . $remote_dt->format('D Y-m-d H:i:s') . "')) { window.open('//www.rjmprogramming.com.au/HTMLCSS/colour_wheel.html?mode=~/~', '_blank', 'top=100,left=100,width=800,height=800'); };\"";
        $cloc = $tz->getLocation(); $ctrycode = $cloc['country_code'];  $offset = ($tz->getOffset($remote_dt) - $otz->getOffset($origin_dt)) / 3600;
        if ($offset < 0) {
          $coffset=$offset;
        } else {
          $coffset="+" . $offset;
        }
            $ret=str_replace("</select>", "<option title='Next Nearest' value='" . $nearname[$best1] . "' data-cc='" . $ctrycode . "'>" . $nearname[$best1] . " in " . country_code_to_country($ctrycode) . " is " . $gcddistsquared / 1000.0 . "km (" . $coffset . ") from " . urldecode($_GET['place']) . " (" . urldecode($_GET['latitude']) . "," . urldecode($_GET['longitude']) .  ")</option></select>", $ret);
            $retmore=str_replace("</select>", "<option " . $gcddistsquaredll . " title='Next Nearest' value='" . $nearname[$best1] . "' data-cc='" . $ctrycode . "'>" . $nearname[$best1] . " in " . country_code_to_country($ctrycode) . " is " . $gcddistsquared / 1000.0 . "km (" . $coffset . ") from " . urldecode($_GET['place']) . " (" . urldecode($_GET['latitude']) . "," . urldecode($_GET['longitude']) .  ")</option></select>", $retmore);
          } 
        } else {
        $otz = new DateTimeZone("UTC"); // "Europe/London"
        $frombad="Tskhinvali"; // "youllneverfindthis";
        $tobad="Tbilisi";
        if (strpos($namename[$best1], "/Tskhinvali") !== false) {
          try {
            $tz = new DateTimeZone($nearname[$best1]);
           $frombad="youllneverfindthis"; } catch(Exception $tyuhg) {
            $frombad="Tskhinvali";
          }
        }
        $tz = new DateTimeZone(str_replace($frombad,$tobad,$nearname[$best1]));
        $origin_dt = new DateTime("now", $otz);
        $remote_dt = new DateTime("now", $tz);
        $dayofweek = $remote_dt->format('N') . " onclick=\"if (confirm('" . $remote_dt->format('D Y-m-d H:i:s') . "')) { window.open('//www.rjmprogramming.com.au/HTMLCSS/colour_wheel.html?mode=~/~', '_blank', 'top=100,left=100,width=800,height=800'); };\"";
        $cloc = $tz->getLocation(); $ctrycode = $cloc['country_code'];  $offset = ($tz->getOffset($remote_dt) - $otz->getOffset($origin_dt)) / 3600;
        if ($offset < 0) {
          $coffset=$offset;
        } else {
          $coffset="+" . $offset;
        }
          $ret=str_replace("</select>", "<option title='Nearest' value='" . $nearname[$best1] . "' data-cc='" . $ctrycode . "'>" . $nearname[$best1] . " is " . $gcddistsquared / 1000.0 . "km (" . $coffset . ") from " . urldecode($_GET['place']) . " (" . urldecode($_GET['latitude']) . "," . urldecode($_GET['longitude']) .  ")</option></select>", $ret);
          $retmore=str_replace("</select>", "<option " . $gcddistsquaredll . " title='Nearest' value='" . $nearname[$best1] . "' data-cc='" . $ctrycode . "'>" . $nearname[$best1] . " is " . $gcddistsquared / 1000.0 . "km (" . $coffset . ") from " . urldecode($_GET['place']) . " (" . urldecode($_GET['latitude']) . "," . urldecode($_GET['longitude']) .  ")</option></select>", $ret);
        }
  if ($pd != "") {
        
          $ppd='<br><a target="_blank" style="background-color:pink;" href="//www.rjmprogramming.com.au/HTMLCSS/other_side_of_the_world.htm?place=' . urlencode($nearname[$best1]) . '&altplace=&altplacethree=" title="WeatherViaOtherSideOfTheWorld">' . $nearname[$best1] . " in " . country_code_to_country($ctrycode) . " is " . $gcddistsquared / 1000.0 . "km (" . $coffset . ") from " . urldecode($_GET['place']) . '</a><br><div';
          if ($gcddistsquaredtwo >= 0.0) $ppd=str_replace("&altplace=", "&altplace=" . urlencode($nearname[$best2]), $ppd);
          if ($gcddistsquaredthree >= 0.0) $ppd=str_replace("&altplacethree=", "&altplacethree=" . urlencode($nearname[$best3]), $ppd);
          $pd=substr($pd,0,1) . str_replace('<div', $ppd, substr($pd,1));
          
          if ($gcddistsquaredtwo >= 0.0) {
          $ppd='<br><a target="_blank" style="background-color:pink;" href="//www.rjmprogramming.com.au/HTMLCSS/other_side_of_the_world.htm?place=' . urlencode($nearname[$best2]) . '&altplace=&altplacethree=" title="WeatherViaOtherSideOfTheWorld">' . $nearname[$best2] . " in " . country_code_to_country($ctrycode) . " is " . $gcddistsquaredtwo / 1000.0 . "km from " . urldecode($_GET['place']) . '</a><br><div';
          $ppd=str_replace("&altplace=", "&altplace=" . urlencode($nearname[$best1]), $ppd);
          if ($gcddistsquaredthree >= 0.0) $ppd=str_replace("&altplacethree=", "&altplacethree=" . urlencode($nearname[$best3]), $ppd);
          $pd=substr($pd,0,1) . str_replace('<div', $ppd, substr($pd,1));
          }
          
          if ($gcddistsquaredthree >= 0.0) {
          $ppd='<br><a target="_blank" style="background-color:pink;" href="//www.rjmprogramming.com.au/HTMLCSS/other_side_of_the_world.htm?place=' . urlencode($nearname[$best3]) . '&altplace=&altplacethree=" title="WeatherViaOtherSideOfTheWorld">' . $nearname[$best3] . " in " . country_code_to_country($ctrycode) . " is " . $gcddistsquaredthree / 1000.0 . "km from " . urldecode($_GET['place']) . '</a><br><div';
          $ppd=str_replace("&altplace=", "&altplace=" . urlencode($nearname[$best1]), $ppd);
          $ppd=str_replace("&altplacethree=", "&altplacethree=" . urlencode($nearname[$best2]), $ppd);
          $pd=substr($pd,0,1) . str_replace('<div', $ppd, substr($pd,1));
          }
          echo "<!doctype html><html><body onload=\"if (('' + top.document.URL).replace('/countries.','/regions.').indexOf('/regions.') != -1) { if (document.getElementById('snearest')) { document.getElementById('snearest').style.left='0px';   }   }\" style=background-color:yellow;><h1>Nearest Timezones ... RJM Programming ... April, 2018 ... <a target=_blank title='Thanks to ...' href='//php.net/manual/en/datetimezone.getlocation.php'>//php.net/manual/en/datetimezone.getlocation.php</a></h1><br><br><br>" . $pd . $ret . "</body></html>";
          exit;
  }
        if ($retmore == "") { $retmore=$ret; }
        echo "<!doctype html><html><head><scr" . "ipt type='text/javascript' src='/HTMLCSS/countries.js?rand=" . rand(0,16756453) . "'></scr" . "ipt><scr" . "ipt type='text/javascript'> function lookoutfortop() { if (parent.document.getElementById('getmell')) { parent.document.getElementById('nearest').innerHTML=\"" . $pd . $retmore . "\";  } else if (top.document.getElementById('nearest')) {  if (top.document.getElementById('getmell')) {  top.document.getElementById('nearest').innerHTML=\"" . $pd . $retmore . "\";  } else { top.document.getElementById('nearest').innerHTML=tzagain(\"" . $pd . $ret . "\"); }  top.window.scrollTo(0,0);  } else { document.body.innerHTML=tzagain(\"" . $pd . str_replace(':70px;',':0px;',str_replace(':350px;',':0px;',$ret)) . "\");  }  if (('' + top.document.URL).replace('/countries.','/regions.').indexOf('/regions.') != -1) { if (document.getElementById('snearest')) { document.getElementById('snearest').style.left='0px';   }   } } </scr" . "ipt></head><body onload='lookoutfortop();'" . $backfullstyle . ">" . $pd . $ret . "</body></html>"; 
        exit;
      }
    }
   }
  }
}  

function toeng($indow,$zn) {
  return str_replace("7", "Sunday", str_replace("1", "Monday", str_replace("2", "Tuesday", str_replace("3", "Wednesday", str_replace("4", "Thursday", str_replace("5", "Friday", str_replace("6", "Saturday", ("" . substr($indow,0,1))))))))) . str_replace("~/~", $zn, substr($indow,1));
}

function great_circle_distance($talis, $gnolis, $latis, $longis) {
  $ourdist=0.0;
  $rgnol=(($gnolis) * pi() / 180.0);
  $rtal=(($talis) * pi() / 180.0);
  $rlong=(($longis) * pi() / 180.0);
  $rlat=(($latis) * pi() / 180.0);


  $deltalong = abs(((($gnolis)-($longis)) * pi() / 180.0));


  $acof = (sin($rtal) * sin($rlat)) + (cos($rtal) * cos($rlat) * cos($deltalong)); // via //en.wikipedia.org/wiki/Great-circle_distance ... thanks

  $ourdist = (round((acos($acof) * 6371000.0) + 0.00001) * 100) / 100;
  return $ourdist;
}

function localtimefromtogmt($indate, $fromtz, $totz) { // thanks to //stackoverflow.com/questions/13698779/timezone-with-dst-handling-by-php
  global $lastTime, $lastnonutc, $rightnow, $bestemojicodepoint, $thisemojicodepoint, $gmtdatetimeis, $gmthhris, $gmthris, $gmtminis, $bestemojiclass, $thisemojiclass;
  $thisemojiclass="";
  if ($indate != "now" && (strpos($indate, "+") !== false || strpos($indate, "-") !== false || strlen($indate) <= 5)) {
  date_default_timezone_set('Australi' . 'a/Perth'); // YOUR timezone, of the server
  $date = new DateTime("now", new DateTimeZone('Australi' . 'a/Perth')); // USER's timezone
  $hoff=intval(str_replace('+','',$indate)) * 60;
  if ($hoff >= 0) {
      $minis=($hoff % 60);
      $hris=(($hoff - $minis) / 60);
      
      if (($gmtminis + $minis) >= 60) {
      if (((1 + $hris + $gmthhris) % 24) >= 12) {
        $thisemojiclass=" nighttime";
      }
        $hris=($hris % 12) + 1;
        $minis=(($gmtminis + $minis) % 60);
      } else {
      if ((($hris + $gmthhris) % 24) >= 12) {
        $thisemojiclass=" nighttime";
      }
        $minis=($gmtminis + $minis);
      } 
      $hris=($gmthhris + $hris);
      if ($hris > 12) {
        $hris=($hris % 12);
      }
  } else {
      $minis=((0 - $hoff) % 60);
      $hris=(((0 - $hoff) - $minis) / 60);

      if (($gmtminis - $minis) < 0) {
      if (((-1 - $hris + 24 + $gmthhris) % 24) >= 12) {
        $thisemojiclass=" nighttime";
      }
        $hris=($hris % 12) - 1;
        if ($hris == 0) $hris=12;
        $minis=(($gmtminis - $minis) + 60);
      } else {
      if ((($gmthhris - $hris + 24) % 24) >= 12) { 
        $thisemojiclass=" nighttime";
      }
        $minis=($gmtminis - $minis);
      } 
      $hris=($gmthris - $hris);
      if ($hris < 1) $hris=($hris + 12);
  }
  


    if ($minis > 45 && $hris == 12) {
      $thisemojicodepoint=128336;
    } else if ($minis >= 45) {
      $thisemojicodepoint=128336 + $hris;
    } else if ($minis <= 15) {
      $thisemojicodepoint=128335 + $hris;
    } else {
      $thisemojicodepoint=128347 + $hris;
    }
   
   $zzb="";
   if ($minis < 10) $zzb="0";
   if ($thisemojiclass == " nighttime" && $hris < 12) {
   $lastTime=($hris + 12) . ':' . $zzb . $minis;
   } else {
   $lastTime=$hris . ':' . $zzb . $minis;
   }

  //echo $thisemojicodepoint;
  //exit;
  } else {
  date_default_timezone_set('Australi' . 'a/Perth'); // YOUR timezone, of the server
  if ($fromtz == 'UTC') {
   $date = new DateTime($indate, new DateTimeZone('UTC')); // USER's timezone
   $date->setTimezone(new DateTimeZone($totz));
  } else {
   //echo $fromtz;
   //exit;
   if ($fromtz == 'Australi' . 'a/Perth') {
   $date = new DateTime($indate);
   } else {
   echo '*' . $fromtz . '*';
   exit;
   $date = new DateTime($indate, new DateTimeZone($fromtz)); // USER's timezone
   }
   $date->setTimezone(new DateTimeZone('UTC'));
   if ($totz != 'UTC') {
     $lastnonutc=$totz;
     $date = localtimefromtogmt($date, 'UTC', $totz);
   } else {
// 1  o'clock is &#128336;
// 2  o'clock is &#128337;
// 12 o'clock is &#128347;
//  2:30 is &#128349;
// 11:30 is &#128358;
// 12:30 is &#128359;
    $gmtdatetimeis=$date->format('D Y-m-d H:i:s') . " GMT at time of first display";
    $hrntis=intval($date->format('H'));
    $gmthhris=$hrntis;
    $bestemojiclass="";
    if ($hrntis >= 12) $bestemojiclass=" nighttime";
    $hris=intval($date->format('h'));
    $minis=intval($date->format('i'));
    $gmthris=$hris;
    $gmtminis=$minis;


    if ($minis > 45 && $hris == 12) {
      $bestemojicodepoint=128336;
    } else if ($hris == 12 && $minis <= 15) {
      $bestemojicodepoint=128347;
    } else if ($hris == 12) {
      $bestemojicodepoint=128359;
    } else if ($minis >= 45 && $hris < 12) {
      $bestemojicodepoint=128336 + $hris;
    } else if ($minis <= 15 && $hris < 12) {
      $bestemojicodepoint=128335 + $hris;
    } else if ($minis >= 45) {
      $bestemojicodepoint=128324 + $hris;
    } else if ($minis <= 15) {
      $bestemojicodepoint=128323 + $hris;
    } else if ($hris < 12) {
      $bestemojicodepoint=128347 + $hris;
    } else {
      $bestemojicodepoint=128335 + $hris;
    }

   $zzb="";
   if ($minis < 10) $zzb="0";
   if ($bestemojiclass == " nighttime" && $hris < 12) {
   $lastTime=($hris + 12) . ':' . $zzb . $minis;
   } else {
   $lastTime=$hris . ':' . $zzb . $minis;
   }

    //echo $bestemojicodepoint;
   }
  }
  }
  return $date; //->format('Y-m-d H:i:s');
}

function ourtimezonelist($ididea) { // thanks to //php.net/manual/en/function.timezone-identifiers-list.php
  global $lastTime, $rightnow, $kcnt, $formstuff, $hprefix, $hsuffix, $sellong;
  $tzn="";
  $selstuff="";
  if (isset($_GET['tzname'])) {
    $tzn=urldecode($_GET['tzname']);
    if (strpos($tzn,"/") === false && strpos($tzn,"-") === false && strpos($tzn,"+") === false && $tzn != "") $tzn="+" . trim($tzn);
    //echo $tzn;
    //exit;
  }
  
  if ($ididea == "szt" && $tzn != "") {
  $places="Places";
  if (strpos($hprefix, "<table") !== false) {
  $prefix="<table" . explode("<table",$hprefix)[1] . "<table><tbody><tr><td>";
  //$prefix="<table><tbody><tr><td>";
  } else { 
  $prefix="<table><tbody><tr><td>";
  }
  $hprefix="";
  $suffix="";
  $ourmapstuff="";
  $yourmapstuff="";
  $formstuff="";
  $extrad="";
  $timezone_abbreviations = DateTimeZone::listAbbreviations();
  foreach ($timezone_abbreviations["est"] as $tzo) {
   $betteroff=0;
   $okay=false;
   //echo str_replace("+","",urldecode($_GET['tzname'])) . ' ' . ('' . ($tzo['offset'] / 3600)) . '   ' . $tzo['timezone_id'];
   //exit;
   //echo $tzn . ' ' . $tzo['timezone_id'];
   //exit;
   //echo (str_replace("%2B","+",$_GET['tzname']));
   //exit;
  //echo (3600 * str_replace("+","",$_GET['tzname'])) . " " . $tzo['offset'];
  //exit;
   if (strpos($tzo['timezone_id'], $tzn) !== false) {
    $tz = new DateTimeZone($tzo['timezone_id']);
    $bnow = new DateTime(null, $tz);
    $betteroff=$bnow->getOffset();
    //echo "betteroff=" . $betteroff . " And tzo[offset]=" . $tzo['offset'] . " ";
    $okay=true;
    //if (strpos($tzo['timezone_id'], "Auckland") !== false) {
    // echo "A " . $tzn . ' ' . $tzo['timezone_id'];
    // exit;
    //}
   } else if (str_replace("+","",urldecode($_GET['tzname'])) == ('' . ($tzo['offset'] / 3600))) {
    $tz = new DateTimeZone($tzo['timezone_id']);
    $bnow = new DateTime(null, $tz);
    $betteroff=$bnow->getOffset();
    //echo "betteroff=" . $betteroff . " And tzo[offset]=" . $tzo['offset'] . " ";
    $okay=true;
    //if (strpos($tzo['timezone_id'], "Auckland") !== false) {
    // echo "B " . $tzn . ' ' . $tzo['timezone_id'];
    // exit;
    //}
   } //else {
    //if (strpos($tzo['timezone_id'], "Auckland") !== false) {
    // echo "C " . $tzo['offset'] . " " . $tzn . ' ' . $tzo['timezone_id'];
    // exit;
    //}
   //}
   
   if ($okay) {
    $zoneName = $tzo['timezone_id'];
    $loc = $tz->getLocation();
    if ($loc[latitude] != 0 || $loc[longitude] != 0) {
    if ($betteroff < 0) {
     $coffset=($betteroff / 3600);
    } else {
     $coffset="+" . ($betteroff / 3600);
    }
    //echo "bEtteroff=" . $betteroff . " And coffset=" . $coffset . " ";
    //if ($tzo['offset'] < 0) {
    // $coffset=($tzo['offset'] / 3600);
    //} else {
    // $coffset="+" . ($tzo['offset'] / 3600);
    //}
    $zbits=explode("/",$zoneName);
    if ($ourmapstuff == "") {
      $formstuff="";
      //$ourzoneName=$zoneName;
      if (isset($_GET['lat']) && isset($_GET['long']) && isset($_GET['place'])) {
       //$places=$_GET['place'];
       //$zbits[-1 + sizeof($zbits)]=$places;
       //$ourzoneName=$places;
       //$loc[latitude]=urldecode($_GET['lat']);
       //$loc[longitude]=urldecode($_GET['long']);
       $wlinkh="";
       if (isset($_GET['wlink'])) $wlinkh="<input type=\"hidden\" name=\"wlink\" value=\"" . urldecode($_GET['wlink']) . "\"></input>"; 
       //localtimefromtogmt(('' . $tzo['offset'] / 3600),  'Australi' . 'a/Perth', 'UTC');
       //if ($rightnow != "") $wlinkh.="<input type=\"hidden\" name=\"rightnow\" value=\"" . urldecode($rightnow) . "\"></input>"; 
       if ($formstuff == "") $formstuff="<form onsubmit=\"return checktop(this);\" target=\"mapif\" action=\"//www.rjmprogramming.com.au/PHP/Map/map.php\" method=\"POST\"><input type=\"hidden\" value=\"" . $_GET['place'] . "\" name=\"title\"></input>" . $wlinkh . "<input type=\"hidden\" value=\"['Lat',\" name=\"label\"></input><div id=dgmtoff></div><input type=\"hidden\" value=\"'Lon','Name']\" name=\"value\"></input><input type='hidden' name='wellinever' id='wellinever' value=''></input><input type=\"hidden\" value=\"\" name=\"data\"></input><input type=\"hidden\" value=\"y\" name=\"onclick\"></input><input id=\"smapif\" type=\"submit\" value=\"Show\" style=\"display:none;\"></input></form> <scr" . "ipt type='text/javascript'> function doc() { document.getElementById('smapif').click(); } setTimeout(doc, 2000); </scr" . "ipt>";
       $formstuff=str_replace('" name="data"', ',[' . urldecode($_GET['lat']) . ',' . urldecode($_GET['long']) . ',~' . $_GET['place'] . '~]" name=data', $formstuff);
       $ourmapstuff="</td><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<iframe style=width:400px;height:520px; id='mapif' name='mapif' src=//www.rjmprogramming.com.au/PHP/Map/map.php?title=" . $_GET['place'] . "&onclick=y&label=[%27Lat%27,&value=%27Lon%27,%27Name%27]&data=,[" . urldecode($_GET['lat']) . "," . urldecode($_GET['long']) . ",~" . $_GET['place']  . "~]></IFRAME><form onsubmit='return checktop(this);' target=mapif action=//www.rjmprogramming.com.au/PHP/Map/map.php method=POST><input type=hidden value=\"" . $places . "\" id=title name=title></input><input type=hidden value=\"['Lat',\" id=label name=label></input><input type=hidden value=\"'Lon','Name']\" id=value name=value></input><input type=hidden value='' id=data name=data></input><input type=hidden value=y id=onclick name=onclick></input><input id=smapif type=submit value=Show style=display:none;></input></form> <scr" . "ipt type='text/javascript'> document.getElementById('smapif').click(); </scr" . "ipt>";
      }
      if ($ourmapstuff == "") $ourmapstuff="</td><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<iframe style=width:400px;height:400px; id='mapif' name='mapif' src=//www.rjmprogramming.com.au/PHP/Map/map.php?title=" . urlencode($places) . "&onclick=y&label=[%27Lat%27,&value=%27Lon%27,%27Name%27]&data=,[" . $loc[latitude] . "," . $loc[longitude] . ",~" . $ourzoneName . "~]></iframe><form onsubmit='return checktop(this);' target=mapif action=//www.rjmprogramming.com.au/PHP/Map/map.php method=POST><input type=hidden value=\"" . $places . "\" id=title name=title></input><input type=hidden value=\"['Lat',\" id=label name=label></input><input type=hidden value=\"'Lon','Name']\" id=value name=value></input><input type=hidden value='' id=data name=data></input><input type=hidden value=y id=onclick name=onclick></input><input id=smapif type=submit value=Show style=display:none;></input></form> <scr" . "ipt type='text/javascript'> document.getElementById('smapif').click(); </scr" . "ipt>";
      $yourmapstuff="</td><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<iframe style=width:400px;height:520px; id='mapif' name='mapif' src=about:blank></iframe>";
      //$formstuff="<form onsubmit=\"return checktop(this);\" target=\"mapif\" action=\"//www.rjmprogramming.com.au/PHP/Map/map.php\" method=\"POST\"><input type=\"hidden\" value=\"Places\" name=\"title\"></input><input type=\"hidden\" value=\"[%27Lat%27,\" name=\"label\"></input><input type=\"hidden\" value=\"%27Lon%27,%27Name%27]\" name=\"value\"></input><input type=\"hidden\" value=\"\" name=\"data\"></input><input type=\"hidden\" value=\"y\" name=\"onclick\"></input><input id=\"smapif\" type=\"submit\" value=\"Show\" style=\"display:none;\"></input></form> <scr" . "ipt type='text/javascript'> function doc() { document.getElementById('smapif').click(); } setTimeout(doc, 2000); </scr" . "ipt>";
      if ($formstuff == "") $formstuff="<form onsubmit=\"return checktop(this);\" target=\"mapif\" action=\"//www.rjmprogramming.com.au/PHP/Map/map.php\" method=\"POST\"><input type=\"hidden\" value=\"" . $places . "\" name=\"title\"></input><input type=\"hidden\" value=\"['Lat',\" name=\"label\"></input><input type=\"hidden\" value=\"'Lon','Name']\" name=\"value\"></input><input type='hidden' name='wouldlikeyoutoseekpermission' id='wouldlikeyoutoseekpermission' value=''></input><input type=\"hidden\" value=\"\" name=\"data\"></input><input type=\"hidden\" value=\"y\" name=\"onclick\"></input><input id=\"smapif\" type=\"submit\" value=\"Show\" style=\"display:none;\"></input></form> <scr" . "ipt type='text/javascript'> function doc() { document.getElementById('smapif').click(); } setTimeout(doc, 2000); </scr" . "ipt>";
      $formstuff=str_replace('" name="data"', ',[' . $loc[latitude] . ',' . $loc[longitude] . ',~' . str_replace("_"," ",explode(",",$zbits[-1 + sizeof($zbits)])[0]) . '~]" name="data"', $formstuff);
    } else {
      $ourmapstuff=str_replace("></iframe", ",[" . $loc[latitude] . "," . $loc[longitude] . ",~" . str_replace("_"," ",explode(",",$zbits[-1 + sizeof($zbits)])[0]) . "~]></iframe", $ourmapstuff); 
      $formstuff=str_replace('" name="data"', ',[' . $loc[latitude] . ',' . $loc[longitude] . ',~' . str_replace("_"," ",explode(",",$zbits[-1 + sizeof($zbits)])[0]) . '~]" name="data"', $formstuff);
    }
    
    if (isset($_GET['tzname'])) {
      if (strpos((" " . $zoneName . " = " . $loc['comments'] . " ... " . $coffset), " " . $tzn) !== false || strpos((" " . $zoneName . " = " . $loc['comments'] . " ... " . $coffset), "+" . $tzn) !== false) {
        $prefix.="<b><i>";
        $suffix.="</i></b>";
      }
    } 
    $prepretitlebit="";
    if ($prepretitlebit == "" && isset($_GET['iso'])) {
      $prepretitlebit=str_replace('oJUNKs','ge',str_replace('OJUNKS','GE',$_GET['iso']));
    }
    $zbits=explode("/",$zoneName);
    $extrad="";
    if ($tzo['dst'] === true) {
      $tzq = new DateTimeZone($zoneName);
      $bnow = new DateTime(null, $tzq);
      $betteroff=$bnow->getOffset();
      //echo "betteroff=" . $betteroff . " And tZo[offset]=" . $tzo['offset'] . " ";
      //$extrad="<div style=display:inline; id=qaof_" . $tzo['offset'] / 3600 . " class=emoji onclick=emojistuff(this);>&#9200;</div>";
      $extrad="<div style=display:inline; id=qaof_" . $betteroff / 3600 . " class=emoji onclick=emojistuff(this);>&#9200;</div>";
    } else {   // new
      $tzq = new DateTimeZone($zoneName);
      $bnow = new DateTime(null, $tzq);
      $betteroff=$bnow->getOffset();
      //echo "betteroFf=" . $betteroff . " And tzo[offset]=" . $tzo['offset'] . " ";
    }
    if ($prepretitlebit == "") $prepretitlebit=$loc['country_code'];
    $pretitlebit=explode('"' . $prepretitlebit . '">', $sellong)[1];
    $titlebit=explode("<", $pretitlebit)[0] . "/" . explode(",",$zbits[-1 + sizeof($zbits)])[0] . ',' . $loc[latitude] . ',' . $loc[longitude] . ',' . ($tzo['offset'] / 3600);
    //localtimefromtogmt(('' . $tzo['offset'] / 3600),  'Australi' . 'a/Perth', 'UTC');
    localtimefromtogmt(('' . $betteroff / 3600),  'Australi' . 'a/Perth', 'UTC');
    if (strpos($titlebit,"Optionally Select Country of Interest below ...") !== false) {     
    $selstuff.=$prefix . " <a title='" . $lastTime . "' id=maof_" . explode(",",$zbits[-1 + sizeof($zbits)])[0] . "></a><a class=abut target=_blank id=aof_" . explode(",",$zbits[-1 + sizeof($zbits)])[0] . " title='" . $zoneName . ',' . $loc[latitude] . ',' . $loc[longitude] . ',' . $tzo['offset'] / 3600 . "' style=text-decoration:underline;cursor:pointer; onclick='moreaddtolist(this.title,\"" . $zoneName . "\");'>" . $zoneName . "</a><div style=display:inline; id=daof_" . explode(",",$zbits[-1 + sizeof($zbits)])[0] . " class=emoji onclick=emojistuff(this);>&#128249;</div>" . $extrad . " = " . $loc['comments'] . " ... " . $coffset . "<div style=display:inline; title=" . toeng($dayofweek,$zoneName) . " id=oaof_" . str_replace('+','',('' . $coffset)) . " class='emoji" . $thisemojiclass . "'  onclick=emojistuff(this);>" . str_replace("&#;","","&#" . $thisemojicodepoint . ";") . "</div>" . $suffix . "<br>";
    } else {
    $selstuff.=$prefix . " <a title='" . $lastTime . "' id=maof_" . explode(",",$zbits[-1 + sizeof($zbits)])[0] . "></a><a class=abut target=_blank id=aof_" . explode(",",$zbits[-1 + sizeof($zbits)])[0] . " title='" . $titlebit . "' style=text-decoration:underline;cursor:pointer; onclick='moreaddtolist(this.title,\"" . $zoneName . "\");'>" . $zoneName . "</a><div style=display:inline; id=daof_" . explode(",",$zbits[-1 + sizeof($zbits)])[0] . " class=emoji onclick=emojistuff(this);>&#128249;</div>" . $extrad . " = " . $loc['comments'] . " ... " . $coffset . "<div style=display:inline; title=" . toeng($dayofweek,$zoneName) . " id=oaof_" . str_replace('+','',('' . $coffset)) . " class='emoji" . $thisemojiclass . "'  onclick=emojistuff(this);>" . str_replace("&#;","","&#" . $thisemojicodepoint . ";") . "</div>" . $suffix . "<br>";
    }
    $prefix="";
    $suffix="";
    }
   }
   
   //if (strpos($tzo['timezone_id'], 'Auckland') !== false) {
   //  echo str_replace("+","",urldecode($_GET['tzname'])) . ' ' . ('' . ($tzo['offset'] / 3600)) . '   ' . $tzo['timezone_id'];
   //  exit;
   //}
  }
  $selstuff.="</td>" . $yourmapstuff . "</tr></tbody></table><br>";
  $ididea="tzs";
  //if (strpos($hprefix, "<table") !== false) {
  //  file_put_contents("x.x", $selstuff);
  //}
  } 
  $selstuff.='<select name=tzname id=s' . "tzs" . $kcnt . ' onchange=changetz(this.value);><option title=' . "''" . ' value=' . "''" . '>Local Time Zone</option><option title= value=0>GMT</option></select>';
  for ($xoff=-24.0; $xoff<=24.0; $xoff+=0.5) {
    $selstuff=str_replace("</select>", "<option title='' value='" . str_replace("+-","-",("+" . (0.0 + $xoff))) . "'>" . str_replace("+-","-",("+" . $xoff . " hours")) . "</option></select>", $selstuff);
  }
  $versus=file_get_contents("tz_places.php");
  $zzxc='"Australia' . '/' . 'Perth","Antarctica' . '/' . 'Troll","Asia' . '/' . 'Chita","Asia' . '/' . 'Khandyga","Asia' . '/' . 'Srednekolymsk","Asia' . '/' . 'Ust-Nera","Europe' . '/' . 'Busingen","Pacific' . '/' . 'Bougainville","America' . '/' . 'Fort_Nelson","Asia' . '/' . 'Atyrau","Asia' . '/' . 'Barnaul","Asia' . '/' . 'Famagusta","Asia' . '/' . 'Tomsk","Europe' . '/' . 'London","America' . '/' . 'Punta_Arenas"';
  $zzlat='"-31.95","-72.01139","52.05","62.65638","67.46666","64.56027","47.69999","-6.21667","58.8","47.11666","53.36666","35.11666","56.5","51.5074","-53.15"';
  $zzlong='"115.85","2.535","113.46666","135.55388","153.71666","143.22666","8.68333","155.56666","-122.7","51.93333","83.75","33.95","84.96666","-0.1278","-70.91667"';
  $zzlast='"AWST","+02","+09","+09","+11","+10","CEST","+11","MST","+05","+07","EEST","+07","BST","-03"';
  $zzthree='"AU","AQ","RU","RU","RU","RU","DE","PG","CA","KZ","RU","CY","RU","UK","CL"';
  $zones = timezone_identifiers_list();
  foreach ($zones as $zone) {
    $origzone=$zone;
    //$ourtz=new DateTimeZone($zone);
    $zzbit=$zone;
         //$ootz = new DateTimeZone($zone);
         //$oocloc = $ootz->getLocation(); 
         //$ooctrycode = $oocloc['country_code'];
    $zone = explode('/', $zone); // 0 => Continent, 1 => City
    // Only use "friendly" continent names
    if ($zone[0] == 'Africa' || $zone[0] == 'America' || $zone[0] == 'Antarctica' || $zone[0] == 'Arctic' || $zone[0] == 'Asia' || $zone[0] == 'Atlantic' || $zone[0] == 'Australia' || $zone[0] == 'Europe' || $zone[0] == 'Indian' || $zone[0] == 'Pacific') {       
        if (isset($zone[1]) != '') {
            if (strpos($versus, '"' . $zzbit . '"') === false && strpos($versus, '"' . '' . '"];') !== false && strpos($versus, '"' . ' ' . '"];') !== false && strpos($versus, '"' . '  ' . '"];') !== false) {
              $ourtz=new DateTimeZone($zzbit);
              $versus=str_replace('"' . '' . '"];', '"' . $zzbit . '","' . '' . '"];', $versus);
              $versus=str_replace('"' . ' ' . '"];', '"' . $ourtz->getLocation()[latitude] . '","' . ' ' . '"];', $versus);
              $versus=str_replace('"' . '  ' . '"];', '"' . $ourtz->getLocation()[longitude] . '","' . '  ' . '"];', $versus);

              if (sizeof($zone) == 3) {
                $abbr="";
                try {
                $zzdt = new DateTime('now', new DateTimeZone($zone[0] . '/' . $zone[1] . '/' . $zone[2])); //$zzbit));
                $abbr = $zzdt->format('T'); 
                //exec("ksh -c 'TZ=" . $zone[0] . '/' . $zone[1] . '/' . $zone[2] . " date > x.x'");
                } catch (Exception $eonee) {
                $abbr="";
                }
                if ($abbr == "") { $abbr="UTC"; }
              } else {
                $abbr="";
                try {
                $zzdt = new DateTime('now', new DateTimeZone($zone[0] . '/' . $zone[1])); //$zzbit));
                $abbr = $zzdt->format('T'); 
                //exec("ksh -c 'TZ=" . $zone[0] . '/' . $zone[1] . " date > x.x'");
                } catch (Exception $etwoe) {
                $abbr="";
                }
                if ($abbr == "") { $abbr="UTC"; }
              }
              $versus=str_replace('"' . '   ' . '"];', '"' . $abbr . '","' . '   ' . '"];', $versus);

              if (strpos($zzbit, "/Wallis") !== false) {
              $versus=str_replace('"' . '' . '"];', '' . $zzxc . ',"' . '' . '"];', $versus);
              $versus=str_replace('"' . ' ' . '"];', '' . $zzlat . ',"' . ' ' . '"];', $versus);
              $versus=str_replace('"' . '  ' . '"];', '' . $zzlong . ',"' . '  ' . '"];', $versus);
              $versus=str_replace('"' . '   ' . '"];', '' . $zzlast . ',"' . '   ' . '"];', $versus);
              $versus=str_replace('"' . '    ' . '"];', '' . $zzthree . ',"' . '    ' . '"];', $versus);
              }

              @file_put_contents("tz_places.php", $versus);
              echo '<html><body onload=" location.href=' . "'" . "./tz_places.php?upto=" . $zzbit . "'" . '; "></body></html>';
              //header("Location: ./tz_places.php?upto=" . $zzbit);
              exit;
            }
            //$locations[$zone[0]][$zone[0]. '/' . $zone[1]] = str_replace('_', ' ', $zone[1]); // Creates array(DateTimeZone => 'Friendly name')
            //$ourtz=new DateTimeZone(str_replace('_', ' ', $zone[0]. '/' . $zone[1]));
            //$selstuff=str_replace("</select>", "<option title='" . $ourtz->getLocation()[latitude] . "," . $ourtz->getLocation()[longitude] . ",~" . urlencode(str_replace('_', ' ', $zone[1])) . "~' value='" . str_replace('_', ' ', $zone[0]. '/' . $zone[1]) . "'>" . str_replace('_', ' ', $zone[0]. '/' . $zone[1]) . "</option></select>", $selstuff);
            //$selstuff=str_replace("</select>", "<option title='" . $origzone . "' value='" . str_replace('_', ' ', $zone[0]. '/' . $zone[1]) . "'>" . str_replace('_', ' ', $zone[0]. '/' . $zone[1]) . "</option></select>", $selstuff);

            //$selstuff=str_replace("</select>", "<option class='" . $ooctrycode , "' title='" . $origzone . "' value='" . str_replace("/" . $zone[-1 + sizeof($zone)], "", $zzbit) . '/' . explode(",",$zone[-1 + sizeof($zone)])[0] . "'>" . str_replace('_', ' ', str_replace("/" . $zone[-1 + sizeof($zone)], "", $zzbit). '/' . $zone[-1 + sizeof($zone)]) . "</option></select>", $selstuff);
            $selstuff=str_replace("</select>", "<option title='" . $origzone . "' value='" . str_replace("/" . $zone[-1 + sizeof($zone)], "", $zzbit) . '/' . explode(",",$zone[-1 + sizeof($zone)])[0] . "'>" . str_replace('_', ' ', str_replace("/" . $zone[-1 + sizeof($zone)], "", $zzbit). '/' . $zone[-1 + sizeof($zone)]) . "</option></select>", $selstuff);

            //$selstuff=str_replace("</select>", "<option value='" . str_replace('_', ' ', $zone[0]. '/' . $zone[1]) . "'>" . str_replace('_', ' ', $zone[0]. '/' . $zone[1]) . "</option></select>", $selstuff);
        }
    }
  }
  
  if (isset($_GET['tzname'])) {
      if (strpos($selstuff, ("'" . urldecode($_GET['tzname']) . "'>")) !== false) {
        $selstuff=str_replace(("'" . urldecode($_GET['tzname']) . "'>"),("'" . urldecode($_GET['tzname']) . "' selected>"),$selstuff);
      }
  }      
  
  return $selstuff;
}

if (isset($_GET['upto'])) {
  ourtimezonelist($ideais);
}

find_nearest();

$cnarr="\n var cnearname='" . '"' . $nearname[0] . '"';
for ($narr=1; $narr<sizeof($nearname); $narr++) {
  if (trim($nearname[$narr]) != '') { $cnarr.=',"' . $nearname[$narr] . '"'; }
}
$cnarr.="'; \n var cnearcc='" . '"' . $nearcc[0] . '"';
for ($narr=1; $narr<sizeof($nearcc); $narr++) {
  if (trim($nearcc[$narr]) != '') { $cnarr.=',"' . $nearcc[$narr] . '"'; } 
}
$cnarr.="'; \n";

echo "<!doctype html>
<html>
<head>
<title>TimeZone Places - RJM Programming - December, 2016 ... Thanks to //php.net/manual/en/datetimezone.getlocation.php and //stackoverflow.com/questions/17842003/php-intl-country-code-2-chars-to-country-name</title>
<meta charset='UTF-8' />
<link href='//www.rjmprogramming.com.au/PHP/emboss_h1.css' rel='stylesheet' type='text/css'>
<style>
td { vertical-align: top; }
.round, #isubmit {  
   /* Safari 3-4, iOS 1-3.2, Android 1.6- */
  -webkit-border-radius: 50%; 

  /* Firefox 1-3.6 */
  -moz-border-radius: 50%; 
  
  /* Opera 10.5, IE 9, Safari 5, Chrome, Firefox 4, iOS 4, Android 2.1+ */
  border-radius: 50%; 
  padding: 17px 17px 17px 17px;   
  font-family: Tahoma; 
  color: red; 
  font-size: 32px; 
}
select { background-color:#f0f0f0; border: 2px solid lightblue; }
.abut {  background-color:#ffffff; border: 2px solid olive; padding 3px 3px 3px 3px; color: purple; }
.emoji { font-size: 36px; }
.nighttime { background-color: darkgray; }
</style>
<script type='text/javascript'>
 var alat=0, along=0, aplace='';
 var defw=" . $defw . ";
 var defh=" . $defh . ";
 var ctzd=false;
 var docdiv=null;
    var thatiso=location.search.split('iso' + '' + '=')[1] ? decodeURIComponent((location.search.split('iso' + '' + '=')[1]).split('&')[0]).replace('OJUNKS','GE').replace('oJUNKs','ge') : '';
    var thattz=location.search.split('tzname' + '' + '=')[1] ? decodeURIComponent((location.search.split('tzname' + '' + '=')[1]).split('&')[0]) : '';
    var thatlat=location.search.split('lat' + '' + '=')[1] ? decodeURIComponent((location.search.split('lat' + '' + '=')[1]).split('&')[0]) : ((thatiso == 'OS') ? '42.2215' : '');
    var thatlong=location.search.split('lat' + '' + '=')[1] ? decodeURIComponent((location.search.split('long' + '' + '=')[1]).split('&')[0]) : ((thatiso == 'OS') ? '43.9644' : '');
    var thatplace=location.search.split('place' + '' + '=')[1] ? decodeURIComponent((location.search.split('place' + '' + '=')[1]).split('&')[0]) : ((thatiso == 'OS') ? 'Tskhinvali' : '');
    var thatwlink=location.search.split('wlink' + '' + '=')[1] ? decodeURIComponent((location.search.split('wlink' + '' + '=')[1]).split('&')[0]) : '';
 var bigtop=null;
 var bigtopval='';
 var winops=[];
 var bestemoji=" . $bestemojicodepoint . "; 
 var iam=" . $iam . "; 
 var gmtoff='';
 var iamleft=" . ((600 * ($iam - 1)) + 100) . "; " . $aqagain . "
 var arrmaplist=[], maplist='', lastmaplist='', mapdelim=';', ofs=null, ofd=null; " . $cnarr . " 
 var anearname=cnearname.replace(/\\\"/g, '').split(',');
 var anearcc=cnearcc.replace(/\\\"/g, '').split(',');
 var topscour=false;
 var yourtzlist=\"<option value='GMT' data-geo='51.4934,0.0098,GMT,GB,+0'>GMT</option><option value='Africa/Abidjan' data-geo='5.31666,-4.03334,GMT,CI,+0'>Africa/Abidjan</option><option value='Africa/Accra' data-geo='5.55,-0.21667,GMT,GH,+0'>Africa/Accra</option><option value='Africa/Addis_Ababa' data-geo='9.03333,38.7,EAT,ET,+3'>Africa/Addis_Ababa</option><option value='Africa/Algiers' data-geo='36.78333,3.05,CET,DZ,+1'>Africa/Algiers</option><option value='Africa/Asmara' data-geo='15.33333,38.88333,EAT,ER,+3'>Africa/Asmara</option><option value='Africa/Bamako' data-geo='12.65,-8,GMT,ML,+0'>Africa/Bamako</option><option value='Africa/Bangui' data-geo='4.36666,18.58333,WAT,CF,+1'>Africa/Bangui</option><option value='Africa/Banjul' data-geo='13.46666,-16.65,GMT,GM,+0'>Africa/Banjul</option><option value='Africa/Bissau' data-geo='11.85,-15.58334,GMT,GW,+0'>Africa/Bissau</option><option value='Africa/Blantyre' data-geo='-15.78334,35,CAT,MW,+2'>Africa/Blantyre</option><option value='Africa/Brazzaville' data-geo='-4.26667,15.28333,WAT,CG,+1'>Africa/Brazzaville</option><option value='Africa/Bujumbura' data-geo='-3.38334,29.36666,CAT,BI,+2'>Africa/Bujumbura</option><option value='Africa/Cairo' data-geo='30.05,31.25,EET,EG,+2'>Africa/Cairo</option><option value='Africa/Casablanca' data-geo='33.65,-7.58334,+01,MA,+0'>Africa/Casablanca</option><option value='Africa/Ceuta' data-geo='35.88333,-5.31667,CEST,ES,+1'>Africa/Ceuta</option><option value='Africa/Conakry' data-geo='9.51666,-13.71667,GMT,GN,+0'>Africa/Conakry</option><option value='Africa/Dakar' data-geo='14.66666,-17.43334,GMT,SN,+0'>Africa/Dakar</option><option value='Africa/Dar_es_Salaam' data-geo='-6.8,39.28333,EAT,TZ,+3'>Africa/Dar_es_Salaam</option><option value='Africa/Djibouti' data-geo='11.6,43.15,EAT,DJ,+3'>Africa/Djibouti</option><option value='Africa/Douala' data-geo='4.05,9.7,WAT,CM,+1'>Africa/Douala</option><option value='Africa/El_Aaiun' data-geo='27.15,-13.2,+01,EH,+0'>Africa/El_Aaiun</option><option value='Africa/Freetown' data-geo='8.5,-13.25,GMT,SL,+0'>Africa/Freetown</option><option value='Africa/Gaborone' data-geo='-24.65001,25.91666,CAT,BW,+2'>Africa/Gaborone</option><option value='Africa/Harare' data-geo='-17.83334,31.05,CAT,ZW,+2'>Africa/Harare</option><option value='Africa/Johannesburg' data-geo='-26.25,28,SAST,ZA,+2'>Africa/Johannesburg</option><option value='Africa/Juba' data-geo='4.85,31.6,EAT,SS,+3'>Africa/Juba</option><option value='Africa/Kampala' data-geo='0.31666,32.41666,EAT,UG,+3'>Africa/Kampala</option><option value='Africa/Khartoum' data-geo='15.6,32.53333,CAT,SD,+3'>Africa/Khartoum</option><option value='Africa/Kigali' data-geo='-1.95,30.06666,CAT,RW,+2'>Africa/Kigali</option><option value='Africa/Kinshasa' data-geo='-4.3,15.3,WAT,CD,+1'>Africa/Kinshasa</option><option value='Africa/Lagos' data-geo='6.45,3.4,WAT,NG,+1'>Africa/Lagos</option><option value='Africa/Libreville' data-geo='0.38333,9.45,WAT,GA,+1'>Africa/Libreville</option><option value='Africa/Lome' data-geo='6.13333,1.21666,GMT,TG,+0'>Africa/Lome</option><option value='Africa/Luanda' data-geo='-8.8,13.23333,WAT,AO,+1'>Africa/Luanda</option><option value='Africa/Lubumbashi' data-geo='-11.66667,27.46666,CAT,CD,+2'>Africa/Lubumbashi</option><option value='Africa/Lusaka' data-geo='-15.41667,28.28333,CAT,ZM,+2'>Africa/Lusaka</option><option value='Africa/Malabo' data-geo='3.75,8.78333,WAT,GQ,+1'>Africa/Malabo</option><option value='Africa/Maputo' data-geo='-25.96667,32.58333,CAT,MZ,+2'>Africa/Maputo</option><option value='Africa/Maseru' data-geo='-29.46667,27.5,SAST,LS,+2'>Africa/Maseru</option><option value='Africa/Mbabane' data-geo='-26.3,31.1,SAST,SZ,+2'>Africa/Mbabane</option><option value='Africa/Mogadishu' data-geo='2.06666,45.36666,EAT,SO,+3'>Africa/Mogadishu</option><option value='Africa/Monrovia' data-geo='6.3,-10.78334,GMT,LR,+0'>Africa/Monrovia</option><option value='Africa/Nairobi' data-geo='-1.28334,36.81666,EAT,KE,+3'>Africa/Nairobi</option><option value='Africa/Ndjamena' data-geo='12.11666,15.05,WAT,TD,+1'>Africa/Ndjamena</option><option value='Africa/Niamey' data-geo='13.51666,2.11666,WAT,NE,+1'>Africa/Niamey</option><option value='Africa/Nouakchott' data-geo='18.1,-15.95,GMT,MR,+0'>Africa/Nouakchott</option><option value='Africa/Ouagadougou' data-geo='12.36666,-1.51667,GMT,BF,+0'>Africa/Ouagadougou</option><option value='Africa/Porto-Novo' data-geo='6.48333,2.61666,WAT,BJ,+1'>Africa/Porto-Novo</option><option value='Africa/Sao_Tome' data-geo='0.33333,6.73333,GMT,ST,+0'>Africa/Sao_Tome</option><option value='Africa/Tripoli' data-geo='32.9,13.18333,EET,LY,+2'>Africa/Tripoli</option><option value='Africa/Tunis' data-geo='36.8,10.18333,CET,TN,+1'>Africa/Tunis</option><option value='Africa/Windhoek' data-geo='-22.56667,17.1,CAT,NA,+2'>Africa/Windhoek</option><option value='America/Adak' data-geo='51.88,-176.65806,HDT,US,-10'>America/Adak</option><option value='America/Anchorage' data-geo='61.21805,-149.90028,AKDT,US,-9'>America/Anchorage</option><option value='America/Anguilla' data-geo='18.2,-63.06667,AST,AI,-4'>America/Anguilla</option><option value='America/Antigua' data-geo='17.05,-61.8,AST,AG,-4'>America/Antigua</option><option value='America/Araguaina' data-geo='-7.2,-48.2,-03,BR,-3'>America/Araguaina</option><option value='America/Argentina/Buenos_Aires' data-geo='-34.6,-58.45,-03,AR,-3'>America/Argentina/Buenos_Aires</option><option value='America/Argentina/Catamarca' data-geo='-28.46667,-65.78334,-03,AR,-3'>America/Argentina/Catamarca</option><option value='America/Argentina/Cordoba' data-geo='-31.4,-64.18334,-03,AR,-3'>America/Argentina/Cordoba</option><option value='America/Argentina/Jujuy' data-geo='-24.18334,-65.3,-03,AR,-3'>America/Argentina/Jujuy</option><option value='America/Argentina/La_Rioja' data-geo='-29.43334,-66.85,-03,AR,-3'>America/Argentina/La_Rioja</option><option value='America/Argentina/Mendoza' data-geo='-32.88334,-68.81667,-03,AR,-3'>America/Argentina/Mendoza</option><option value='America/Argentina/Rio_Gallegos' data-geo='-51.63334,-69.21667,-03,AR,-3'>America/Argentina/Rio_Gallegos</option><option value='America/Argentina/Salta' data-geo='-24.78334,-65.41667,-03,AR,-3'>America/Argentina/Salta</option><option value='America/Argentina/San_Juan' data-geo='-31.53334,-68.51667,-03,AR,-3'>America/Argentina/San_Juan</option><option value='America/Argentina/San_Luis' data-geo='-33.31667,-66.35,-03,AR,-3'>America/Argentina/San_Luis</option><option value='America/Argentina/Tucuman' data-geo='-26.81667,-65.21667,-03,AR,-3'>America/Argentina/Tucuman</option><option value='America/Argentina/Ushuaia' data-geo='-54.8,-68.3,-03,AR,-3'>America/Argentina/Ushuaia</option><option value='America/Aruba' data-geo='12.5,-69.96667,AST,AW,-4'>America/Aruba</option><option value='America/Asuncion' data-geo='-25.26667,-57.66667,-04,PY,-3'>America/Asuncion</option><option value='America/Atikokan' data-geo='48.75861,-91.62167,EST,CA,-5'>America/Atikokan</option><option value='America/Bahia' data-geo='-12.98334,-38.51667,-03,BR,-3'>America/Bahia</option><option value='America/Bahia_Banderas' data-geo='20.8,-105.25,CDT,MX,-6'>America/Bahia_Banderas</option><option value='America/Barbados' data-geo='13.1,-59.61667,AST,BB,-4'>America/Barbados</option><option value='America/Belem' data-geo='-1.45,-48.48334,-03,BR,-3'>America/Belem</option><option value='America/Belize' data-geo='17.5,-88.2,CST,BZ,-6'>America/Belize</option><option value='America/Blanc-Sablon' data-geo='51.41666,-57.11667,AST,CA,-4'>America/Blanc-Sablon</option><option value='America/Boa_Vista' data-geo='2.81666,-60.66667,-04,BR,-4'>America/Boa_Vista</option><option value='America/Bogota' data-geo='4.6,-74.08334,-05,CO,-5'>America/Bogota</option><option value='America/Boise' data-geo='43.61361,-116.2025,MDT,US,-7'>America/Boise</option><option value='America/Cambridge_Bay' data-geo='69.11388,-105.05278,MDT,CA,-7'>America/Cambridge_Bay</option><option value='America/Campo_Grande' data-geo='-20.45,-54.61667,-04,BR,-3'>America/Campo_Grande</option><option value='America/Cancun' data-geo='21.08333,-86.76667,EST,MX,-5'>America/Cancun</option><option value='America/Caracas' data-geo='10.5,-66.93334,-04,VE,-4.5'>America/Caracas</option><option value='America/Cayenne' data-geo='4.93333,-52.33334,-03,GF,-3'>America/Cayenne</option><option value='America/Cayman' data-geo='19.3,-81.38334,EST,KY,-5'>America/Cayman</option><option value='America/Chicago' data-geo='41.85,-87.65,CDT,US,-6'>America/Chicago</option><option value='America/Chihuahua' data-geo='28.63333,-106.08334,MDT,MX,-7'>America/Chihuahua</option><option value='America/Costa_Rica' data-geo='9.93333,-84.08334,CST,CR,-6'>America/Costa_Rica</option><option value='America/Creston' data-geo='49.1,-116.51667,MST,CA,-7'>America/Creston</option><option value='America/Cuiaba' data-geo='-15.58334,-56.08334,-04,BR,-3'>America/Cuiaba</option><option value='America/Curacao' data-geo='12.18333,-69,AST,CW,-4'>America/Curacao</option><option value='America/Danmarkshavn' data-geo='76.76666,-18.66667,GMT,GL,+0'>America/Danmarkshavn</option><option value='America/Dawson' data-geo='64.06666,-139.41667,PDT,CA,-8'>America/Dawson</option><option value='America/Dawson_Creek' data-geo='59.76666,-120.23334,MST,CA,-7'>America/Dawson_Creek</option><option value='America/Denver' data-geo='39.73916,-104.98417,MDT,US,-7'>America/Denver</option><option value='America/Detroit' data-geo='42.33138,-83.04584,EDT,US,-5'>America/Detroit</option><option value='America/Dominica' data-geo='15.3,-61.4,AST,DM,-4'>America/Dominica</option><option value='America/Edmonton' data-geo='53.55,-113.46667,MDT,CA,-7'>America/Edmonton</option><option value='America/Eirunepe' data-geo='-6.66667,-69.86667,-05,BR,-5'>America/Eirunepe</option><option value='America/El_Salvador' data-geo='13.7,-89.2,CST,SV,-6'>America/El_Salvador</option><option value='America/Fortaleza' data-geo='-3.71667,-38.5,-03,BR,-3'>America/Fortaleza</option><option value='America/Glace_Bay' data-geo='46.19999,-59.95,ADT,CA,-4'>America/Glace_Bay</option><option value='America/Godthab' data-geo='64.18333,-51.73334,-02,GL,-3'>America/Godthab</option><option value='America/Goose_Bay' data-geo='53.33333,-60.41667,ADT,CA,-4'>America/Goose_Bay</option><option value='America/Grand_Turk' data-geo='21.46666,-71.13334,EDT,TC,-4'>America/Grand_Turk</option><option value='America/Grenada' data-geo='12.05,-61.75,AST,GD,-4'>America/Grenada</option><option value='America/Guadeloupe' data-geo='16.23333,-61.53334,AST,GP,-4'>America/Guadeloupe</option><option value='America/Guatemala' data-geo='14.63333,-90.51667,CST,GT,-6'>America/Guatemala</option><option value='America/Guayaquil' data-geo='-2.16667,-79.83334,-05,EC,-5'>America/Guayaquil</option><option value='America/Guyana' data-geo='6.8,-58.16667,-04,GY,-4'>America/Guyana</option><option value='America/Halifax' data-geo='44.65,-63.6,ADT,CA,-4'>America/Halifax</option><option value='America/Havana' data-geo='23.13333,-82.36667,CDT,CU,-5'>America/Havana</option><option value='America/Hermosillo' data-geo='29.06666,-110.96667,MST,MX,-7'>America/Hermosillo</option><option value='America/Indiana/Indianapolis' data-geo='39.76833,-86.15806,EDT,US,-5'>America/Indiana/Indianapolis</option><option value='America/Indiana/Knox' data-geo='41.29583,-86.625,CDT,US,-6'>America/Indiana/Knox</option><option value='America/Indiana/Marengo' data-geo='38.37555,-86.34473,EDT,US,-5'>America/Indiana/Marengo</option><option value='America/Indiana/Petersburg' data-geo='38.49194,-87.27862,EDT,US,-5'>America/Indiana/Petersburg</option><option value='America/Indiana/Tell_City' data-geo='37.95305,-86.76139,CDT,US,-6'>America/Indiana/Tell_City</option><option value='America/Indiana/Vevay' data-geo='38.74777,-85.06723,EDT,US,-5'>America/Indiana/Vevay</option><option value='America/Indiana/Vincennes' data-geo='38.67722,-87.52862,EDT,US,-5'>America/Indiana/Vincennes</option><option value='America/Indiana/Winamac' data-geo='41.05138,-86.60306,EDT,US,-5'>America/Indiana/Winamac</option><option value='America/Inuvik' data-geo='68.34972,-133.71667,MDT,CA,-7'>America/Inuvik</option><option value='America/Iqaluit' data-geo='63.73333,-68.46667,EDT,CA,-5'>America/Iqaluit</option><option value='America/Jamaica' data-geo='18,-76.8,EST,JM,-5'>America/Jamaica</option><option value='America/Juneau' data-geo='58.30194,-134.41973,AKDT,US,-9'>America/Juneau</option><option value='America/Kentucky/Louisville' data-geo='38.25416,-85.75945,EDT,US,-5'>America/Kentucky/Louisville</option><option value='America/Kentucky/Monticello' data-geo='36.82972,-84.84917,EDT,US,-5'>America/Kentucky/Monticello</option><option value='America/Kralendijk' data-geo='12.15083,-68.27667,AST,BQ,-4'>America/Kralendijk</option><option value='America/La_Paz' data-geo='-16.5,-68.15,-04,BO,-4'>America/La_Paz</option><option value='America/Lima' data-geo='-12.05,-77.05,-05,PE,-5'>America/Lima</option><option value='America/Los_Angeles' data-geo='34.05222,-118.24278,PDT,US,-8'>America/Los_Angeles</option><option value='America/Lower_Princes' data-geo='18.05138,-63.04723,AST,SX,-4'>America/Lower_Princes</option><option value='America/Maceio' data-geo='-9.66667,-35.71667,-03,BR,-3'>America/Maceio</option><option value='America/Managua' data-geo='12.15,-86.28334,CST,NI,-6'>America/Managua</option><option value='America/Manaus' data-geo='-3.13334,-60.01667,-04,BR,-4'>America/Manaus</option><option value='America/Marigot' data-geo='18.06666,-63.08334,AST,MF,-4'>America/Marigot</option><option value='America/Martinique' data-geo='14.6,-61.08334,AST,MQ,-4'>America/Martinique</option><option value='America/Matamoros' data-geo='25.83333,-97.5,CDT,MX,-6'>America/Matamoros</option><option value='America/Mazatlan' data-geo='23.21666,-106.41667,MDT,MX,-7'>America/Mazatlan</option><option value='America/Menominee' data-geo='45.10777,-87.61417,CDT,US,-6'>America/Menominee</option><option value='America/Merida' data-geo='20.96666,-89.61667,CDT,MX,-6'>America/Merida</option><option value='America/Metlakatla' data-geo='55.12694,-131.57639,AKDT,US,-8'>America/Metlakatla</option><option value='America/Mexico_City' data-geo='19.4,-99.15001,CDT,MX,-6'>America/Mexico_City</option><option value='America/Miquelon' data-geo='47.05,-56.33334,-02,PM,-3'>America/Miquelon</option><option value='America/Moncton' data-geo='46.1,-64.78334,ADT,CA,-4'>America/Moncton</option><option value='America/Monterrey' data-geo='25.66666,-100.31667,CDT,MX,-6'>America/Monterrey</option><option value='America/Montevideo' data-geo='-34.88334,-56.18334,-03,UY,-2'>America/Montevideo</option><option value='America/Montreal' data-geo='45.51666,-73.56667,UTC,??,-5'>America/Montreal</option><option value='America/Montserrat' data-geo='16.71666,-62.21667,AST,MS,-4'>America/Montserrat</option><option value='America/Nassau' data-geo='25.08333,-77.35,EDT,BS,-5'>America/Nassau</option><option value='America/New_York' data-geo='40.71416,-74.00639,EDT,US,-5'>America/New_York</option><option value='America/Nipigon' data-geo='49.01666,-88.26667,EDT,CA,-5'>America/Nipigon</option><option value='America/Nome' data-geo='64.50111,-165.40639,AKDT,US,-9'>America/Nome</option><option value='America/Noronha' data-geo='-3.85,-32.41667,-02,BR,-2'>America/Noronha</option><option value='America/North_Dakota/Beulah' data-geo='47.26416,-101.77778,CDT,US,-6'>America/North_Dakota/Beulah</option><option value='America/North_Dakota/Center' data-geo='47.11638,-101.29917,CDT,US,-6'>America/North_Dakota/Center</option><option value='America/North_Dakota/New_Salem' data-geo='46.845,-101.41084,CDT,US,-6'>America/North_Dakota/New_Salem</option><option value='America/Ojinaga' data-geo='29.56666,-104.41667,MDT,MX,-7'>America/Ojinaga</option><option value='America/Panama' data-geo='8.96666,-79.53334,EST,PA,-5'>America/Panama</option><option value='America/Pangnirtung' data-geo='66.13333,-65.73334,EDT,CA,-5'>America/Pangnirtung</option><option value='America/Paramaribo' data-geo='5.83333,-55.16667,-03,SR,-3'>America/Paramaribo</option><option value='America/Phoenix' data-geo='33.44833,-112.07334,MST,US,-7'>America/Phoenix</option><option value='America/Port-au-Prince' data-geo='18.53333,-72.33334,EDT,HT,-5'>America/Port-au-Prince</option><option value='America/Port_of_Spain' data-geo='10.65,-61.51667,AST,TT,-4'>America/Port_of_Spain</option><option value='America/Porto_Velho' data-geo='-8.76667,-63.9,-04,BR,-4'>America/Porto_Velho</option><option value='America/Puerto_Rico' data-geo='18.46833,-66.10612,AST,PR,-4'>America/Puerto_Rico</option><option value='America/Rainy_River' data-geo='48.71666,-94.56667,CDT,CA,-6'>America/Rainy_River</option><option value='America/Rankin_Inlet' data-geo='62.81666,-92.08306,CDT,CA,-6'>America/Rankin_Inlet</option><option value='America/Recife' data-geo='-8.05,-34.9,-03,BR,-3'>America/Recife</option><option value='America/Regina' data-geo='50.4,-104.65001,CST,CA,-6'>America/Regina</option><option value='America/Resolute' data-geo='74.69555,-94.82917,CDT,CA,-6'>America/Resolute</option><option value='America/Rio_Branco' data-geo='-9.96667,-67.8,-05,BR,-5'>America/Rio_Branco</option><option value='America/Santa_Isabel' data-geo='30.3,-114.86667,UTC,MX,-8'>America/Santa_Isabel</option><option value='America/Santarem' data-geo='-2.43334,-54.86667,-03,BR,-3'>America/Santarem</option><option value='America/Santiago' data-geo='-33.45,-70.66667,-03,CL,-3'>America/Santiago</option><option value='America/Santo_Domingo' data-geo='18.46666,-69.9,AST,DO,-4'>America/Santo_Domingo</option><option value='America/Sao_Paulo' data-geo='-23.53334,-46.61667,-03,BR,-2'>America/Sao_Paulo</option><option value='America/Scoresbysund' data-geo='70.48333,-21.96667,+00,GL,-1'>America/Scoresbysund</option><option value='America/Shiprock' data-geo='36.78555,-108.68639,UTC,??,-7'>America/Shiprock</option><option value='America/Sitka' data-geo='57.17638,-135.30195,AKDT,US,-9'>America/Sitka</option><option value='America/St_Barthelemy' data-geo='17.88333,-62.85,AST,BL,-4'>America/St_Barthelemy</option><option value='America/St_Johns' data-geo='47.56666,-52.71667,NDT,CA,-3.5'>America/St_Johns</option><option value='America/St_Kitts' data-geo='17.3,-62.71667,AST,KN,-4'>America/St_Kitts</option><option value='America/St_Lucia' data-geo='14.01666,-61,AST,LC,-4'>America/St_Lucia</option><option value='America/St_Thomas' data-geo='18.35,-64.93334,AST,VI,-4'>America/St_Thomas</option><option value='America/St_Vincent' data-geo='13.15,-61.23334,AST,VC,-4'>America/St_Vincent</option><option value='America/Swift_Current' data-geo='50.28333,-107.83334,CST,CA,-6'>America/Swift_Current</option><option value='America/Tegucigalpa' data-geo='14.1,-87.21667,CST,HN,-6'>America/Tegucigalpa</option><option value='America/Thule' data-geo='76.56666,-68.78334,ADT,GL,-4'>America/Thule</option><option value='America/Thunder_Bay' data-geo='48.38333,-89.25,EDT,CA,-5'>America/Thunder_Bay</option><option value='America/Tijuana' data-geo='32.53333,-117.01667,PDT,MX,-8'>America/Tijuana</option><option value='America/Toronto' data-geo='43.65,-79.38334,EDT,CA,-5'>America/Toronto</option><option value='America/Tortola' data-geo='18.45,-64.61667,AST,VG,-4'>America/Tortola</option><option value='America/Vancouver' data-geo='49.26666,-123.11667,PDT,CA,-8'>America/Vancouver</option><option value='America/Whitehorse' data-geo='60.71666,-135.05001,PDT,CA,-8'>America/Whitehorse</option><option value='America/Winnipeg' data-geo='49.88333,-97.15001,CDT,CA,-6'>America/Winnipeg</option><option value='America/Yakutat' data-geo='59.54694,-139.72723,AKDT,US,-9'>America/Yakutat</option><option value='America/Yellowknife' data-geo='62.44999,-114.35,MDT,CA,-7'>America/Yellowknife</option><option value='Antarctica/Casey' data-geo='-66.28334,110.51666,+08,AQ,+8'>Antarctica/Casey</option><option value='Antarctica/Davis' data-geo='-68.58334,77.96666,+07,AQ,+7'>Antarctica/Davis</option><option value='Antarctica/DumontDUrville' data-geo='-66.66667,140.01666,+10,AQ,+10'>Antarctica/DumontDUrville</option><option value='Antarctica/Macquarie' data-geo='-54.5,158.95,+11,AU,+11'>Antarctica/Macquarie</option><option value='Antarctica/Mawson' data-geo='-67.6,62.88333,+05,AQ,+5'>Antarctica/Mawson</option><option value='Antarctica/McMurdo' data-geo='-77.83334,166.6,NZST,AQ,+13'>Antarctica/McMurdo</option><option value='Antarctica/Palmer' data-geo='-64.8,-64.1,-03,AQ,-3'>Antarctica/Palmer</option><option value='Antarctica/Rothera' data-geo='-67.56667,-68.13334,-03,AQ,-3'>Antarctica/Rothera</option><option value='Antarctica/South_Pole' data-geo='-90,0,UTC,??,+13'>Antarctica/South_Pole</option><option value='Antarctica/Syowa' data-geo='-69.00612,39.59,+03,AQ,+3'>Antarctica/Syowa</option><option value='Antarctica/Vostok' data-geo='-78.40001,106.89999,+06,AQ,+6'>Antarctica/Vostok</option><option value='Arctic/Longyearbyen' data-geo='78,16,CEST,SJ,+1'>Arctic/Longyearbyen</option><option value='Asia/Aden' data-geo='12.75,45.2,+03,YE,+3'>Asia/Aden</option><option value='Asia/Almaty' data-geo='43.25,76.95,+06,KZ,+6'>Asia/Almaty</option><option value='Asia/Amman' data-geo='31.95,35.93333,EEST,JO,+2'>Asia/Amman</option><option value='Asia/Anadyr' data-geo='64.75,177.48333,+12,RU,+12'>Asia/Anadyr</option><option value='Asia/Aqtau' data-geo='44.51666,50.26666,+05,KZ,+5'>Asia/Aqtau</option><option value='Asia/Aqtobe' data-geo='50.28333,57.16666,+05,KZ,+5'>Asia/Aqtobe</option><option value='Asia/Ashgabat' data-geo='37.95,58.38333,+05,TM,+5'>Asia/Ashgabat</option><option value='Asia/Baghdad' data-geo='33.35,44.41666,+03,IQ,+3'>Asia/Baghdad</option><option value='Asia/Bahrain' data-geo='26.38333,50.58333,+03,BH,+3'>Asia/Bahrain</option><option value='Asia/Baku' data-geo='40.38333,49.85,+04,AZ,+4'>Asia/Baku</option><option value='Asia/Bangkok' data-geo='13.75,100.51666,+07,TH,+7'>Asia/Bangkok</option><option value='Asia/Beirut' data-geo='33.88333,35.5,EEST,LB,+2'>Asia/Beirut</option><option value='Asia/Bishkek' data-geo='42.9,74.6,+06,KG,+6'>Asia/Bishkek</option><option value='Asia/Brunei' data-geo='4.93333,114.91666,+08,BN,+8'>Asia/Brunei</option><option value='Asia/Choibalsan' data-geo='48.06666,114.5,+08,MN,+8'>Asia/Choibalsan</option><option value='Asia/Chongqing' data-geo='29.56666,106.58333,UTC,??,+8'>Asia/Chongqing</option><option value='Asia/Colombo' data-geo='6.93333,79.85,+0530,LK,+5.5'>Asia/Colombo</option><option value='Asia/Damascus' data-geo='33.5,36.3,EEST,SY,+2'>Asia/Damascus</option><option value='Asia/Dhaka' data-geo='23.71666,90.41666,+06,BD,+6'>Asia/Dhaka</option><option value='Asia/Dili' data-geo='-8.55,125.58333,+09,TL,+9'>Asia/Dili</option><option value='Asia/Dubai' data-geo='25.3,55.3,+04,AE,+4'>Asia/Dubai</option><option value='Asia/Dushanbe' data-geo='38.58333,68.8,+05,TJ,+5'>Asia/Dushanbe</option><option value='Asia/Gaza' data-geo='31.5,34.46666,EEST,PS,+2'>Asia/Gaza</option><option value='Asia/Harbin' data-geo='45.75,126.68333,UTC,??,+8'>Asia/Harbin</option><option value='Asia/Hebron' data-geo='31.53333,35.095,EEST,PS,+2'>Asia/Hebron</option><option value='Asia/Ho_Chi_Minh' data-geo='10.75,106.66666,+07,VN,+7'>Asia/Ho_Chi_Minh</option><option value='Asia/Hong_Kong' data-geo='22.28333,114.14999,HKT,HK,+8'>Asia/Hong_Kong</option><option value='Asia/Hovd' data-geo='48.01666,91.64999,+07,MN,+7'>Asia/Hovd</option><option value='Asia/Irkutsk' data-geo='52.26666,104.33333,+08,RU,+8'>Asia/Irkutsk</option><option value='Asia/Jakarta' data-geo='-6.16667,106.8,WIB,ID,+7'>Asia/Jakarta</option><option value='Asia/Jayapura' data-geo='-2.53334,140.7,WIT,ID,+9'>Asia/Jayapura</option><option value='Asia/Jerusalem' data-geo='31.76666,35.23333,IDT,IL,+2'>Asia/Jerusalem</option><option value='Asia/Kabul' data-geo='34.51666,69.2,+0430,AF,+4.5'>Asia/Kabul</option><option value='Asia/Kamchatka' data-geo='53.01666,158.65,+12,RU,+12'>Asia/Kamchatka</option><option value='Asia/Karachi' data-geo='24.86666,67.05,PKT,PK,+5'>Asia/Karachi</option><option value='Asia/Kashgar' data-geo='39.48333,75.98333,UTC,??,+6'>Asia/Kashgar</option><option value='Asia/Kathmandu' data-geo='27.71666,85.31666,+0545,NP,+5.75'>Asia/Kathmandu</option><option value='Asia/Kolkata' data-geo='22.53333,88.36666,IST,IN,+5.5'>Asia/Kolkata</option><option value='Asia/Krasnoyarsk' data-geo='56.01666,92.83333,+07,RU,+7'>Asia/Krasnoyarsk</option><option value='Asia/Kuala_Lumpur' data-geo='3.16666,101.7,+08,MY,+8'>Asia/Kuala_Lumpur</option><option value='Asia/Kuching' data-geo='1.55,110.33333,+08,MY,+8'>Asia/Kuching</option><option value='Asia/Kuwait' data-geo='29.33333,47.98333,+03,KW,+3'>Asia/Kuwait</option><option value='Asia/Macau' data-geo='22.23333,113.58333,CST,MO,+8'>Asia/Macau</option><option value='Asia/Magadan' data-geo='59.56666,150.8,+11,RU,+10'>Asia/Magadan</option><option value='Asia/Makassar' data-geo='-5.11667,119.39999,WITA,ID,+8'>Asia/Makassar</option><option value='Asia/Manila' data-geo='14.58333,121,PST,PH,+8'>Asia/Manila</option><option value='Asia/Muscat' data-geo='23.6,58.58333,+04,OM,+4'>Asia/Muscat</option><option value='Asia/Nicosia' data-geo='35.16666,33.36666,EEST,CY,+2'>Asia/Nicosia</option><option value='Asia/Novokuznetsk' data-geo='53.75,87.11666,+07,RU,+7'>Asia/Novokuznetsk</option><option value='Asia/Novosibirsk' data-geo='55.03333,82.91666,+07,RU,+6'>Asia/Novosibirsk</option><option value='Asia/Omsk' data-geo='55,73.4,+06,RU,+6'>Asia/Omsk</option><option value='Asia/Oral' data-geo='51.21666,51.35,+05,KZ,+5'>Asia/Oral</option><option value='Asia/Phnom_Penh' data-geo='11.55,104.91666,+07,KH,+7'>Asia/Phnom_Penh</option><option value='Asia/Pontianak' data-geo='-0.03334,109.33333,WIB,ID,+7'>Asia/Pontianak</option><option value='Asia/Pyongyang' data-geo='39.01666,125.75,KST,KP,+9'>Asia/Pyongyang</option><option value='Asia/Qatar' data-geo='25.28333,51.53333,+03,QA,+3'>Asia/Qatar</option><option value='Asia/Qyzylorda' data-geo='44.8,65.46666,+05,KZ,+6'>Asia/Qyzylorda</option><option value='Asia/Rangoon' data-geo='16.78333,96.16666,UTC,MM,+6.5'>Asia/Rangoon</option><option value='Asia/Riyadh' data-geo='24.63333,46.71666,+03,SA,+3'>Asia/Riyadh</option><option value='Asia/Sakhalin' data-geo='46.96666,142.7,+11,RU,+10'>Asia/Sakhalin</option><option value='Asia/Samarkand' data-geo='39.66666,66.8,+05,UZ,+5'>Asia/Samarkand</option><option value='Asia/Seoul' data-geo='37.55,126.96666,KST,KR,+9'>Asia/Seoul</option><option value='Asia/Shanghai' data-geo='31.23333,121.46666,CST,CN,+8'>Asia/Shanghai</option><option value='Asia/Singapore' data-geo='1.28333,103.85,+08,SG,+8'>Asia/Singapore</option><option value='Asia/Taipei' data-geo='25.05,121.5,CST,TW,+8'>Asia/Taipei</option><option value='Asia/Tashkent' data-geo='41.33333,69.3,+05,UZ,+5'>Asia/Tashkent</option><option value='Asia/Tbilisi' data-geo='41.71666,44.81666,+04,GE,+4'>Asia/Tbilisi</option><option value='Asia/Tehran' data-geo='35.66666,51.43333,+0430,IR,+3.5'>Asia/Tehran</option><option value='Asia/Thimphu' data-geo='27.46666,89.64999,+06,BT,+6'>Asia/Thimphu</option><option value='Asia/Tokyo' data-geo='35.65444,139.74472,JST,JP,+9'>Asia/Tokyo</option><option value='Asia/Ulaanbaatar' data-geo='47.91666,106.88333,+08,MN,+8'>Asia/Ulaanbaatar</option><option value='Asia/Urumqi' data-geo='43.8,87.58333,+06,CN,+6'>Asia/Urumqi</option><option value='Asia/Vientiane' data-geo='17.96666,102.6,+07,LA,+7'>Asia/Vientiane</option><option value='Asia/Vladivostok' data-geo='43.16666,131.93333,+10,RU,+10'>Asia/Vladivostok</option><option value='Asia/Yakutsk' data-geo='62,129.66666,+09,RU,+9'>Asia/Yakutsk</option><option value='Asia/Yekaterinburg' data-geo='56.85,60.6,+05,RU,+5'>Asia/Yekaterinburg</option><option value='Asia/Yerevan' data-geo='40.18333,44.5,+04,AM,+4'>Asia/Yerevan</option><option value='Atlantic/Azores' data-geo='37.73333,-25.66667,+00,PT,-1'>Atlantic/Azores</option><option value='Atlantic/Bermuda' data-geo='32.28333,-64.76667,ADT,BM,-4'>Atlantic/Bermuda</option><option value='Atlantic/Canary' data-geo='28.1,-15.4,WEST,ES,+0'>Atlantic/Canary</option><option value='Atlantic/Cape_Verde' data-geo='14.91666,-23.51667,-01,CV,-1'>Atlantic/Cape_Verde</option><option value='Atlantic/Faroe' data-geo='62.01666,-6.76667,WEST,FO,+0'>Atlantic/Faroe</option><option value='Atlantic/Madeira' data-geo='32.63333,-16.9,WEST,PT,+0'>Atlantic/Madeira</option><option value='Atlantic/Reykjavik' data-geo='64.15,-21.85,GMT,IS,+0'>Atlantic/Reykjavik</option><option value='Atlantic/South_Georgia' data-geo='-54.26667,-36.53334,-02,GS,-2'>Atlantic/South_Georgia</option><option value='Atlantic/St_Helena' data-geo='-15.91667,-5.7,GMT,SH,+0'>Atlantic/St_Helena</option><option value='Atlantic/Stanley' data-geo='-51.70001,-57.85,-03,FK,-3'>Atlantic/Stanley</option><option value='Australia/Adelaide' data-geo='-34.91667,138.58333,ACST,AU,+10.5'>Australia/Adelaide</option><option value='Australia/Brisbane' data-geo='-27.46667,153.03333,AEST,AU,+10'>Australia/Brisbane</option><option value='Australia/Broken_Hill' data-geo='-31.95,141.45,ACST,AU,+10.5'>Australia/Broken_Hill</option><option value='Australia/Currie' data-geo='-39.93334,143.86666,AEST,AU,+11'>Australia/Currie</option><option value='Australia/Darwin' data-geo='-12.46667,130.83333,ACST,AU,+9.5'>Australia/Darwin</option><option value='Australia/Eucla' data-geo='-31.71667,128.86666,+0845,AU,+8.75'>Australia/Eucla</option><option value='Australia/Hobart' data-geo='-42.88334,147.31666,AEST,AU,+11'>Australia/Hobart</option><option value='Australia/Lindeman' data-geo='-20.26667,149,AEST,AU,+10'>Australia/Lindeman</option><option value='Australia/Lord_Howe' data-geo='-31.55,159.08333,+1030,AU,+11'>Australia/Lord_Howe</option><option value='Australia/Melbourne' data-geo='-37.81667,144.96666,AEST,AU,+11'>Australia/Melbourne</option><option value='Australia/Sydney' data-geo='-33.86667,151.21666,AEST,AU,+11'>Australia/Sydney</option><option value='Europe/Amsterdam' data-geo='52.36666,4.9,CEST,NL,+1'>Europe/Amsterdam</option><option value='Europe/Andorra' data-geo='42.5,1.51666,CEST,AD,+1'>Europe/Andorra</option><option value='Europe/Athens' data-geo='37.96666,23.71666,EEST,GR,+2'>Europe/Athens</option><option value='Europe/Belgrade' data-geo='44.83333,20.5,CEST,RS,+1'>Europe/Belgrade</option><option value='Europe/Berlin' data-geo='52.5,13.36666,CEST,DE,+1'>Europe/Berlin</option><option value='Europe/Bratislava' data-geo='48.15,17.11666,CEST,SK,+1'>Europe/Bratislava</option><option value='Europe/Brussels' data-geo='50.83333,4.33333,CEST,BE,+1'>Europe/Brussels</option><option value='Europe/Bucharest' data-geo='44.43333,26.1,EEST,RO,+2'>Europe/Bucharest</option><option value='Europe/Budapest' data-geo='47.5,19.08333,CEST,HU,+1'>Europe/Budapest</option><option value='Europe/Chisinau' data-geo='47,28.83333,EEST,MD,+2'>Europe/Chisinau</option><option value='Europe/Copenhagen' data-geo='55.66666,12.58333,CEST,DK,+1'>Europe/Copenhagen</option><option value='Europe/Dublin' data-geo='53.33333,-6.25,IST,IE,+0'>Europe/Dublin</option><option value='Europe/Gibraltar' data-geo='36.13333,-5.35,CEST,GI,+1'>Europe/Gibraltar</option><option value='Europe/Guernsey' data-geo='49.44999,-2.53334,BST,GG,+0'>Europe/Guernsey</option><option value='Europe/Helsinki' data-geo='60.16666,24.96666,EEST,FI,+2'>Europe/Helsinki</option><option value='Europe/Isle_of_Man' data-geo='54.15,-4.46667,BST,IM,+0'>Europe/Isle_of_Man</option><option value='Europe/Istanbul' data-geo='41.01666,28.96666,+03,TR,+2'>Europe/Istanbul</option><option value='Europe/Jersey' data-geo='49.19999,-2.11667,BST,JE,+0'>Europe/Jersey</option><option value='Europe/Kaliningrad' data-geo='54.71666,20.5,EET,RU,+2'>Europe/Kaliningrad</option><option value='Europe/Kiev' data-geo='50.43333,30.51666,EEST,UA,+2'>Europe/Kiev</option><option value='Europe/Lisbon' data-geo='38.71666,-9.13334,WEST,PT,+0'>Europe/Lisbon</option><option value='Europe/Ljubljana' data-geo='46.05,14.51666,CEST,SI,+1'>Europe/Ljubljana</option><option value='Europe/Luxembourg' data-geo='49.6,6.15,CEST,LU,+1'>Europe/Luxembourg</option><option value='Europe/Madrid' data-geo='40.4,-3.68334,CEST,ES,+1'>Europe/Madrid</option><option value='Europe/Malta' data-geo='35.9,14.51666,CEST,MT,+1'>Europe/Malta</option><option value='Europe/Mariehamn' data-geo='60.1,19.95,EEST,AX,+2'>Europe/Mariehamn</option><option value='Europe/Minsk' data-geo='53.9,27.56666,+03,BY,+3'>Europe/Minsk</option><option value='Europe/Monaco' data-geo='43.69999,7.38333,CEST,MC,+1'>Europe/Monaco</option><option value='Europe/Moscow' data-geo='55.75,37.58333,MSK,RU,+3'>Europe/Moscow</option><option value='Europe/Oslo' data-geo='59.91666,10.75,CEST,NO,+1'>Europe/Oslo</option><option value='Europe/Paris' data-geo='48.86666,2.33333,CEST,FR,+1'>Europe/Paris</option><option value='Europe/Podgorica' data-geo='42.43333,19.26666,CEST,ME,+1'>Europe/Podgorica</option><option value='Europe/Prague' data-geo='50.08333,14.43333,CEST,CZ,+1'>Europe/Prague</option><option value='Europe/Riga' data-geo='56.94999,24.1,EEST,LV,+2'>Europe/Riga</option><option value='Europe/Rome' data-geo='41.9,12.48333,CEST,IT,+1'>Europe/Rome</option><option value='Europe/Samara' data-geo='53.19999,50.15,+04,RU,+4'>Europe/Samara</option><option value='Europe/San_Marino' data-geo='43.91666,12.46666,CEST,SM,+1'>Europe/San_Marino</option><option value='Europe/Sarajevo' data-geo='43.86666,18.41666,CEST,BA,+1'>Europe/Sarajevo</option><option value='Europe/Simferopol' data-geo='44.94999,34.1,MSK,RU,+3'>Europe/Simferopol</option><option value='Europe/Skopje' data-geo='41.98333,21.43333,CEST,MK,+1'>Europe/Skopje</option><option value='Europe/Sofia' data-geo='42.68333,23.31666,EEST,BG,+2'>Europe/Sofia</option><option value='Europe/Stockholm' data-geo='59.33333,18.05,CEST,SE,+1'>Europe/Stockholm</option><option value='Europe/Tallinn' data-geo='59.41666,24.75,EEST,EE,+2'>Europe/Tallinn</option><option value='Europe/Tirane' data-geo='41.33333,19.83333,CEST,AL,+1'>Europe/Tirane</option><option value='Europe/Uzhgorod' data-geo='48.61666,22.3,EEST,UA,+2'>Europe/Uzhgorod</option><option value='Europe/Vaduz' data-geo='47.15,9.51666,CEST,LI,+1'>Europe/Vaduz</option><option value='Europe/Vatican' data-geo='41.90222,12.45305,CEST,VA,+1'>Europe/Vatican</option><option value='Europe/Vienna' data-geo='48.21666,16.33333,CEST,AT,+1'>Europe/Vienna</option><option value='Europe/Vilnius' data-geo='54.68333,25.31666,EEST,LT,+2'>Europe/Vilnius</option><option value='Europe/Volgograd' data-geo='48.73333,44.41666,+04,RU,+3'>Europe/Volgograd</option><option value='Europe/Warsaw' data-geo='52.25,21,CEST,PL,+1'>Europe/Warsaw</option><option value='Europe/Zagreb' data-geo='45.8,15.96666,CEST,HR,+1'>Europe/Zagreb</option><option value='Europe/Zaporozhye' data-geo='47.83333,35.16666,EEST,UA,+2'>Europe/Zaporozhye</option><option value='Europe/Zurich' data-geo='47.38333,8.53333,CEST,CH,+1'>Europe/Zurich</option><option value='Indian/Antananarivo' data-geo='-18.91667,47.51666,EAT,MG,+3'>Indian/Antananarivo</option><option value='Indian/Chagos' data-geo='-7.33334,72.41666,+06,IO,+6'>Indian/Chagos</option><option value='Indian/Christmas' data-geo='-10.41667,105.71666,+07,CX,+7'>Indian/Christmas</option><option value='Indian/Cocos' data-geo='-12.16667,96.91666,+0630,CC,+6.5'>Indian/Cocos</option><option value='Indian/Comoro' data-geo='-11.68334,43.26666,EAT,KM,+3'>Indian/Comoro</option><option value='Indian/Kerguelen' data-geo='-49.35278,70.2175,+05,TF,+5'>Indian/Kerguelen</option><option value='Indian/Mahe' data-geo='-4.66667,55.46666,+04,SC,+4'>Indian/Mahe</option><option value='Indian/Maldives' data-geo='4.16666,73.5,+05,MV,+5'>Indian/Maldives</option><option value='Indian/Mauritius' data-geo='-20.16667,57.5,+04,MU,+4'>Indian/Mauritius</option><option value='Indian/Mayotte' data-geo='-12.78334,45.23333,EAT,YT,+3'>Indian/Mayotte</option><option value='Indian/Reunion' data-geo='-20.86667,55.46666,+04,RE,+4'>Indian/Reunion</option><option value='Pacific/Apia' data-geo='-13.83334,-171.73334,+13,WS,+14'>Pacific/Apia</option><option value='Pacific/Auckland' data-geo='-36.86667,174.76666,NZST,NZ,+13'>Pacific/Auckland</option><option value='Pacific/Chatham' data-geo='-43.95,-176.55001,+1245,NZ,+13.75'>Pacific/Chatham</option><option value='Pacific/Chuuk' data-geo='7.41666,151.78333,+10,FM,+10'>Pacific/Chuuk</option><option value='Pacific/Easter' data-geo='-27.15,-109.43334,-05,CL,-5'>Pacific/Easter</option><option value='Pacific/Efate' data-geo='-17.66667,168.41666,+11,VU,+11'>Pacific/Efate</option><option value='Pacific/Enderbury' data-geo='-3.13334,-171.08334,+13,KI,+13'>Pacific/Enderbury</option><option value='Pacific/Fakaofo' data-geo='-9.36667,-171.23334,+13,TK,+13'>Pacific/Fakaofo</option><option value='Pacific/Fiji' data-geo='-18.13334,178.41666,+12,FJ,+13'>Pacific/Fiji</option><option value='Pacific/Funafuti' data-geo='-8.51667,179.21666,+12,TV,+12'>Pacific/Funafuti</option><option value='Pacific/Galapagos' data-geo='-0.9,-89.6,-06,EC,-6'>Pacific/Galapagos</option><option value='Pacific/Gambier' data-geo='-23.13334,-134.95,-09,PF,-9'>Pacific/Gambier</option><option value='Pacific/Guadalcanal' data-geo='-9.53334,160.2,+11,SB,+11'>Pacific/Guadalcanal</option><option value='Pacific/Guam' data-geo='13.46666,144.75,ChST,GU,+10'>Pacific/Guam</option><option value='Pacific/Honolulu' data-geo='21.30694,-157.85834,HST,US,-10'>Pacific/Honolulu</option><option value='Pacific/Johnston' data-geo='16.75,-169.51667,UTC,UM,-10'>Pacific/Johnston</option><option value='Pacific/Kiritimati' data-geo='1.86666,-157.33334,+14,KI,+14'>Pacific/Kiritimati</option><option value='Pacific/Kosrae' data-geo='5.31666,162.98333,+11,FM,+11'>Pacific/Kosrae</option><option value='Pacific/Kwajalein' data-geo='9.08333,167.33333,+12,MH,+12'>Pacific/Kwajalein</option><option value='Pacific/Majuro' data-geo='7.15,171.2,+12,MH,+12'>Pacific/Majuro</option><option value='Pacific/Marquesas' data-geo='-9,-139.5,-0930,PF,-9.5'>Pacific/Marquesas</option><option value='Pacific/Midway' data-geo='28.21666,-177.36667,SST,UM,-11'>Pacific/Midway</option><option value='Pacific/Nauru' data-geo='-0.51667,166.91666,+12,NR,+12'>Pacific/Nauru</option><option value='Pacific/Niue' data-geo='-19.01667,-169.91667,-11,NU,-11'>Pacific/Niue</option><option value='Pacific/Norfolk' data-geo='-29.05,167.96666,+11,NF,+11.5'>Pacific/Norfolk</option><option value='Pacific/Noumea' data-geo='-22.26667,166.45,+11,NC,+11'>Pacific/Noumea</option><option value='Pacific/Pago_Pago' data-geo='-14.26667,-170.7,SST,AS,-11'>Pacific/Pago_Pago</option><option value='Pacific/Palau' data-geo='7.33333,134.48333,+09,PW,+9'>Pacific/Palau</option><option value='Pacific/Pitcairn' data-geo='-25.06667,-130.08334,-08,PN,-8'>Pacific/Pitcairn</option><option value='Pacific/Pohnpei' data-geo='6.96666,158.21666,+11,FM,+11'>Pacific/Pohnpei</option><option value='Pacific/Port_Moresby' data-geo='-9.5,147.16666,+10,PG,+10'>Pacific/Port_Moresby</option><option value='Pacific/Rarotonga' data-geo='-21.23334,-159.76667,-10,CK,-10'>Pacific/Rarotonga</option><option value='Pacific/Saipan' data-geo='15.2,145.75,ChST,MP,+10'>Pacific/Saipan</option><option value='Pacific/Tahiti' data-geo='-17.53334,-149.56667,-10,PF,-10'>Pacific/Tahiti</option><option value='Pacific/Tarawa' data-geo='1.41666,173,+12,KI,+12'>Pacific/Tarawa</option><option value='Pacific/Tongatapu' data-geo='-21.16667,-175.16667,+13,TO,+13'>Pacific/Tongatapu</option><option value='Pacific/Wake' data-geo='19.28333,166.61666,+12,UM,+12'>Pacific/Wake</option><option value='Pacific/Wallis' data-geo='-13.3,-176.16667,+12,WF,+12'>Pacific/Wallis</option><option value='Australia/Perth' data-geo='-31.95,115.85,AWST,AU,+8'>Australia/Perth</option><option value='Antarctica/Troll' data-geo='-72.01139,2.535,+02,AQ,+0'>Antarctica/Troll</option><option value='Asia/Chita' data-geo='52.05,113.46666,+09,RU,+8'>Asia/Chita</option><option value='Asia/Khandyga' data-geo='62.65638,135.55388,+09,RU,+9'>Asia/Khandyga</option><option value='Asia/Srednekolymsk' data-geo='67.46666,153.71666,+11,RU,+11'>Asia/Srednekolymsk</option><option value='Asia/Ust-Nera' data-geo='64.56027,143.22666,+10,RU,+10'>Asia/Ust-Nera</option><option value='Europe/Busingen' data-geo='47.69999,8.68333,CEST,DE,+1'>Europe/Busingen</option><option value='Pacific/Bougainville' data-geo='-6.21667,155.56666,+11,PG,+11'>Pacific/Bougainville</option><option value='America/Fort_Nelson' data-geo='58.8,-122.7,MST'>America/Fort_Nelson</option><option value='Asia/Atyrau' data-geo='47.11666,51.93333,+05'>Asia/Atyrau</option><option value='Asia/Barnaul' data-geo='53.36666,83.75,+07'>Asia/Barnaul</option><option value='Asia/Famagusta' data-geo='35.11666,33.95,EEST'>Asia/Famagusta</option><option value='Asia/Tomsk' data-geo='56.5,84.96666,+07'>Asia/Tomsk</option><option value='Europe/London' data-geo='51.5074,-0.1278,BST,GB,+0'>Europe/London</option>\";
 
 
     if (thatiso == 'OS') {
    //alert(0);
      if (1 == 1) {
      //alert(9);
      aplace=thatplace;
      alat=thatlat;
      along=thatlong;
      setTimeout(zzlater, 2000);
      }
    }

 
function alats() {
if (window.opener && document.URL.indexOf('tzname=') != -1) {
      console.log('67 ' + decodeURIComponent(document.URL.split('tzname=')[1].split('&')[0]).replace('GMT','0').replace(' ','+'));
      var osbits=document.body.innerHTML.split(' ... ' + decodeURIComponent(document.URL.split('tzname=')[1].split('&')[0]).replace('GMT','0').replace(' ','+'));
      if (eval('' + osbits.length) > 1) {
        console.log('alats Found ' + eval(-1 + eval('' + osbits.length)) + osbits[0].slice(-500));
        for (var oiu=0; oiu<eval(-1 + eval('' + osbits.length)); oiu++) {
        if (osbits[eval(1 + oiu)].substring(0,1) != '.') {
        console.log('76 ' + document.getElementById('bigtzrepos').innerHTML);
        if (window.opener.document.getElementById('bigtzrepos')) {
        if (document.getElementById('bigtzrepos')) {
        if (document.getElementById('amappos')) { document.getElementById('amappos').style.textDecoration='none';  }
        window.opener.document.getElementById('bigtzrepos').innerHTML+=aqlast(document.getElementById('bigtzrepos').innerHTML);
        }
        }
        console.log(176);
        }
        }
      }
} 
}

function hdef(defhis, looklong) {
  var ourhdef=defhis;
  var defhs=looklong.split('[');
  var maxlatis=-90.0;
  for (var idh=1; idh<defhs.length; idh++) {
    if (eval(defhs[idh].split(',')[0]) > maxlatis) { 
     maxlatis=eval(defhs[idh].split(',')[0]); 
     ourhdef='.' + ('000' + ('' + eval(10.0 + Math.abs(eval(100.0 - eval(eval(eval('' + maxlatis) - eval('-90')) / 180.0) * 100.0))))).split('.')[0].slice(-3); 
     //alert('maxlatis=' + maxlatis + ' leads to ' + ourhdef);
    }  
  }
  return ourhdef;
}

function falsedom() {
 var woff='', hoff='', they='Y';
 var fois='xffmfmap', thingoprefix=',', thingosuffix=']', usuffix=''; 
 document.getElementById('xwidth').value='' + Math.abs(eval('' + defw));
 document.getElementById('xheight').value='' + Math.abs(eval('' + defh));
 if (eval('' + defw) < 0) {
  document.getElementById(fois).action='//www.rjmprogramming.com.au/PHP/Map/map.php';
  document.getElementById('xaregeographicals').value='y';
 } else {
  if (defw == 5560) {
    woff='.' + ('000' + ('' + eval(100 * Math.abs(eval('-12') - eval('" . str_replace("+","",str_replace("GMT","0",$ugb)) . "'))) / 29.0).split('.')[0]).slice(-3);
    hoff=hdef('.015',document.getElementById('xtopdata').value);
    document.getElementById('xaregeographicals').value=they;
  } else if (defw != 556) {
    woff='.' + ('000' + ('' + eval(100 * Math.abs(eval('-12') - eval('" . str_replace("+","",str_replace("GMT","0",$ugb)) . "'))) / 29.0).split('.')[0]).slice(-3);
    hoff=hdef('.015',document.getElementById('xtopdata').value);
    document.getElementById('xaregeographicals').value=they;
  } else {
    they='y';
    document.getElementById('xaregeographicals').value=they;
  }
  document.getElementById(fois).action='//www.rjmprogramming.com.au/PHP/GeoChart/geo_chart.php';
  document.getElementById('xtopdata').value=document.getElementById('xtopdata').value.substring(1).replace(/\]/g,',2]');
  thingoprefix='';
  thingosuffix=',2]';
  usuffix='&country=Country&popularity=Popularity&aregeographicals=' + they + '&areplaces=Y&width=' + document.getElementById('xwidth').value + woff + '&height=' + document.getElementById('xheight').value + hoff;
 }


  var wourl=document.getElementById('xffmfmap').action + '?onclick=y' + usuffix;
  wourl+='&title=' + encodeURIComponent('TimeZone Offset " . $ugb . " Hours');
  wourl+='&label=' + encodeURIComponent(\"['Lat',\");
  wourl+='&value=' + encodeURIComponent(\"'Lon','Name']\");
  if (document.getElementById('xtopdata').value.trim() == '') {
  wourl+='&data=' + encodeURIComponent((thingoprefix + '[-90.000,' + eval(('0" . str_replace('GMT','0',urldecode($_GET['bigtz'])) . " * 15.0').replace('(0 ','(').replace('0-','-').replace('(+','(')) + ',~Antarctica/South_Pole~' + thingosuffix).replace('(0 ','(').replace('0-','-').replace('(+','('));
  } else {
  wourl+='&data=' + encodeURIComponent(decodeURIComponent(document.getElementById('xtopdata').value));
  }
  window.open(wourl, '_blank', 'top=100,left=100,width=' + eval(Math.abs(eval('' + defw)) + 200) + ',height=' + eval(Math.abs(eval('' + defh)) + 200));
  return false;
}

function afteraq() {
  invih=document.getElementById('xtopdata').value;
  var outvih=invih, lk;
 var outvs=invih.split(']');
 var aqbits='';
 if (eval('' + outvs.length) > 1) {
   outvih='';
   for (lk=0; lk<outvs.length; lk++) {
     if (outvs[lk].trim() != '') {
     if (outvs[lk].indexOf(',~Ant' + 'arctica') != '') {
       aqbits+=outvs[lk] + ']';
     } else {
       outvih+=outvs[lk] + ']';
     }
     }
   }
 }
 outvih+=aqbits;
 if (outvih != invih) {
   document.getElementById('xtopdata').value=outvih;
 }
 return outvih;
}

function afteraqlast() {
  invih=document.getElementById('bigtzrepos').innerHTML;
  var outvih=invih, lk;
 var outvs=invih.split(']');
 var aqbits='';
 if (eval('' + outvs.length) > 1) {
   outvih='';
   for (lk=0; lk<outvs.length; lk++) {
     if (outvs[lk].trim() != '') {
     if (outvs[lk].indexOf(',~Ant' + 'arctica') != '') {
       aqbits+=outvs[lk] + ']';
     } else {
       outvih+=outvs[lk] + ']';
     }
     }
   }
 }
 outvih+=aqbits;
 if (outvih != invih) {
   document.getElementById('bigtzrepos').innerHTML=outvih;
 }
 return outvih;
 }

function aqlast(invih) {
 var outvih=invih, lk;
 var outvs=invih.split(']');
 var aqbits='';
 if (eval('' + outvs.length) > 1) {
   outvih='';
   for (lk=0; lk<outvs.length; lk++) {
     if (outvs[lk].trim() != '') {
     if (outvs[lk].indexOf(',~Ant' + 'arctica') != '') {
       aqbits+=outvs[lk] + ']';
     } else {
       outvih+=outvs[lk] + ']';
     }
     }
   }
 }
 setTimeout(afteraqlast,500);
 outvih+=aqbits;
 //if (document.getElementById('bigtzrepos').innerHTML == invih && outvih != invih) {
 if (outvih != invih) {
   document.getElementById('bigtzrepos').innerHTML=outvih;
 }
 return outvih;
}

function everynowandthen() {
  if (top.document.getElementById('shour')) {
    if (top.document.getElementById('shour').innerHTML.indexOf('China') == -1) {
      var slih=document.getElementById('sellong').innerHTML;
      var slihopts=slih.split('</option>');
      top.document.getElementById('shour').innerHTML+=slih.replace(slihopts[0] + '</option>','');
    }
  }
  if (!topscour) {
    var osbits=[], oiu=0;
    if (document.URL.indexOf('bigtz=') != -1 && window.opener) {
      setTimeout(alats, 8000);
    }
    var windowopener=window.opener;
    if (windowopener) {
        if (!window.opener.document.getElementById('bigtzrepos')) {
         windowopener=null;
        }
    }
    if (windowopener && document.URL.indexOf('tzname=') != -1) {
      if (document.getElementById('amappos')) { document.getElementById('amappos').style.textDecoration='none';  }
      osbits=document.body.innerHTML.split(' ... ' + decodeURIComponent(document.URL.split('tzname=')[1].split('&')[0]).replace('GMT','0').replace(' ','+'));
      if (eval('' + osbits.length) > 1) {
        console.log('window.opener Found ' + eval(-1 + eval('' + osbits.length)) + osbits[0].slice(-500));
        for (oiu=0; oiu<eval(-1 + eval('' + osbits.length)); oiu++) {
        if (osbits[eval(1 + oiu)].substring(0,1) != '.') {
        if (window.opener.document.getElementById('bigtzrepos')) {
        if (document.getElementById('bigtzrepos')) {
        if (document.getElementById('amappos')) { document.getElementById('amappos').style.textDecoration='none';  }
        window.opener.document.getElementById('bigtzrepos').innerHTML+=rearr((',[' + osbits[oiu].split(' title=\"')[eval(-1 + osbits[oiu].split(' title=\"').length)].split('\"')[0] + ']').replace(',JUNK' + document.URL.split('tzname=')[1].split('&')[0].replace('GMT','0').replace(' ','+').replace('+','') + ']',']'));
        }
        }
        }
        }
      }
    } else if (top.document.URL.indexOf('bigtz=') != -1) {
      osbits=document.body.innerHTML.split(' ... ' + decodeURIComponent(top.document.URL.split('bigtz=')[1].split('&')[0]).replace(' ','+').replace('GMT','0'));
      if (eval('' + osbits.length) > 1) {
        console.log('top.document.URL Found ' + eval(-1 + eval('' + osbits.length)) + osbits[0].slice(-500));
        for (oiu=0; oiu<eval(-1 + eval('' + osbits.length)); oiu++) {
        if (osbits[eval(1 + oiu)].substring(0,1) != '.') {
        top.document.getElementById('bigtzrepos').innerHTML+=rearr((',[' + osbits[oiu].split(' title=\"')[eval(-1 + osbits[oiu].split(' title=\"').length)].split('\"')[0] + ']').replace(',JUNK' + top.document.URL.split('bigtz=')[1].split('&')[0].replace('GMT','0').replace(' ','+').replace('+','') + ']',']'));
        if (windowopener) {
        window.opener.document.getElementById('bigtzrepos').innerHTML+=rearr((',[' + osbits[oiu].split(' title=\"')[eval(-1 + osbits[oiu].split(' title=\"').length)].split('\"')[0] + ']').replace(',JUNK' + top.document.URL.split('bigtz=')[1].split('&')[0].replace('GMT','0').replace(' ','+').replace('+','') + ']',']'));
        }
        }
        }
      }
    } else if (parent.docdiv) {
      osbits=document.body.innerHTML.split(' ... ' + decodeURIComponent(parent.bigtopval));
      if (eval('' + osbits.length) > 1) {
        console.log('parent.docdiv Found ' + eval(-1 + eval('' + osbits.length)) + osbits[0].slice(-500));
        for (oiu=0; oiu<eval(-1 + eval('' + osbits.length)); oiu++) {
        if (osbits[eval(1 + oiu)].substring(0,1) != '.') {
        parent.docdiv.innerHTML+=rearr((',[' + osbits[oiu].split(' title=\"')[eval(-1 + osbits[oiu].split(' title=\"').length)].split('\"')[0] + ']'));
        }
        }
      }
    } else if (parent.bigtop) {
      osbits=document.body.innerHTML.split(' ... ' + decodeURIComponent(parent.bigtopval));
      if (eval('' + osbits.length) > 1) {
        console.log('parent.bigtop Found ' + eval(-1 + eval('' + osbits.length)) + osbits[0].slice(-500));
        for (oiu=0; oiu<eval(-1 + eval('' + osbits.length)); oiu++) {
        if (osbits[eval(1 + oiu)].substring(0,1) != '.') {
        parent.bigtop.innerHTML+=rearr((',[' + osbits[oiu].split(' title=\"')[eval(-1 + osbits[oiu].split(' title=\"').length)].split('\"')[0] + ']'));
        }
        }
      }
    } 
  } 
  
  
  if (ofs != null) {
    // alert(ofd.value);
    if (ofd.value.substring(3).indexOf('[') != -1) ofs.click();
    ofs=null;
  }
  topscour=true;
  setTimeout(everynowandthen, 5000);
}

function rearr(invis) {
  var vss=invis.replace(/^\,/g,'').replace(/\[/g,'').replace(/\]/g,'').split(',');
  return ',[' + vss[eval(-3 + vss.length)] + ',' + vss[eval(-2 + vss.length)] + ',~' + encodeURIComponent(invis.replace(/^\,/g,'').replace(/\[/g,'').replace(/\]/g,'').split(',' + vss[eval(-3 + vss.length)])[0].replace(\"~\",\"\")) + '~]'; 
}

function checktop(ooform) {
  //alert('here with ' + ooform.innerHTML);
  var wlb='', spl;
  ofs=null;
  if (document.getElementById('ffmfmap') != null) {
    ofs=document.getElementById('topsmapif');
    ofd=document.getElementById('topdata');
  if (ofs != null && ooform.innerHTML.indexOf('\"wlink\" value=\"') != -1) {
//alert(98);
    //document.getElementById('topwlink').value=ooform.innerHTML.split('\"wlink\" value=\"')[1].split('\"')[0];
//alert(988);
    wlb=ooform.innerHTML.split('\"wlink\" value=\"')[1].split('\"')[0];
//alert(wlb);
  }
  if (ofs != null && ooform.innerHTML.indexOf(' value=\",[') != -1 && ooform.innerHTML.indexOf('\"tzname\" value=\"') != -1 && ooform.innerHTML.indexOf('\"gmtoff\" value=\"') != -1 && ooform.innerHTML.indexOf('\"rightnow\" value=\"') != -1) {
  //alert(94 + ' ' + document.getElementById('topdata').value + ' vs ' + ',[' + ooform.innerHTML.split(' value=\",[')[1].split('\"')[0]);
    if (document.getElementById('topdata').value.indexOf(',[' + ooform.innerHTML.split(' value=\",[')[1].split('\"')[0]) == -1) {
      document.getElementById('topdata').value+=',[' + ooform.innerHTML.split(' value=\",[')[1].split('\"')[0].replace('~]', '|' + ooform.innerHTML.split('\"tzname\" value=\"')[1].split('\"')[0] + '|' + ('+' + ooform.innerHTML.split('\"gmtoff\" value=\"')[1].split('\"')[0]).replace('+-','-') + '|' + ooform.innerHTML.split('\"rightnow\" value=\"')[1].split('\"')[0] + wlb + '~]'); 
      //alert(document.getElementById('topdata').value);
      //ofs.click();
    }
  }
  } else if (1 == 1) {
  try {
  if (parent.document.getElementById('ffmfmap') != null) {
    ofs=parent.document.getElementById('topsmapif');
    ofd=parent.document.getElementById('topdata');
  if (ofs != null && ooform.innerHTML.indexOf('\"wlink\" value=\"') != -1) {
//alert(98);
    //document.getElementById('topwlink').value=ooform.innerHTML.split('\"wlink\" value=\"')[1].split('\"')[0];
//alert(988);
    wlb=ooform.innerHTML.split('\"wlink\" value=\"')[1].split('\"')[0];
//alert(wlb);
  }
  if (ofs != null && ooform.innerHTML.indexOf(' value=\",[') != -1 && ooform.innerHTML.indexOf('\"tzname\" value=\"') != -1 && ooform.innerHTML.indexOf('\"gmtoff\" value=\"') != -1 && ooform.innerHTML.indexOf('\"rightnow\" value=\"') != -1) {
  //alert(194 + ' ' + parent.document.getElementById('topdata').value + ' vs ' + ',[' + ooform.innerHTML.split(' value=\",[')[1].split('\"')[0]);
    if (parent.document.getElementById('topdata').value.indexOf(',[' + ooform.innerHTML.split(' value=\",[')[1].split('\"')[0]) == -1) {
      parent.document.getElementById('topdata').value+=',[' + ooform.innerHTML.split(' value=\",[')[1].split('\"')[0].replace('~]', '|' + ooform.innerHTML.split('\"tzname\" value=\"')[1].split('\"')[0] + '|' + ('+' + ooform.innerHTML.split('\"gmtoff\" value=\"')[1].split('\"')[0]).replace('+-','-') + '|' + ooform.innerHTML.split('\"rightnow\" value=\"')[1].split('\"')[0] + wlb + '~]'); 
      //alert(parent.document.getElementById('topdata').value);
      //ofs.click();
    }
  }
  }
  try {
  if (top.document.getElementById('ffmfmap') != null) {
    ofs=top.document.getElementById('topsmapif');
    ofd=top.document.getElementById('topdata');
  if (ofs != null && ooform.innerHTML.indexOf('\"wlink\" value=\"') != -1) {
//alert(98);
    //document.getElementById('topwlink').value=ooform.innerHTML.split('\"wlink\" value=\"')[1].split('\"')[0];
//alert(988);
    wlb=ooform.innerHTML.split('\"wlink\" value=\"')[1].split('\"')[0];
//alert(wlb);
  }
  if (ofs != null && ooform.innerHTML.indexOf(' value=\",[') != -1 && ooform.innerHTML.indexOf('\"tzname\" value=\"') != -1 && ooform.innerHTML.indexOf('\"gmtoff\" value=\"') != -1 && ooform.innerHTML.indexOf('\"rightnow\" value=\"') != -1) {
  //alert(294 + ' ' + top.document.getElementById('topdata').value + ' vs ' + ',[' + ooform.innerHTML.split(' value=\",[')[1].split('\"')[0]);
    if (top.document.getElementById('topdata').value.indexOf(',[' + ooform.innerHTML.split(' value=\",[')[1].split('\"')[0]) == -1) {
      top.document.getElementById('topdata').value+=',[' + ooform.innerHTML.split(' value=\",[')[1].split('\"')[0].replace('~]', '|' + ooform.innerHTML.split('\"tzname\" value=\"')[1].split('\"')[0] + '|' + ('+' + ooform.innerHTML.split('\"gmtoff\" value=\"')[1].split('\"')[0]).replace('+-','-') + '|' + ooform.innerHTML.split('\"rightnow\" value=\"')[1].split('\"')[0] + wlb + '~]'); 
      //alert(top.document.getElementById('topdata').value);
      //ofs.click();
    }
  }
  }
  } catch (edds) {  ofs=null; }
  } catch (eds) {  ofs=null; }
  }
  return true;
}

function great_circle_distance(talis, gnolis, latis, longis) {
  var ourdist=0.0;
  var rgnol=eval((gnolis) * Math.PI / 180.0);
  var rtal=eval((talis) * Math.PI / 180.0);
  var rlong=eval((longis) * Math.PI / 180.0);
  var rlat=eval((latis) * Math.PI / 180.0);
  var deltalong = Math.abs(eval(((gnolis)-(longis)) * Math.PI / 180.0));
  var acof = eval(Math.sin(rtal) * Math.sin(rlat)) + (Math.cos(rtal) * Math.cos(rlat) * Math.cos(deltalong)); // via //en.wikipedia.org/wiki/Great-circle_distance ... thanks
  ourdist = eval(Math.round((Math.acos(acof) * 6371000.0) + 0.00001) * 100) / 100;
  return ourdist;
}
 
function checkmailbox() {
 var urlis='', ih='', jiarr=[], ijarr=[], ijcont='', ijplace='', jicont='', jiplace='';
 //alert(99 + ' ' + maplist);
 if (top.document.getElementById('mapphpmailbox').value != maplist) {
  if (maplist.length > top.document.getElementById('mapphpmailbox').value.length) {
    top.document.getElementById('mapphpmailbox').value=maplist;
  } else {
    maplist=top.document.getElementById('mapphpmailbox').value;
  }
  arrmaplist=maplist.split(mapdelim);
 }
 if (arrmaplist.length > 1) {
 //alert(98);
    if (document.getElementById('fromto') && lastmaplist != maplist) {
 //alert(97);
      lastmaplist=maplist;
      ih=\"<option value=''>Optionally select a From/To set of interest below ...</option>\";
 //alert(ih);
      for (var ij=0; ij<arrmaplist.length; ij++) {
       for (var ji=0; ji<arrmaplist.length; ji++) {
         if (ji != ij && ij < ji) {
           ijarr=arrmaplist[ij].split(',');
           jiarr=arrmaplist[ji].split(',');
           ijplace=ijarr[0].split('/')[eval(-1 + ijarr[0].split('/').length)];  //.replace(/_/g,'%20');
           jiplace=jiarr[0].split('/')[eval(-1 + ijarr[0].split('/').length)];  //.replace(/_/g,'%20');
           ijcont=ijarr[0].replace('/' + ijplace,'');
           jicont=jiarr[0].replace('/' + jiplace,'');
           ijplace=ijplace.replace(/_/g,'%20');
           jiplace=jiplace.replace(/_/g,'%20');
           urlis='https://www.google.com/maps/dir/' + ijplace + '+' + ijcont + '/' + jiplace + '+' + jicont;
           ih+='<option value=\"' + urlis + '\">' + ijplace.replace(/%20/g,' ') + ' to ' + jiplace.replace(/%20/g,' ') + ' ... ' + eval(great_circle_distance(ijarr[1], ijarr[2], jiarr[1], jiarr[2]) / 1000.0) + 'km ... ' + eval(eval(jiarr[3]) - eval(ijarr[3])) + ' hours difference</option>'; 
         }
       }
      }
      document.getElementById('fromto').innerHTML=ih;
      document.getElementById('fromto').style.display='inline';
    }
  
 }
 setTimeout(checkmailbox, 3000);
}


function moreaddtolist(nextarrmember,zoneName) {
// alert(198);
 window.open('HTTP://www.timezoneconverter.com/cgi-bin/zoneinfo?tz=' + zoneName,'_blank','top=100,left=' + iamleft + ',width=600,height=900');
 addtolist(nextarrmember);
}


function addtolist(nextarrmember) {
// alert(198);
 if (top.document.getElementById('mapphpmailbox').value.indexOf(nextarrmember) == -1) {
// alert(197);
  if (top.document.getElementById('mapphpmailbox').value != '') {
    top.document.getElementById('mapphpmailbox').value+=mapdelim + nextarrmember;
  } else {
    top.document.getElementById('mapphpmailbox').value=nextarrmember;
  }
  maplist=top.document.getElementById('mapphpmailbox').value;
  arrmaplist=maplist.split(mapdelim);
// alert(maplist);
 }
}

function mapselchange(othis) {
 if (othis.value.length > 0) { 
  window.open(othis.value,'_blank','top=10,left=10,width=1200,height=800');
 }
}


function changetz(intz) {
  ctzd=true;
  if (intz.indexOf('/') != -1) {
    for (var ikn=0; ikn<anearname.length; ikn++) {
      if (intz == anearname[ikn]) {  document.getElementById('isellong').value=anearcc[ikn];  }
    }
  } else if ((intz + ' ').substring(0,1) == '-' || (intz + '   ').substring(0,3) == 'GMT' || (intz + ' ').substring(0,1) == '+' || ((intz + ' ').substring(0,1) >= '0' && (intz + ' ').substring(0,1) <= '9')) {
    var secsare, startdate, enddate, pdstis = null, prepdstis = null, noff=0, ctyl='', ctyld='';
    document.getElementById('isellong').style.cursor='progress';
    for (var jkn=0; jkn<anearname.length; jkn++) {
      prepdstis='' + new Date().toLocaleString('en-US', {timeZone: 'GMT'});
      pdstis='' + new Date().toLocaleString('en-US', {timeZone: anearname[jkn]});
      enddate=new Date(prepdstis);
      startdate=new Date(pdstis);
      noff = eval((startdate.getTime() - enddate.getTime()) / 3600000);
      noff-=eval('' + intz.replace('GMT','0').replace('+',''));
      if (anearname[jkn].indexOf('/Athens') != -1 || anearname[jkn].indexOf('/Sydney') != -1) {
      console.log(anearname[jkn] + ' ' + anearcc[jkn]);
      console.log(pdstis);
      }
      //noff=pdstis.getTimezoneOffset();
      //if (Math.abs(eval(eval(eval('' + noff) / 1) - eval('' + intz.replace('GMT','0').replace('+','')))) < eval('0.01')) {
      if (Math.abs(eval('' + noff)) < eval('0.01')) {
       if (('' + ctyl).indexOf(anearcc[jkn]) == -1 && ('' + ctyl) != 'undefined') {
        ctyl+=ctyld + anearcc[jkn];
        ctyld=',';
      console.log(anearname[jkn] + ' ' + anearcc[jkn] + ' name.cc=' + anearname.length + '.' + anearcc.length);
      console.log(pdstis);
       }
      }
      if (ctyl.indexOf('AQ,') != -1) { ctyl=ctyl.replace('AQ,','') + ',AQ'; }
      if (anearname[jkn].indexOf('/Athens') != -1 || anearname[jkn].indexOf('/Sydney') != -1) {
      console.log(noff + ' ... ' + Math.abs(eval(eval(eval('' + noff) / 1) - eval('' + intz.replace('GMT','0').replace('+','')))) + ' ctyl=' + ctyl);
      }
    }
    if (ctyl != '') {  document.getElementById('isellong').value=ctyl;  }
    document.getElementById('isellong').style.cursor='pointer';
  }
}

function changeiso(intz) { }

function zzzlater() {
  if (document.getElementById('snearest')) {
  document.getElementById('snearest').innerHTML=document.getElementById('snearest').innerHTML.replace('Asia/Tskhinvali in Georgia is 0km (+4) from Tskhinvali (42.2215,43.9644)','');
  } else {
  setTimeout(zzzlater, 500);
  }
}

function zzlater() {
//alert(1);
      document.getElementById('nplace').value=aplace;
      document.getElementById('latitude').value=alat;
      document.getElementById('longitude').value=along;
      document.getElementById('inearest').click();
      setTimeout(zzzlater, 500);
//alert(11);
}

function perhapsfillin(inidea) {
 // './tz_places.php?latitude=&longitude=&place=' + encodeURIComponent(this.value))
 var outidea=inidea;
 if (inidea.indexOf('place=') != -1) {
   var inplaceis=decodeURIComponent(inidea.split('place=')[1].split('&')[0].split('#')[0]);
   // +07'>Asia/Tomsk</option><option value='Europe/London' data-geo='51.5074,-0.1278,BST,GB,+0'>Europe/London</
   if (yourtzlist.toLowerCase().indexOf('/' + inplaceis.toLowerCase().replace(/\ /g,'_') + '<') != -1) {
    document.getElementById('latitude').value='' + eval('' + yourtzlist.toLowerCase().split('/' + inplaceis.toLowerCase().replace(/\ /g,'_') + '<')[0].split(' data-geo=')[eval(-1 + yourtzlist.toLowerCase().split('/' + inplaceis.toLowerCase().replace(/\ /g,'_') + '<')[0].split(' data-geo=').length)].substring(1).split(',')[0]).toPrecision(6);
    document.getElementById('longitude').value='' +  eval('' + yourtzlist.toLowerCase().split('/' + inplaceis.toLowerCase().replace(/\ /g,'_') + '<')[0].split(' data-geo=')[eval(-1 + yourtzlist.toLowerCase().split('/' + inplaceis.toLowerCase().replace(/\ /g,'_') + '<')[0].split(' data-geo=').length)].substring(1).split(',')[1]).toPrecision(6);
    outidea=outidea.replace('latitude=' + inidea.split('latitude=')[1].split('&')[0].split('#')[0], 'latitude=' + document.getElementById('latitude').value);
    outidea=outidea.replace('longitude=' + inidea.split('longitude=')[1].split('&')[0].split('#')[0], 'longitude=' + document.getElementById('longitude').value);
   }  
 }
 return outidea;
}

function newiframe(wht) {
    var extras='';
    var thisiso=location.search.split('iso' + wht + '=')[1] ? decodeURIComponent((location.search.split('iso' + wht + '=')[1]).split('&')[0]).replace('OJUNKS','GE').replace('oJUNKs','ge') : '';
    var thistz=location.search.split('tzname' + wht + '=')[1] ? decodeURIComponent((location.search.split('tzname' + wht + '=')[1]).split('&')[0]) : '';
    var thislat=location.search.split('lat' + wht + '=')[1] ? decodeURIComponent((location.search.split('lat' + wht + '=')[1]).split('&')[0]) : ((thisiso == 'OS') ? '42.2215' : '');
    var thislong=location.search.split('lat' + wht + '=')[1] ? decodeURIComponent((location.search.split('long' + wht + '=')[1]).split('&')[0]) : ((thisiso == 'OS') ? '43.9644' : '');
    var thisplace=location.search.split('place' + wht + '=')[1] ? decodeURIComponent((location.search.split('place' + wht + '=')[1]).split('&')[0]) : ((thisiso == 'OS') ? 'Tskhinvali' : '');
    var thiswlink=location.search.split('wlink' + wht + '=')[1] ? decodeURIComponent((location.search.split('wlink' + wht + '=')[1]).split('&')[0]) : '';
    if (thisiso != '' && thistz != '') {
     extras+='iso=' + thisiso + '&tzname=' + encodeURIComponent(thistz) + '&';
    } else if (thisiso != '') {
     extras+='iso=' + thisiso + '&';
    } else if (thistz != '') {
     extras+='tzname=' + encodeURIComponent(thistz) + '&';
    }
    if (thislat != '' && thislong != '') {
     extras+='lat=' + thislat + '&long=' + thislong + '&';
    } else if (thislat != '') {
     extras+='lat=' + thislat + '&';
    } else if (thislong != '') {
     extras+='long=' + thislong + '&';
    }
    if (thisplace != '') extras+='place=' + encodeURIComponent(thisplace) + '&';
    if (thiswlink != '') extras+='wlink=' + encodeURIComponent(thiswlink) + '&';

//    if (extras != '') {
//     alert('<iframe style=margin-top:-135px;width:600px;height:900px; id=newif' + wht + ' name=newif' + wht + ' src=./tz_places.php?' + extras + 'iam=' + wht + '></iframe>');
//    }
    //alert('./tz_places.php?' + extras + 'iam=' + wht);
    if (!document.getElementById('td' + wht)) {
      wht=1;
      document.getElementById('tbt').style.width='100%';
      document.getElementById('td' + wht).style.width='100%';
    }
    document.getElementById('td' + wht).innerHTML='<iframe style=margin-top:-135px;width:600px;height:900px; id=newif' + wht + ' name=newif' + wht + ' src=./tz_places.php?' + extras + 'iam=' + wht + '></iframe>';
}

function andthenagain() {
    var thisiso=' ', thistz=' ';
    var wht=2;
    while ((thisiso != '' || thistz != '') && wht < 10) {
      thisiso=location.search.split('iso' + wht + '=')[1] ? (location.search.split('iso' + wht + '=')[1]).split('&')[0] : '';
      thistz=location.search.split('tzname' + wht + '=')[1] ? (location.search.split('tzname' + wht + '=')[1]).split('&')[0] : '';
      if (thisiso != '' || thistz != '') {
       newiframe(wht);
      }
      wht++;
    }
}

function fixforlocal() {
    var dd=new Date();
    var qw1=eval(eval((eval(dd.toTimeString().replace('-',' ').replace('+',' ').split(' ')[2]) - eval(dd.toTimeString().replace('-',' ').replace('+',' ').split(' ')[2] % 100)) / 100) + eval((0.0 + eval(dd.toTimeString().replace('-',' ').replace('+',' ').split(' ')[2] % 100)) / 60.0));
    if (dd.toTimeString().indexOf('+') != -1) qw1=-qw1;
    var huh='sszt';
    if (document.getElementById('stzs')) huh='stzs';
    if (document.getElementById(huh).innerHTML.indexOf(' value=\"\">') != -1) {
      if (eval(0 - eval(qw1)) >= 0) {
      document.getElementById(huh).innerHTML=document.getElementById('stzs').innerHTML.replace(' value=\"\">Local', ' value=\"+' + eval(0 - eval(qw1)) + '\">Local');
      document.getElementById(huh).value='+' + eval(0 - eval(qw1));
      } else {
      document.getElementById(huh).innerHTML=document.getElementById('stzs').innerHTML.replace(' value=\"\">Local', ' value=\"' + eval(0 - eval(qw1)) + '\">Local');
      document.getElementById(huh).value=eval(0 - eval(qw1));
      }
    } 
    var tds=document.getElementsByTagName('table');
    for (var itds=0; itds<tds.length; itds++) { 
      if (tds[itds].innerHTML.indexOf('<td></td>') != -1) {
        tds[itds].style.display='none';
      } 
    }
  ";
    if (strlen($ourtzn) > 0) {
  echo "
    var aatds;
    var atds=document.getElementsByTagName('a');

    for (var iatds=0; iatds<atds.length; iatds++) { 
      if (atds[iatds].innerHTML == '" . $ourtzn . "') {
        aatds=atds[iatds].title.split(',');
        gmtoff='' + aatds[eval(-1 + aatds.length)];
        if (document.getElementById('dgmtoff')) {
        if (document.getElementById('dgmtoff').innerHTML == '') {
         document.getElementById('dgmtoff').innerHTML = \"<input type=hidden name=gmtoff value='\" + gmtoff + \"'></input>\"; 
         document.getElementById('dgmtoff').innerHTML += \"<input type=hidden name=rightnow value='\" + document.getElementById('m' + atds[iatds].id).title + \"'></input>\"; 
         document.getElementById('dgmtoff').innerHTML += \"<input type=hidden name=tzname value='" . $ourtzn . "'></input>\"; 
        }
        }
      } 
    }
       ";
    }
  echo "
    setTimeout(andthenagain,2000);
}

// 1  o'clock is &#128336;
// 2  o'clock is &#128337;

// 12 o'clock is &#128347;

//  2:30 is &#128349;
// 11:30 is &#128358;
// 12:30 is &#128359;

// //www.rjmprogramming.com.au/HTMLCSS/daylight_saving_time.html?timezone=0
function emojistuff(ething) {
  var subj='';
  if (ething.innerHTML.length < 10) {
    if (ething.id.indexOf('daof_') == 0) {
      if (top.document.title.indexOf('Time') == 0) {
        top.document.title='Country ' + top.document.title + ' ... Quiz';
      }
      ething.innerHTML='<iframe style=width:700px;height:700px;z-index:5; src=//www.rjmprogramming.com.au/HTMLCSS/karaoke_youtube_api.htm?emoji=on&nokaraoke=y&youtubeid=' + encodeURIComponent('              ' + ething.id.substring(5).replace('_',' ').replace('_',' ').replace('_',' ').replace('_',' ').replace('_',' ').replace('_',' ').replace('_',' ')) + '></iframe>';
    } else if (ething.id.indexOf('qaof_') == 0) {
      if (top.document.title.indexOf('Time') == 0) {
        top.document.title='Country ' + top.document.title + ' ... Quiz';
      }
      ething.innerHTML='<iframe style=width:950px;height:700px;z-index:5; src=//www.rjmprogramming.com.au/HTMLCSS/daylight_saving_time.html?timezone=' + ething.id.substring(5) + '></iframe>';
    } else if (ething.id.indexOf('oaof_') == 0) {
      if (top.document.title.indexOf('Time') == 0) {
        top.document.title='Country ' + top.document.title + ' ... Quiz';
      }
      ething.innerHTML='<iframe style=width:950px;height:700px;z-index:5; src=//www.rjmprogramming.com.au/HTMLCSS/daylight_saving_time.html?timezone=' + ething.id.substring(5) + '></iframe>';
    } else if (ething.id.indexOf('disellong') == 0) {
      if (document.getElementById('isellong').value != '') {
        subj=document.getElementById('sellong').options[document.getElementById('sellong').selectedIndex].text;
      }
      if (subj != '') {
      if (top.document.title.indexOf('Time') == 0) {
        top.document.title='Country ' + top.document.title + ' ... Quiz';
      }
      ething.innerHTML='<iframe style=width:700px;height:700px;z-index:5; src=//www.rjmprogramming.com.au/HTMLCSS/karaoke_youtube_api.htm?emoji=on&nokaraoke=y&youtubeid=' + encodeURIComponent('              ' + subj.replace('_',' ').replace('_',' ').replace('_',' ').replace('_',' ').replace('_',' ').replace('_',' ').replace('_',' ')) + '></iframe>';
      }
    } else if (ething.id.indexOf('getmegmt') == 0) {
      if (top.document.title.indexOf('Time') == 0) {
        top.document.title='Country ' + top.document.title + ' ... Quiz';
      }
      //ething.innerHTML='<iframe style=width:700px;height:700px;z-index:5; src=//www.rjmprogramming.com.au/HTMLCSS/daylight_saving_time.html?timezone=0></iframe>';
      ething.innerHTML='<iframe style=width:1150px;height:700px;z-index:5; src=//www.rjmprogramming.com.au/HTMLCSS/analogue_clock.htm?></iframe>';
    }
  }
}

function andtwo(iois) {
  if (iois != null) {
    var aconto = (iois.contentWindow || iois.contentDocument); 
    if (aconto != null) {
     if (aconto.document) { aconto = aconto.document; }
     if (aconto.body != null) {
      //alert('bigrepos is ' + document.getElementById('bigtzrepos').innerHTML);
      bigtop=top.document.getElementById('bigtzrepos');
      bigtopval=decodeURIComponent(iois.src.split('bigtz=')[1].split('&')[0]).replace('GMT','0').replace(' ','+');
      docdiv=top.document.getElementById('bigtzrepos');
     }
    }
  }
}

function heightsandtype(fois) {
 var woff='', hoff='', they='Y';
 document.getElementById('xwidth').value='' + Math.abs(eval('' + defw));
 document.getElementById('xheight').value='' + Math.abs(eval('' + defh));
 if (eval('' + defw) < 0) {
  document.getElementById(fois).action='//www.rjmprogramming.com.au/PHP/Map/map.php';
  document.getElementById('xaregeographicals').value='y';
 } else {
  document.getElementById(fois).action='//www.rjmprogramming.com.au/PHP/GeoChart/geo_chart.php';
  document.getElementById('xtopdata').value=document.getElementById('xtopdata').value.substring(1).replace(/\]/g,',2]');
 }
 if (defw == 5560) {
    woff='.' + ('000' + ('' + eval(100 * Math.abs(eval('-12') - eval('" . str_replace("+","",str_replace("GMT","0",$ugb)) . "'))) / 29.0).split('.')[0]).slice(-3);
    hoff=hdef('.015',document.getElementById('xtopdata').value);
 document.getElementById('xwidth').value='' + Math.abs(eval('' + defw)) + woff;
 document.getElementById('xheight').value='' + Math.abs(eval('' + defh)) + hoff;
  document.getElementById('xaregeographicals').value=they;
 } else if (defw != 556) {
    woff='.' + ('000' + ('' + eval(100 * Math.abs(eval('-12') - eval('" . str_replace("+","",str_replace("GMT","0",$ugb)) . "'))) / 29.0).split('.')[0]).slice(-3);
    hoff=hdef('.015',document.getElementById('xtopdata').value);
 document.getElementById('xwidth').value='' + Math.abs(eval('' + defw)) + woff;
 document.getElementById('xheight').value='' + Math.abs(eval('' + defh)) + hoff;
  document.getElementById('xaregeographicals').value=they;
 } else {
    they='y';
  document.getElementById('xaregeographicals').value=they;
 }
 if (document.getElementById(fois).outerHTML.indexOf('/geo_chart.php') != -1) {
    console.log(document.getElementById(fois).outerHTML);
 }
}

function csellong(ofis) {
  var worryyes=false, ibvc;
  afteraqlast();
  if (document.getElementById('isellong')) {
  if (document.getElementById('isellong').value.indexOf(',') != -1 || (ctzd && (document.getElementById('stzs').value + ' ').substring(0,1).replace('+','-').replace('0','-').replace('1','-').replace('2','-').replace('3','-').replace('4','-').replace('5','-').replace('6','-').replace('7','-').replace('8','-').replace('9','-') == '-')) {
  //alert(document.getElementById('stzs').value + 'why ' + document.getElementById('isellong').value);
  worryyes=true;
  if (document.getElementById('isellong') && document.getElementById('isellong') && document.getElementById('stzs') && document.getElementById('iam')) {
  var newhref=document.URL.split('?')[0].split('#')[0];
  var nineoff=0;
  var dlim='?bigtz=' + document.getElementById('stzs').value.replace('GMT','+0&isgmt=y') + '&';
  var dsuff='';
  var isotwos=document.getElementById('isellong').value.split(',');
  for (ibvc=0; ibvc<isotwos.length; ibvc++) {
    newhref+=dlim;
    dlim='&';
    newhref+='iso' + dsuff + '=' + isotwos[ibvc].toUpperCase();
    newhref+=dlim + 'tzname' + dsuff + '=' + document.getElementById('stzs').value.replace('GMT','+0');
    newhref+=dlim + 'iam' + dsuff + '=' + eval(1 + ibvc - nineoff);
    dsuff='' + eval(2 + ibvc - nineoff);   
    if (eval(1 + ibvc - nineoff) == 9 && eval(1 + ibvc) < eval('' + isotwos.length)) {
      top.winops.push(top.window.open(newhref, '_blank'));
      newhref=document.URL.split('?')[0].split('#')[0];
      dlim='?bigtz=' + document.getElementById('stzs').value.replace('GMT','+0&isgmt=y') + '&';
      dsuff='';
      nineoff+=9;
    }
  } 
  if (winops.length > 0) {
  top.winops.push(top.window.open(newhref, '_blank'));
  top.document.getElementById('bigoverlay').style.display='block';
  top.document.getElementById('bigoverlay').style.position='absolute';
  top.document.getElementById('bigoverlay').style.top='0px';
  top.document.getElementById('bigoverlay').style.left='0px';
  top.document.getElementById('bigoverlay').style.width='100%';
  top.document.getElementById('bigoverlay').style.height='100%';
  top.document.getElementById('bigoverlay').style.zIndex='10';
  top.document.getElementById('bigoverlay').innerHTML=\"<iframe onload='andtwo(this);' style='width:100%;height:100%;' src='\" + newhref + \"'></iframe>\";
      var fi=top.document.createElement('link');
      fi.rel='icon';
      fi.href='//www.rjmprogramming.com.au/images/back01.gif';

      top.document.head.appendChild(fi);
  } else {
  if (!worryyes) {
  
  return true;
  } else {
  var subi=false;
  if (window.parent) {
    if (parent.document != document) {   subi=true; top.location.href=newhref.replace('?','?ontop=y&'); }
  }
  if (!subi) {  top.location.href=newhref;  }
  }
  }
  return false;
  } else {
  document.getElementById('isellong').value=document.getElementById('isellong').value.split(',')[0];
  }
  }
  }
  
  return true;
}

" . $aqagain . "

</scr" . "ipt>
</head>
<body style='background-color:" . $bcol[((0 + $iam) % 10)] . ";' onload='everynowandthen(); " . $onloadbits . " setTimeout(fixforlocal,1000);'>" . $hprefix;
// <body style='background-color:yellow;' onload='setTimeout(fixforlocal,1000);'><h1>TimeZone Places</h1><h3>RJM Programming - December, 2016</h3><h4>Thanks to <a target=_blank title='//php.net/manual/en/datetimezone.getlocation.php' href='//php.net/manual/en/datetimezone.getlocation.php'>//php.net/manual/en/datetimezone.getlocation.php</a> and <br><a target=_blank title='//stackoverflow.com/questions/17842003/php-intl-country-code-2-chars-to-country-name' href='//stackoverflow.com/questions/17842003/php-intl-country-code-2-chars-to-country-name'>//stackoverflow.com/questions/17842003/php-intl-country-code-2-chars-to-country-name</a> and <br><a target=_blank title=//php.net/manual/en/function.timezone-identifiers-list.php href=//php.net/manual/en/function.timezone-identifiers-list.php>//php.net/manual/en/function.timezone-identifiers-list.php</a> and <br><a target=_blank title=//www.timezoneconverter.com/ href=//www.timezoneconverter.com/>//www.timezoneconverter.com/</a></h4>" . $hprefix;


$formstuff="";
if (isset($_GET['iso'])) {
  $places="Places";
  for ($ic=0; $ic<sizeof($iso_country_codes); $ic+=2) {
    if ($iso_country_codes[$ic] == $_GET['iso']) $places=$iso_country_codes[1 + $ic];
  }
  $sellong=str_replace('value="">', 'value="' . $_GET['iso'] . '">',str_replace('"' . $_GET['iso'] . '"', '"' . $_GET['iso'] . '" selected',$sellong));
  $timeZones = DateTimeZone::listIdentifiers(DateTimeZone::PER_COUNTRY, $_GET['iso']);
  $prefix="<table><tbody><tr><td>";
  $suffix="";
  $ourmapstuff="";
  $yourmapstuff="";
  $formstuff="";
  $ideais="tzs";
  if ($_GET['iso'] == '' &&  isset($_GET['tzname'])) {
  $ideais="szt";
  } else {
  foreach ( $timeZones as $key => $zoneName ) {
    $otz = new DateTimeZone("UTC"); // "Europe/London"
    $tz = new DateTimeZone($zoneName);

    $origin_dt = new DateTime("now", $otz);
    $remote_dt = new DateTime("now", $tz);
    $dayofweek = $remote_dt->format('N') . " onclick=\"if (confirm('" . $remote_dt->format('D Y-m-d H:i:s') . "')) { window.open('//www.rjmprogramming.com.au/HTMLCSS/colour_wheel.html?mode=~/~', '_blank', 'top=100,left=100,width=800,height=800'); };\"";

    $offset = ($tz->getOffset($remote_dt) - $otz->getOffset($origin_dt)) / 3600;
      $betteroff=$remote_dt->getOffset();  // new 2 below
      $offset=$betteroff / 3600;
    if ($offset < 0) {
     $coffset=$offset;
    } else {
     $coffset="+" . $offset;
    }

// <input type=\"hidden\" value=\"Places\" name=\"title\"></input><input type=\"hidden\" value=\"['Lat',\" name=\"label\"></input><input type=\"hidden\" value=\"'Lon','Name']\" name=\"value\"></input>

    $zbits=explode("/",explode(",",$zoneName)[0]);

    $loc = $tz->getLocation();
    if ($ourmapstuff == "") {
      $formstuff="";
      if (isset($_GET['lat']) && isset($_GET['long']) && isset($_GET['place'])) {
       //$zbits[-1 + sizeof($zbits)]=$_GET['place'];
       //$loc[latitude]=urldecode($_GET['lat']);
       //$loc[longitude]=urldecode($_GET['long']);
       $wlinkh="";
       localtimefromtogmt($coffset,   'Australi' . 'a/Perth', 'UTC');
       if ($rightnow != "") $wlinkh.="<input type=\"hidden\" name=\"rightnow\" value=\"" . urldecode($rightnow) . "\"></input>"; 
       if (isset($_GET['wlink'])) $wlinkh="<input type=\"hidden\" name=\"wlink\" value=\"" . urldecode($_GET['wlink']) . "\"></input>"; 
       if ($formstuff == "") $formstuff="<form onsubmit=\"return checktop(this);\" target=\"mapif\" action=\"//www.rjmprogramming.com.au/PHP/Map/map.php\" method=\"POST\"><input type=\"hidden\" value=\"" . $_GET['place'] . "\" name=\"title\"></input>" . $wlinkh . "<input type=\"hidden\" value=\"['Lat',\" name=\"label\"></input><div id=dgmtoff></div><input type=\"hidden\" value=\"'Lon','Name']\" name=\"value\"></input><input type='hidden' name='wouldlikeyoutoseekpermission' id='wouldlikeyoutoseekpermission' value=''></input><input type=\"hidden\" value=\"\" name=\"data\"></input><input type=\"hidden\" value=\"y\" name=\"onclick\"></input><input id=\"smapif\" type=\"submit\" value=\"Show\" style=\"display:none;\"></input></form> <scr" . "ipt type='text/javascript'> function doc() { document.getElementById('smapif').click(); } setTimeout(doc, 2000); </scr" . "ipt>";
       $formstuff=str_replace('" name="data"', ',[' . urldecode($_GET['lat']) . ',' . urldecode($_GET['long']) . ',~' . $_GET['place'] . '~]" name=data', $formstuff);
       $ourmapstuff="</td><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<iframe style=width:400px;height:520px; id='mapif' name='mapif' src=//www.rjmprogramming.com.au/PHP/Map/map.php?title=" . $_GET['place'] . "&onclick=y&label=[%27Lat%27,&value=%27Lon%27,%27Name%27]&data=,[" . urldecode($_GET['lat']) . "," . urldecode($_GET['long']) . ",~" . $_GET['place']  . "~]></IFRAME><form onsubmit='return checktop(this);' target=mapif action=//www.rjmprogramming.com.au/PHP/Map/map.php method=POST><input type=hidden value=\"" . $places . "\" id=title name=title></input><input type=hidden value=\"['Lat',\" id=label name=label></input><input type=hidden value=\"'Lon','Name']\" id=value name=value></input><input type=hidden value='' id=data name=data></input><input type=hidden value=y id=onclick name=onclick></input><input id=smapif type=submit value=Show style=display:none;></input></form> <scr" . "ipt type='text/javascript'> document.getElementById('smapif').click(); </scr" . "ipt>";
      }
      if ($ourmapstuff == "") $ourmapstuff="</td><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<iframe style=width:400px;height:400px; id='mapif' name='mapif' src=//www.rjmprogramming.com.au/PHP/Map/map.php?title=" . urlencode($places) . "&onclick=y&label=[%27Lat%27,&value=%27Lon%27,%27Name%27]&data=,[" . $loc[latitude] . "," . $loc[longitude] . ",~" . explode(",",$zbits[-1 + sizeof($zbits)])[0] . "~]></iframe><form onsubmit='return checktop(this);' target=mapif action=//www.rjmprogramming.com.au/PHP/Map/map.php method=POST><input type=hidden value=\"" . $places . "\" id=title name=title></input><input type=hidden value=\"['Lat',\" id=label name=label></input><input type=hidden value=\"'Lon','Name']\" id=value name=value></input><input type=hidden value='' id=data name=data></input><input type=hidden value=y id=onclick name=onclick></input><input id=smapif type=submit value=Show style=display:none;></input></form> <scr" . "ipt type='text/javascript'> document.getElementById('smapif').click(); </scr" . "ipt>";
      $yourmapstuff="</td><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<iframe style=width:400px;height:520px; id='mapif' name='mapif' src=about:blank></iframe>";
      //$formstuff="<form onsubmit=\"return checktop(this);\" target=\"mapif\" action=\"//www.rjmprogramming.com.au/PHP/Map/map.php\" method=\"POST\"><input type=\"hidden\" value=\"Places\" name=\"title\"></input><input type=\"hidden\" value=\"[%27Lat%27,\" name=\"label\"></input><input type=\"hidden\" value=\"%27Lon%27,%27Name%27]\" name=\"value\"></input><input type=\"hidden\" value=\"\" name=\"data\"></input><input type=\"hidden\" value=\"y\" name=\"onclick\"></input><input id=\"smapif\" type=\"submit\" value=\"Show\" style=\"display:none;\"></input></form> <scr" . "ipt type='text/javascript'> function doc() { document.getElementById('smapif').click(); } setTimeout(doc, 2000); </scr" . "ipt>";
      if ($formstuff == "") $formstuff="<form onsubmit=\"return checktop(this)\" target=\"mapif\" action=\"//www.rjmprogramming.com.au/PHP/Map/map.php\" method=\"POST\"><input type=\"hidden\" value=\"" . $places . "\" name=\"title\"></input><input type=\"hidden\" value=\"['Lat',\" name=\"label\"></input><input type=\"hidden\" value=\"'Lon','Name']\" name=\"value\"></input><input type='hidden' name='wouldlikeyoutoseekpermission' id='wouldlikeyoutoseekpermission' value=''></input><input type=\"hidden\" value=\"\" name=\"data\"></input><input type=\"hidden\" value=\"y\" name=\"onclick\"></input><input id=\"smapif\" type=\"submit\" value=\"Show\" style=\"display:none;\"></input></form> <scr" . "ipt type='text/javascript'> function doc() { document.getElementById('smapif').click(); } setTimeout(doc, 2000); </scr" . "ipt>";
      $formstuff=str_replace('" name="data"', ',[' . $loc[latitude] . ',' . $loc[longitude] . ',~' . str_replace("_"," ",explode(",",$zbits[-1 + sizeof($zbits)])[0]) . '~]" name="data"', $formstuff);
    } else {
      $ourmapstuff=str_replace("></iframe", ",[" . $loc[latitude] . "," . $loc[longitude] . ",~" . str_replace("_"," ",explode(",",$zbits[-1 + sizeof($zbits)])[0]) . "~]></iframe", $ourmapstuff); 
      $formstuff=str_replace('" name="data"', ',[' . $loc[latitude] . ',' . $loc[longitude] . ',~' . str_replace("_"," ",explode(",",$zbits[-1 + sizeof($zbits)])[0]) . '~]" name="data"', $formstuff);
    }
    
    if (isset($_GET['tzname'])) {
      $tzn=urldecode($_GET['tzname']);
      if (strpos($tzn,"/") === false && strpos($tzn,"-") === false && strpos($tzn,"+") === false && $tzn != "") $tzn="+" . trim($tzn);
      if (strpos((" " . $zoneName . " = " . $loc['comments'] . " ... " . $coffset), " " . $tzn) !== false || strpos((" " . $zoneName . " = " . $loc['comments'] . " ... " . $coffset), "+" . $tzn) !== false) {
        $prefix.="<b><i>";
        $suffix.="</i></b>";
      }
    }   

    $prepretitlebit="";
    if ($prepretitlebit == "" && isset($_GET['iso'])) {
      $prepretitlebit=$_GET['iso'];
    }
    if ($prepretitlebit == "") $prepretitlebit=$loc['country_code'];
    $pretitlebit=explode('"' . $prepretitlebit . '" selected>', $sellong)[1];
    $titlebit=explode("<", $pretitlebit)[0] . "/" . explode(",",$zbits[-1 + sizeof($zbits)])[0] . ',' . $loc[latitude] . ',' . $loc[longitude] . ',' . $offset;
    $extrad="";
    if ($tzo['dst'] === true) {
      $tzq = new DateTimeZone($zoneName);
      $bnow = new DateTime(null, $tzq);
      $betteroff=$bnow->getOffset();
      //echo "betterOff=" . $betteroff . " And coffset=" . $coffset . " ";
      //$extrad="<div style=display:inline; id=qaof_" . $tzo['offset'] / 3600 . " class=emoji onclick=emojistuff(this);>&#9200;</div>";
      $extrad="<div style=display:inline;-webkit-overflow-scrolling:touch;overflow:scroll; id=qaof_" . $betteroff / 3600 . " class=emoji onclick=emojistuff(this);>&#9200;</div>";
    } else {  // new
      $tzq = new DateTimeZone($zoneName);
      $bnow = new DateTime(null, $tzq);
      $betteroff=$bnow->getOffset();
      //echo "betTeroff=" . $betteroff . " And coffset=" . $coffset . " ";
    }
    localtimefromtogmt($coffset,   'Australi' . 'a/Perth', 'UTC');
    if (strpos($titlebit,"Optionally Select Country of Interest below ...") !== false) {
    print($prefix . " <a title='" . $lastTime . "' id=maof_" . explode(",",$zbits[-1 + sizeof($zbits)])[0] . "></a><a class=abut id=aof_" . explode(",",$zbits[-1 + sizeof($zbits)])[0] . " target=_blank title='" . $zoneName . ',' . $loc[latitude] . ',' . $loc[longitude] . ',' . $offset . "' style=text-decoration:underline;cursor:pointer; onclick='moreaddtolist(this.title,\"" . $zoneName . "\");'>" . $zoneName . "</a><div style=display:inline;-webkit-overflow-scrolling:touch;overflow:scroll; id=daof_" . explode(",",$zbits[-1 + sizeof($zbits)])[0] . " class=emoji onclick=emojistuff(this);>&#128249;</div> = " . $loc['comments'] . " ... " . $coffset . "<div style=display:inline;-webkit-overflow-scrolling:touch;overflow:scroll; title=" . toeng($dayofweek,$zoneName) . " id=oaof_" . str_replace('+','',('' . $coffset)) . " class='emoji" . $thisemojiclass . "'  onclick=emojistuff(this);>" . str_replace("&#;","","&#" . $thisemojicodepoint . ";") . "</div>" . $suffix . "<br>");
    } else {
    print($prefix . " <a title='" . $lastTime . "' id=maof_" . explode(",",$zbits[-1 + sizeof($zbits)])[0] . "></a><a class=abut id=aof_" . explode(",",$zbits[-1 + sizeof($zbits)])[0] . " target=_blank title='" . $titlebit . "' style=text-decoration:underline;cursor:pointer; onclick='moreaddtolist(this.title,\"" . $zoneName . "\");'>" . $zoneName . "</a><div style=display:inline;-webkit-overflow-scrolling:touch;overflow:scroll; id=daof_" . explode(",",$zbits[-1 + sizeof($zbits)])[0] . " class=emoji onclick=emojistuff(this);>&#128249;</div> = " . $loc['comments'] . " ... " . $coffset . "<div style=display:inline;-webkit-overflow-scrolling:touch;overflow:scroll; title=" . toeng($dayofweek,$zoneName) . " id=oaof_" . str_replace('+','',('' . $coffset)) . " class='emoji" . $thisemojiclass . "'  onclick=emojistuff(this);>" . str_replace("&#;","","&#" . $thisemojicodepoint . ";") . "</div>" . $suffix . "<br>");
    }
    $prefix="";
    $suffix="";
  }
  }
  //$yourmapstuff="";
  print("</td>" . $yourmapstuff . "</tr></tbody></table>");
  //print("</td>" . "</tr></tbody></table>");
}

if ($iam == "1") {
  echo "<input type='hidden' id='mapphpmailbox' value='' type='Where map.php puts and gets information'></input>";
}

echo "<!--br><br-->
<form onsubmit='return csellong(this);' action=./tz_places.php" . str_replace("~","",str_replace("?~","",("?" . $_SERVER['QUERY_STRING'] . "~"))) . " style=width:100%; method=GET><input id=isubmit type=submit value='Display as Below...' style=background-color:orange;></input>" . $fromto . "<br><br>" . $sellong . ourtimezonelist($ideais) . "
<input type=hidden name=iam id=iam value=" . $iam . "></input></form><br>" . $formstuff . $finalmapform . $hsuffix . $otherform . "<div id=bigtzrepos style=display:none;></div><div id=bigoverlay style=display:none;></div></body>
</html>
";
?> 

