<html>
<head>
<meta charset="UTF-8"/>
<title>Country Based Data - RJM Programming - April, 2023 ... thanks to https://web.archive.org/web/20150319012353/http://opengeocode.org/cude/download.php?file=/home/fashions/public_html/opengeocode.org/download/cow.txt</title>
<style>
th, td { text-align: center; }
</style>
<script type=text/javascript>
var origihcode='', origihname='';
var prevval='', lines=[];
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 ccchar="", ccsuff="";
var lri="ABCDEFGHIJKLMNOPQRSTUVWXYZ";
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"];
for (var iccsuff=0; iccsuff<thiscc.length; iccsuff++) {
ccchar=thiscc.substring(iccsuff, eval(1 + eval('' + iccsuff))).toUpperCase();
ccsuff+=String.fromCodePoint(eval('' + dri[eval('' + lri.indexOf(ccchar))])); //'' + dri[eval('' + lri.indexOf(ccchar))] + ';';
}
return ccsuff;
}
function checkif(iois, four) {
var aconto = (iois.contentWindow || iois.contentDocument);
var altwo='', altthree='';
if (aconto != null) {
if (aconto.document) { aconto = aconto.document; }
if (aconto.body != null) {
if (origihcode == '') {
origihcode=document.getElementById('ccode').innerHTML;
origihname=document.getElementById('cname').innerHTML;
} else {
document.getElementById('ccode').innerHTML=origihcode;
document.getElementById('cname').innerHTML=origihname;
}
var cols=[];
lines=aconto.body.innerText.split(String.fromCharCode(10));
document.getElementById('tdcapital').innerHTML='';
for (var i=0; i<lines.length; i++) {
cols=lines[i].split(';');
httpstuff='';
httpstuff='HTTP.' + encodeURIComponent(('' + cols[36]).trim()) + '%2Chttp.' + encodeURIComponent(('' + cols[36]).trim()) + '%2Chttp.'+ encodeURIComponent(('' + cols[4]).trim()) + '%2Chttp:' + encodeURIComponent(('' + cols[4]).trim());
//if (cols[0] == 'AU') { console.log('' + cols[43] + ' ... to ... ' + cols[46]); }
altwo="/PHP/Map/map.php?title=" + encodeURIComponent(('' + cols[4]).trim()) + "&onclick=y&label=['Lat',&value='Lon','Name']&data=,[" + ('' + cols[43]).replace(/\ /g,'') + "," + ('' + cols[44]).replace(/\ /g,'') + ",~" + encodeURIComponent(('' + cols[36]).trim()) + "~],%20[" + ('' + cols[45]).replace(/\ /g,'') + "," + ('' + cols[46]).replace(/\ /g,'') + ",~" + encodeURIComponent(('' + cols[36]).trim()) + "~],%20[" + ('' + cols[61]).replace(/\ /g,'') + "," + ('' + cols[62]).replace(/\ /g,'') + ",~" + encodeURIComponent(('' + cols[4]).trim() + ' north west place') + "~],%20[" + ('' + cols[64]).replace(/\ /g,'') + "," + ('' + cols[65]).replace(/\ /g,'') + ",~" + encodeURIComponent(('' + cols[4]).trim() + ' south east place') + "~]";
altthree="/PHP/GeoChart/geo_chart.php?title=" + cols[0] + ";" + encodeURIComponent(('' + cols[4]).trim()) + "%20Places&aregexographicals=y&aregeographicals=" + httpstuff + "&width=834&height=520&country=Places&popularity=&data=%20[" + ('' + cols[43]).replace(/\ /g,'') + "|" + ('' + cols[44]).replace(/\ /g,'') + "|~" + encodeURIComponent(('' + cols[36]).trim()) + "~,2]%20,%20[" + ('' + cols[45]).replace(/\ /g,'') + "|" + ('' + cols[46]).replace(/\ /g,'') + "|~" + encodeURIComponent(('' + cols[36]).trim()) + "~,2]%20,%20[" + ('' + cols[61]).replace(/\ /g,'') + "|" + ('' + cols[62]).replace(/\ /g,'') + "|~" + encodeURIComponent(('' + cols[4]).trim() + ' north west place') + "~,2]%20,%20[" + ('' + cols[64]).replace(/\ /g,'') + "|" + ('' + cols[65]).replace(/\ /g,'') + "|~" + encodeURIComponent(('' + cols[4]).trim() + ' south east place') + "~,2]";
if (eval('' + lines[i].length) > 3 && eval('' + cols[0].length) == 2 && eval('' + cols.length) > eval('' + four)) {
if (prevval != '' && prevval.indexOf(orflag(cols[0])) != -1) {
var ihis='<option data-geourl="' + altthree + '" data-mapurl="' + altwo + '" data-capital="' + cols[36].trim() + '" data-capital4="' + cols[36].trim() + '" data-capital8="' + cols[39].trim() + '" data-capital15="' + cols[40].trim() + '" data-capital17="' + cols[41].trim() + '" data-capital32="' + cols[42].trim() + '" data-capital29="' + cols[36].trim() + '" value="' + cols[0] + ' ' + orflag(cols[0]) + '" selected>' + (cols[eval('' + four)].trim() == '' ? cols[4] : cols[eval('' + four)]) + ' ' + orflag(cols[0]) + '</option>';
document.getElementById('tdcapital').innerHTML=(('' + ihis.split(' data-capital' + document.getElementById('lang').value + '="')[1].split('"')[0].trim()) == '' ? ('' + ihis.split(' data-capital' + '="')[1].split('"')[0].trim()) : ('' + ihis.split(' data-capital' + document.getElementById('lang').value + '="')[1].split('"')[0].trim()) );
if (('' + document.getElementById('lang').value) != '4' && document.getElementById('tdcapital').innerHTML != '') {
if (document.getElementById('tdcapital').innerHTML != ('' + cols[36]).trim() || ('' + cols[4]).trim() != (cols[eval('' + four)].trim() == '' ? cols[4] : cols[eval('' + four)])) {
ihis=ihis.replace(';' + encodeURIComponent(('' + cols[4]).trim()), ';' + encodeURIComponent((cols[eval('' + four)].trim() == '' ? cols[4] : cols[eval('' + four)])));
ihis=ihis.replace('~' + encodeURIComponent(('' + cols[4]).trim()), '~' + encodeURIComponent((cols[eval('' + four)].trim() == '' ? cols[4] : cols[eval('' + four)])));
ihis=ihis.replace('~' + encodeURIComponent(('' + cols[4]).trim()), '~' + encodeURIComponent((cols[eval('' + four)].trim() == '' ? cols[4] : cols[eval('' + four)])));
ihis=ihis.replace('=' + encodeURIComponent(('' + cols[4]).trim()), '=' + encodeURIComponent((cols[eval('' + four)].trim() == '' ? cols[4] : cols[eval('' + four)])));
ihis=ihis.replace('~' + encodeURIComponent(('' + cols[36]).trim()), '~' + encodeURIComponent(document.getElementById('tdcapital').innerHTML));
ihis=ihis.replace('~' + encodeURIComponent(('' + cols[36]).trim()), '~' + encodeURIComponent(document.getElementById('tdcapital').innerHTML));
var jhis=altwo; //document.getElementById('ifl').src;
jhis=jhis.replace(';' + encodeURIComponent(('' + cols[4]).trim()), ';' + encodeURIComponent((cols[eval('' + four)].trim() == '' ? cols[4] : cols[eval('' + four)])));
jhis=jhis.replace('~' + encodeURIComponent(('' + cols[4]).trim()), '~' + encodeURIComponent((cols[eval('' + four)].trim() == '' ? cols[4] : cols[eval('' + four)])));
jhis=jhis.replace('~' + encodeURIComponent(('' + cols[4]).trim()), '~' + encodeURIComponent((cols[eval('' + four)].trim() == '' ? cols[4] : cols[eval('' + four)])));
jhis=jhis.replace('=' + encodeURIComponent(('' + cols[4]).trim()), '=' + encodeURIComponent((cols[eval('' + four)].trim() == '' ? cols[4] : cols[eval('' + four)])));
jhis=jhis.replace('~' + encodeURIComponent(('' + cols[36]).trim()), '~' + encodeURIComponent(document.getElementById('tdcapital').innerHTML));
jhis=jhis.replace('~' + encodeURIComponent(('' + cols[36]).trim()), '~' + encodeURIComponent(document.getElementById('tdcapital').innerHTML));
document.getElementById('ifl').src=jhis;
jhis=altthree; //document.getElementById('ifr').src;
jhis=jhis.replace(';' + encodeURIComponent(('' + cols[4]).trim()), ';' + encodeURIComponent((cols[eval('' + four)].trim() == '' ? cols[4] : cols[eval('' + four)])));
jhis=jhis.replace('~' + encodeURIComponent(('' + cols[4]).trim()), '~' + encodeURIComponent((cols[eval('' + four)].trim() == '' ? cols[4] : cols[eval('' + four)])));
jhis=jhis.replace('~' + encodeURIComponent(('' + cols[4]).trim()), '~' + encodeURIComponent((cols[eval('' + four)].trim() == '' ? cols[4] : cols[eval('' + four)])));
jhis=jhis.replace('=' + encodeURIComponent(('' + cols[4]).trim()), '=' + encodeURIComponent((cols[eval('' + four)].trim() == '' ? cols[4] : cols[eval('' + four)])));
jhis=jhis.replace('~' + encodeURIComponent(('' + cols[36]).trim()), '~' + encodeURIComponent(document.getElementById('tdcapital').innerHTML));
jhis=jhis.replace('~' + encodeURIComponent(('' + cols[36]).trim()), '~' + encodeURIComponent(document.getElementById('tdcapital').innerHTML));
document.getElementById('ifr').src=jhis;
}
}
document.getElementById('cname').innerHTML+=ihis;
document.getElementById('ccode').innerHTML+='<option data-geourl="' + altthree + '" data-mapurl="' + altwo + '" data-capital="' + cols[36].trim() + '" data-capital4="' + cols[36].trim() + '" data-capital8="' + cols[39].trim() + '" data-capital15="' + cols[40].trim() + '" data-capital17="' + cols[41].trim() + '" data-capital32="' + cols[42].trim() + '" data-capital29="' + cols[36].trim() + '" value="' + (cols[eval('' + four)].trim() == '' ? cols[4] : cols[eval('' + four)]) + ' ' + orflag(cols[0]) + '" selected>' + cols[0] + ' ' + orflag(cols[0]) + '</option>';
} else {
document.getElementById('cname').innerHTML+='<option data-geourl="' + altthree + '" data-mapurl="' + altwo + '" data-capital="' + cols[36].trim() + '" data-capital4="' + cols[36].trim() + '" data-capital8="' + cols[39].trim() + '" data-capital15="' + cols[40].trim() + '" data-capital17="' + cols[41].trim() + '" data-capital32="' + cols[42].trim() + '" data-capital29="' + cols[36].trim() + '" value="' + cols[0] + ' ' + orflag(cols[0]) + '">' + (cols[eval('' + four)].trim() == '' ? cols[4] : cols[eval('' + four)]) + ' ' + orflag(cols[0]) + '</option>';
document.getElementById('ccode').innerHTML+='<option data-geourl="' + altthree + '" data-mapurl="' + altwo + '" data-capital="' + cols[36].trim() + '" data-capital4="' + cols[36].trim() + '" data-capital8="' + cols[39].trim() + '" data-capital15="' + cols[40].trim() + '" data-capital17="' + cols[41].trim() + '" data-capital32="' + cols[42].trim() + '" data-capital29="' + cols[36].trim() + '" value="' + (cols[eval('' + four)].trim() == '' ? cols[4] : cols[eval('' + four)]) + ' ' + orflag(cols[0]) + '">' + cols[0] + ' ' + orflag(cols[0]) + '</option>';
}
}
}
}
}
prevval='';
}
function fixother(iso) {
var inid=iso.id;
var altwo='', cols=[];
var four=('' + document.getElementById('lang').value);
iso.options[iso.selectedIndex].getAttribute('data-mapurl');
var val=iso.options[iso.selectedIndex].innerText;
var tdcap='';
if (iso.value == '') { val=''; } else { altwo='<iframe id=ifl style=display:inline-block;width:32%;height:600px; src="' + iso.options[iso.selectedIndex].getAttribute('data-mapurl') + '"></iframe>'; altwo+='<iframe id=ifr style=display:inline-block;width:66%;height:600px; src="' + iso.options[iso.selectedIndex].getAttribute('data-geourl') + '"></iframe>'; tdcap=(('' + iso.options[iso.selectedIndex].getAttribute('data-capital' + document.getElementById('lang').value)).replace(/^null/g,'').replace(/^undefined/g,'').trim() == '' ? ('' + iso.options[iso.selectedIndex].getAttribute('data-capital')).replace(/^null/g,'').replace(/^undefined/g,'').trim() : ('' + iso.options[iso.selectedIndex].getAttribute('data-capital' + document.getElementById('lang').value)).replace(/^null/g,'').replace(/^undefined/g,'').trim()); }
//alert('this value=' + iso.value + ' and this id=' + iso.id + ' to id=' + inid.replace('ccode','CNAME').replace('cname','CCODE').toLowerCase());
document.getElementById(inid.replace('ccode','CNAME').replace('cname','CCODE').toLowerCase()).value=val;
document.getElementById('tdcapital').innerHTML=tdcap;
if (('' + document.getElementById('lang').value) != '4' && document.getElementById('tdcapital').innerHTML != '') {
for (var i=0; i<lines.length; i++) {
if (lines[i].split(';')[0] == document.getElementById('cname').value.split(' ')[0]) {
cols=lines[i].split(';');
}
}
if (document.getElementById('tdcapital').innerHTML != ('' + cols[36]).trim() || ('' + cols[4]).trim() != (cols[eval('' + four)].trim() == '' ? cols[4] : cols[eval('' + four)])) {
altwo=altwo.replace(';' + encodeURIComponent(('' + cols[4]).trim()), ';' + encodeURIComponent((cols[eval('' + four)].trim() == '' ? cols[4] : cols[eval('' + four)])));
altwo=altwo.replace('~' + encodeURIComponent(('' + cols[4]).trim()), '~' + encodeURIComponent((cols[eval('' + four)].trim() == '' ? cols[4] : cols[eval('' + four)])));
altwo=altwo.replace('~' + encodeURIComponent(('' + cols[4]).trim()), '~' + encodeURIComponent((cols[eval('' + four)].trim() == '' ? cols[4] : cols[eval('' + four)])));
altwo=altwo.replace('=' + encodeURIComponent(('' + cols[4]).trim()), '=' + encodeURIComponent((cols[eval('' + four)].trim() == '' ? cols[4] : cols[eval('' + four)])));
altwo=altwo.replace('~' + encodeURIComponent(('' + cols[36]).trim()), '~' + encodeURIComponent(document.getElementById('tdcapital').innerHTML));
altwo=altwo.replace('~' + encodeURIComponent(('' + cols[36]).trim()), '~' + encodeURIComponent(document.getElementById('tdcapital').innerHTML));
}
}
document.getElementById('mymap').innerHTML=altwo;
}
</script>
</head>
<body>
<h1>Country Based Data</h1>
<h3>RJM Programming - April, 2023</h3>
<h4>Thanks to <a target=_blank href='https://web.archive.org/web/20150319012353/http://opengeocode.org/cude/download.php?file=/home/fashions/public_html/opengeocode.org/download/cow.txt'>https://web.archive.org/web/20150319012353/http://opengeocode.org/cude/download.php?file=/home/fashions/public_html/opengeocode.org/download/cow.txt</a></h4>
<table cellpadding=5 cellspacing=5 border=5 style=width:100%;>
<tr><th>Country Code</th><th>Country Name in <select id=lang onchange="prevval=document.getElementById('ccode').value; document.getElementById('myif').src='/cow.txt?rand=' + Math.floor(Math.random() * 19876543);"><option value=4>English</option><option value=8>French</option><option value=15>Spanish</option><option value=17>Russian</option><option value=29>Italian</option><option value=32>Estonian</option></select></th><th>Capital City</th></tr>
<tr><td><select onchange="fixother(this,document.getElementById('lang').value);" id=ccode><option value=''>Country Code</option></select></td><td><select onchange="fixother(this,document.getElementById('lang').value);" id=cname><option value=''>Country Name</option></select></td><td id=tdcapital></td></tr>
<tr><td colspan=3 id=mymap></td></tr>
</table>
<iframe style=display:none; id=myif onload=checkif(this,document.getElementById('lang').value); src='/cow.txt'></iframe>
</body>
</html>