<html>
<head>
<title>Country Languages Auto-completion Ajax Primer Tutorial</title>
<meta charset="utf-8">
<style>
body, #myCountrySearchField {
font: 1.2em verdana, arial, helvetica, sans-serif;
}

.mysuggestions {
background-color: #ffffff;
padding: 2px 6px;
border: 1px solid #000000;
}

.mysuggestions:hover {
background-color: #69F69F;
}

#mypopups {
position: absolute;
}

.myCountrySearchField.myerror {
background-color: #FFCFFC;
}

td {
vertical-align: top;
}

</style>

<script type="text/javascript">
window.onload = initAll;

var accomurl='https://www.google.com/search?q=accomodation+in+Beijing,+China&rlz=1C5CHFA_enAU832AU832&source=lnms&tbm=isch&sa=X&ved=0ahUKEwiyo92AkqrjAhVGbn0KHda2AyIQ_AUIESgC&biw=1437&bih=755';
var accomfrom='Beijing,+China';
var accomto='Beijing,+China';

var known_already="";
var lhcandidate='';
var lhready=false;
var overcnt=0;
var mtcis='';
var idname='';
var selois=null;

var intstuff='';

var countryeq='?country=';

var one=-1;

var is_capital=false;

var lhcandidate='';
var lhready=false;

var lc_CC='';
var prefix='';
var bitsbetween="";
var bhuh="~";

var myxhr = false;
var myCountriesArray = new Array();
var myCodesArray = new Array();
var myCapitalsArray = new Array();
var myCapitalsVArray = new Array();
var cis = "";
var xmlDoc=loadXMLDoc("languages.xml");
var myThisC = '';
var myThisLanguageCode = "";
var myThisLanguage = "";
var myThisCapital = "";
var uprefix="//www.rjmprogramming.com.au/PHP/GeoChart/geo_chart.php?title=Countries&onclick=y&width=298&height=194&country=Country&popularity=Intensity&guess=&data="; // %20[~AU~,34]
var gcurl="";
var ospan=null;
var stopoffs="~";
var weathers="~";
var accoms="~";

var lastdegs='', lastmins='', lastsecs='';

var winos=[], prewinos=[], iprewinos=0;
var otherideas='';

function doweathers() {
for (var j=1; j<=prewinos.length; j++) {
winos.push(null);
winos[eval(-1 + winos.length)]=window.open(prewinos[eval(-1 + j)],'_blank','top=500,left=' + eval(eval(-1 + winos.length) * 300) + ',width=300,height=400');
}
prewinos=[];
}

function finalchoice(osel) {
var j=1, tz='', lat='', long='', tll, iso='', cplace='', prefix='', suffix='', blurb='You selected ';
for (var i=0; i<osel.length; i++) {
if (osel.options[i].selected) {
tll=('' + osel.options[i].title).split(',');
tz='' + tll[0];
lat='' + tll[1];
long='' + tll[2];
iso=('' + tll[3]).replace('undefined','');
//alert(osel.options[i].title);
cplace='' + osel.options[i].text;
if (j == 1) {
document.getElementById("jsondata").innerHTML="";
document.getElementById("myWeatherSearchField").value=osel.options[i].text;
if (winos.length > 0) {
for (var iwinos=0; iwinos<winos.length; iwinos++) {
winos[iwinos].close();
winos[iwinos]=null;
}
winos=[];
prewinos=[];
}
blurb+=cplace;
} else {
blurb+=' and ' + cplace;
}
prewinos.push("https://www.wunderground.com" + osel.options[i].value);
document.getElementById("jsondata").innerHTML+='<input type=hidden id=weather' + j + ' value="' + "window.open('https://www.wunderground.com" + osel.options[i].value + "','_blank','top=500,left=" + eval(eval(-1 + winos.length) * 300) + ",width=300,height=400')" + '"></input>';
if (prefix == '') prefix='//www.rjmprogramming.com.au/PHP/tz_places.php?x=x';
prefix += '&wlink' + suffix + '=' + encodeURIComponent("https://www.wunderground.com" + osel.options[i].value) + '&iso' + suffix + '=' + iso + '&lat' + suffix + '=' + encodeURIComponent(lat) + '&long' + suffix + '=' + encodeURIComponent(long) + '&place' + suffix + '=' + encodeURIComponent(cplace) + '&tzname' + suffix + '=' + encodeURIComponent(tz) + '&iam' + suffix + '=' + j;
j++;
suffix='' + j;
}
if (j > 1) {
osel.options[0].text=blurb;
osel.size=1;
setTimeout(doweathers,5000);
}
}
if (prefix != '') {
//alert(prefix);
// window.open(prefix,'_blank','top=50,left=50,width=400,height=400');
document.getElementById("mytz").style.display="block";
document.getElementById("mytz").src=prefix.replace('?x=x&','?');
//document.getElementById("myWeatherSearchField").focus();
}
}

function prewbit() {
var x = document.getElementById("myWeatherSearchField").value;
//if (x.length >= 3) {
if (x.length >= 1) {
document.getElementById("myselcont").size=8;
document.getElementById("myselcont").style.display="inline";
document.getElementById("mybut").style.display="inline";
//alert('using_key.php?theseparameters=aq%3Fquery%3D' + encodeURIComponent(x));
//alert(otherideas);
// // document.getElementById('mygi').src='//www.rjmprogramming.com.au/weather/using_key.php?theseparameters=aq%3F' + otherideas + 'query%3D' + encodeURIComponent(x);
}
}

function loadXMLDoc(dname)
{
if (window.XMLHttpRequest)
{
xhttp=new XMLHttpRequest();
}
else
{
xhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xhttp.open("GET",dname,false);
xhttp.send();
return xhttp.responseXML;
}

function lastdiviframe(invl) {
if (invl != '') {
if (document.getElementById("mypopups")) {
document.getElementById("mypopups").innerHTML = "";
}
if (document.getElementById('revisits').innerHTML == '') {
document.getElementById('revisits').style.backgroundColor='#f0f0f0';
document.getElementById('revisits').innerHTML='<hr><a id=backfromtop href="#myh1" title="Back to top">Back to top</a><br><iframe id=calledi style="width:100%;height:700px;" src="' + invl + '"></iframe>';
if (document.getElementById('dbut')) {
if (document.getElementById('dbut').innerHTML.indexOf('checkbox') != -1) {
location.href='#backfromtop';
}
} else {
location.href='#backfromtop';
}
} else {
document.getElementById('calledi').src=invl;
if (document.getElementById('dbut')) {
if (document.getElementById('dbut').innerHTML.indexOf('checkbox') != -1) {
location.href='#backfromtop';
}
} else {
location.href='#backfromtop';
}
}
}
}

function sadd(inih) {
var purlis='', psuffix='';
if (inih.indexOf("'s the capital city of ") != -1) {
if (inih.indexOf('#') != -1) { psuffix=' (' + inih.split('#')[1] + ')'; }
purlis=document.URL.split('#')[0].split('?')[0] + '?capital=' + encodeURIComponent(inih.split('#')[0].split(' (')[0].split("'s ")[0].replace(', ',',_').replace(/\ /g,'_')) + '#' + encodeURIComponent(inih.split("'s the capital city of ")[1].replace(', ',',_').replace(/\ /g,'_') + psuffix);
} else if (inih.indexOf("'s capital city is ") != -1) {
purlis=document.URL.split('#')[0].split('?')[0] + '?country=' + encodeURIComponent(inih.split('#')[0].split(' (')[0].split("'s ")[0].replace(', ',',_').replace(/\ /g,'_')) + '#' + encodeURIComponent(inih.split("'s capital city is ")[1].replace(', ',',_').replace(/\ /g,'_') + psuffix);
} else if (inih != '') {
purlis=document.URL.split('#')[0].split('?')[0] + '?country=' + encodeURIComponent(inih.split('#')[0].split(' (')[0].split("'s ")[0].replace(', ',',_').replace(/\ /g,'_'));
}
if (purlis != '') {
var wasih=document.getElementById('expands').innerHTML;
if (wasih.indexOf('<') == -1) {
stopoffs="~";
document.getElementById('expands').innerHTML='<select id=divselect style="display:inline-block;width:' + ('' + ospan.width).replace('px','') + 'px;" onchange="lastdiviframe(this.value);"><option value="">Trip Planning ' + wasih + '</option><option' + idname + ' value="' + purlis + '">' + inih.split('#')[0] + '</option></select> <div style=display:inline-block; id=dbut><font size=2>Trip Mode: </font><input style=display:inline-block; type=checkbox onchange="document.getElementById(' + "'" + 'divselect' + "'" + ').multiple=true; document.getElementById(' + "'" + 'dbut' + "'" + ').innerHTML=' + "'" + '<input style=display:inline-block; onclick=tripplan(1,selois); type=button value=Capital></input> <input onclick=tripplan(0,selois); type=button value=Country></input> <input onclick=tripplan(-6,selois); type=button value=Accomodation></input> <input onclick=tripplan(-3,selois); type=button value=Sun></input> <input onclick=tripplan(-4,selois); type=button value=Moon></input> <input onclick=tripplan(-5,selois); type=button value=Planets></input> <img src=//www.rjmprogramming.com.au/weather/wulogo.JPG title=Powered_by_Weather_Underground onclick=tripplan(-1,selois); style=display:inline-block;width:120px;></img>' + "'" + ';"></input></div>';
selois=document.getElementById('divselect');
} else if (document.getElementById('divselect').innerHTML.indexOf(purlis) == -1) {
document.getElementById('divselect').innerHTML+='<option' + idname + ' value="' + purlis + '">' + inih.split('#')[0] + '</option>';
}
}
return inih.split('#')[0];
}

function ephemlatlong(longlat) {
// 151:10.58703
lastdegs=('' + longlat).split('.')[0];
lastmins='00';
lastsecs='00.00';
if (('' + longlat).indexOf('.') == -1) {
return ('' + longlat) + ':00.00000';
}
var suffz='00' + eval(eval('60') * eval('0.' + ('' + longlat).split('.')[1]));
if (suffz.indexOf('.') == -1) { lastmins=('0' + suffz).slice(-2); suffz+='.00'; } else { lastmins=('0' + suffz).split('.')[0].slice(-2); lastsecs='' + Math.round(eval(60 * eval('0.' + ('0' + suffz).split('.')[1]))); }
return ('' + longlat).split('.')[0] + ':' + suffz.split('.')[0].slice(-2) + '.' + suffz.split('.')[1];
}

function formatted_date(isgmt) { // thanks to https://stackoverflow.com/questions/30158574/how-to-convert-result-from-date-now-to-yyyy-mm-dd-hhmmss-ffff
var result="";
var d = new Date();
var documenttitle=d.toUTCString(); // Wed, 10 Jul 2019 07:33:44 GMT
var dts=documenttitle.trim().split(' ');
//alert(documenttitle);
if (dts.length >= 5) {

if (isgmt && dts[3] == ('' + d.getFullYear()) && ("0" + dts[1]).slice(-2) == ("0" + d.getDate()).slice(-2)) {
result = d.getFullYear() + "/" + ("0" + (d.getMonth()+1)).slice(-2) + "/" + ("0" + d.getDate()).slice(-2) + " " + dts[4];
} else if (isgmt && dts[3] == ('' + d.getFullYear()) && ("0" + dts[1]).slice(-2) == "01") {

if (eval(("" + (d.getMonth()+2)).slice(-2)) == 13) {
result = eval(1 + eval('' + d.getFullYear())) + "/" + "01" + "/" + "01" + " " + dts[4];
} else if (isgmt && dts[3] == ('' + d.getFullYear()) && ("0" + dts[1]).slice(-2) != "01") {
result = dts[3] + "/" + ("0" + (d.getMonth()+0)).slice(-2) + "/" + dts[1] + " " + dts[4];
} else {
result = d.getFullYear() + "/" + ("0" + (d.getMonth()+2)).slice(-2) + "/" + "01" + " " + dts[4];
}

}


} else {
result = d.getFullYear() + "/" + ("0" + (d.getMonth()+1)).slice(-2) + "/" + ("0" + d.getDate()).slice(-2) + " " + ("0" + d.getHours()).slice(-2) + ":" + ("0" + d.getMinutes()).slice(-2) + ":" + ("0" + d.getSeconds()).slice(-2) + " " + d.getMilliseconds();
}
//document.title=result;
return result;
}


function ephemgmt(yyyy, secondone, lastafterepoch) {
// https://www.rjmprogramming.com.au/PHP/ephem_astronomy.php?body=Jupiter&epoch=&observer=iam%20%3D%20ephem.Observer()%0Aiam.lon%20%3D%20%27151%3A10.58703%27%20%23%20%5BLongitudeDegrees%5D%3A%5BDecimalMinutes%5D%0Aiam.lat%20%3D%20%27-33%3A54.446766000000004%27%20%23%20%5BLatitudeDegrees%5D%3A%5BDecimalMinutes%5D%0Aiam.elevation%20%3D%200.0%20%20%20%23%20Metres%0Aiam.date%20%3D%20%272019%2F07%2F10%2005%3A30%27%20%20%23%20Y%2Fm%2Fd%20H%3Ai%20(GMT)%0Aiam.temp%20%3D%2025.0%20%20%23%20Celsius%20degrees%0Aiam.epoch%20%3D%20%272000%27%20%20%23%20Nearest%2050%20year%20epoch%20under%20date%0Aiam.pressure%20%3D%201010%20%20%23%20Millibars&ss=%2F%2Fwww.rjmprogramming.com.au%2FPHP%2FGeoChart%2Fgeo_chart.php%3Ftitle%3DEarth%2520Places%2520Under%2520Celestial%2520Places%26aregexographicals%3Dy%26aregeographicals%3DHTTP.Home%252Chttp.Observer%252Chttp.Sun%252Chttp.Moon%252Chttp.Ganymede%26peninfo%3D-33.1764505%7C151.1764505%7C127968_Home%2520Observer%2C-33.1764505%7C151.1764505%7C128301_Observer%2520Home%2C22.263614031928736%0A%7C96.76668571870948%7C9728.65039_Sun%2C-5.825198746345253%7C-164.74107028856707%7C127765_Moon%2C110.328083333333%7C9.720722222222%7C127760_Ganymede%26width%3D417%26height%3D260%26country%3DPlaces%26popularity%3D%26data%3D%2520%5B-33.1764505%7C151.1764505%7C~Home%2520Observer~%2C2%5D%2520%2C%2520%5B-33.1764505%7C151.1764505%7C~Observer%2520Home~%2C2%5D%2520%2C%2520%5B22.263614031928736%0A%7C96.76668571870948%7C~Sun~%2C2%5D%2520%2C%2520%5B-5.825198746345253%7C-164.74107028856707%7C~Moon~%2C2%5D%2520%2C%2520%5B110.328083333333%7C9.720722222222%7C~Ganymede~%2C2%5D
return ('' + formatted_date(true)).substring(0, 16) + secondone + encodeURIComponent('' + eval(eval('' + Math.floor(eval(('' + formatted_date(true)).split('/')[0]) / 50.0))) * 50) + lastafterepoch + '&epoch=' + encodeURIComponent('' + eval(eval('' + Math.floor(eval(('' + formatted_date(true)).split('/')[0]) / 50.0)) * 50) + '/01/01');
}

function tripplan(iscapitaltrip,sin) {
//alert(stopoffs);
var pwo=null;
var i=0, j=0, retval='', aot, tripurl='', daccomc='', dcity='', dctry='', dweather=[], dcs=[], daccom=[], daccomsel=[];
var totalsel=sin.innerHTML.split('</option>'), sofarsel=stopoffs.split('~'), selsel=[];
if (iscapitaltrip == -1) { tripurl='//wunderground.com'; }
selsel.push("");
for (i=0; i<sin.options.length; i++) {
daccom.push(-1);
daccomsel.push(-1);
}
for (i=0; i<sin.options.length; i++) {
if (sin.options[i].selected) {
if (sin.options[i].value != '') {
//alert(sin.options[i].outerHTML);
dcity='';
dctry='';
//dweather=[];
dcs=sin.options[i].outerHTML.split(' data-capitalgeo="');
if (dcs.length > 1) { dcity=dcs[1].split('"')[0]; }
dcs=sin.options[i].outerHTML.split(' data-countrygeo="');
if (dcs.length > 1) { dctry=dcs[1].split('"')[0]; }
dcs=sin.options[i].outerHTML.split(' data-accom="');
if (dcs.length > 1) { daccomc=dcs[1].split('"')[0]; }
dcs=sin.options[i].outerHTML.split(' data-weatherurl="');
if (dcs.length > 1) { dweather.push(dcs[1].split('"')[0]); } else { dweather.push(""); }
// data-capitalgeo="-16.500,-68.150" data-countrygeo="-16.712,-64.666"
//aot=sin.options[i].text.split('(')[eval(-1 + sin.options[i].text.replace(')','').split('(').length)].replace(')','').split(':');
if (dcity != '') { selsel.push(sin.options[i].value + '#0000' + dcity); }
if (daccomc != '') { daccomsel[eval(-1 + selsel.length)]=i; }
for (j=0; j<sofarsel.length; j++) {
if (sofarsel[j].split('#')[0] == sin.options[i].value.split('#')[0]) { daccom[j]=i; sofarsel[j]+='#00' + i; if (dcity != '') { sofarsel[j]+='#0000' + dcity; } }
}
}
}
}
selsel.push("");
if (selsel.length == sofarsel.length) {
// eg. http://localhost:8888/Ajax/AutoCompletion/auto_language_complete.html?capital=La_Paz#Bolivia%23BO%20(BO)#001
// //www.rjmprogramming.com.au/PHP/tz_places.php?iso=GB&iso2=AU&iso3=NZ
if (iscapitaltrip == 0) {
tripurl='//www.rjmprogramming.com.au/PHP/tz_places.php?iso=' + sofarsel[1].split('%23')[1].split('(')[1].split(')')[0];
} else if (iscapitaltrip == -6) { // accomodation
if (daccom[1] != -1) {
//alert(sofarsel[1].split('#0000')[1] + ' ... ' + sofarsel[1].split('#0000')[1].split(',')[1]);
tripurl=accomurl.replace(accomfrom, sin.options[daccom[1]].getAttribute('data-accom'));
window.open(tripurl, "_blank", "left=" + eval(10 + i) + ",top=330,width=1300,height=470");
}
} else if (iscapitaltrip == -5) { // planets
if (sofarsel[1].indexOf('#0000') != -1) {
//alert(sofarsel[1].split('#0000')[1] + ' ... ' + sofarsel[1].split('#0000')[1].split(',')[1]);
tripurl='//www.rjmprogramming.com.au/PHP/ephem_astronomy.php?body=Sun&observer=iam%20%3D%20ephem.Observer()%0Aiam.lon%20%3D%20%27' + ephemlatlong(('' + sofarsel[1].split('#0000')[1].split(',')[1]).replace(/\ /g,'')) + '%27%20%23%20%5BLongitudeDegrees%5D%3A%5BDecimalMinutes%5D%0Aiam.lat%20%3D%20%27' + ephemlatlong(('' + sofarsel[1].split('#0000')[1].split(',')[0]).replace(/\ /g,'')) + '%27%20%23%20%5BLatitudeDegrees%5D%3A%5BDecimalMinutes%5D%0Aiam.elevation%20%3D%200.0%20%20%20%23%20Metres%0Aiam.date%20%3D%20%27' + ephemgmt('yyyy/mm/dd hh24:mi', '%27%20%20%23%20Y%2Fm%2Fd%20H%3Ai%20(GMT)%0Aiam.temp%20%3D%2025.0%20%20%23%20Celsius%20degrees%0Aiam.epoch%20%3D%20%27', '%27%20%20%23%20Nearest%2050%20year%20epoch%20under%20date%0Aiam.pressure%20%3D%201010%20%20%23%20Millibars'); // + '/' + jiplace + '+' + jicont;
//alert('sun:' + tripurl);
pwo=window.open(tripurl, "_blank", "left=" + eval(10 + i) + ",top=330,width=1300,height=470");
try { pwo.document.title+=' ... ' + sin.options[i].id; } catch (eert) { }
}
} else if (iscapitaltrip == -3) { // sun
if (sofarsel[1].indexOf('#0000') != -1) {
// https://www.rjmprogramming.com.au/PHP/MoonAngle/moon_angle_now_at.php?done=y&latd=-31&latm=22&lats=0&longd=-64&longm=15&longs=0&from=from&country=ARGENTINA&place=Cordoba
tripurl='//www.rjmprogramming.com.au/PHP/SunAngle/sun_angle_now_at.php?done=y';
ephemlatlong('' + sofarsel[1].split('#0000')[1].split(',')[0].replace(/\ /g,''));
tripurl+='&latd=' + lastdegs + '&latm=' + lastmins + '&lats=' + lastsecs;
ephemlatlong('' + sofarsel[1].split('#0000')[1].split(',')[1].replace(/\ /g,''));
tripurl+='&longd=' + lastdegs + '&longm=' + lastmins + '&longs=' + lastsecs;
//alert(tripurl);
window.open(tripurl, "_blank", "left=" + eval(10 + i) + ",top=330,width=1300,height=470");
}
} else if (iscapitaltrip == -4) { // moon angle
if (sofarsel[1].indexOf('#0000') != -1) {
// https://www.rjmprogramming.com.au/PHP/MoonAngle/moon_angle_now_at.php?done=y&latd=-31&latm=22&lats=0&longd=-64&longm=15&longs=0&from=from&country=ARGENTINA&place=Cordoba
tripurl='//www.rjmprogramming.com.au/PHP/MoonAngle/moon_angle_now_at.php?done=y';
ephemlatlong('' + sofarsel[1].split('#0000')[1].split(',')[0].replace(/\ /g,''));
tripurl+='&latd=' + lastdegs + '&latm=' + lastmins + '&lats=' + lastsecs;
ephemlatlong('' + sofarsel[1].split('#0000')[1].split(',')[1].replace(/\ /g,''));
tripurl+='&longd=' + lastdegs + '&longm=' + lastmins + '&longs=' + lastsecs;
//alert(tripurl);
window.open(tripurl, "_blank", "left=" + eval(10 + i) + ",top=330,width=1300,height=470");
}
} else if (iscapitaltrip == -1) { // weather via wundergound
if (dweather[0] != '') {
tripurl='';
if (prewinos.length == 0) {
prewinos.push(dweather[0]);
iprewinos=0;
//alert('2:' + dweather);
document.getElementById('mygix').src=dweather[0];
} else {
prewinos.push(dweather[0]);
}
//alert('theseparameters=aq%3Fc%3DAO%26query%3DLu ... vs ...' + dweather);
}
} else { // Sydney,+New+South+Wales
if (sofarsel[1].indexOf('capital=') != -1) {
if (sofarsel[1].indexOf('#0000') != -1) {
tripurl='//www.google.com/maps/dir/' + sofarsel[1].split('#0000')[1].split('#')[0].replace(/\ /g,''); // + '/' + jiplace + '+' + jicont;
} else if (sofarsel[1].indexOf('#00') != -1) {
tripurl='//www.google.com/maps/dir/' + sin.options[eval(sofarsel[1].split('#00')[1].split('#')[0])].id.replace(/\_/g,'+') + ',' + sin.options[eval(sofarsel[1].split('#00')[1].split('#')[0])].name.replace(/\_/g,'+'); // .replace(/\ /g,''); // + '/' + jiplace + '+' + jicont;
}
} else if (sofarsel[1].indexOf('country=') != -1) {
if (sofarsel[1].indexOf('#0000') != -1) {
tripurl='//www.google.com/maps/dir/' + sofarsel[1].split('#0000')[1].split('#')[0].replace(/\ /g,''); // + '/' + jiplace + '+' + jicont;
} else if (sofarsel[1].indexOf('#00') != -1) {
tripurl='//www.google.com/maps/dir/' + sin.options[eval(sofarsel[1].split('#00')[1].split('#')[0])].id.replace(/\_/g,'+') + ',' + sin.options[eval(sofarsel[1].split('#00')[1].split('#')[0])].name.replace(/\_/g,'+'); // .replace(/\ /g,''); // + '/' + jiplace + '+' + jicont;
}
}
}
for (i=2; i<sofarsel.length; i++) {
if (sofarsel[i] != '') {
if (iscapitaltrip == 0) {
tripurl+='&iso' + i + '=' + sofarsel[i].split('%23')[1].split('(')[1].split(')')[0];
} else if (iscapitaltrip == -6) { // accomodation
if (daccom[i] != -1) {
//alert(sofarsel[1].split('#0000')[1] + ' ... ' + sofarsel[1].split('#0000')[1].split(',')[1]);
tripurl=accomurl.replace(accomfrom, sin.options[daccom[i]].getAttribute('data-accom'));
window.open(tripurl, "_blank", "left=" + eval(10 + i) + ",top=330,width=1300,height=470");
}
} else if (iscapitaltrip == -5) { // planets
if (sofarsel[1].indexOf('#0000') != -1) {
tripurl='//www.rjmprogramming.com.au/PHP/ephem_astronomy.php?body=Sun&observer=iam%20%3D%20ephem.Observer()%0Aiam.lon%20%3D%20%27' + ephemlatlong('' + sofarsel[i].split('#0000')[1].split(',')[1].replace(/\ /g,'')) + '%27%20%23%20%5BLongitudeDegrees%5D%3A%5BDecimalMinutes%5D%0Aiam.lat%20%3D%20%27' + ephemlatlong('' + sofarsel[i].split('#0000')[1].split(',')[0].replace(/\ /g,'')) + '%27%20%23%20%5BLatitudeDegrees%5D%3A%5BDecimalMinutes%5D%0Aiam.elevation%20%3D%200.0%20%20%20%23%20Metres%0Aiam.date%20%3D%20%27' + ephemgmt('yyyy/mm/dd hh24:mi', '%27%20%20%23%20Y%2Fm%2Fd%20H%3Ai%20(GMT)%0Aiam.temp%20%3D%2025.0%20%20%23%20Celsius%20degrees%0Aiam.epoch%20%3D%20%27', '%27%20%20%23%20Nearest%2050%20year%20epoch%20under%20date%0Aiam.pressure%20%3D%201010%20%20%23%20Millibars'); // + '/' + jiplace + '+' + jicont;
pwo=window.open(tripurl, "_blank", "left=" + eval(10 + i) + ",top=330,width=1300,height=470");
try { pwo.document.title+=' ... ' + sin.options[i].id; } catch (eert) { }
}
} else if (iscapitaltrip == -3) { // sun
if (sofarsel[i].indexOf('#0000') != -1) {
// https://www.rjmprogramming.com.au/PHP/MoonAngle/moon_angle_now_at.php?done=y&latd=-31&latm=22&lats=0&longd=-64&longm=15&longs=0&from=from&country=ARGENTINA&place=Cordoba
tripurl='//www.rjmprogramming.com.au/PHP/SunAngle/sun_angle_now_at.php?done=y';
ephemlatlong('' + sofarsel[i].split('#0000')[1].split(',')[0].replace(/\ /g,''));
tripurl+='&latd=' + lastdegs + '&latm=' + lastmins + '&lats=' + lastsecs;
ephemlatlong('' + sofarsel[i].split('#0000')[1].split(',')[1].replace(/\ /g,''));
tripurl+='&longd=' + lastdegs + '&longm=' + lastmins + '&longs=' + lastsecs;
//alert(tripurl);
window.open(tripurl, "_blank", "left=" + eval(10 + i) + ",top=330,width=1300,height=470");
}
} else if (iscapitaltrip == -4) { // moon angle
if (sofarsel[i].indexOf('#0000') != -1) {
// https://www.rjmprogramming.com.au/PHP/MoonAngle/moon_angle_now_at.php?done=y&latd=-31&latm=22&lats=0&longd=-64&longm=15&longs=0&from=from&country=ARGENTINA&place=Cordoba
tripurl='//www.rjmprogramming.com.au/PHP/MoonAngle/moon_angle_now_at.php?done=y';
ephemlatlong('' + sofarsel[i].split('#0000')[1].split(',')[0].replace(/\ /g,''));
tripurl+='&latd=' + lastdegs + '&latm=' + lastmins + '&lats=' + lastsecs;
ephemlatlong('' + sofarsel[i].split('#0000')[1].split(',')[1].replace(/\ /g,''));
tripurl+='&longd=' + lastdegs + '&longm=' + lastmins + '&longs=' + lastsecs;
//alert(tripurl);
window.open(tripurl, "_blank", "left=" + eval(10 + i) + ",top=330,width=1300,height=470");
}
} else if (iscapitaltrip == -1) { // weather via wundergound
if (dweather[eval(-1 + i)] != '') {
tripurl='';
if (prewinos.length == 0) {
prewinos.push(dweather[eval(-1 + i)]);
iprewinos=0;
//alert('2:' + dweather);
document.getElementById('mygix').src=dweather[eval(-1 + i)];
} else {
prewinos.push(dweather[eval(-1 + i)]);
}
//alert('theseparameters=aq%3Fc%3DAO%26query%3DLu ... vs ...' + dweather);
}
} else {
if (sofarsel[i].indexOf('capital=') != -1) {
if (sofarsel[i].indexOf('#0000') != -1) {
tripurl+='/' + sofarsel[i].split('#0000')[1].split('#')[0].replace(/\ /g,'');
window.open(tripurl, "_blank", "left=" + eval(10 + i) + ",top=330,width=1300,height=470");
tripurl='//www.google.com/maps/dir/' + sofarsel[i].split('#0000')[1].split('#')[0].replace(/\ /g,''); // + '/' + jiplace + '+' + jicont;
} else if (sofarsel[i].indexOf('#00') != -1) {
tripurl+='/' + sin.options[eval(sofarsel[i].split('#00')[1].split('#')[0])].id.replace(/\_/g,'+') + ',' + sin.options[eval(sofarsel[1].split('#00')[1].split('#')[0])].name.replace(/\_/g,'+'); // .replace(/\ /g,''); // + '/' + jiplace + '+' + jicont;
window.open(tripurl, "_blank", "left=" + eval(10 + i) + ",top=330,width=1300,height=470");
tripurl='//www.google.com/maps/dir/' + sin.options[eval(sofarsel[i].split('#00')[1].split('#')[0])].id.replace(/\_/g,'+') + ',' + sin.options[eval(sofarsel[1].split('#00')[1].split('#')[0])].name.replace(/\_/g,'+'); // .replace(/\ /g,''); // + '/' + jiplace + '+' + jicont;
}
} else if (sofarsel[i].indexOf('country=') != -1) {
if (sofarsel[1].indexOf('#0000') != -1) {
tripurl+='/' + sofarsel[i].split('#0000')[1].split('#')[0].replace(/\ /g,''); // + '/' + jiplace + '+' + jicont;
window.open(tripurl, "_blank", "left=" + eval(10 + i) + ",top=330,width=1300,height=470");
tripurl='//www.google.com/maps/dir/' + sofarsel[i].split('#0000')[1].split('#')[0].replace(/\ /g,''); // + '/' + jiplace + '+' + jicont;
} else if (sofarsel[i].indexOf('#00') != -1) {
tripurl+='/' + sin.options[eval(sofarsel[i].split('#00')[1].split('#')[0])].id.replace(/\_/g,'+') + ',' + sin.options[eval(sofarsel[1].split('#00')[1].split('#')[0])].name.replace(/\_/g,'+'); // .replace(/\ /g,''); // + '/' + jiplace + '+' + jicont;
window.open(tripurl, "_blank", "left=" + eval(10 + i) + ",top=330,width=1300,height=470");
tripurl='//www.google.com/maps/dir/' + sin.options[eval(sofarsel[i].split('#00')[1].split('#')[0])].id.replace(/\_/g,'+') + ',' + sin.options[eval(sofarsel[1].split('#00')[1].split('#')[0])].name.replace(/\_/g,'+'); // .replace(/\ /g,''); // + '/' + jiplace + '+' + jicont;
}
}
}
//alert(sofarsel[i]);
}
}
if (iscapitaltrip != -1) { window.open(tripurl, "_blank", "left=10,top=330,width=1300,height=470"); tripurl=''; }
} else {
if (iscapitaltrip == 0) {
tripurl='//www.rjmprogramming.com.au/PHP/tz_places.php?iso=' + selsel[1].split('%23')[1].split('(')[1].split(')')[0];
} else if (iscapitaltrip == -6) { // accomodation
if (daccomsel[1] != -1) {
//alert(sofarsel[1].split('#0000')[1] + ' ... ' + sofarsel[1].split('#0000')[1].split(',')[1]);
tripurl=accomurl.replace(accomfrom, sin.options[daccomsel[1]].getAttribute('data-accom'));
window.open(tripurl, "_blank", "left=" + eval(10 + i) + ",top=330,width=1300,height=470");
}
} else if (iscapitaltrip == -5) { // planets
if (selsel[1].indexOf('#0000') != -1) {
tripurl='//www.rjmprogramming.com.au/PHP/ephem_astronomy.php?body=Sun&observer=iam%20%3D%20ephem.Observer()%0Aiam.lon%20%3D%20%27' + ephemlatlong('' + selsel[1].split('#0000')[1].split(',')[1].replace(/\ /g,'')) + '%27%20%23%20%5BLongitudeDegrees%5D%3A%5BDecimalMinutes%5D%0Aiam.lat%20%3D%20%27' + ephemlatlong('' + selsel[1].split('#0000')[1].split(',')[0].replace(/\ /g,'')) + '%27%20%23%20%5BLatitudeDegrees%5D%3A%5BDecimalMinutes%5D%0Aiam.elevation%20%3D%200.0%20%20%20%23%20Metres%0Aiam.date%20%3D%20%27' + ephemgmt('yyyy/mm/dd hh24:mi', '%27%20%20%23%20Y%2Fm%2Fd%20H%3Ai%20(GMT)%0Aiam.temp%20%3D%2025.0%20%20%23%20Celsius%20degrees%0Aiam.epoch%20%3D%20%27', '%27%20%20%23%20Nearest%2050%20year%20epoch%20under%20date%0Aiam.pressure%20%3D%201010%20%20%23%20Millibars'); // + '/' + jiplace + '+' + jicont;
pwo=window.open(tripurl, "_blank", "left=" + eval(10 + i) + ",top=330,width=1300,height=470");
try { pwo.document.title+=' ... ' + sin.options[i].id; } catch (eert) { }
}
} else if (iscapitaltrip == -3) { // sun
if (selsel[1].indexOf('#0000') != -1) {
//alert(selsel[1]);
// https://www.rjmprogramming.com.au/PHP/MoonAngle/moon_angle_now_at.php?done=y&latd=-31&latm=22&lats=0&longd=-64&longm=15&longs=0&from=from&country=ARGENTINA&place=Cordoba
tripurl='//www.rjmprogramming.com.au/PHP/SunAngle/sun_angle_now_at.php?done=y';
ephemlatlong('' + selsel[1].split('#0000')[1].split(',')[0].replace(/\ /g,''));
tripurl+='&latd=' + lastdegs + '&latm=' + lastmins + '&lats=' + lastsecs;
ephemlatlong('' + selsel[1].split('#0000')[1].split(',')[1].replace(/\ /g,''));
tripurl+='&longd=' + lastdegs + '&longm=' + lastmins + '&longs=' + lastsecs;
//alert(tripurl);
window.open(tripurl, "_blank", "left=" + eval(10 + i) + ",top=330,width=1300,height=470");
}
} else if (iscapitaltrip == -4) { // moon angle
if (selsel[1].indexOf('#0000') != -1) {
//alert(selsel[1]);
// https://www.rjmprogramming.com.au/PHP/MoonAngle/moon_angle_now_at.php?done=y&latd=-31&latm=22&lats=0&longd=-64&longm=15&longs=0&from=from&country=ARGENTINA&place=Cordoba
tripurl='//www.rjmprogramming.com.au/PHP/MoonAngle/moon_angle_now_at.php?done=y';
ephemlatlong('' + selsel[1].split('#0000')[1].split(',')[0].replace(/\ /g,''));
tripurl+='&latd=' + lastdegs + '&latm=' + lastmins + '&lats=' + lastsecs;
ephemlatlong('' + selsel[1].split('#0000')[1].split(',')[1].replace(/\ /g,''));
tripurl+='&longd=' + lastdegs + '&longm=' + lastmins + '&longs=' + lastsecs;
//alert(tripurl);
window.open(tripurl, "_blank", "left=" + eval(10 + i) + ",top=330,width=1300,height=470");
}
} else if (iscapitaltrip == -1) { // weather via wundergound
if (dweather[0] != '') {
tripurl='';
if (prewinos.length == 0) {
prewinos.push(dweather[0]);
iprewinos=0;
//alert('2:' + dweather);
document.getElementById('mygix').src=dweather[0];
} else {
prewinos.push(dweather[0]);
}
//alert('theseparameters=aq%3Fc%3DAO%26query%3DLu ... vs ...' + dweather);
}
} else { // Sydney,+New+South+Wales
if (selsel[1].indexOf('capital=') != -1) {
if (selsel[1].indexOf('#0000') != -1) {
tripurl='//www.google.com/maps/dir/' + selsel[1].split('#0000')[1].split('#')[0].replace(/\ /g,''); // + '/' + jiplace + '+' + jicont;
} else if (selsel[1].indexOf('#00') != -1) {
tripurl='//www.google.com/maps/dir/' + sin.options[eval(selsel[1].split('#00')[1].split('#')[0])].id.replace(/\_/g,'+') + ',' + sin.options[eval(selsel[1].split('#00')[1].split('#')[0])].name.replace(/\_/g,'+'); // .replace(/\ /g,''); // + '/' + jiplace + '+' + jicont;
}
} else if (selsel[1].indexOf('country=') != -1) {
if (selsel[1].indexOf('#0000') != -1) {
tripurl='//www.google.com/maps/dir/' + selsel[1].split('#0000')[1].split('#')[0].replace(/\ /g,''); // + '/' + jiplace + '+' + jicont;
} else if (selsel[1].indexOf('#00') != -1) {
tripurl='//www.google.com/maps/dir/' + sin.options[eval(selsel[1].split('#00')[1].split('#')[0])].id.replace(/\_/g,'+') + ',' + sin.options[eval(selsel[1].split('#00')[1].split('#')[0])].name.replace(/\_/g,'+'); // .replace(/\ /g,''); // + '/' + jiplace + '+' + jicont;
}
}
}
for (i=2; i<selsel.length; i++) {
if (selsel[i] != '') {
if (iscapitaltrip == 0) {
tripurl+='&iso' + i + '=' + selsel[i].split('%23')[1].split('(')[1].split(')')[0];
} else if (iscapitaltrip == -6) { // accomodation
if (daccomsel[i] != -1) {
//alert(sofarsel[1].split('#0000')[1] + ' ... ' + sofarsel[1].split('#0000')[1].split(',')[1]);
tripurl=accomurl.replace(accomfrom, sin.options[daccomsel[i]].getAttribute('data-accom'));
window.open(tripurl, "_blank", "left=" + eval(10 + i) + ",top=330,width=1300,height=470");
}
} else if (iscapitaltrip == -5) { // planets
if (sofarsel[1].indexOf('#0000') != -1) {
tripurl='//www.rjmprogramming.com.au/PHP/ephem_astronomy.php?body=Sun&observer=iam%20%3D%20ephem.Observer()%0Aiam.lon%20%3D%20%27' + ephemlatlong('' + selsel[i].split('#0000')[1].split(',')[1].replace(/\ /g,'')) + '%27%20%23%20%5BLongitudeDegrees%5D%3A%5BDecimalMinutes%5D%0Aiam.lat%20%3D%20%27' + ephemlatlong('' + selsel[i].split('#0000')[1].split(',')[0].replace(/\ /g,'')) + '%27%20%23%20%5BLatitudeDegrees%5D%3A%5BDecimalMinutes%5D%0Aiam.elevation%20%3D%200.0%20%20%20%23%20Metres%0Aiam.date%20%3D%20%27' + ephemgmt('yyyy/mm/dd hh24:mi', '%27%20%20%23%20Y%2Fm%2Fd%20H%3Ai%20(GMT)%0Aiam.temp%20%3D%2025.0%20%20%23%20Celsius%20degrees%0Aiam.epoch%20%3D%20%27', '%27%20%20%23%20Nearest%2050%20year%20epoch%20under%20date%0Aiam.pressure%20%3D%201010%20%20%23%20Millibars'); // + '/' + jiplace + '+' + jicont;
pwo=window.open(tripurl, "_blank", "left=" + eval(10 + i) + ",top=330,width=1300,height=470");
try { pwo.document.title+=' ... ' + sin.options[i].id; } catch (eert) { }
}
} else if (iscapitaltrip == -3) { // sun
if (selsel[i].indexOf('#0000') != -1) {
// https://www.rjmprogramming.com.au/PHP/MoonAngle/moon_angle_now_at.php?done=y&latd=-31&latm=22&lats=0&longd=-64&longm=15&longs=0&from=from&country=ARGENTINA&place=Cordoba
tripurl='//www.rjmprogramming.com.au/PHP/SunAngle/sun_angle_now_at.php?done=y';
ephemlatlong('' + selsel[i].split('#0000')[1].split(',')[0].replace(/\ /g,''));
tripurl+='&latd=' + lastdegs + '&latm=' + lastmins + '&lats=' + lastsecs;
ephemlatlong('' + selsel[i].split('#0000')[1].split(',')[1].replace(/\ /g,''));
tripurl+='&longd=' + lastdegs + '&longm=' + lastmins + '&longs=' + lastsecs;
//alert(tripurl);
window.open(tripurl, "_blank", "left=" + eval(10 + i) + ",top=330,width=1300,height=470");
}
} else if (iscapitaltrip == -4) { // moon angle
if (selsel[i].indexOf('#0000') != -1) {
// https://www.rjmprogramming.com.au/PHP/MoonAngle/moon_angle_now_at.php?done=y&latd=-31&latm=22&lats=0&longd=-64&longm=15&longs=0&from=from&country=ARGENTINA&place=Cordoba
tripurl='//www.rjmprogramming.com.au/PHP/MoonAngle/moon_angle_now_at.php?done=y';
ephemlatlong('' + selsel[i].split('#0000')[1].split(',')[0].replace(/\ /g,''));
tripurl+='&latd=' + lastdegs + '&latm=' + lastmins + '&lats=' + lastsecs;
ephemlatlong('' + selsel[i].split('#0000')[1].split(',')[1].replace(/\ /g,''));
tripurl+='&longd=' + lastdegs + '&longm=' + lastmins + '&longs=' + lastsecs;
//alert(tripurl);
window.open(tripurl, "_blank", "left=" + eval(10 + i) + ",top=330,width=1300,height=470");
}
} else if (iscapitaltrip == -1) { // weather via wundergound
if (dweather[eval(-1 + i)] != '') {
tripurl='';
if (prewinos.length == 0) {
prewinos.push(dweather[eval(-1 + i)]);
iprewinos=0;
//alert('2:' + dweather);
document.getElementById('mygix').src=dweather[eval(-1 + i)];
} else {
prewinos.push(dweather[eval(-1 + i)]);
}
//alert('theseparameters=aq%3Fc%3DAO%26query%3DLu ... vs ...' + dweather);
}
} else {
if (selsel[i].indexOf('capital=') != -1) {
if (selsel[i].indexOf('#0000') != -1) {
tripurl+='/' + selsel[i].split('#0000')[1].split('#')[0].replace(/\ /g,'');
window.open(tripurl, "_blank", "left=" + eval(10 + i) + ",top=330,width=1300,height=470");
tripurl='//www.google.com/maps/dir/' + selsel[i].split('#0000')[1].split('#')[0].replace(/\ /g,''); // + '/' + jiplace + '+' + jicont;
} else if (selsel[i].indexOf('#00') != -1) {
tripurl+='/' + sin.options[eval(selsel[i].split('#00')[1].split('#')[0])].id.replace(/\_/g,'+') + ',' + sin.options[eval(selsel[1].split('#00')[1].split('#')[0])].name.replace(/\_/g,'+'); // .replace(/\ /g,''); // + '/' + jiplace + '+' + jicont;
window.open(tripurl, "_blank", "left=" + eval(10 + i) + ",top=330,width=1300,height=470");
tripurl='//www.google.com/maps/dir/' + sin.options[eval(selsel[i].split('#00')[1].split('#')[0])].id.replace(/\_/g,'+') + ',' + sin.options[eval(selsel[1].split('#00')[1].split('#')[0])].name.replace(/\_/g,'+'); // .replace(/\ /g,''); // + '/' + jiplace + '+' + jicont;
}
} else if (selsel[i].indexOf('country=') != -1) {
if (selsel[1].indexOf('#0000') != -1) {
tripurl+='/' + selsel[i].split('#0000')[1].split('#')[0].replace(/\ /g,''); // + '/' + jiplace + '+' + jicont;
window.open(tripurl, "_blank", "left=" + eval(10 + i) + ",top=330,width=1300,height=470");
tripurl='//www.google.com/maps/dir/' + selsel[i].split('#0000')[1].split('#')[0].replace(/\ /g,''); // + '/' + jiplace + '+' + jicont;
} else if (selsel[i].indexOf('#00') != -1) {
tripurl+='/' + sin.options[eval(selsel[i].split('#00')[1].split('#')[0])].id.replace(/\_/g,'+') + ',' + sin.options[eval(selsel[1].split('#00')[1].split('#')[0])].name.replace(/\_/g,'+'); // .replace(/\ /g,''); // + '/' + jiplace + '+' + jicont;
window.open(tripurl, "_blank", "left=" + eval(10 + i) + ",top=330,width=1300,height=470");
tripurl='//www.google.com/maps/dir/' + sin.options[eval(selsel[i].split('#00')[1].split('#')[0])].id.replace(/\_/g,'+') + ',' + sin.options[eval(selsel[1].split('#00')[1].split('#')[0])].name.replace(/\_/g,'+'); // .replace(/\ /g,''); // + '/' + jiplace + '+' + jicont;
}
}
}
//alert(selsel[i]);
}
}
if (iscapitaltrip != -1) { window.open(tripurl, "_blank", "left=10,top=330,width=1300,height=470"); tripurl=''; }
}
if (tripurl != '' && iscapitaltrip == -1) { window.open(tripurl, "_blank", "left=10,top=330,width=1300,height=470"); tripurl=''; }
}

function populatelccc() {
lc_CC=document.getElementById('sellccc').innerHTML;
}

function initAll() {
ospan=document.getElementById('expands').getBoundingClientRect();
is_capital=false;
known_already=('' + (location.search.split('country=')[1] ? decodeURIComponent(location.search.split('country=')[1].split('&')[0]) : '')).replace(/\_/g,' ');
if (known_already == '') {
known_already=('' + (location.search.split('capital=')[1] ? decodeURIComponent(location.search.split('capital=')[1].split('&')[0]) : '')).replace(/\_/g,' ');
if (known_already != '') {
is_capital=true;
}
}
setTimeout(populatelccc, 2000);
setTimeout(postinitAll,1000);
}

function postinitAll() {
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
bitsbetween="m/translate";
bhuh="|";
}
document.getElementById("myCountrySearchField").onkeyup = searchHelpout;
document.getElementById("myCountrySearchField").onkeypress = presearchHelpout;


if (window.XMLHttpRequest) {
myxhr = new window.XMLHttpRequest;
}
else {
try {
myxhr = new ActiveXObject("Msxml2.XMLHTTP");
} catch (othermicrosoft) {
try {
myxhr = new ActiveXObject("Microsoft.XMLHTTP");
} catch (failed) {
myxhr = false;
}
}
}

if (myxhr) {
//console.log("prehere");

myxhr.onreadystatechange = setCountriesArray;
myxhr.open("GET", "countries_attributed.xml", true);
myxhr.send(null);
} else {
alert("Not able to create XMLHttpRequest ... sadly.");
}

if (known_already != "") {
document.getElementById("myCountrySearchField").value=known_already;
setTimeout(atw, 2000);
}
}

function atw() {
var iii=0;
if (known_already != "") {
document.getElementById("myCountrySearchField").value=known_already;
if (is_capital) {
iii=myCapitalsArray.indexOf(known_already);
known_already="";
if (iii >= 0) {
document.getElementById('atload').setAttribute('data-title', myCodesArray[iii] + ';' + myCountriesArray[iii]);
// theseparameters=aq%3Fc%3DAO%26query%3DLu ... vs ...//www.rjmprogramming.com.au/weather/using_key.php?theseparameters=aq%3FAOquery%3DLuanda
document.getElementById('atload').setAttribute('data-weatherurl', '//www.rjmprogramming.com.au/weather/using_key.php?theseparameters=aq%3Fc%3D' + myCodesArray[iii] + '%26query%3DEncodedPlaceGoesHere');
document.getElementById('atload').title=myCapitalsVArray[iii]; //myCodesArray[iii] + ';' + myCountriesArray[iii];
document.getElementById('atload').className="mysuggestions";
document.getElementById('atload').innerHTML=myCapitalsArray[iii].split(' (')[0];
lhcandidate=document.getElementById('atload');
lhready=true;
overcnt=1;
setTimeout(searchHelpout,800); // setTimeout(makeSelection,800);
}
} else {
iii=myCountriesArray.indexOf(known_already);
known_already="";
if (iii >= 0) {
document.getElementById('atload').setAttribute('data-title', myCodesArray[iii] + ';' + myCapitalsArray[iii]);
document.getElementById('atload').setAttribute('data-weatherurl', '//www.rjmprogramming.com.au/weather/using_key.php?theseparameters=aq%3Fc%3D' + myCodesArray[iii] + '%26query%3DEncodedPlaceGoesHere');
document.getElementById('atload').title=myCountriesArray[iii]; //myCodesArray[iii] + ';' + myCapitalsArray[iii];
document.getElementById('atload').className="mysuggestions";
document.getElementById('atload').innerHTML=myCountriesArray[iii];
lhcandidate=document.getElementById('atload');
lhready=true;
overcnt=1;
setTimeout(makeSelection,800);
}
}
}
}

function setCountriesArray() {
if (myxhr.readyState == 4) {
if (myxhr.status == 200) {

//console.log("here");
if (myxhr.responseXML) {
var myAllCountries = myxhr.responseXML.getElementsByTagName("country");
var myCapitalsBackup=document.getElementById('selceq').innerHTML;
for (var myi=0; myi<myAllCountries.length; myi++) {
//console.log("ahere");
//console.log("yeshere at " + myAllCountries[myi].getAttribute("name"));
if (1 == 1) {
myCountriesArray[myi] = myAllCountries[myi].getAttribute("name");
//alert(65);
myCodesArray[myi] = myAllCountries[myi].getAttribute("code");
try {
myCapitalsArray[myi] = myAllCountries[myi].getAttribute("capital");
if (('' + myCapitalsArray[myi]).replace('null','') == '') {
if (myCapitalsBackup.indexOf(' value="' + myCountriesArray[myi] + '"') != -1) {
myCapitalsVArray[myi] = myCapitalsBackup.split(' value="' + myCountriesArray[myi] + '"')[1].split('>')[1].split('<')[0];
myCapitalsArray[myi] = myCapitalsBackup.split(' value="' + myCountriesArray[myi] + '"')[1].split('>')[1].split('<')[0].split(' (')[0];
} else {
console.log('No match For ' + myCountriesArray[myi]);
//alert('No match For ' + myCountriesArray[myi]);
}
}
} catch (ert) {
if (myCapitalsBackup.indexOf(' value="' + myCountriesArray[myi] + '"') != -1) {
myCapitalsVArray[myi] = myCapitalsBackup.split(' value="' + myCountriesArray[myi] + '"')[1].split('>')[1].split('<')[0];
myCapitalsArray[myi] = myCapitalsBackup.split(' value="' + myCountriesArray[myi] + '"')[1].split('>')[1].split('<')[0].split(' (')[0];
} else {
console.log('No match for ' + myCountriesArray[myi]);
//alert('No match for ' + myCountriesArray[myi]);
}
}
} else {
myCountriesArray[myi] = myAllCountries[myi].getElementsByTagName("name")[0].firstChild;
myCodesArray[myi] = myAllCountries[myi].getElementsByTagName("code")[0].firstChild;
try {
myCapitalsVArray[myi] = myAllCountries[myi].getElementsByTagName("capital")[0].firstChild;
myCapitalsArray[myi] = ('' + myAllCountries[myi].getElementsByTagName("capital")[0].firstChild).split(' (')[0];
if (('' + myCapitalsArray[myi]).replace('null','') == '') {
if (myCapitalsBackup.indexOf(' value="' + myCountriesArray[myi] + '"') != -1) {
myCapitalsVArray[myi] = myCapitalsBackup.split(' value="' + myCountriesArray[myi] + '"')[1].split('>')[1].split('<')[0];
myCapitalsArray[myi] = myCapitalsBackup.split(' value="' + myCountriesArray[myi] + '"')[1].split('>')[1].split('<')[0].split(' (')[0];
} else {
console.log('No Match For ' + myCountriesArray[myi]);
//alert('No Match For ' + myCountriesArray[myi]);
}
}
} catch (erty) {
if (myCapitalsBackup.indexOf(' value="' + myCountriesArray[myi] + '"') != -1) {
myCapitalsVArray[myi] = myCapitalsBackup.split(' value="' + myCountriesArray[myi] + '"')[1].split('>')[1].split('<')[0];
myCapitalsArray[myi] = myCapitalsBackup.split(' value="' + myCountriesArray[myi] + '"')[1].split('>')[1].split('<')[0].split(' (')[0];
} else {
console.log('No Match for ' + myCountriesArray[myi]);
//alert('No Match for ' + myCountriesArray[myi]);
}
}
}
}
}
} else {
//console.log("Problem: " + myxhr.status);
alert("Problem: " + myxhr.status);
}
}
}

function presearchHelpout(evt) {
var ifound=-1;
if ((evt.which || evt.keyCode) == 8) {
evt=evt;
} else if ((evt.which || evt.keyCode) == 186 || (evt.which || evt.keyCode) == 900000016) {
evt=evt;
} else if ((evt.which || evt.keyCode) < 46) { // || (evt.which || evt.keyCode) > 58) {
evt=evt;
} else if (document.getElementById("myCountrySearchField").value.length == 0 && String.fromCharCode((evt.which || evt.keyCode)) >= 'A' && String.fromCharCode((evt.which || evt.keyCode)) <= 'Z') {
document.getElementById('ddcapital').innerHTML='';
document.getElementById('dcapital').innerHTML='';
lhcandidate='';
lhready=false;
overcnt=0;
is_capital=false;
} else if (document.getElementById("myCountrySearchField").value.length == 0 && String.fromCharCode((evt.which || evt.keyCode)) >= 'a' && String.fromCharCode((evt.which || evt.keyCode)) <= 'z') {
document.getElementById('ddcapital').innerHTML='';
document.getElementById('dcapital').innerHTML='';
lhcandidate='';
lhready=false;
overcnt=0;
is_capital=true;
} else if (document.getElementById("myCountrySearchField").value.length > 0 && document.getElementById("myCountrySearchField").value.substring(0,1) >= 'A' && document.getElementById("myCountrySearchField").value.substring(0,1) <= 'Z') {
document.getElementById('ddcapital').innerHTML='';
document.getElementById('dcapital').innerHTML='';
lhcandidate='';
lhready=false;
overcnt=0;
is_capital=false;
if (document.getElementById("myCountrySearchField").value.length == 1) {
ifound=myCodesArray.indexOf(document.getElementById("myCountrySearchField").value + String.fromCharCode((evt.which || evt.keyCode)));
if (ifound != -1) {
document.getElementById("myCountrySearchField").value=myCountriesArray[ifound];
one=1;
return false;
}
}
} else if (document.getElementById("myCountrySearchField").value.length > 0 && document.getElementById("myCountrySearchField").value.substring(0,1) >= 'a' && document.getElementById("myCountrySearchField").value.substring(0,1) <= 'z') {
document.getElementById('ddcapital').innerHTML='';
document.getElementById('dcapital').innerHTML='';
lhcandidate='';
lhready=false;
overcnt=0;
is_capital=true;
}
return true;
}

function searchHelpout() {
var xfound=false; // new ideas from May, 2015 here
var thefirst=true;
var pdelim='';
var smtc = "", mtc = "";
var mystr = document.getElementById("myCountrySearchField").value;
if (one <= 0) { one=mystr.length; }
var myThisCode = "";
if (document.getElementById('atload').innerHTML == '') {
if (document.getElementById("myCountrySearchField").value.length > 0 && document.getElementById("myCountrySearchField").value.substring(0,1) >= 'A' && document.getElementById("myCountrySearchField").value.substring(0,1) <= 'Z') {
is_capital=false;
} else if (document.getElementById("myCountrySearchField").value.length > 0 && document.getElementById("myCountrySearchField").value.substring(0,1) >= 'a' && document.getElementById("myCountrySearchField").value.substring(0,1) <= 'z') {
is_capital=true;
}
}
//document.title='' + is_capital;
myThisLanguageCode = "";
myThisLanguage = "";
myThisCapital = "";
var mySpareThisLanguageCode = "";
var mySpareThisLanguage = "";
var mySpareThisCapital = "";
document.getElementById("myCountrySearchField").className = "";
if (mystr != "") {
prefix='';
document.getElementById("mypopups").innerHTML = "";
if (is_capital) {
for (var myi=0; myi<myCapitalsArray.length; myi++) {
//console.log(myCountriesArray[myi]);
if (myCapitalsArray[myi]) {
myThisCapital = myCapitalsVArray[myi]; //.nodeValue;
} else {
myThisCapital = " ";
}

if (myThisCapital.toLowerCase().indexOf(mystr.toLowerCase().substring(0,one)) == 0) {
var myThisCountry = myCountriesArray[myi]; //.nodeValue;
myThisCode = myCodesArray[myi];
myThisC=myThisCode;
myThisCapital = myCapitalsVArray[myi];
mtc = myThisCountry;
var myTempDiv = document.createElement("div");
myTempDiv.setAttribute('data-title', myCodesArray[myi] + ';' + myThisCountry);
// ?theseparameters=aq%3Fc%3D' + myCodesArray[iii] + '%26query%3DEnc
myTempDiv.setAttribute('data-weatherurl', '//www.rjmprogramming.com.au/weather/using_key.php?theseparameters=aq%3Fc%3D' + myCodesArray[myi] + '%26query%3DEncodedPlaceGoesHere');
myTempDiv.title = myThisCapital + ' is capital city of ' + myThisCountry; //myCodesArray[myi] + ';' + myThisCountry;
myTempDiv.innerHTML = myThisCapital.split(' (')[0];
myTempDiv.onmouseover = overmakeSelection;
myTempDiv.onmouseout = outmakeSelection;
myTempDiv.onclick = makeSelection;
myTempDiv.className = "mysuggestions";
if (thefirst) { thefirst=false; myTempDiv.id='thefirstone'; }
if (one == 1 && mystr.length != one && mystr.toLowerCase() == myThisCountry.toLowerCase()) { myTempDiv.id='divtheone'; }
if (document.getElementById('ddcapital').innerHTML != '') { document.getElementById('ddcapital').innerHTML=''; }
document.getElementById("mypopups").appendChild(myTempDiv);
if (one == 1 && mystr.length != one && mystr.toLowerCase() == myThisCountry.toLowerCase()) { document.getElementById('divtheone').click(); mystr=''; }
}

}
} else {
for (var myi=0; myi<myCountriesArray.length; myi++) {
//console.log(myCountriesArray[myi]);
var myThisCountry = myCountriesArray[myi]; //.nodeValue;

if (myThisCountry.toLowerCase().indexOf(mystr.toLowerCase().substring(0,one)) == 0) {
myThisCode = myCodesArray[myi];
myThisC=myThisCode;
myThisCapital = myCapitalsVArray[myi];
mtc = myThisCountry;
var myTempDiv = document.createElement("div");
myTempDiv.setAttribute('data-title', myCodesArray[myi] + ';' + myThisCapital.split(' (')[0]);
myTempDiv.setAttribute('data-weatherurl', '//www.rjmprogramming.com.au/weather/using_key.php?theseparameters=aq%3Fc%3D' + myCodesArray[myi] + '%26query%3DEncodedPlaceGoesHere');
myTempDiv.title = myThisCountry + ' has a capital city of ' + myThisCapital; //myCodesArray[myi] + ';' + myThisCapital;
myTempDiv.innerHTML = myThisCountry;
myTempDiv.onmouseover = overmakeSelection;
myTempDiv.onmouseout = outmakeSelection;
myTempDiv.onclick = makeSelection;
myTempDiv.className = "mysuggestions";
if (thefirst) { thefirst=false; myTempDiv.id='thefirstone'; }
if (one == 1 && mystr.length != one && mystr.toLowerCase() == myThisCountry.toLowerCase()) { myTempDiv.id='divtheone'; }
if (document.getElementById('ddcapital').innerHTML != '') { document.getElementById('ddcapital').innerHTML=''; }
document.getElementById("mypopups").appendChild(myTempDiv);
if (one == 1 && mystr.length != one && mystr.toLowerCase() == myThisCountry.toLowerCase()) { document.getElementById('divtheone').click(); mystr=''; }
}

}
}
var myFoundCt = document.getElementById("mypopups").childNodes.length;
if (myFoundCt == 0) {
document.getElementById("myCountrySearchField").className = "myerror";
}
if (myFoundCt == 1) {
//if (is_capital) { alert('quito'); }
if (is_capital) {
//var xcv=document.getElementById("myCountrySearchField").value;
//document.getElementById("mypopups").firstChild.innerHTML=document.getElementById("mypopups").firstChild.title.split(';')[1];
//document.getElementById("myCountrySearchField").value = document.getElementById("mypopups").firstChild.title.split(';')[1];
//document.getElementById("mypopups").firstChild.title=document.getElementById("mypopups").firstChild.title.split(';')[0] + xcv;
//is_capital=false;
document.getElementById("myCountrySearchField").value = document.getElementById("mypopups").firstChild.innerHTML;
if (('' + document.getElementById("mypopups").firstChild.getAttribute('data-title')) != '') {
cis = document.getElementById("mypopups").firstChild.getAttribute('data-title').split(';')[1];
//alert('cis=' + cis);
} else {
cis = document.getElementById("mypopups").firstChild.title.split(';')[1];
//alert('ciS=' + cis);
}
mtcis = cis;
document.getElementById("thefirstone").click();
document.getElementById("mypopups").innerHTML = "";
} else {
document.getElementById("myCountrySearchField").value = document.getElementById("mypopups").firstChild.innerHTML;
cis = document.getElementById("mypopups").firstChild.innerHTML;
//alert('Cis=' + cis);
document.getElementById("thefirstone").click();
document.getElementById("mypopups").innerHTML = "";
}
//alert("cis=" + cis);

//var xmlDoc=loadXMLDoc("languages.xml");

var myAllLanguages = xmlDoc.getElementsByTagName("language");
for (var myj=0; myj<myAllLanguages.length; myj++) {
//console.log(myAllLanguages[myj].getAttribute("code").toLowerCase() + " vs " + myThisCode.toLowerCase());
if (myAllLanguages[myj].getAttribute("code").toLowerCase().indexOf(myThisCode.toLowerCase()) == 0) {
myThisLanguageCode = myAllLanguages[myj].getAttribute("code");
myThisLanguage = myAllLanguages[myj].getAttribute("name");
}
if (myAllLanguages[myj].getAttribute("name").toLowerCase().indexOf(myThisCode.toLowerCase()) == 0) {
mySpareThisLanguageCode = myAllLanguages[myj].getAttribute("code");
mySpareThisLanguage = myAllLanguages[myj].getAttribute("name");
mySpareThisCapital = myThisCapital;
if (1 == 4) xfound=true;
} //else { // new ideas from May, 2015 here
//document.title=prefix + myAllLanguages[myj].getAttribute("name").toLowerCase() + "/" + myAllLanguages[myj].getAttribute("code").toLowerCase() + " not with " + myThisCode.toLowerCase();
//}
}

smtc = myThisCode;
if (1 == 1 && !xfound && prefix == '' && lc_CC != '' && mtc != '') { // new ideas from May, 2015 here
//document.title=myTempDiv.title;
//prefix=mtc; //'Y ';
if (lc_CC != '') {
//prefix='Q ';
if (lc_CC.indexOf('"' + mtc + '"') != -1) {
var xiprefs, xendofs, xprefs=lc_CC.split('"' + mtc + '"');
for (xiprefs=1; xiprefs<xprefs.length; xiprefs++) {
xendofs=xprefs[xiprefs].substring(1).split("_");
if (xendofs[0].length == 2 && prefix.indexOf(xendofs[0]) == -1) {
prefix = prefix + pdelim + xendofs[0].replace("zh", "zh-CN,zh-TW");
myThisLanguageCode=""; //xendofs[0];
mySpareThisLanguageCode = ""; //
mySpareThisCapital = ""; //
}
pdelim=',';
}
} else if (lc_CC.indexOf('"' + mtc + ' ') != -1) {
var xiprefs, xendofs, xprefs=lc_CC.split('"' + mtc + '"');
for (xiprefs=1; xiprefs<xprefs.length; xiprefs++) {
xendofs=xprefs[xiprefs].substring(1).split("_");
if (xendofs[0].length == 2 && prefix.indexOf(xendofs[0]) == -1) {
prefix = prefix + pdelim + xendofs[0].replace("zh", "zh-CN,zh-TW");
myThisLanguageCode=""; //xendofs[0];
mySpareThisLanguageCode = ""; //
mySpareThisCapital = ""; //
}
pdelim=',';
}
}
}
//document.title=prefix;
if (prefix != '') xfound=true;
}
if (!xfound && prefix == '' && lc_CC != '' && smtc != '') { // new ideas from May, 2015 here
//document.title=myTempDiv.title;
//prefix='Y ';
if (lc_CC != '') {
//prefix='Q ';
if (lc_CC.indexOf("_" + smtc + "<") != -1) {
var xiprefs, xendofs, xprefs=lc_CC.split("_" + smtc + "<");
for (xiprefs=0; xiprefs<xprefs.length; xiprefs++) {
xendofs=xprefs[xiprefs].split(">");
if (xendofs[xendofs.length - 1].length == 2 && prefix.indexOf(xendofs[xendofs.length - 1]) == -1) prefix = prefix + pdelim + xendofs[xendofs.length - 1].replace("zh", "zh-CN,zh-TW");
pdelim=',';
}
}
}
//document.title=mtc;
}

if (myThisLanguageCode == "" && mySpareThisLanguageCode != "") {
myThisLanguageCode = mySpareThisLanguageCode;
myThisLanguage = mySpareThisLanguage;
myThisCapital = mySpareThisCapital;
}

if (myThisLanguageCode != "" && prefix.indexOf(myThisLanguageCode) == -1) {
prefix=prefix + pdelim + myThisLanguageCode;
}

if (myThisLanguageCode != "" && 1 == 2) {
var wo_wo=window.open("http://translate.google.com/" + bitsbetween + "#en|" + myThisLanguageCode + "|Hello%20from%20Sydney%20in%20Australia.".replace(bhuh,"/").replace(bhuh,"/"), myThisLanguageCode, "left=500,top=10,width=800,height=380");
//wo_wo.document.title+=' ... Capital City is ' + myThisCapital;
myThisLanguageCode = "";
myThisLanguage = "";
myThisCapital = "";
}

}
}
}

// http://localhost:8888/fgc/?tdinto=ctrytd&inurl=http%3A%2F%2Fen.wikipedia.org%2Fwiki%2FBolivia

function overandout() {
if (lhcandidate != '' && overcnt == 1) {
overcnt=0;
lhready=true;
makeSelection(null);
}
}

function overmakeSelection(evt) {
overcnt++;
if (evt) {
lhcandidate = evt.target;
} else {
lhcandidate = window.event.srcElement;
}
setTimeout(overandout, 2000);
}

function outmakeSelection(evt) {
if (overcnt > 0) { overcnt--; }
lhcandidate='';
lhready=false;
}

function huhint() {
if (1 == 5) { alert(intstuff); }
}

function domore(incd) {
// <iframe style="width:460px;height:360px;" src="' + gcurl + '"></iframe>
setTimeout(huhint,8000);
if (('' + document.URL).toLowerCase().indexOf('rjmprogramming.com.au') != -1) {
document.getElementById('disotwo').innerHTML="<iframe onload=internationalize(this); style=display:none; id=isotwo src='//www.rjmprogramming.com.au/PHP/fgc/?iso2=" + encodeURIComponent(incd) + "'></iframe>";
} else {
document.getElementById('disotwo').innerHTML="<iframe onload=internationalize(this); style=display:none; id=isotwo src='../../fgc/?iso2=" + encodeURIComponent(incd) + "'></iframe>";
}
return '" name=canbetz id=canbetz></iframe><br><a target=canbetz href="//www.rjmprogramming.com.au/PHP/tz_places.php?iso=' + incd + '" title="Timezone Places">Show Timezone Places</a>';
}

function makeSelection(evt) {
var xfound=false; // new ideas from May, 2015 here
var pdelim='';
var smtc = "", mtc = "";
var myThisCode = "";
myThisLanguageCode = "";
myThisLanguage = "";
myThisCapital = "";
var mySpareThisLanguageCode = "";
var mySpareThisLanguage = "";
var mySpareThisCapital = "";
if (lhcandidate != '' && lhready) {
var myThisDiv = lhcandidate;
} else if (evt) {
var myThisDiv = evt.target;
} else {
var myThisDiv = window.event.srcElement;
}
document.getElementById("myCountrySearchField").value = myThisDiv.innerHTML;
if (('' + myThisDiv.getAttribute('data-title')) != '') {
myThisCode = myThisDiv.getAttribute('data-title').split(';')[0];
myThisC=myThisCode;
} else {
myThisCode = myThisDiv.title.split(';')[0];
myThisC=myThisCode;
}
if (myThisDiv.title.indexOf(';') != -1 || ('' + myThisDiv.getAttribute('data-title')).indexOf(';') != -1) {
if (('' + myThisDiv.getAttribute('data-title')) != '') {
myThisCapital = myThisDiv.getAttribute('data-title').split(';')[1];
//alert('myThisCapital=' + myThisCapital);
} else {
myThisCapital = myThisDiv.title.split(';')[1];
}
}
mtcis=myThisCapital;
if (is_capital) {
idname=" onclick=\" if (stopoffs.indexOf(this.value) != -1) { stopoffs='~'; } if (accoms.indexOf(this.getAttribute('data-accom')) == -1) { accoms+=this.id + '=' + this.getAttribute('data-accom') + '~'; } if (weathers.indexOf(this.getAttribute('data-weatherurl').replace('EncodedPlaceGoesHere',encodeURIComponent('" + myThisDiv.innerHTML.split(',')[0] + "'))) == -1) { weathers+='" + myThisDiv.innerHTML + "'.toLowerCase().split(' (')[0].replace(/\ /g,'_') + '=' + this.getAttribute('data-weatherurl').replace('EncodedPlaceGoesHere',encodeURIComponent('" + myThisDiv.innerHTML.split(',')[0] + "')) + '~'; } stopoffs+=this.value + '~';\" name=\"" + myThisCapital.toLowerCase().split(' (')[0].replace(/\ /g,'_') + "\" id=\"" + myThisDiv.innerHTML.toLowerCase().split(' (')[0].replace(/\ /g,'_') + "\" data-accom=\"" + (myThisDiv.innerHTML.toLowerCase().split(' (')[0] + ', ' + myThisCapital.toLowerCase().split(' (')[0]).replace(/\ /g,'+') + "\" ";
} else {
idname=" onclick=\"if (stopoffs.indexOf(this.value) != -1) { stopoffs='~'; } if (accoms.indexOf(this.getAttribute('data-accom')) == -1) { accoms+=this.id + '=' + this.getAttribute('data-accom') + '~'; } if (weathers.indexOf(this.getAttribute('data-weatherurl').replace('EncodedPlaceGoesHere',encodeURIComponent('" + myThisDiv.innerHTML.split(',')[0] + "'))) == -1) { weathers+='" + myThisDiv.innerHTML + "'.toLowerCase().split(' (')[0].replace(/\ /g,'_') + '=' + this.getAttribute('data-weatherurl').replace('EncodedPlaceGoesHere',encodeURIComponent('" + myThisDiv.innerHTML.split(',')[0] + "')) + '~'; } stopoffs+=this.value + '~';\" id=\"" + myThisCapital.toLowerCase().split(' (')[0].replace(/\ /g,'_') + "\" name=\"" + myThisDiv.innerHTML.toLowerCase().split(' (')[0].replace(/\ /g,'_') + "\" data-accom=\"" + (myThisCapital.toLowerCase().split(' (')[0] + ', ' + myThisDiv.innerHTML.toLowerCase().split(' (')[0]).replace(/\ /g,'+') + "\" ";
}
gcurl=uprefix.replace('Countries',encodeURIComponent(document.getElementById("myCountrySearchField").value)) + "%20[~" + myThisCode.toUpperCase() + "~,66]" + domore(myThisCode.toUpperCase());
if (lhcandidate != '' && lhready) {
document.getElementById('ddcapital').innerHTML='<table id=textras cellpadding=20><tr><td id=tdgc><iframe style="width:460px;height:390px;" src="' + gcurl + '</td><td id=ctrytd></td><td id=citytd></td></tr></table>';
} else {
document.getElementById('mytableideas').innerHTML='<table id=textras cellpadding=20><tr><td id=tdgc><iframe style="width:460px;height:390px;" src="' + gcurl + '</td><td id=ctrytd></td><td id=citytd></td></tr></table>';
}

if (('' + document.URL).toLowerCase().indexOf('rjmprogramming.com.au') != -1) {
if (is_capital) {
document.getElementById('ifsrc').title="capitalid=" + myThisDiv.innerHTML.toLowerCase().split(' (')[0].replace(/\ /g,'_');
document.getElementById('ifsrctwo').title="countryname=" + myThisCapital.toLowerCase().split(' (')[0].replace(/\ /g,'_') + "~" + myThisDiv.innerHTML.toLowerCase().split(' (')[0].replace(/\ /g,'_');
} else {
document.getElementById('ifsrctwo').title="capitalid=" + myThisCapital.toLowerCase().split(' (')[0].replace(/\ /g,'_');
document.getElementById('ifsrc').title="countryname=" + myThisDiv.innerHTML.toLowerCase().split(' (')[0].replace(/\ /g,'_') + "~" + myThisCapital.toLowerCase().split(' (')[0].replace(/\ /g,'_');
}
document.getElementById('ifsrc').src='//www.rjmprogramming.com.au/PHP/fgc/?tdinto=ctrytd&inurl=' + encodeURIComponent('http://en.wikipedia.org/wiki/' + encodeURIComponent(document.getElementById("myCountrySearchField").value.split(' (')[0].replace(', ',',_').replace(/\ /g,'_')));
document.getElementById('ifsrctwo').src='//www.rjmprogramming.com.au/PHP/fgc/?tdinto=citytd&inurl=' + encodeURIComponent('http://en.wikipedia.org/wiki/' + encodeURIComponent(myThisCapital.split(' (')[0].replace(', ',',_').replace(/\ /g,'_')));
} else {
if (is_capital) {
document.getElementById('ifsrc').title="capitalid=" + myThisDiv.innerHTML.toLowerCase().split(' (')[0].replace(/\ /g,'_');
document.getElementById('ifsrctwo').title="countryname=" + myThisCapital.toLowerCase().split(' (')[0].replace(/\ /g,'_') + "~" + myThisDiv.innerHTML.toLowerCase().split(' (')[0].replace(/\ /g,'_');
} else {
document.getElementById('ifsrctwo').title="capitalid=" + myThisCapital.toLowerCase().split(' (')[0].replace(/\ /g,'_');
document.getElementById('ifsrc').title="countryname=" + myThisDiv.innerHTML.toLowerCase().split(' (')[0].replace(/\ /g,'_') + "~" + myThisCapital.toLowerCase().split(' (')[0].replace(/\ /g,'_');
}
document.getElementById('ifsrc').src='http://localhost:8888/fgc/?tdinto=ctrytd&inurl=' + encodeURIComponent('http://en.wikipedia.org/wiki/' + encodeURIComponent(document.getElementById("myCountrySearchField").value.split(' (')[0].replace(', ',',_').replace(/\ /g,'_')));
document.getElementById('ifsrctwo').src='http://localhost:8888/fgc/?tdinto=citytd&inurl=' + encodeURIComponent('http://en.wikipedia.org/wiki/' + encodeURIComponent(myThisCapital.split(' (')[0].replace(', ',',_').replace(/\ /g,'_')));
}


cis = myThisDiv.innerHTML;

if (weathers.indexOf(myThisDiv.getAttribute('data-weatherurl').replace('EncodedPlaceGoesHere',encodeURIComponent(myThisDiv.innerHTML.split(',')[0]))) == -1) { weathers+=idname.split(' id="')[1].split('"')[0] + '=' + myThisDiv.getAttribute('data-weatherurl').replace('EncodedPlaceGoesHere',encodeURIComponent(myThisDiv.innerHTML.split(',')[0])) + '~'; }

//alert("Cis=" + cis);
if (lhcandidate == '' || !lhready) { document.getElementById("mypopups").innerHTML = ""; }

//var xmlDoc=loadXMLDoc("languages.xml");

var myAllLanguages = xmlDoc.getElementsByTagName("language");
for (var myj=0; myj<myAllLanguages.length; myj++) {
//console.log("2: " + myAllLanguages[myj].getAttribute("code").toLowerCase() + " vs " + myThisCode.toLowerCase());
if (myAllLanguages[myj].getAttribute("code").toLowerCase().indexOf(myThisCode.toLowerCase()) == 0) {
myThisLanguageCode = myAllLanguages[myj].getAttribute("code");
myThisLanguage = myAllLanguages[myj].getAttribute("name");
}
if (myAllLanguages[myj].getAttribute("name").toLowerCase().indexOf(myThisCode.toLowerCase()) == 0) {
mySpareThisLanguageCode = myAllLanguages[myj].getAttribute("code");
mySpareThisLanguage = myAllLanguages[myj].getAttribute("name");
}
}

smtc = myThisCode;
if (1 == 1 && !xfound && prefix == '' && lc_CC != '' && mtc != '') { // new ideas from May, 2015 here
//document.title=myTempDiv.title;
//prefix=mtc; //'Y ';
if (lc_CC != '') {
//prefix='Q ';
if (lc_CC.indexOf('"' + mtc + '"') != -1) {
var xiprefs, xendofs, xprefs=lc_CC.split('"' + mtc + '"');
for (xiprefs=1; xiprefs<xprefs.length; xiprefs++) {
xendofs=xprefs[xiprefs].substring(1).split("_");
if (xendofs[0].length == 2 && prefix.indexOf(xendofs[0]) == -1) {
prefix = prefix + pdelim + xendofs[0].replace("zh", "zh-CN,zh-TW");
myThisLanguageCode=""; //xendofs[0];
mySpareThisLanguageCode = ""; //
}
pdelim=',';
}
} else if (lc_CC.indexOf('"' + mtc + ' ') != -1) {
var xiprefs, xendofs, xprefs=lc_CC.split('"' + mtc + '"');
for (xiprefs=1; xiprefs<xprefs.length; xiprefs++) {
xendofs=xprefs[xiprefs].substring(1).split("_");
if (xendofs[0].length == 2 && prefix.indexOf(xendofs[0]) == -1) {
prefix = prefix + pdelim + xendofs[0].replace("zh", "zh-CN,zh-TW");
myThisLanguageCode=""; //xendofs[0];
mySpareThisLanguageCode = ""; //
}
pdelim=',';
}
}
}
//document.title=prefix;
if (prefix != '') xfound=true;
}
if (!xfound && prefix == '' && lc_CC != '' && smtc != '') { // new ideas from May, 2015 here
//document.title=myTempDiv.title;
//prefix='Y ';
if (lc_CC != '') {
//prefix='Q ';
if (lc_CC.indexOf("_" + smtc + "<") != -1) {
var xiprefs, xendofs, xprefs=lc_CC.split("_" + smtc + "<");
for (xiprefs=0; xiprefs<xprefs.length; xiprefs++) {
xendofs=xprefs[xiprefs].split(">");
if (xendofs[xendofs.length - 1].length == 2 && prefix.indexOf(xendofs[xendofs.length - 1]) == -1) prefix = prefix + pdelim + xendofs[xendofs.length - 1].replace("zh", "zh-CN,zh-TW");
pdelim=',';
}
}
}
//document.title=mtc;
}

if (myThisLanguageCode == "" && mySpareThisLanguageCode != "") {
myThisLanguageCode = mySpareThisLanguageCode;
myThisLanguage = mySpareThisLanguage;
myThisCapital = mySpareThisCapital;
}

if (myThisLanguageCode != "" && prefix.indexOf(myThisLanguageCode) == -1) {
prefix=prefix + pdelim + myThisLanguageCode;
}

if (myThisLanguageCode != "" && 1 == 2) {
//alert(56);
var wo_wo_wo=window.open("https://translate.google.com/" + bitsbetween + "#en|" + myThisLanguageCode + "|Hello%20from%20Sydney%20in%20Australia.".replace(bhuh,"/").replace(bhuh,"/"), myThisLanguageCode, "left=500,top=10,width=800,height=360");
//alert(156);
wo_wo_wo.document.title+=' ... Capital City is ' + myThisCapital;
//alert(256);
myThisLanguageCode = "";
myThisLanguage = "";
myThisCapital = "";
}

//if (lhcandidate != '' && lhready) {
//xgbit();
//} else {
gbit();
//}
}

// <option value="http://localhost:8888/Ajax/AutoCompletion/auto_language_complete.html?capital=Accra">Accra's the capital city of Ghana</option>

function gbit() {
if (document.getElementById("myCountrySearchField").value != "" && cis != "") {
if (is_capital) {
countryeq='?capital=';
} else {
countryeq='?country=';
}
document.getElementById('semail').innerHTML="<a style='cursor:pointer;text-decoration:none;' href='mailto:?subject=" + encodeURIComponent(document.getElementById("myCountrySearchField").value + " Information ...") + '&body=' + encodeURIComponent(document.URL.split('#')[0].split('?')[0] + countryeq + encodeURIComponent(document.getElementById("myCountrySearchField").value)) + "' title='Email about " + document.getElementById("myCountrySearchField").value + "'>📧</a>";
if (lhcandidate == '' || !lhready) { document.getElementById('ddcapital').innerHTML=''; }
if (document.getElementById('atload').innerHTML != '') {
lhcandidate='';
lhready=false;
document.getElementById('atload').innerHTML='';
}
//document.getElementById("mygi").style.display = "block";
//alert(myThisCapital + "https://maps.google.com/maps?q=" + cis + '&hl=en&hnear=' + cis + '&t=m&z=5');
if (lhcandidate == '' || !lhready) {
var wo_wo_wo_wo=window.open("https://maps.google.com/maps?q=" + cis.split(' (')[0], cis, "left=10,top=330,width=1300,height=470"); //,'mygi');
//wo_wo_wo_wo.document.title+=' ... Capital City is ' + myThisCapital;
}
if (('' + myThisCapital).replace('null','') == '' && !is_capital) {
document.getElementById('dcapital').innerHTML=' ' + sadd(document.getElementById("myCountrySearchField").value);
} else if (is_capital) {
document.getElementById('dcapital').innerHTML=' ' + sadd(document.getElementById("myCountrySearchField").value + "'s the capital city of " + mtcis + '#' + myThisC);
} else {
document.getElementById('dcapital').innerHTML=' ' + sadd(document.getElementById("myCountrySearchField").value + "'s capital city is " + myThisCapital + '#' + myThisC);
}
cis = "";
if (myThisLanguageCode != "" && prefix == '') {
if (lhcandidate == '' || !lhready) { window.open("https://translate.google.com/" + bitsbetween + "#en|" + myThisLanguageCode + "|Hello%20from%20Sydney%20in%20Australia.".replace(bhuh,"/").replace(bhuh,"/"), myThisLanguageCode, "left=500,top=10,width=800,height=360"); }
if (("," + prefix + ",").indexOf("," + myThisLanguageCode + ",") != -1) {
prefix=prefix.replace(myThisLanguageCode, "");
}
myThisLanguageCode = "";
myThisLanguage = "";
}
if (prefix.replace(/,/g,'') != '') {
var imylangs, mylangs=prefix.split(",");
for (imylangs=0; imylangs<mylangs.length; imylangs++) {
if ((lhcandidate == '' || !lhready) && mylangs[imylangs] != '') { window.open("https://translate.google.com/" + bitsbetween + "#en|" + mylangs[imylangs] + "|Hello%20from%20Sydney%20in%20Australia.".replace(bhuh,"/").replace(bhuh,"/"), mylangs[imylangs], "left=500,top=" + eval((imylangs + 1) * 2) + "10,width=800,height=360"); }
}
}
myThisLanguageCode = "";
myThisLanguage = "";
} else {
document.getElementById("mygi").style.display = "none";
}
prefix='';
lhcandidate='';
lhready=false;
overcnt=0;
}

function internationalize(iois) {
//if (iois.src != '' && iois.src.indexOf('.htm') == -1) {
var aconto = (iois.contentWindow || iois.contentDocument);
if (aconto != null) {
if (aconto.document) { aconto = aconto.document; }
intstuff=aconto.body.innerHTML;
}
//}
}



function loadifsrc(iois) {
var xintstuff='', latlong='';
//if (iois.src != '' && iois.src.indexOf('.htm') == -1) {
if (iois.src != '') {
var aconto = (iois.contentWindow || iois.contentDocument);
if (aconto != null) {
if (aconto.document) { aconto = aconto.document; }
if (iois.src.indexOf('tdinto=') != -1) {
xintstuff=document.getElementById(iois.src.split('tdinto=')[1].split('&')[0]).innerHTML;
} else {
xintstuff=aconto.body.innerHTML;
}
//alert(xintstuff);
if (xintstuff.indexOf(' data-geo="') != -1) {
latlong=xintstuff.split(' data-geo="')[1].split('"')[0];
if (('' + iois.title).indexOf('countryname=') != -1 && ('' + iois.title).indexOf('~') != -1) {
if (accoms.indexOf('' + ('' + iois.title).split('~')[1] + '=') != -1) {
document.getElementById(('' + iois.title).split('~')[1]).setAttribute('data-accom', accoms.split('' + ('' + iois.title).split('~')[1] + '=')[1].split('~')[0]);
}
if (weathers.indexOf('' + ('' + iois.title).split('~')[1] + '=') != -1) {
document.getElementById(('' + iois.title).split('~')[1]).setAttribute('data-weatherurl', weathers.split('' + ('' + iois.title).split('~')[1] + '=')[1].split('~')[0]);
}
document.getElementById(('' + iois.title).split('~')[1]).setAttribute('data-countrygeo', latlong);
} else if (('' + iois.title).indexOf('capitalid=') != -1) {
if (accoms.indexOf('' + ('' + iois.title).split('capitalid=')[1] + '=') != -1) {
document.getElementById(('' + iois.title).split('~')[1]).setAttribute('data-accom', accoms.split('' + ('' + iois.title).split('capitalid=')[1] + '=')[1].split('~')[0]);
}
if (weathers.indexOf('' + ('' + iois.title).split('capitalid=')[1] + '=') != -1) {
document.getElementById(('' + ('' + iois.title).split('capitalid=')[1])).setAttribute('data-weatherurl', weathers.split('' + ('' + iois.title).split('capitalid=')[1] + '=')[1].split('~')[0]);
}
document.getElementById(('' + iois.title).split('capitalid=')[1]).setAttribute('data-capitalgeo', latlong);
}
}
}
//}
}
}


function loadifsrctwo(iois) {
var xintstuff='', latlong='';
//if (iois.src != '' && iois.src.indexOf('.htm') == -1) {
if (iois.src != '') {
var aconto = (iois.contentWindow || iois.contentDocument);
if (aconto != null) {
if (aconto.document) { aconto = aconto.document; }
if (iois.src.indexOf('tdinto=') != -1) {
xintstuff=document.getElementById(iois.src.split('tdinto=')[1].split('&')[0]).innerHTML;
} else {
xintstuff=aconto.body.innerHTML;
}
//alert("1:" + xintstuff);
if (xintstuff.indexOf(' data-geo="') != -1) {
latlong=xintstuff.split(' data-geo="')[1].split('"')[0];
if (('' + iois.title).indexOf('countryname=') != -1 && ('' + iois.title).indexOf('~') != -1) {
if (accoms.indexOf('' + ('' + iois.title).split('~')[1] + '=') != -1) {
document.getElementById(('' + iois.title).split('~')[1]).setAttribute('data-accom', accoms.split('' + ('' + iois.title).split('~')[1] + '=')[1].split('~')[0]);
}
if (weathers.indexOf('' + ('' + iois.title).split('~')[1] + '=') != -1) {
document.getElementById(('' + iois.title).split('~')[1]).setAttribute('data-weatherurl', weathers.split('' + ('' + iois.title).split('~')[1] + '=')[1].split('~')[0]);
}
document.getElementById(('' + iois.title).split('~')[1]).setAttribute('data-countrygeo', latlong);
} else if (('' + iois.title).indexOf('capitalid=') != -1) {
if (accoms.indexOf('' + ('' + iois.title).split('capitalid=')[1] + '=') != -1) {
document.getElementById(('' + iois.title).split('~')[1]).setAttribute('data-accom', accoms.split('' + ('' + iois.title).split('capitalid=')[1] + '=')[1].split('~')[0]);
}
if (weathers.indexOf('' + ('' + iois.title).split('capitalid=')[1] + '=') != -1) {
document.getElementById(('' + ('' + iois.title).split('capitalid=')[1])).setAttribute('data-weatherurl', weathers.split('' + ('' + iois.title).split('capitalid=')[1] + '=')[1].split('~')[0]);
}
document.getElementById(('' + iois.title).split('capitalid=')[1]).setAttribute('data-capitalgeo', latlong);
}
}
}
//}
}
}

function weatherit(iois) {
// <option value=>Please select below ...</option><option title=Africa/Luanda,-7.400000,15.380000,AO value=/q/zmw:00000.371.66142>Luanda, Angola</option>
//alert(iois.src);
if (iois.src.indexOf('using_key.php') != -1 && iois.src.indexOf('rjmprogramming.com.au') != -1) {
var aconto = (iois.contentWindow || iois.contentDocument);
if (aconto != null) {
if (aconto.document) { aconto = aconto.document; }
//alert(aconto.body.innerHTML);
var wss=[];
if (document.getElementById('myselcont').innerHTML != '') {
wss=document.getElementById('myselcont').innerHTML.replace(/\"/g,'').replace(' value=>','').split('value=');
document.getElementById('myselcont').innerHTML='';
} else {
wss=aconto.body.innerHTML.replace(/\"/g,'').replace(' value=>','').split('value=');
}
if (wss.length > 1) {
window.open('//www.wunderground.com' + wss[eval(-1 + wss.length)].split(' ')[0].split('>')[0], '_blank', 'top=250,left=' + eval(50 + iprewinos) + ',width=700,height=700');
}
iprewinos++;
if (prewinos.length > iprewinos) {
setTimeout(delayit, 3000); // document.getElementById('mygix').src=prewinos[iprewinos];
} else {
iprewinos=0;
prewinos=[];
}
}
}
}

function delayit() {
document.getElementById('mygix').src=prewinos[iprewinos];
}

</script>

</head>
<body>
<h1 id=myh1>Country or Capital <span id=expands>Information</span></h1>
<h3>RJM Programming <span id=semail>-</span> December 2013</h3>
<form action="#">
Please enter your country or capital name: <input style="width:400px;background-color:yellow;" placeholder="Lowercase for capitals (go figure)" onclick="if (this.value.length == 0) { is_capital=false; } lhcandidate=''; lhready=false; overcnt=0; document.getElementById('ddcapital').innerHTML=''; document.getElementById('dcapital').innerHTML=''; document.getElementById('mytableideas').innerHTML='';" type="text" name="myCountrySearchField" id="myCountrySearchField" autocomplete="off" onblur="gbit();" /><div id=dcapital style='display:inline-block;'></div><div id=ddcapital style='float:right;'></div><br>
<div id="mytableideas"></div>
<div id="mypopups"> </div>
<br><iframe id='mygi' src='javascript:false;' style='display:none;width:100%;height:550px;'></iframe>
</form>


<select id='sellccc' style='display:none;'></select>
<iframe id='mylccc' src='lc_CC.php' style='display:none;width:100%;height:550px;'></iframe>
<form action="#">
<select id=selceq style='display:none;' onchange="if (this.value.length == 0) { otherideas=otherideas.replace('c%3D','cx%3D'); } else { otherideas+='c%3D' + this.value + encodeURIComponent('&'); }">
<option value="Afghanistan">Kabul</option>
<option value="Åland Islands">Mariehamn</option>
<option value="Albania">Tirana</option>
<option value="Algeria">Algiers</option>
<option value="American Samoa">Pago Pago</option>
<option value="Andorra">Andorra la Vella</option>
<option value="Angola">Luanda</option>
<option value="Anguilla">The Valley</option>
<option value="Antigua and Barbuda">Saint John's</option>
<option value="Argentina">Buenos Aires</option>
<option value="Armenia">Yerevan</option>
<option value="Aruba">Oranjestad</option>
<option value="Australia">Canberra</option>
<option value="Austria">Vienna</option>
<option value="Azerbaijan">Baku</option>
<option value="Bahamas">Nassau</option>
<option value="Bahrain">Manama</option>
<option value="Bangladesh">Dhaka</option>
<option value="Barbados">Bridgetown</option>
<option value="Belarus">Minsk</option>
<option value="Belgium">Brussels</option>
<option value="Belize">Belmopan</option>
<option value="Benin">Porto-Novo</option>
<option value="Bermuda">Hamilton</option>
<option value="Bhutan">Thimphu</option>
<option value="Bolivia">La Paz (administrative), Sucre (judicial)</option>
<option value="Bosnia and Herzegovina">Sarajevo</option>
<option value="Botswana">Gaborone</option>
<option value="Brazil">Brasilia</option>
<option value="British Indian Ocean Territory">Camp Justice</option>
<option value="Brunei">Bandar Seri Begawan</option>
<option value="Brunei Darussalam">Bandar Seri Begawan</option>
<option value="Bulgaria">Sofia</option>
<option value="Burkina Faso">Ouagadougou</option>
<option value="Burundi">Bujumbura</option>
<option value="Cabo Verde">Praia</option>
<option value="Cambodia">Phnom Penh</option>
<option value="Cameroon">Yaounde</option>
<option value="Canada">Ottawa</option>
<option value="Cape Verde">Praia</option>
<option value="Cayman Islands">George Town</option>
<option value="Central African Republic">Bangui</option>
<option value="Chad">N'Djamena</option>
<option value="Chile">Santiago</option>
<option value="China">Beijing</option>
<option value="Christmas Island">Flying Fish Cove</option>
<option value="Cocos (Keeling) Islands">West Island</option>
<option value="Colombia">Bogotá</option>
<option value="Comoros">Moroni</option>
<option value="Cook Islands">Avarua District</option>
<option value="Côte d'Ivoire">Yamoussoukro<option>
<option value="Democratic Republic of the Congo">Kinshasa</option>
<option value="Congo, The Democratic Republic Of The">Kinshasa</option>
<option value="Republic of the Congo">Brazzaville</tr>
<option value="Congo">Brazzaville</tr>
<option value="Costa Rica">San Jose</option>
<option value="Cote d"Ivoire">Yamoussoukro</option>
<option value="Croatia">Zagreb</option>
<option value="Cuba">Havana</option>
<option value="Cyprus">Nicosia</option>
<option value="Czech Republic">Prague</option>
<option value="Denmark">Copenhagen</option>
<option value="Djibouti">Djibouti (city)</option>
<option value="Dominica">Roseau</option>
<option value="Dominican Republic">Santo Domingo</option>
<option value="Ecuador">Quito</option>
<option value="Egypt">Cairo</option>
<option value="El Salvador">San Salvador</option>
<option value="Equatorial Guinea">Malabo</option>
<option value="Eritrea">Asmara</option>
<option value="Estonia">Tallinn</option>
<option value="Ethiopia">Addis Ababa</option>
<option value="Falkland Islands (Malvinas)">Stanley</option>
<option value="Faroe Islands">Tórshavn</option>
<option value="Fiji">Suva</option>
<option value="Finland">Helsinki</option>
<option value="France">Paris</option>
<option value="French Guiana">Cayenne</option>
<option value="French Polynesia">Pape'ete</option>
<option value="French Southern Territories">Saint Pierre</option>
<option value="Gabon">Libreville</option>
<option value="Gambia">Banjul</option>
<option value="Georgia">Tbilisi</option>
<option value="Germany">Berlin</option>
<option value="Ghana">Accra</option>
<option value="Gibraltar">Gibraltar</option>
<option value="Greece">Athens</option>
<option value="Greenland">Nuuk</option>
<option value="Grenada">Saint George"s</option>
<option value="Guam">Hagåtña</option>
<option value="Guadeloupe">Basse Terre</option>
<option value="Guatemala">Guatemala City</option>
<option value="Guinea">Conakry</option>
<option value="Guinea-Bissau">Bissau</option>
<option value="Guyana">Georgetown</option>
<option value="Haiti">Port-au-Prince</option>
<option value="Holy See (Vatican City State)">Vatican City</option>
<option value="Honduras">Tegucigalpa</option>
<option value="Hong Kong">Central</option>
<option value="Hungary">Budapest</option>
<option value="Iceland">Reykjavik</option>
<option value="India">New Delhi</option>
<option value="Indonesia">Jakarta</option>
<option value="Iran">Tehran</option>
<option value="Iran, Islamic Republic Of">Tehran</option>
<option value="Iraq">Baghdad</option>
<option value="Ireland">Dublin</option>
<option value="Israel">Jerusalem</option>
<option value="Italy">Rome</option>
<option value="Jamaica">Kingston</option>
<option value="Japan">Tokyo</option>
<option value="Jordan">Amman</option>
<option value="Kazakhstan">Astana</option>
<option value="Kenya">Nairobi</option>
<option value="Kiribati">South Tarawa</option>
<option value="Korea, Democratic People's Republic Of">Pyongyang</option>
<option value="Korea, Republic Of">Seoul</option>
<option value="Kosovo">Pristina</option>
<option value="Kuwait">Kuwait City</option>
<option value="Kyrgyzstan">Bishkek</option>
<option value="Laos">Vientiane</option>
<option value="Lao People's Democratic Republic">Vientiane</option>
<option value="Latvia">Riga</option>
<option value="Lebanon">Beirut</option>
<option value="Lesotho">Maseru</option>
<option value="Liberia">Monrovia</option>
<option value="Libya">Tripoli</option>
<option value="Libyan Arab Jamahiriya">Tripoli</option>
<option value="Liechtenstein">Vaduz</option>
<option value="Lithuania">Vilnius</option>
<option value="Luxembourg">Luxembourg</option>
<option value="Macedonia">Skopje</option>
<option value="Macedonia, The Former Yugoslav Republic Of">Skopje</option>
<option value="Macao">Macau</option>
<option value="Madagascar">Antananarivo</option>
<option value="Malawi">Lilongwe</option>
<option value="Malaysia">Kuala Lumpur</option>
<option value="Maldives">Male</option>
<option value="Mali">Bamako</option>
<option value="Malta">Valletta</option>
<option value="Marshall Islands">Majuro</option>
<option value="Martinique">Fort-de-France Bay</option>
<option value="Mauritania">Nouakchott</option>
<option value="Mauritius">Port Louis</option>
<option value="Mayotte">Mamoudzou</option>
<option value="Mexico">Mexico City</option>
<option value="Micronesia">Palikir</option>
<option value="Micronesia, Federated States Of">Palikir</option>
<option value="Moldova">Chisinau</option>
<option value="Moldova, Republic Of">Chisinau</option>
<option value="Monaco">Monaco</option>
<option value="Mongolia">Ulaanbaatar</option>
<option value="Montenegro">Podgorica</option>
<option value="Montserrat">Plymouth</option>
<option value="Morocco">Rabat</option>
<option value="Mozambique">Maputo</option>
<option value="Myanmar (Burma)">Naypyidaw</option>
<option value="Myanmar">Naypyitaw</option>
<option value="Namibia">Windhoek</option>
<option value="Nauru">Yaren District</option>
<option value="Nepal">Kathmandu</option>
<option value="Netherlands">Amsterdam</option>
<option value="Netherlands Antilles">Willemstad</option>
<option value="New Caledonia">Noumea</option>
<option value="New Zealand">Wellington</option>
<option value="Nicaragua">Managua</option>
<option value="Niger">Niamey</option>
<option value="Nigeria">Abuja</option>
<option value="Niue">Alofi</option>
<option value="Norfolk Island">Kingston</option>
<option value="North Korea">Pyongyang</option>
<option value="Northern Mariana Islands">Capitol Hill</option>
<option value="Norway">Oslo</option>
<option value="Oman">Muscat</option>
<option value="Pakistan">Islamabad</option>
<option value="Palau">Ngerulmud</option>
<option value="Palestine">Ramallah</option>
<option value="Palestinian Territory, Occupied">Ramallah</option>
<option value="Panama">Panama City</option>
<option value="Papua New Guinea">Port Moresby</option>
<option value="Paraguay">Asunción</option>
<option value="Peru">Lima</option>
<option value="Philippines">Manila</option>
<option value="Pitcairn">Adamstown</option>
<option value="Poland">Warsaw</option>
<option value="Portugal">Lisbon</option>
<option value="Puerto Rico">San Juan</option>
<option value="Qatar">Doha</option>
<option value="Reunion">Saint-Denis</option>
<option value="Romania">Bucharest</option>
<option value="Russia">Moscow</option>
<option value="Russian Federation">Moscow</option>
<option value="Rwanda">Kigali</option>
<option value="Saint Helena">Jamestown</option>
<option value="Saint Kitts and Nevis">Basseterre</option>
<option value="Saint Lucia">Castries</option>
<option value="Saint Pierre and Miquelon">Saint-Pierre</option>
<option value="Saint Vincent and the Grenadines">Kingstown</option>
<option value="Samoa">Apia</option>
<option value="San Marino">San Marino</option>
<option value="Sao Tome and Principe">São Tomé</option>
<option value="Saudi Arabia">Riyadh</option>
<option value="Senegal">Dakar</option>
<option value="Serbia">Belgrade</option>
<option value="Serbia and Montenegro">Podgorica</option>
<option value="Seychelles">Victoria</option>
<option value="Sierra Leone">Freetown</option>
<option value="Singapore">Singapore</option>
<option value="Slovakia">Bratislava</option>
<option value="Slovenia">Ljubljana</option>
<option value="Solomon Islands">Honiara</option>
<option value="Somalia">Mogadishu</option>
<option value="South Africa">Pretoria (administrative), Cape Town (legislative), Bloemfontein (judicial)</option>
<option value="South Georgia and the South Sandwich Islands">King Edward Point</option>
<option value="South Korea">Seoul</option>
<option value="South Sudan">Juba</option>
<option value="Spain">Madrid</option>
<option value="Sri Lanka">Sri Jayawardenepura Kotte</option>
<option value="Sudan">Khartoum</option>
<option value="Suriname">Paramaribo</option>
<option value="Svalbard and Jan Mayen">Longyearbyen</option>
<option value="Swaziland">Mbabane</option>
<option value="Sweden">Stockholm</option>
<option value="Switzerland">Bern</option>
<option value="Syria">Damascus</option>
<option value="Syrian Arab Republic">Damascus</option>
<option value="Taiwan">Taipei</option>
<option value="Taiwan, Province of China">Taipei</option>
<option value="Tajikistan">Dushanbe</option>
<option value="Tanzania">Dodoma</option>
<option value="Tanzania, United Republic Of">Dodoma</option>
<option value="Thailand">Bangkok</option>
<option value="Timor-Leste">Dili</option>
<option value="Togo">Lomé</option>
<option value="Tokelau">Nukunonu</option>
<option value="Tonga">Nukuʻalofa</option>
<option value="Trinidad and Tobago">Port of Spain</option>
<option value="Tunisia">Tunis</option>
<option value="Turkey">Ankara</option>
<option value="Turkmenistan">Ashgabat</option>
<option value="Turks and Caicos Islands">Cockburn Town</option>
<option value="Tuvalu">Funafuti</option>
<option value="Uganda">Kampala</option>
<option value="Ukraine">Kyiv</option>
<option value="United Arab Emirates">Abu Dhabi</option>
<option value="United Kingdom">London</option>
<option value="United States">Washington, D.C.</option>
<option value="United States of America">Washington, D.C.</option>
<option value="Uruguay">Montevideo</option>
<option value="Uzbekistan">Tashkent</option>
<option value="Vanuatu">Port Vila</option>
<option value="Vatican City (Holy See)">Vatican City</option>
<option value="Venezuela">Caracas</option>
<option value="Vietnam">Hanoi</option>
<option value="Virgin Islands, British">Road Town</option>
<option value="Virgin Islands, U.S.">Charlotte Amalie</option>
<option value="Wallis and Futuna">Matā'utu</option>
<option value="Western Sahara">Laayoune</option>
<option value="Yemen">Sana'a</option>
<option value="Zambia">Lusaka</option>
<option value="Zimbabwe">Harare</option>
</select><select style="display:none;" id=selheq onchange="if (this.value.length == 0) { otherideas=otherideas.replace('h%3D','hx%3D').replace('cities%3D','citiesx%3D'); } else { otherideas+='h%3D1' + encodeURIComponent('&') + this.value + encodeURIComponent('&'); }"><option value=""></option>
<option value="x%3D1">or hurricane</option>
<option value="cities%3D0">but just hurricanes</option>
</select> <input style="background-color:pink;display:none;" type="text" name="myWeatherSearchField" id="myWeatherSearchField" autocomplete="off" onblur="prewbit();" onkeyup="prewbit();" /> <select style="display:none;background-color:yellow;" id='myselcontxx' size=8 multiple></select> <input id='mybut' type=button onclick="finalchoice(document.getElementById('myselcont'));" value="Ready?" style="display:none;background-color:orange;"></input>
<a target=_blank style='display:none;' title='Powered by Weather Underground' href='https://www.wunderground.com/?apiref=115debbc3a1e87e1'><img style='display:none;' src='//www.rjmprogramming.com.au/weather/wulogo.JPG' title='Powered by Weather Underground'></img></a>
</form>
<iframe onload="loadifsrc(this);" title="" style=display:none; id=ifsrc src=></iframe>
<iframe onload="loadifsrctwo(this);" title="" style=display:none; id=ifsrctwo src=></iframe>
<div id=disotwo style=display:none;></div>
<div id=atload style=display:none;></div>
<div id=revisits></div>
<div id='jsondata'></div>
<iframe onload="weatherit(this);" id='mygix' src='about:blank' style='display:none;width:100%;height:550px;'></iframe>
<iframe id='mytz' src='about:blank' style='display:none;width:100%;height:850px;'></iframe>
<select id=myselcont style='display:none;'></select>
</body>
</html>