<!doctype html>
<html>
<head>
<title>Country Quiz - RJM Programming - January, 2017</title>
<script type='text/javascript'>
var notsofast=true;
var nextq=-1;
var thisq=-1;
var lastq=-1;
var uprefix="http://www.rjmprogramming.com.au/PHP/GeoChart/geo_chart.php?title=My%20World%20Quiz&onclick=y&width=556&height=347&country=Country&popularity=Intensity";
var cscore='';
var tname='';
var okn='';

//002 - Africa 015 - Northern Africa DZ, EG, EH, LY, MA, SD, SS, TN
//011 - Western Africa BF, BJ, CI, CV, GH, GM, GN, GW, LR, ML, MR, NE, NG, SH, SL, SN, TG
//017 - Middle Africa AO, CD, ZR, CF, CG, CM, GA, GQ, ST, TD
//014 - Eastern Africa BI, DJ, ER, ET, KE, KM, MG, MU, MW, MZ, RE, RW, SC, SO, TZ, UG, YT, ZM, ZW
//018 - Southern Africa BW, LS, NA, SZ, ZA
//150 - Europe 154 - Northern Europe GG, JE, AX, DK, EE, FI, FO, GB, IE, IM, IS, LT, LV, NO, SE, SJ
//155 - Western Europe AT, BE, CH, DE, DD, FR, FX, LI, LU, MC, NL
//151 - Eastern Europe BG, BY, CZ, HU, MD, PL, RO, RU, SU, SK, UA
//039 - Southern Europe AD, AL, BA, ES, GI, GR, HR, IT, ME, MK, MT, CS, RS, PT, SI, SM, VA, YU
//019 - Americas 021 - Northern America BM, CA, GL, PM, US
//029 - Caribbean AG, AI, AN, AW, BB, BL, BS, CU, DM, DO, GD, GP, HT, JM, KN, KY, LC, MF, MQ, MS, PR, TC, TT, VC, VG, VI
//013 - Central America BZ, CR, GT, HN, MX, NI, PA, SV
//005 - South America AR, BO, BR, CL, CO, EC, FK, GF, GY, PE, PY, SR, UY, VE
//142 - Asia 143 - Central Asia TM, TJ, KG, KZ, UZ
//030 - Eastern Asia CN, HK, JP, KP, KR, MN, MO, TW
//034 - Southern Asia AF, BD, BT, IN, IR, LK, MV, NP, PK
//035 - South-Eastern Asia BN, ID, KH, LA, MM, BU, MY, PH, SG, TH, TL, TP, VN
//145 - Western Asia AE, AM, AZ, BH, CY, GE, IL, IQ, JO, KW, LB, OM, PS, QA, SA, NT, SY, TR, YE, YD
//009 - Oceania 053 - Australia and New Zealand AU, NF, NZ
//054 - Melanesia FJ, NC, PG, SB, VU
//057 - Micronesia FM, GU, KI, MH, MP, NR, PW
//061 - Polynesia AS, CK, NU, PF, PN, TK, TO, TV, WF, WS

var url_array=[
uprefix + "&guess=Brazil&question=" + encodeURIComponent("Which country had Tijuana Brass?") + "&data=%20[~Brazil~,66]%20,%20[~Australia~,66],%20[~Norway~,66],%20[~Morocco~,66],%20[~France~,66],%20[~Argentina~,66]",


uprefix + "&guess=United%20States&question=" + encodeURIComponent("Which country is the land of the brave?") + "&data=%20[~United States~,66]%20,%20[~Australia~,66],%20[~China~,66],%20[~Morocco~,66],%20[~Argentina~,66]",
uprefix + "&guess=United%20Kingdom&question=" + encodeURIComponent("Which country was home for William Shakespeare?") + "&data=%20[~United Kingdom~,66]%20,%20[~Russia~,66],%20[~Norway~,66],%20[~Morocco~,66],%20[~Argentina~,66],%20[~Germany~,66]",
uprefix + "&guess=United%20Arab%20Emirates&question=" + encodeURIComponent("Which country has Abu Dhabi as its capital city?") + "&data=%20[~United Arab Emirates~,66]%20,%20[~Russia~,66],%20[~Norway~,66],%20[~Morocco~,66],%20[~Argentina~,66],%20[~Germany~,66]",
uprefix + "&guess=Iran&question=" + encodeURIComponent("Which country here is a member of OPEC?") + "&data=%20[~Iran~,66]%20,%20[~Russia~,66],%20[~Norway~,66],%20[~Morocco~,66],%20[~Argentina~,66],%20[~Germany~,66]",

uprefix + "&guess=Canada&question=" + encodeURIComponent("Which country has a maple leave on its flag?") + "&data=%20[~Iran~,66]%20,%20[~Russia~,66],%20[~Norway~,66],%20[~Morocco~,66],%20[~Canada~,66],%20[~Germany~,66]",

uprefix + "&guess=Jamaica&question=" + encodeURIComponent("Which country has the fastest sprinters of the early 21st century?") + "&data=%20[~Finland~,66],%20[~Hungary~,66]%20,%20[~Brazil~,66],%20[~China~,66],%20[~United States~,66],%20[~Cuba~,66],%20[~Jamaica~,66]",

uprefix.replace('?title=','?title=IT' + encodeURIComponent(';')) + "&guess=Rome&question=" + encodeURIComponent("Which city in Italy has the Colosseum?") + "&data=%20[~Milan~,66]%20,%20[~Turin~,66],%20[~Rome~,66],%20[~Florence~,66],%20[~Genoa~,66],%20[~Naples~,66],%20[~Florence~,66]",
uprefix.replace('?title=','?title=AU' + encodeURIComponent(';')) + "&guess=Brisbane&question=" + encodeURIComponent("Which city has The Gabba?") + "&data=%20[~Canberra~,66]%20,%20[~Melbourne~,66],%20[~Perth~,66],%20[~Adelaide~,66],%20[~Sydney~,66],%20[~Hobart~,66],%20[~Brisbane~,66]",
uprefix.replace('?title=','?title=CN' + encodeURIComponent(';')) + "&guess=Shanghai&question=" + encodeURIComponent("Which city is the Nevernight City?") + "&data=%20[~Chongqing~,66],%20[~Hong Kong~,66],%20[~Tianjin~,66],%20[~Beijing~,66],%20[~Shanghai~,66],%20[~Canton~,66]",
uprefix.replace('?title=','?title=MX' + encodeURIComponent(';')) + "&guess=Mexico%20City&question=" + encodeURIComponent("Which city is the highest city in Mexico out of these?") + "&data=%20[~Cancun~,66],%20[~Mexico City~,66],%20[~Guadalajara~,66],%20[~Tijuana~,66],%20[~Acapulco~,66]",
uprefix.replace('?title=','?title=US' + encodeURIComponent(';')) + "&guess=Los Angeles&question=" + encodeURIComponent("Where is Hollywood?") + "&data=%20[~San%20Francisco~,66],%20[~Chicago~,66],%20[~Los%20Angeles~,66],%20[~Boston~,66],%20[~New York~,66]",
uprefix.replace('?title=','?title=ZA' + encodeURIComponent(';')) + "&guess=Pretoria&question=" + encodeURIComponent("Which city is the administrative capital of South Africa?") + "&data=%20[~Capetown~,66],%20[~Durban~,66],%20[~Pretoria~,66],%20[~Johannesburg~,66]",
uprefix.replace('?title=','?title=GB' + encodeURIComponent(';')) + "&guess=Leicester&question=" + encodeURIComponent("Which city had the football team to win the Champion League in 2016?") + "&data=%20[~London~,66],%20[~Leicester~,66],%20[~Liverpool~,66],%20[~Birmingham~,66],%20[~Manchester~,66]",
uprefix.replace('?title=','?title=RU' + encodeURIComponent(';')) + "&guess=Moscow&question=" + encodeURIComponent("Where is the Kremlim?") + "&data=%20[~Leningrad~,66],%20[~Novosibirsk~,66],%20[~Moscow~,66],%20[~Minsk~,66],%20[~Vladivostok~,66],%20[~Volvograd~,66]",
uprefix.replace('?title=','?title=IN' + encodeURIComponent(';')) + "&guess=Mumbai&question=" + encodeURIComponent("Where is the biggest centre for the movie industry of India?") + "&data=%20[~Chennai~,66],%20[~Kolkata~,66],%20[~New Delhi~,66],%20[~Mumbai~,66],%20[~Jaipur~,66],%20[~Varanasi~,66]",
uprefix.replace('?title=','?title=FR' + encodeURIComponent(';')) + "&guess=Paris&question=" + encodeURIComponent("Where is the Eiffel Tower?") + "&data=%20[~Marseille~,66],%20[~Lyon~,66],%20[~Paris~,66],%20[~Nice~,66],%20[~Nantes~,66],%20[~Toulouse~,66]",
uprefix.replace('?title=','?title=DE' + encodeURIComponent(';')) + "&guess=Munich&question=" + encodeURIComponent("What is the largest city of Bavaria?") + "&data=%20[~Munich~,66],%20[~Frankfurt~,66],%20[~Hamburg~,66],%20[~Cologne~,66],%20[~Nuremburg~,66],%20[~Stuttgart~,66]",
uprefix.replace('?title=','?title=ID' + encodeURIComponent(';')) + "&guess=Medan&question=" + encodeURIComponent("What is the largest city on Sumatra?") + "&data=%20[~Makassar~,66],%20[~Semarang~,66],%20[~Depok~,66],%20[~Bandung~,66],%20[~Jakarta~,66],%20[~Medan~,66]",
uprefix.replace('?title=','?title=NE' + encodeURIComponent(';')) + "&guess=Lagos&question=" + encodeURIComponent("What is the largest city in Nigeria?") + "&data=%20[~Kano~,66],%20[~Benin City~,66],%20[~Lagos~,66],%20[~Kaduna~,66],%20[~Ibadan~,66]",
uprefix.replace('?title=','?title=ES' + encodeURIComponent(';')) + "&guess=Barcelona&question=" + encodeURIComponent("Where is the Sagrada Familia in Spain?") + "&data=%20[~Madrid~,66],%20[~Valencia~,66],%20[~Barcelona~,66],%20[~Seville~,66],%20[~Zaragoza~,66]",
uprefix.replace('?title=','?title=BR' + encodeURIComponent(';')) + "&guess=Manaus&question=" + encodeURIComponent("Where is the remotest Opera House in Brazil?") + "&data=%20[~Brasilia~,66],%20[~Rio de Janeiro~,66],%20[~Manaus~,66],%20[~Recife~,66],%20[~Campinas~,66]",
uprefix.replace('?title=','?title=AR' + encodeURIComponent(';')) + "&guess=Rosario&question=" + encodeURIComponent("Where is the National Flag Memorial?") + "&data=%20[~Buenos Aires~,66],%20[~Rosario~,66],%20[~La%20Plata~,66],%20[~Salta~,66],%20[~Mar%20del%20Plata~,66]",
uprefix.replace('?title=','?title=CA' + encodeURIComponent(';')) + "&guess=Quebec%20City&question=" + encodeURIComponent("Where is the French more likely to be heard?") + "&data=%20[~Montreal~,66],%20[~Quebec%20City~,66],%20[~Toronto~,66],%20[~Vancouver~,66],%20[~Winnipeg~,66]",
uprefix.replace('?title=','?title=GB' + encodeURIComponent(';')) + "&guess=Belfast&question=" + encodeURIComponent("Which airport would you get to to see The Giant Staircase?") + "&data=%20[~Liverpool~,66],%20[~Manchester~,66],%20[~Belfast~,66],%20[~London~,66],%20[~Glasgow~,66]",

uprefix + "&guess=Chad&question=" + encodeURIComponent("Which country has a city called Timbuktu?") + "&data=%20[~Iran~,66]%20,%20[~Niger~,66],%20[~Chad~,66],%20[~Nigeria~,66],%20[~Morocco~,66],%20[~Canada~,66],%20[~Germany~,66]",

uprefix + "&guess=Andorra&question=" + encodeURIComponent("Which of these countries has a mountain range called the Pyrenees?") + "&data=%20[~Andorra~,66]%20,%20[~India~,66],%20[~South Africa~,66],%20[~Nigeria~,66],%20[~Morocco~,66],%20[~Canada~,66],%20[~Germany~,66]",

uprefix + "&guess=New Zealand&question=" + encodeURIComponent("Which country has All Blacks that are all-conquering?") + "&data=%20[~New Zealand~,66]%20,%20[~Australia~,66],%20[~South Africa~,66],%20[~France~,66],%20[~United Kingdom~,66],%20[~Italy~,66],%20[~Argentina~,66]",

uprefix + "&guess=Australia&question=" + encodeURIComponent("Which country has the priviledge of governing the Collingwood Football Club?") + "&data=%20[~New Zealand~,66]%20,%20[~Australia~,66],%20[~South Africa~,66],%20[~France~,66],%20[~United Kingdom~,66],%20[~Italy~,66],%20[~Argentina~,66]",

uprefix + "&guess=Ecuador&question=" + encodeURIComponent("Which country governs the Galapagos Islands?") + "&data=%20[~New Zealand~,66]%20,%20[~Australia~,66],%20[~United States~,66],%20[~Mexico~,66],%20[~Ecuador~,66],%20[~Peru~,66],%20[~Belize~,66],%20[~Uruguay~,66],%20[~Paraguay~,66],%20[~Peru~,66],%20[~Bolivia~,66],%20[~Chile~,66],%20[~Colombia~,66]",

uprefix + "&guess=Spain&question=" + encodeURIComponent("Which country has had a history linked to the Shakespearian character Othello, and his ancestry?") + "&data=%20[~New Zealand~,66]%20,%20[~Australia~,66],%20[~Spain~,66],%20[~France~,66],%20[~United Kingdom~,66],%20[~Italy~,66],%20[~Argentina~,66]",

uprefix + "&guess=Japan&question=" + encodeURIComponent("Which country hosts the Nikkei index?") + "&data=%20[~Japan~,66]%20,%20[~Australia~,66],%20[~China~,66],%20[~France~,66],%20[~United Kingdom~,66],%20[~India~,66],%20[~United States~,66],%20[~Argentina~,66]",

uprefix + "&guess=South Africa&question=" + encodeURIComponent("Which African country hosted a soccer World Cup?") + "&data=%20[~Egypt~,66]%20,%20[~Morocco~,66],%20[~Ethiopia~,66],%20[~South Africa~,66],%20[~Kenya~,66],%20[~Nigeria~,66],%20[~Libya~,66],%20[~Chad~,66],%20[~Tanzania~,66]",

uprefix + "&guess=Vanuatu&question=" + encodeURIComponent("Which of these countries is in the Pacific Ocean?") + "&data=%20[~Jamaica~,66],%20[~Trinidad%20and%20Tobago~,66],%20[~Cuba~,66],%20[~Iceland~,66],%20[~Bermuda~,66],%20[~Vanuatu~,66],%20[~Sri Lanka~,66],%20[~Seychelles~,66],%20[~Ireland~,66],%20[~Cyprus~,66],%20[~Malta~,66],%20[~Madagascar~,66]",

uprefix + "&guess=China&question=" + encodeURIComponent("Which country has the largest population?") + "&data=%20[~China~,66]%20,%20[~India~,66],%20[~Pakistan~,66],%20[~Japan~,66],%20[~United States~,66],%20[~Germany~,66],%20[~Indonesia~,66],%20[~Bangladesh~,66],%20[~Russia~,66]",

uprefix + "&guess=Afghanistan&question=" + encodeURIComponent("Which country is not a former Soviet republic?") + "&data=%20[~Armenia~,66]%20,%20[~Azerbaijan~,66],%20[~Georgia~,66],%20[~Turkmenistan~,66],%20[~Tajikistan~,66],%20[~Afghanistan~,66],%20[~Kyrgyzstan~,66],%20[~Uzbekistan~,66],%20[~Russia~,66]",

uprefix + "&guess=Vietnam&question=" + encodeURIComponent("Which country contains the Mekong delta?") + "&data=%20[~Vietnam~,66]%20,%20[~South Korea~,66],%20[~India~,66],%20[~Bangladesh~,66],%20[~Myanmar~,66],%20[~Laos~,66],%20[~Singapore~,66],%20[~Malaysia~,66],%20[~Thailand~,66]",

uprefix + "&guess=Thailand&question=" + encodeURIComponent("Which country shares a border with Malaysia?") + "&data=%20[~Vietnam~,66]%20,%20[~South Korea~,66],%20[~India~,66],%20[~Bangladesh~,66],%20[~Japan~,66],%20[~Laos~,66],%20[~China~,66],%20[~Pakistan~,66],%20[~Thailand~,66]",

uprefix + "&guess=Nepal&question=" + encodeURIComponent("Which of these countries contains Mt Everest?") + "&data=%20[~Vietnam~,66]%20,%20[~South Korea~,66],%20[~Nepal~,66],%20[~Bangladesh~,66],%20[~Germany~,66],%20[~United States~,66],%20[~China~,66],%20[~Pakistan~,66],%20[~Brazil~,66]",

uprefix + "&guess=Sweden&question=" + encodeURIComponent("Which of these countries is at one end of The Bridge?") + "&data=%20[~Finland~,66]%20,%20[~Sweden~,66],%20[~Norway~,66],%20[~Estonia~,66],%20[~Lithuania~,66],%20[~United Kingdom~,66],%20[~France~,66],%20[~Latvia~,66],%20[~Spain~,66],%20[~Colombia~,66]",

uprefix + "&guess=Denmark&question=" + encodeURIComponent("Which country has the krone as its currency?") + "&data=%20[~Finland~,66]%20,%20[~Sweden~,66],%20[~Norway~,66],%20[~Denmark~,66],%20[~Lithuania~,66],%20[~United Kingdom~,66],%20[~Netherlands~,66],%20[~Latvia~,66],%20[~Belarus~,66]",

uprefix + "&guess=Greece&question=" + encodeURIComponent("Which country has a history involving a civilization at Sparta?") + "&data=%20[~Finland~,66]%20,%20[~Sweden~,66],%20[~Norway~,66],%20[~Denmark~,66],%20[~Italy~,66],%20[~Greece~,66],%20[~Macedonia~,66],%20[~Albania~,66],%20[~Ukraine~,66]",

uprefix + "&guess=Australia&question=" + encodeURIComponent("Which country has monotremes, the echidna and the platypus?") + "&data=%20[~China~,66]%20,%20[~Brazil~,66],%20[~South Africa~,66],%20[~Australia~,66],%20[~United States~,66],%20[~Switzerland~,66],%20[~Austria~,66],%20[~Australia~,66],%20[~Argentina~,66]",

uprefix + "&guess=Botswana&question=" + encodeURIComponent("Which country produces diamonds?") + "&data=%20[~Sri Lanka~,66]%20,%20[~United Kingdom~,66],%20[~Egypt~,66],%20[~Algeria~,66],%20[~Spain~,66],%20[~Portugal~,66],%20[~Botswana~,66],%20[~Laos~,66],%20[~Peru~,66]",

uprefix + "&guess=Venezuela&question=" + encodeURIComponent("Which country has Caracas as its capital city?") + "&data=%20[~Ecuador~,66]%20,%20[~Peru~,66],%20[~Mexico~,66],%20[~Costa Rica~,66],%20[~Venezuela~,66],%20[~Bolivia~,66],%20[~Guatemala~,66],%20[~Sudan~,66],%20[~Somalia~,66]",

uprefix + "&guess=Cameroon&question=" + encodeURIComponent("Which country has a port city called Douala?") + "&data=%20[~Chile~,66]%20,%20[~Ecuador~,66],%20[~Mexico~,66],%20[~Panama~,66],%20[~Cameroon~,66],%20[~India~,66],%20[~China~,66],%20[~Burkina Faso~,66],%20[~Ghana~,66]",

uprefix + "&guess=Yemen&question=" + encodeURIComponent("Which country has a coastline bordering the Gulf of Aden?") + "&data=%20[~Chile~,66]%20,%20[~Ecuador~,66],%20[~Mexico~,66],%20[~Panama~,66],%20[~Yemen~,66],%20[~Sudan~,66],%20[~Turkey~,66],%20[~Rwanda~,66],%20[~Ghana~,66]",

uprefix + "&guess=Switzerland&question=" + encodeURIComponent("Which country is landlocked?") + "&data=%20[~Germany~,66]%20,%20[~Switzerland~,66],%20[~Netherlands~,66],%20[~Myanmar~,66],%20[~Belarus~,66],%20[~Ukraine~,66],%20[~Bulgaria~,66],%20[~Romania~,66],%20[~Monaco~,66]",

uprefix + "&guess=Slovenia&question=" + encodeURIComponent("Which country does not have the Danube River flowing through it?") + "&data=%20[~Slovakia~,66]%20,%20[~Slovenia~,66],%20[~Germany~,66],%20[~Austria~,66],%20[~Moldova~,66],%20[~Hungary~,66],%20[~Bulgaria~,66],%20[~Romania~,66],%20[~Ukraine~,66]",

uprefix + "&guess=Norway&question=" + encodeURIComponent("Which country has fjords?") + "&data=%20[~Brazil~,66]%20,%20[~Australia~,66],%20[~Norway~,66],%20[~Morocco~,66],%20[~Argentina~,66]",
uprefix + "&guess=Egypt&question=" + encodeURIComponent("Which country is the land of the pharaohs?") + "&data=%20[~Morocco~,66]%20,%20[~Australia~,66],%20[~China~,66],%20[~Egypt~,66],%20[~Argentina~,66]",
uprefix + "&guess=Russia&question=" + encodeURIComponent("Which country has the Trans-Siberian railway?") + "&data=%20[~Brazil~,66]%20,%20[~Russia~,66],%20[~Norway~,66],%20[~Morocco~,66],%20[~Argentina~,66],%20[~Germany~,66]",
uprefix + "&guess=Germany&question=" + encodeURIComponent("Which country is more likely to have oompah music?") + "&data=%20[~Brazil~,66]%20,%20[~Australia~,66],%20[~Norway~,66],%20[~Morocco~,66],%20[~Russia~,66],%20[~Finland~,66],%20[~Germany~,66],%20[~Argentina~,66]"
];

function ourprompt(blurb, def) {
var ourps='';
if (notsofast) {
document.getElementById('message').innerHTML='';
return 'ourps=prompt(blurb, def)';
} else {
document.getElementById('message').innerHTML='<p>' + blurb + '</p><br><input style=background-color:yellow; type=button value=Ready? onclick=filliframe();></input>';
notsofast=true;
}
return ourps;
}

function paq() {
pickaquestion(false);
}

function startyt() {
var was=document.title;
notsofast=false;
if (was.indexOf('Country ') != 0) document.title='Country ' + was;
document.getElementById('tdmydiv').style.width='800px;'
document.getElementById('tdmydiv').style.height='720px;'
document.getElementById('mydiv').style.width='800px;'
document.getElementById('mydiv').style.height='720px;'
document.getElementById('mydiv').innerHTML=document.getElementById('mydiv').innerHTML.split('<br>')[0] + '<br><iframe style="border:8px solid yellow;width:800px;height:700px;" src="http://www.rjmprogramming.com.au/HTMLCSS/karaoke_youtube_api.htm?vid=' + encodeURIComponent(' ' + tname) + '" title="' + okn + '"></iframe>';
}

function checkit() {
var one_thousand=1000;
if (document.getElementById('score').innerHTML != cscore) {
tname=decodeURIComponent(url_array[lastq].split('&guess=')[1].split('&')[0]);
okn='YouTube videos related to ' + decodeURIComponent(url_array[lastq].split('&guess=')[1].split('&')[0]);
if (document.getElementById("oura")) {
document.getElementById('oura').title=okn;
document.getElementById('oura').innerHTML=okn;
} else {
document.getElementById('mydiv').innerHTML='<a id="oura" onclick="startyt();" style="padding:5px 5px 5px 5px;border:3px solid orange;background-color:yellow;cursor:pointer;text-decoration:underline;" title="' + okn + '">' + okn + '</a><br>';
}
cscore=document.getElementById('score').innerHTML;
if (1 == 1) {
one_thousand=3000;
setTimeout(paq,2500);
} else {
pickaquestion(false);
}
}
setTimeout(checkit,one_thousand);
}

function filliframe() {
document.getElementById('message').innerHTML='';
document.getElementById('myquiziframe').style.display='block';
document.getElementById('myquiziframe').src=url_array[thisq];
lastq=thisq;
}

function pickaquestion(first_time) {
var opret='';
if (nextq >= 0) {
thisq=nextq;
nextq=-1;
} else {
while (thisq == lastq) {
thisq=Math.floor(Math.random() * url_array.length);
}
}
if (first_time) {
cscore=document.getElementById('score').innerHTML;
setTimeout(checkit,1000);
cscore='Score: 0/0';
document.getElementById('score').innerHTML=cscore;
filliframe();
} else {
opret=ourprompt(decodeURIComponent(url_array[thisq].split('&question=')[1].split('&')[0]),decodeURIComponent(url_array[thisq].split('&guess=')[1].split('&')[0]));
if (opret != '') filliframe();
}
//document.getElementById('myquiziframe').style.display='block';
//document.getElementById('myquiziframe').src=url_array[thisq];
//lastq=thisq;
}

function premapthis(cv) {
var vbit, ibit, sbits, selbitis=document.getElementById('ccode').innerHTML.replace(/value='/g,'value=').replace(/value="/g,'value=').toUpperCase();
if (cv != '') {
//alert(selbitis);
if (selbitis.indexOf(' VALUE=' + cv.toUpperCase()) != -1) {
sbits=document.getElementById('ccode').innerHTML.replace(/value='/g,'value=').replace(/value="/g,'value=').split(' value=' + cv.toUpperCase());
if (sbits[1].indexOf(' - ') != -1) {
ibit=sbits[1].split(' - ')[1].split('<')[0];
document.getElementById('icountry').value=ibit.replace("~","'");
}
}
}
}

function mapthis(cv) {
var vbit, ibit, sbits, selbitis=document.getElementById('ccode').innerHTML.toUpperCase();
if (cv != '') {
if (selbitis.indexOf(' - ' + cv.toUpperCase()) != -1) {
sbits=selbitis.split(' - ' + cv.toUpperCase());
ibit=document.getElementById('ccode').innerHTML.substring(eval(sbits[0].length + 3)).split('<')[0];
vbit=sbits[0].split(' VALUE=')[eval(-1 + sbits[0].split(' VALUE=').length)].replace("'",'').replace("'",' ').replace('"','').replace('"',' ').replace('>',' ').split(' ')[0];
document.getElementById('ccode').value=vbit;
//alert(ibit + ' vs ' + cv);
if (ibit != cv) document.getElementById('icountry').value=ibit.replace("~","'");
}
}
}

function addthis() {
var retval="", things, ithings;
var ccountry=document.getElementById('icountry').value;
var ccode=document.getElementById('ccode').value;
var ccity=document.getElementById('icity').value;
var clist=document.getElementById('ilist').value;
var cquestion=document.getElementById('iquestion').value;

if (ccity != '') {
if (clist.toLowerCase().indexOf(ccity.toLowerCase()) == -1) {
return retval;
}
} else if (clist.toLowerCase().indexOf(ccountry.toLowerCase()) == -1) {
return retval;
}
if (cquestion == '') return retval;
things=clist.split(',');
retval="&data=%20[~" + encodeURIComponent(things[0]) + "~,66]";
for (ithings=1; ithings<things.length; ithings++) {
retval+=",%20[~" + encodeURIComponent(things[ithings]) + "~,66]";
}
if (ccity != '') {
//alert(uprefix.replace('?title=','?title=' + ccode + encodeURIComponent(';')) + "&guess=" + encodeURIComponent(ccity) + "&question=" + encodeURIComponent(cquestion) + retval);
url_array.push(uprefix.replace('?title=','?title=' + ccode + encodeURIComponent(';')) + "&guess=" + encodeURIComponent(ccity) + "&question=" + encodeURIComponent(cquestion) + retval);
nextq=eval(-1 + url_array.length);
} else {
//alert(uprefix + "&guess=" + encodeURIComponent(ccountry) + "&question=" + encodeURIComponent(cquestion) + retval);
url_array.push(uprefix + "&guess=" + encodeURIComponent(ccountry) + "&question=" + encodeURIComponent(cquestion) + retval);
nextq=eval(-1 + url_array.length);
}
document.getElementById('icountry').value='';
document.getElementById('ccode').value='';
document.getElementById('icity').value='';
document.getElementById('ilist').value='';
document.getElementById('iquestion').value='';
return retval;
}

</script>
</head>
<body onload=' pickaquestion(true); ' style="background: url('worldwide_country_quiz.PNG'); ">
<table cellspacing=20 cellpadding=20><tbody><tr><td style='width:560px;color: white; '>
<h1>Your Worldwide Country Quiz <a href='#addyourown' title='Add your Own Question to the Mix' onclick=" document.getElementById('addyourown').style.display='block'; " style="background-color:white;cursor:pointer;text-decoration:none;">➕</a></h1>
<h2>RJM Programming - January, 2017</h2>
<div id='message'></div>
<h4 id='score'>Score: 0/0 Thanks to <a target=_blank title='Thanks for the background image' href='http://pixabay.com'>pixabay</a> for today's background image.</h4>
<iframe style='display:none;border:8px solid yellow;width:556px;height:450px;' src='about:blank' id='myquiziframe'></iframe><br>
<div id='addyourown' style='border:8px solid yellow;background-color:silver;padding: 5px 5px 5px 5px;display:none;'>
<span id='scountry'>Country: <input onfocus='notsofast=false;' onblur=' mapthis(this.value); ' style='width:150px;' type='text' value='' id='icountry'></input><select onchange=' notsofast=false; premapthis(this.value); ' id='ccode'><option value=''>ISO Two Letter Code</option>
<option value="AF">AF - Afghanistan</option>
<option value="AX">AX - Aland Islands</option>
<option value="AL">AL - Albania</option>
<option value="DZ">DZ - Algeria</option>
<option value="AS">AS - American Samoa</option>
<option value="AD">AD - Andorra</option>
<option value="AO">AO - Angola</option>
<option value="AI">AI - Anguilla</option>
<option value="AQ">AQ - Antarctica</option>
<option value="AG">AG - Antigua and Barbuda</option>
<option value="AR">AR - Argentina</option>
<option value="AM">AM - Armenia</option>
<option value="AW">AW - Aruba</option>
<option value="AU">AU - Australia</option>
<option value="AT">AT - Austria</option>
<option value="AZ">AZ - Azerbaijan</option>
<option value="BS">BS - Bahamas the</option>
<option value="BH">BH - Bahrain</option>
<option value="BD">BD - Bangladesh</option>
<option value="BB">BB - Barbados</option>
<option value="BY">BY - Belarus</option>
<option value="BE">BE - Belgium</option>
<option value="BZ">BZ - Belize</option>
<option value="BJ">BJ - Benin</option>
<option value="BM">BM - Bermuda</option>
<option value="BT">BT - Bhutan</option>
<option value="BO">BO - Bolivia</option>
<option value="BA">BA - Bosnia and Herzegovina</option>
<option value="BW">BW - Botswana</option>
<option value="BV">BV - Bouvet Island (Bouvetoya)</option>
<option value="BR">BR - Brazil</option>
<option value="IO">IO - British Indian Ocean Territory (Chagos Archipelago)</option>
<option value="VG">VG - British Virgin Islands</option>
<option value="BN">BN - Brunei Darussalam</option>
<option value="BG">BG - Bulgaria</option>
<option value="BF">BF - Burkina Faso</option>
<option value="BI">BI - Burundi</option>
<option value="KH">KH - Cambodia</option>
<option value="CM">CM - Cameroon</option>
<option value="CA">CA - Canada</option>
<option value="CV">CV - Cape Verde</option>
<option value="KY">KY - Cayman Islands</option>
<option value="CF">CF - Central African Republic</option>
<option value="TD">TD - Chad</option>
<option value="CL">CL - Chile</option>
<option value="CN">CN - China</option>
<option value="CX">CX - Christmas Island</option>
<option value="CC">CC - Cocos (Keeling) Islands</option>
<option value="CO">CO - Colombia</option>
<option value="KM">KM - Comoros the</option>
<option value="CD">CD - Congo</option>
<option value="CG">CG - Congo the</option>
<option value="CK">CK - Cook Islands</option>
<option value="CR">CR - Costa Rica</option>
<option value="CI">CI - Cote d~Ivoire</option>
<option value="HR">HR - Croatia</option>
<option value="CU">CU - Cuba</option>
<option value="CY">CY - Cyprus</option>
<option value="CZ">CZ - Czech Republic</option>
<option value="DK">DK - Denmark</option>
<option value="DJ">DJ - Djibouti</option>
<option value="DM">DM - Dominica</option>
<option value="DO">DO - Dominican Republic</option>
<option value="EC">EC - Ecuador</option>
<option value="EG">EG - Egypt</option>
<option value="SV">SV - El Salvador</option>
<option value="GQ">GQ - Equatorial Guinea</option>
<option value="ER">ER - Eritrea</option>
<option value="EE">EE - Estonia</option>
<option value="ET">ET - Ethiopia</option>
<option value="FO">FO - Faroe Islands</option>
<option value="FK">FK - Falkland Islands (Malvinas)</option>
<option value="FJ">FJ - Fiji the Fiji Islands</option>
<option value="FI">FI - Finland</option>
<option value="FR">FR - France, French Republic</option>
<option value="GF">GF - French Guiana</option>
<option value="PF">PF - French Polynesia</option>
<option value="TF">TF - French Southern Territories</option>
<option value="GA">GA - Gabon</option>
<option value="GM">GM - Gambia the</option>
<option value="GE">GE - Georgia</option>
<option value="DE">DE - Germany</option>
<option value="GH">GH - Ghana</option>
<option value="GI">GI - Gibraltar</option>
<option value="GR">GR - Greece</option>
<option value="GL">GL - Greenland</option>
<option value="GD">GD - Grenada</option>
<option value="GP">GP - Guadeloupe</option>
<option value="GU">GU - Guam</option>
<option value="GT">GT - Guatemala</option>
<option value="GG">GG - Guernsey</option>
<option value="GN">GN - Guinea</option>
<option value="GW">GW - Guinea-Bissau</option>
<option value="GY">GY - Guyana</option>
<option value="HT">HT - Haiti</option>
<option value="HM">HM - Heard Island and McDonald Islands</option>
<option value="VA">VA - Holy See (Vatican City State)</option>
<option value="HN">HN - Honduras</option>
<option value="HK">HK - Hong Kong</option>
<option value="HU">HU - Hungary</option>
<option value="IS">IS - Iceland</option>
<option value="IN">IN - India</option>
<option value="ID">ID - Indonesia</option>
<option value="IR">IR - Iran</option>
<option value="IQ">IQ - Iraq</option>
<option value="IE">IE - Ireland</option>
<option value="IM">IM - Isle of Man</option>
<option value="IL">IL - Israel</option>
<option value="IT">IT - Italy</option>
<option value="JM">JM - Jamaica</option>
<option value="JP">JP - Japan</option>
<option value="JE">JE - Jersey</option>
<option value="JO">JO - Jordan</option>
<option value="KZ">KZ - Kazakhstan</option>
<option value="KE">KE - Kenya</option>
<option value="KI">KI - Kiribati</option>
<option value="KP">KP - Korea</option>
<option value="KR">KR - Korea</option>
<option value="KW">KW - Kuwait</option>
<option value="KG">KG - Kyrgyz Republic</option>
<option value="LA">LA - Laos</option>
<option value="LV">LV - Latvia</option>
<option value="LB">LB - Lebanon</option>
<option value="LS">LS - Lesotho</option>
<option value="LR">LR - Liberia</option>
<option value="LY">LY - Libyan Arab Jamahiriya</option>
<option value="LI">LI - Liechtenstein</option>
<option value="LT">LT - Lithuania</option>
<option value="LU">LU - Luxembourg</option>
<option value="MO">MO - Macao</option>
<option value="MK">MK - Macedonia</option>
<option value="MG">MG - Madagascar</option>
<option value="MW">MW - Malawi</option>
<option value="MY">MY - Malaysia</option>
<option value="MV">MV - Maldives</option>
<option value="ML">ML - Mali</option>
<option value="MT">MT - Malta</option>
<option value="MH">MH - Marshall Islands</option>
<option value="MQ">MQ - Martinique</option>
<option value="MR">MR - Mauritania</option>
<option value="MU">MU - Mauritius</option>
<option value="YT">YT - Mayotte</option>
<option value="MX">MX - Mexico</option>
<option value="FM">FM - Micronesia</option>
<option value="MD">MD - Moldova</option>
<option value="MC">MC - Monaco</option>
<option value="MN">MN - Mongolia</option>
<option value="ME">ME - Montenegro</option>
<option value="MS">MS - Montserrat</option>
<option value="MA">MA - Morocco</option>
<option value="MZ">MZ - Mozambique</option>
<option value="MM">NM - Myanmar</option>
<option value="NA">NA - Namibia</option>
<option value="NR">NR - Nauru</option>
<option value="NP">NP - Nepal</option>
<option value="AN">AN - Netherlands Antilles</option>
<option value="NL">NL - Netherlands the</option>
<option value="NC">NC - New Caledonia</option>
<option value="NZ">NZ - New Zealand</option>
<option value="NI">NI - Nicaragua</option>
<option value="NE">NE - Niger</option>
<option value="NG">NG - Nigeria</option>
<option value="NU">NU - Niue</option>
<option value="NF">NF - Norfolk Island</option>
<option value="MP">MP - Northern Mariana Islands</option>
<option value="NO">NO - Norway</option>
<option value="OM">OM - Oman</option>
<option value="PK">PK - Pakistan</option>
<option value="PW">PW - Palau</option>
<option value="PS">PS - Palestinian Territory</option>
<option value="PA">PA - Panama</option>
<option value="PG">PG - Papua New Guinea</option>
<option value="PY">PY - Paraguay</option>
<option value="PE">PE - Peru</option>
<option value="PH">PH - Philippines</option>
<option value="PN">PN - Pitcairn Islands</option>
<option value="PL">PL - Poland</option>
<option value="PT">PT - Portugal, Portuguese Republic</option>
<option value="PR">PR - Puerto Rico</option>
<option value="QA">QA - Qatar</option>
<option value="RE">RE - Reunion</option>
<option value="RO">RO - Romania</option>
<option value="RU">RU - Russian Federation</option>
<option value="RW">RW - Rwanda</option>
<option value="BL">BL - Saint Barthelemy</option>
<option value="SH">SH - Saint Helena</option>
<option value="KN">KN - Saint Kitts and Nevis</option>
<option value="LC">LC - Saint Lucia</option>
<option value="MF">MF - Saint Martin</option>
<option value="PM">PM - Saint Pierre and Miquelon</option>
<option value="VC">VC - Saint Vincent and the Grenadines</option>
<option value="WS">WS - Samoa</option>
<option value="SM">SM - San Marino</option>
<option value="ST">ST - Sao Tome and Principe</option>
<option value="SA">SA - Saudi Arabia</option>
<option value="SN">SN - Senegal</option>
<option value="RS">RS - Serbia</option>
<option value="SC">SC - Seychelles</option>
<option value="SL">SL - Sierra Leone</option>
<option value="SG">SG - Singapore</option>
<option value="SK">SK - Slovakia (Slovak Republic)</option>
<option value="SI">SI - Slovenia</option>
<option value="SB">SB - Solomon Islands</option>
<option value="SO">SO - Somalia, Somali Republic</option>
<option value="ZA">ZA - South Africa</option>
<option value="GS">GS - South Georgia and the South Sandwich Islands</option>
<option value="ES">ES - Spain</option>
<option value="LK">LK - Sri Lanka</option>
<option value="SD">SD - Sudan</option>
<option value="SR">SR - Suriname</option>
<option value="SJ">SJ - Svalbard & Jan Mayen Islands</option>
<option value="SZ">SZ - Swaziland</option>
<option value="SE">SE - Sweden</option>
<option value="CH">CH - Switzerland, Swiss Confederation</option>
<option value="SY">SY - Syrian Arab Republic</option>
<option value="TW">TW - Taiwan</option>
<option value="TJ">TJ - Tajikistan</option>
<option value="TZ">TZ - Tanzania</option>
<option value="TH">TH - Thailand</option>
<option value="TL">TL - Timor-Leste</option>
<option value="TG">TG - Togo</option>
<option value="TK">TK - Tokelau</option>
<option value="TO">TO - Tonga</option>
<option value="TT">TT - Trinidad and Tobago</option>
<option value="TN">TN - Tunisia</option>
<option value="TR">TR - Turkey</option>
<option value="TM">TM - Turkmenistan</option>
<option value="TC">TC - Turks and Caicos Islands</option>
<option value="TV">TV - Tuvalu</option>
<option value="UG">UG - Uganda</option>
<option value="UA">UA - Ukraine</option>
<option value="AE">AE - United Arab Emirates</option>
<option value="GB">GB - United Kingdom</option>
<option value="US">US - United States of America</option>
<option value="UM">UM - United States Minor Outlying Islands</option>
<option value="VI">VI - United States Virgin Islands</option>
<option value="UY">UY - Uruguay, Eastern Republic of</option>
<option value="UZ">UZ - Uzbekistan</option>
<option value="VU">VU - Vanuatu</option>
<option value="VE">VE - Venezuela</option>
<option value="VN">VN - Vietnam</option>
<option value="WF">WF - Wallis and Futuna</option>
<option value="EH">EH - Western Sahara</option>
<option value="YE">YE - Yemen</option>
<option value="ZM">ZM - Zambia</option>
<option value="ZW">ZW - Zimbabwe</option>
</select></span><br>
<span id='scity'>City (optional): <input onfocus='notsofast=false;' style='width:150px;' type='text' value='' id='icity'></input></span><br>
<span id='slist'>List of Alternatives (comma separate): <input onfocus='notsofast=false;' style='width:350px;' type='text' value='' id='ilist'></input></span><br>
<span id='squestion'>Question: <input onfocus='notsofast=false;' style='width:350px;' type='text' value='' id='iquestion'></input></span><br><br>
<input style='background-color:magenta;' onclick=' addthis(); ' type='button' value='Add Your Own Question to Mix'></input>
</div>
</td><td id='tdmydiv' style='vertical-align:top;'><div id='mydiv'></div></td></tr></tbody></table>
</body>
</html>