<!doctype html>
<html>
<head>
<title>Daylight Saving Time Information - RJM Programming - September, 2015 - Thanks go to http://gomashup.com and https://en.wikipedia.org/wiki/List_of_tz_database_time_zones</title>
<link href='//www.rjmprogramming.com.au/PHP/emboss_h1.css' rel='stylesheet' type='text/css'>
<style>
td { text-align: center; }
table { border: 5px teal solid; }
.digitalclock {
opacity: 0.9;
background-color: #f0ffff;
padding: 16px 16px 16px 16px;
border-bottom: 28px inset black;
border-left: 26px inset gray;
border-right: 26px outset gray;
border-top: 24px inset black;
}
h1.a0:after {
content: '0';
}
h1.a1:after {
content: '1';
}
h1.a2:after {
content: '2';
}
h1.a3:after {
content: '3';
}
h1.a4:after {
content: '4';
}
h1.a5:after {
content: '5';
}
h1.a6:after {
content: '6';
}
h1.a7:after {
content: '7';
}
h1.a8:after {
content: '8';
}
h1.a9:after {
content: '9';
}
.hour {
background-color: lightblue;
border: purple solid 7px;
padding: 18px 18px 18px 18px;
}
.minute {
background-color: lightgreen;
border: purple solid 7px;
padding: 18px 18px 18px 18px;
}
.second {
background-color: pink;
border: purple solid 7px;
padding: 18px 18px 18px 18px;
}
</style>
<script type='text/javascript'>
var clobber=true;
var ftz=["","","","","","","","","","","","",""];
var frg=["","","","","","","","","","","","",""];
var ffrom=["","","","","","","","","","","","",""];
var fto=["","","","","","","","","","","","",""];
var callback=false;
var timezone=0;
var place="";
var region="";
var firsttime=true;
var wois=null;
var gotforced=false;
var placet=new Array();
var aconto;
var bad=false;
var wasresult="";
var ifol=false;
var airbit='intair.php'; //?num=4&lat=34&long=26'
var gcd="0";
var lastgcd="";
var tpurl="https://www.google.com/maps/dir/Sydney+NSW,+Australia/Brisbane+QLD,+Australia"; // /@-30.5802325,147.5907076,6z/data=!3m1!4b1!4m13!4m12!1m5!1m1!1s0x6b129838f39a743f:0x3017d681632a850!2m2!1d151.2069902!2d-33.8674869!1m5!1m1!1s0x6b91579aac93d233:0x402a35af3deaf40!2m2!1d153.0234489!2d-27.4710107";
tpurl="https://www.google.com/maps/dir/Sydney,+Australia/Brisbane,+Australia";
var origtpurl=tpurl;
var isok=-1;
var lastis="";
var lasttitle="";
timezone=location.search.split('timezone=')[1] ? location.search.split('timezone=')[1].split('&')[0] : -99;
place=location.search.split('place=')[1] ? location.search.split('place=')[1].split('&')[0] : place;
region=location.search.split('region=')[1] ? location.search.split('region=')[1].split('&')[0] : region;
if (timezone != -99) firsttime=false;
var ourlat, ourlong;
var url = "http://www.rjmprogramming.com.au/PHP/Map/map.php?title=Airports&label=['Lat',&value='Lon','Name']&data=,[51.5072,-0.1275,~London~]";
var retx = 0.0, rety = 0.0;
function prereturnxy(inlatinlongthis) {
//alert(inlatinlongthis.title);
var prestuff = inlatinlongthis.title.split(",");
if (prestuff.length == 2) {
//alert(prestuff[0]);
return returnxy(prestuff[0], prestuff[1]);
}
return "0.0,0.0";
}
function returnxy(inlat, inlong) {
var retval="0.0,0.0";
var ourx = eval((londonx + eval(((inlong) - (0.0)) * ((348.0 * (londonx / london_x))) / (147.325))));
var oury = eval((londony + eval(((inlat) - (51.5)) * ((257.0 * (londony / london_y))) / (-94.3806))));
retx = ourx;
rety = oury;
retval = ourx + "," + oury;
if (context != null) context.fillStyle = '#0000ff';
if (context != null) context.fillRect(retx, rety, 5, 5);
return retval;
}
function sepfrom(fromo) {
if (document.getElementById('sfrom').value != "") {
var cs=(fromo.options[fromo.selectedIndex].title).split(",");
airbit='intair.php?num=4&lat=' + cs[0] + '&long=' + cs[1];
//alert(fromo.options[fromo.selectedIndex].title);
doairbit("place");
}
}
function septo(too) {
if (document.getElementById('sto').value != "") {
var cs=(too.options[too.selectedIndex].title).split(",");
airbit='intair.php?num=4&lat=' + cs[0] + '&long=' + cs[1];
doairbit("to");
}
}
function pre_great_circle_distance() {
var fromo=document.getElementById('sfrom');
var too=document.getElementById('sto');
var cs;
if (document.getElementById('sfrom').value != "" && document.getElementById('sto').value != "") {
cs=(fromo.options[fromo.selectedIndex].title + "," + too.options[too.selectedIndex].title).split(",");
airbit='intair.php?num=4&lat=' + cs[0] + '&long=' + cs[1];
doairbit("place");
return "" + Math.floor(great_circle_distance(cs[0], cs[1], cs[2], cs[3]) / 1000.0);
} else {
return "Unknown";
}
}
function great_circle_distance(talis, gnolis, latis, longis) {
var ourdist=0.0;
var rgnol=eval((gnolis) * Math.PI / 180.0);
var rtal=eval((talis) * Math.PI / 180.0);
var rlong=eval((longis) * Math.PI / 180.0);
var rlat=eval((latis) * Math.PI / 180.0);
var deltalong = Math.abs(eval(((gnolis)-(longis)) * Math.PI / 180.0));
var acof = eval(Math.sin(rtal) * Math.sin(rlat)) + (Math.cos(rtal) * Math.cos(rlat) * Math.cos(deltalong)); // via http://en.wikipedia.org/wiki/Great-circle_distance ... thanks
ourdist = eval(Math.round((Math.acos(acof) * 6371000.0) + 0.00001) * 100) / 100;
return ourdist;
}
function prerepos() {
var iu, ubits, vbits, zbits, udata="";
if (isok == -1) {
var r = confirm("Press OK to show places on a Google Map for this session, or Cancel to show Timezone information.");
if (r == true) {
isok=1;
} else {
isok=0;
document.getElementById('thgm').style.display='none';
}
}
document.getElementById('label').value="['Lat',";
document.getElementById('value').value="'Lon', 'Name']";
document.getElementById('data').value+=(lasttitle);
//document.getElementById('data').innerHTML+=decodeURIComponent(lasttitle);
if (isok == 1) {
var mysrc=document.getElementById('myform').action;
mysrc+="?title=" + document.getElementById('title').value;
mysrc+="&label=" + document.getElementById('label').value;
mysrc+="&value=" + document.getElementById('value').value;
udata=document.getElementById('data').value;
ubits=udata.split("/place/");
if (ubits.length > 1) {
for (iu=1; iu<ubits.length; iu++) {
vbits=ubits[iu].split("%");
zbits=vbits[0].split("/");
if (zbits.length == 3) {
udata=udata.replace(zbits[0] + "/" + zbits[1], zbits[1] + "/" + zbits[0]).replace(zbits[0] + "/" + zbits[1], zbits[1] + "/" + zbits[0]).replace(zbits[0] + "/" + zbits[1], zbits[1] + "/" + zbits[0]);
}
}
}
mysrc+="&data=" + udata;
//alert(udata);
if (mysrc.length < 800) {
document.getElementById('mapif').style.display='block';
document.getElementById('mapif').src=mysrc;
} else {
document.getElementById('mapsubmit').click();
}
}
return isok;
}
function repos() {
if (isok == 1) {
window.scrollTo(0,0);
}
if (wois != null) {
wois=wois;
}
}
function process() {
var iois=document.getElementById('myxiframe');
var disp=true;tzi="", dst="", gmt="";
var i, badresult="Sorry, but no data found, even though we tried looking very very very hard.", stuff, dqstuff;
var tablestuff="<table style='background-color:white;'><thead><tr><th>Time Zone ID</th><th>Daylight Saving Time (Now)</th><th>Greenwich Mean Time(zone)</th></tr></thead><tbody></tbody></table>";
var pt=tablestuff;
try {
if (iois != null) {
aconto = (iois.contentWindow || iois.contentDocument);
if (aconto != null) {
if (aconto.document) { aconto = aconto.document; }
if (aconto.body != null) {
//document.getElementById('result').innerHTML="";
stuff=aconto.body.innerHTML.split(" : ");
if (stuff.length > 1) {
for (i=1; i<stuff.length; i+=3) {
dqstuff=stuff[i].split('"');
tzi=dqstuff[1];
dqstuff=stuff[eval(1 + i)].split('"');
dst=dqstuff[1];
dqstuff=stuff[eval(2 + i)].split('"');
gmt=dqstuff[1];
disp=true;
if (region != "") {
if (("~" + tzi).indexOf("~" + region + "-") == -1) disp=false;
}
if (place != "") {
if (tzi.toLowerCase().replace(/_/g,' ').indexOf(place.toLowerCase().replace(/_/g,' ')) == -1) disp=false;
}
if (disp) {
tablestuff=tablestuff.replace("</tbody>", "<tr><td>" + tzi + "</td><td>" + dst + "</td><td>" + gmt + "</td></tr></tbody>");
}
}
}
if (pt != tablestuff) {
document.getElementById('result').innerHTML=tablestuff;
}
badresult="";
}
}
}
if (badresult != "") document.getElementById('result').innerHTML=badresult;
} catch (ee) { }
document.getElementById('result').title='Timezone and Latitude and Longitude and Trip Planner functionalities';
look();
}
function getipetc() {
var ixif=0, ifstuff="", baseurl="", ffconto, iois=document.getElementById('myziframe'), eee;
var rnum = Math.floor(Math.random() * 20000) + 1;
try {
if (iois != null) {
ffconto = (iois.contentWindow || iois.contentDocument);
if (ffconto != null) {
if (ffconto.document) { ffconto = ffconto.document; }
if (ffconto.body != null) {
//alert(ffconto.body.innerHTML);
baseurl=ffconto.body.innerHTML.replace("_0.html", "_1.html");
if (baseurl.indexOf("_1.html") != -1) {
for (ixif=1; ixif<=12; ixif++) {
ifstuff+='<iframe id="jffn' + ixif + '" style="display:none;" onload="setTimeout(fkeyj' + ixif + ',' + ixif + '000);" src="./' + baseurl + '?rnum=' + rnum + '"></iframe>';
baseurl=baseurl.replace("_" + ixif + ".html", "_" + eval(1 + ixif) + ".html");
rnum = Math.floor(Math.random() * 20000) + 1;
}
}
document.getElementById('dkeyfn').innerHTML=ifstuff;
}
}
}
} catch (eee) { }
}
function checkforcallback() {
if (wasresult == "") {
wasresult=document.getElementById('result').innerHTML;
startTime();
}
if (timezone == -99) {
timezone=10;
} else {
firsttime=false;
callback=true;
document.getElementById('timezone').value = timezone;
document.getElementById('place').value = place;
document.getElementById('region').value = region;
//alert("./daylight_saving_time.php?url=" + encodeURIComponent('http://gomashup.com/json.php?fds=geo/timezone/gmt/' + timezone + '&jsoncallback=?'));
document.getElementById('myxiframe').src="./daylight_saving_time.php?url=" + encodeURIComponent('http://gomashup.com/json.php?fds=geo/timezone/gmt/' + timezone + '&jsoncallback=?');
//setTimeout(process,2000);
}
}
function fixit(tval) {
document.getElementById('url').value='http://gomashup.com/json.php?fds=geo/timezone/gmt/' + tval + '&jsoncallback=?';
populatesel(document.getElementById('lookif'));
}
function look() {
var asis=document.getElementsByTagName("a"), wasgf=gotforced;
for (var ia=0; ia<asis.length; ia++) {
if (asis[ia].className) {
if (asis[ia].className == "onload") {
isok=1;
wasgf=true;
asis[ia].click();
}
}
}
gotforced=wasgf;
}
function goesinto(ourv,intop) {
document.getElementById(intop).value=ourv;
otzmaybe(null);
}
function populatesel(iois) {
var eeee, latlong="",cllbits, llbits, tpl, afters, disp=true, sfrom=document.getElementById('sfrom').innerHTML, sto=document.getElementById('sto').innerHTML;
var iplacet=placet.length;
try {
if (iois != null) {
aconto = (iois.contentWindow || iois.contentDocument);
if (aconto != null) {
if (aconto.document) { aconto = aconto.document; }
if (aconto.body != null) {
sfrom="<option value=''>This (Trip Planner) From place can go left</option>";
sto="<option value=''>This (Trip Planner) To place can go right</option>";
var pk, pktwo, gpk, gpktwo, thisregion=document.getElementById('region').value;
var thistimezone=document.getElementById('timezone').value.replace("−", "-");
//alert(aconto.body.innerHTML);
var llplaces=aconto.body.innerHTML.split('~');
if (llplaces.length > 1) {
for (var jj=1; jj<llplaces.length; jj+=2) {
disp=true;
latlong="";
tpl=llplaces[jj].split('~');
if (llplaces[eval(-1 + jj)].indexOf(",[") != -1) {
llbits=llplaces[eval(-1 + jj)].split(",[");
cllbits=llbits[eval(-1 + llbits.length)].split(",");
if (cllbits.length > 1) {
latlong=cllbits[0] + "," + cllbits[1];
}
}
afters=tpl[0].split('/');
if (thistimezone != "") {
if (llplaces[eval(1 + jj)].replace(".5","").replace(".5","").replace("−", "-").replace("−", "-").indexOf('"GMT" : "' + thistimezone.replace("−", "-") + '"') == -1) disp=false;
}
if (thisregion != "") {
//alert("*" + afters[0].toLowerCase() + "*!" + thisregion.toLowerCase() + "!");
if (afters[0].toLowerCase() != thisregion.toLowerCase()) disp=false;
}
if (disp) {
sfrom+='<option title="' + latlong + '" value="' + tpl[0].replace(afters[0] + '/', '') + '">' + tpl[0] + '</option>';
sto+='<option title="' + latlong + '" value="' + tpl[0].replace(afters[0] + '/', '') + '">' + tpl[0] + '</option>';
if (1 == 1) {
pk=aconto.body.innerHTML.split(' "' + tpl[0] + '", "DST" : "');
if (pk.length > 1) {
gpk=pk[1].split('"GMT" : "');
gpktwo=gpk[1].split('"');
pktwo=pk[1].split('"');
placet.push(pktwo[0].replace("−", "-") + ":" + tpl[0].replace(afters[0] + '/', '') + ":" + gpktwo[0].replace("−", "-") + ":" + afters[0]);
} else {
placet.push(thistimezone.replace("−", "-") + ":" + tpl[0].replace(afters[0] + '/', '') + ":" + gpktwo[0].replace("−", "-") + ":" + afters[0]);
}
} else {
placet.push(thistimezone.replace("−", "-") + ":" + tpl[0].replace(afters[0] + '/', '') + ":" + gpktwo[0].replace("−", "-") + ":" + afters[0]);
}
}
}
}
document.getElementById('sfrom').innerHTML=sfrom;
document.getElementById('sto').innerHTML=sto;
}
}
}
} catch (eeee) { }
}
function otzmaybe(inthing) {
var selo, abits, aplace, aval, theid="", optcnt=0;;
if (inthing == null) {
if (document.getElementById('place').value != "" && document.getElementById('to').value != "") {
if (document.getElementById('timezone').value == "") {
if (document.getElementById('timezone').innerHTML.indexOf(">Please ") !== -1) {
document.getElementById('timezone').innerHTML=document.getElementById('timezone').innerHTML.replace('>Please ', '>Optionally, please ');
}
}
var titlebit="";
var thing='sfrom';
selo=document.getElementById(thing);
//alert(document.getElementById(thing).value);
if (document.getElementById(thing).value == "") {
thing='place';
aval=document.getElementById(thing).value;
abits=aval.replace(/_/g,"+").replace(/-/g,"+").split('/');
} else {
aval=selo.options[selo.selectedIndex].text;
abits=aval.replace(/_/g,"+").replace(/-/g,"+").split('/');
}
aplace=aval.replace(abits[0] + "/", "");
titlebit=lastbit(aplace) + ", " + abits[0] + " to ";
//alert(document.getElementById(thing).value);
var fromto=lastbit(aplace) + ",+" + abits[0] + "/";
thing='sto';
selo=document.getElementById(thing);
if (document.getElementById(thing).value == "") {
thing='to';
aval=document.getElementById(thing).value;
abits=aval.replace(/_/g,"+").replace(/-/g,"+").split('/');
} else {
aval=selo.options[selo.selectedIndex].text;
abits=aval.replace(/_/g,"+").replace(/-/g,"+").split('/');
}
aplace=aval.replace(abits[0] + "/", "");
titlebit+=lastbit(aplace) + ", " + abits[0] + " via Google Maps directions ... thanks";
fromto+=lastbit(aplace) + ",+" + abits[0];
//alert("fromto=" + fromto + " tpurl=" + origtpurl.replace("Sydney,+Australia/Brisbane,+Australia", fromto));
tpurl=origtpurl.replace("Sydney,+Australia/Brisbane,+Australia", fromto);
gcd="" + pre_great_circle_distance();
if (gcd.indexOf("nknown") == -1 && gcd.indexOf("NaN") == -1 && gcd.indexOf("ndefined") == -1 && gcd.substring(0,1) != "0" && gcd != lastgcd) {
document.getElementById('thetrip').innerHTML=document.getElementById('thetrip').innerHTML.replace('->', '-<a style="text-decoration:none; border: 3px purple solid; background-color: yellow;" title="' + titlebit + '" href="#" onclick="window.open(' + "'" + tpurl + "'" + ',' + "'" + "_blank" + "'" + ',' + "'" + "top=550,left=10,width=775,height=250" + "'" + ');">✈<sub> ' + gcd + ' km </sub></a>');
lastgcd=gcd;
}
}
sepfrom(document.getElementById('sfrom'));
} else if (inthing.id == 'place') { // dfrom
theid="dfrom";
} else if (inthing.id == 'to') { // dto
theid="dto";
}
if (theid != "" && inthing.value != "") {
optcnt=1;
var vother=theid.replace('dfrom','plaxce').replace('dto','region').replace('plaxce','to');
var versus=theid.replace('from','txo').replace('to','from').replace('txo','to');
var imore=0, sois=theid.replace('d','s');
var itpos, jtpos, xxbits, tbits=document.getElementById(sois).innerHTML;
var posttbits="<option value='' selected>Optionally Use to AutoComplete</option>";
var ip, jp, fg, hj, ctyp, noncp,kj=0;
xxbits=tbits.toLowerCase().split("/" + inthing.value.replace(" ","_").replace(" ","_").replace(" ","_").replace(" ","_").toLowerCase());
if (xxbits.length > 1) {
for (ip=1; ip<xxbits.length; ip++) {
fg=xxbits[eval(-1 + ip)].split(">");
if (fg[eval(-1 + fg.length)].indexOf('"') == -1) {
hj=xxbits[ip].split("<");
ctyp=fg[eval(-1 + fg.length)] + "/" + inthing.value.replace(" ","_").replace(" ","_").replace(" ","_").replace(" ","_").toLowerCase() + hj[0];
noncp=inthing.value.toLowerCase() + hj[0];
imore=ctyp.toLowerCase().indexOf("/" + noncp.toLowerCase().replace(" ","_").replace(" ","_").replace(" ","_").replace(" ","_"));
if (imore > 0) {
imore=ctyp.toLowerCase().substring(0, imore).indexOf("/");
//if (inthing.value == "new ") alert("imore=" + imore + " hj[0]=" + hj[0] + " inthing.value=" + inthing.value + " ctyp=" + ctyp + " noncp=" + noncp);
}
if (imore > 0) {
noncp=ctyp.toLowerCase().replace(ctyp.toLowerCase().substring(0,eval(1 + imore)), "");
//if (inthing.value == "new ") alert("imOre=" + imore + " hj[0]=" + hj[0] + " inthing.value=" + inthing.value + " ctyp=" + ctyp + " noncp=" + noncp);
} else {
noncp=inthing.value.toLowerCase() + hj[0];
//if (inthing.value == "new ") alert("imoRe=" + imore + " hj[0]=" + hj[0] + " inthing.value=" + inthing.value + " ctyp=" + ctyp + " noncp=" + noncp);
}
//if (inthing.value == "new ") alert("hj[0]=" + hj[0] + " inthing.value=" + inthing.value + " ctyp=" + ctyp + " noncp=" + noncp);
itpos=tbits.toLowerCase().indexOf(">" + ctyp.replace(" ","_").replace(" ","_").replace(" ","_").replace(" ","_") + "<");
jtpos=tbits.toLowerCase().indexOf('"' + noncp.replace(" ","_").replace(" ","_").replace(" ","_").replace(" ","_") + '"');
posttbits+="<option value='" + tbits.substring(eval(1 + jtpos), eval(1 + noncp.length + jtpos)) + "'>" + tbits.substring(eval(1 + itpos), eval(1 + ctyp.length + itpos)) + "</option>";
optcnt++;
}
}
}
xxbits=tbits.toLowerCase().split('">' + inthing.value.toLowerCase());
if (xxbits.length > 1) {
optcnt++;
posttbits+="<option value=''>---- Click for More Here----</option>";
for (ip=1; ip<xxbits.length; ip++) {
fg=xxbits[eval(0 + ip)].split("<");
if (fg[0].indexOf('/') != -1 && eval((fg[0].length) - (eval(fg[0].indexOf('/'))) > 0)) {
ctyp=inthing.value.replace(" ","_").replace(" ","_").replace(" ","_").replace(" ","_").toLowerCase() + fg[0];
hj=ctyp.split("/");
if (hj.length > 1) {
noncp=ctyp.replace(hj[0] + "/", "");
} else {
noncp=ctyp;
}
itpos=tbits.toLowerCase().indexOf(">" + ctyp.replace(" ","_").replace(" ","_").replace(" ","_").replace(" ","_") + "<");
jtpos=tbits.toLowerCase().indexOf('"' + noncp.replace(" ","_").replace(" ","_").replace(" ","_").replace(" ","_") + '"');
posttbits+="<option value='" + tbits.substring(eval(1 + jtpos), eval(1 + noncp.length + jtpos)) + "'>" + tbits.substring(eval(1 + itpos), eval(1 + ctyp.length + itpos)) + "</option>";
if (kj == 0) optcnt++;
kj = 1;
}
}
}
//if (optcnt < 5) alert(posttbits);
//alert("sois=" + sois + " and inthing.id=" + inthing.id);
document.getElementById(theid).innerHTML = "<select style=\" margin-top: 0px; \" onclick=\" this.size=1; \" onchange=\" if (this.value.length > 0) { document.getElementById('" + inthing.id + "').value=lastbit(this.value.replace('_',' ').replace('_',' ').replace('_',' ').replace('_',' ')); document.getElementById('" + sois + "').value=this.value.replace(' ','_').replace(' ','_').replace(' ','_').replace(' ','_'); document.getElementById('" + vother + "').focus(); this.value=''; this.style.display='none'; otzmaybe(null); } \" size=" + optcnt + " id='" + theid.replace('d','ss') + "'>" + posttbits + '</select>';
document.getElementById(versus).innerHTML = "";
}
}
function justcheck(checkfor, selidis) {
if (checkfor != "") {
var vother, itpos, icfl=0, tbits=document.getElementById(selidis).innerHTML;
var xxbits=tbits.toLowerCase().split('"' + checkfor.toLowerCase().replace(" ","_").replace(" ","_").replace(" ","_").replace(" ","_") + '"');
if (xxbits.length > 1) {
vother=selidis.replace('sfrom','plaxce').replace('sto','region').replace('plaxce','to');
itpos=tbits.toLowerCase().indexOf('"' + checkfor.toLowerCase().replace(" ","_").replace(" ","_").replace(" ","_").replace(" ","_") + '"');
document.getElementById(selidis).value=tbits.substring(eval(1 + itpos), eval(1 + itpos + checkfor.length)).replace(" ","_").replace(" ","_").replace(" ","_").replace(" ","_");
document.getElementById(selidis.replace('s', 'd')).innerHTML='';
document.getElementById(vother).focus();
otzmaybe(null);
if (selidis.indexOf("from") == -1) {
septo(document.getElementById('sto'));
}
} else {
xxbits=tbits.toLowerCase().split('/' + checkfor.toLowerCase().replace(" ","_").replace(" ","_").replace(" ","_").replace(" ","_") + '"');
if (xxbits.length > 1) {
vother=selidis.replace('sfrom','plaxce').replace('sto','region').replace('plaxce','to');
itpos=tbits.toLowerCase().indexOf('/' + checkfor.toLowerCase().replace(" ","_").replace(" ","_").replace(" ","_").replace(" ","_") + '"');
icfl=0;
while (tbits.substring(itpos, eval(1 + itpos)) != '"') {
itpos--;
icfl++;
}
document.getElementById(selidis).value=tbits.substring(eval(1 + itpos), eval(1 + itpos + checkfor.length + icfl)).replace(" ","_").replace(" ","_").replace(" ","_").replace(" ","_");
document.getElementById(selidis.replace('s', 'd')).innerHTML='';
document.getElementById(vother).focus();
otzmaybe(null);
if (selidis.indexOf("from") == -1) {
septo(document.getElementById('sto'));
}
}
}
}
}
function lastbit(intr) {
var bw=intr.split("/");
if (bw.length > 1) {
return bw[eval(-1 + bw.length)];
} else {
return intr;
}
}
function doairbit(which) {
if (which == "") which="place";
var other=which.replace("place", "sfrom").replace("to", "sto");
document.getElementById('result').innerHTML=wasresult;
document.getElementById('result').title='Timezone and Latitude and Longitude and Trip Planner functionalities';
document.getElementById('myiframe').style.display='block';
//document.getElementById('myiframe').style.top='350px';
//document.getElementById('myiframe').style.left='10px';
document.getElementById('myiframe').style.width='430px';
document.getElementById('myiframe').style.height='400px';
if (document.getElementById(other).value != '') {
if (document.getElementById(which).value != '' && document.getElementById(other).value.indexOf("/" + document.getElementById(which).value) != -1) {
document.getElementById('myiframe').src="http://www.rjmprogramming.com.au/PHP/Map/map.php?title=" + document.getElementById(which).value.replace("_"," ").replace("_"," ").replace("_"," ").replace("_"," ") + " Airports&label=['Lat',&value='Lon','Name']&data="; //url;
} else {
document.getElementById('myiframe').src="http://www.rjmprogramming.com.au/PHP/Map/map.php?title=" + document.getElementById(other).value.replace("_"," ").replace("_"," ").replace("_"," ").replace("_"," ") + " Airports&label=['Lat',&value='Lon','Name']&data="; //url;
}
} else {
document.getElementById('myiframe').src="http://www.rjmprogramming.com.au/PHP/Map/map.php?title=" + document.getElementById(which).value.replace("_"," ").replace("_"," ").replace("_"," ").replace("_"," ") + " Airports&label=['Lat',&value='Lon','Name']&data="; //url;
}
document.getElementById('mypiframe').src=airbit;
}
function dc(chuh, subclass) {
var retval="";
if (subclass == 'hour' && chuh.length == 1) chuh='0' + chuh;
for (var iy=0; iy<chuh.length; iy++) {
retval+='<td><h1 class="a' + chuh.substring(iy, eval(1 + iy)) + ' ' + subclass + '"></h1></td>';
}
//alert(retval);
return retval;
}
function startTime() { // Thanks to http://www.w3schools.com/js/tryit.asp?filename=tryjs_timing_clock
var today = new Date();
// Thanks to http://stackoverflow.com/questions/11124322/get-date-time-for-a-specific-time-zone-using-javascript
var localoffset = -(today.getTimezoneOffset()/60);
var destoffset = 0;
var placebit = '';
var vst=document.getElementById('timezone').value;
var vsr=document.getElementById('region').value;
var tries=300;
var ok=false;
var numis, pbits;
if (placet.length > 1) {
while (!ok) {
numis=Math.floor(Math.random() * placet.length);
pbits=placet[numis].split(':');
if (pbits.length > 1) {
destoffset = eval(pbits[0]);
placebit = lastbit(pbits[1]).replace("_", " ").replace("_", " ").replace("_", " ").replace("_", " ").replace("_", " ") + ": ";
}
if ((pbits.length > 2 && vst != "") || (pbits.length > 3 && vsr != "")) {
if (pbits.length > 3 && vsr != "") {
//document.title='Region try ' + vsr.toLowerCase() + " vs " + pbits[3].toLowerCase();
if (vsr.toLowerCase() != pbits[3].toLowerCase()) {
ok=false;
} else {
ok=true;
if (pbits[2].length == vst.length && pbits[2].replace("−", "-") == vst.replace("−", "-") && vst != "") {
//document.title='Timezone okay';
ok = true;
} else if (vst != "") {
//document.title='Timezone fail';
ok = false;
}
}
} else if (vst != "") {
if (pbits[2].length == vst.length && pbits[2].replace("−", "-") == vst.replace("−", "-") && vst != "") {
//document.title='Timezone Okay';
ok = true;
} else if (vst != "") {
//document.title='Timezone Fail';
ok = false;
}
}
} else {
ok=true;
}
if (!ok) tries--;
if (tries == 0) ok=true;
}
}
var t;
if (eval(tries) <= 0) {
t = setTimeout(startTime, 500);
} else {
var offset = destoffset-localoffset;
var d = new Date( new Date().getTime() + offset * 3600 * 1000);
var h = d.getHours();
var m = d.getMinutes();
var s = d.getSeconds();
m = checkTime(m);
s = checkTime(s);
if (document.getElementById('result').innerHTML == wasresult || document.getElementById('result').innerHTML.indexOf("<iframe ") == -1) {
document.getElementById('result').innerHTML = "<br><h1 title='Click for images ... you will have to be quick!' onclick='window.open(\"http://www.google.com/search?q=" + placebit.replace(': ','').replace(' ', '%20').replace(' ', '%20').replace(' ', '%20') + "&source=lnms&tbm=isch&sa=X\",\"_blank\",\"top=50,left=50,width=600,height=600\");' align='center' style='background-color: orange;'><br><table class='digitalclock'><tr><td>" + placebit + " </td>" + dc("" + h, 'hour') + "<td>:</td>" + dc("" + m, 'minute') + "<td>:</td>" + dc("" + s, 'second') + "</tr></table><br><br></h1>";
t = setTimeout(startTime, 500);
}
}
}
function checkTime(i) {
if (i < 10) {i = "0" + i}; // add zero in front of numbers < 10
return i;
}
function fnkeys(event) {
var char = event.which || event.keyCode;
//document.getElementById("demo").innerHTML = "Unicode CHARACTER code: " + char;
switch (char) {
case 112:
document.getElementById('df1').click();
break;
case 113:
document.getElementById('df2').click();
break;
case 114:
document.getElementById('df3').click();
break;
case 115:
document.getElementById('df4').click();
break;
case 116:
document.getElementById('df5').click();
break;
case 117:
document.getElementById('df6').click();
break;
case 118:
document.getElementById('df7').click();
break;
case 119:
document.getElementById('df8').click();
break;
case 120:
document.getElementById('df9').click();
break;
case 121:
document.getElementById('df10').click();
break;
case 122:
document.getElementById('df11').click();
break;
case 123:
document.getElementById('df12').click();
break;
default:
//alert("Unicode CHARACTER code: " + char);
break;
}
}
function fkeyj1() { fkeyj(1); }
function fkeyj2() { fkeyj(2); }
function fkeyj3() { fkeyj(3); }
function fkeyj4() { fkeyj(4); }
function fkeyj5() { fkeyj(5); }
function fkeyj6() { fkeyj(6); }
function fkeyj7() { fkeyj(7); }
function fkeyj8() { fkeyj(8); }
function fkeyj9() { fkeyj(9); }
function fkeyj10() { fkeyj(10); }
function fkeyj11() { fkeyj(11); }
function fkeyj12() { fkeyj(12); }
function fkeyj(numis) {
var csvthings, fconto, spano, spanoih="", iois=document.getElementById('jffn' + numis), ee;
try {
if (iois != null) {
fconto = (iois.contentWindow || iois.contentDocument);
if (fconto != null) {
if (fconto.document) { fconto = fconto.document; }
if (fconto.body != null) {
csvthings=fconto.body.innerHTML.split(",");
if (csvthings.length >= 4) {
ftz[numis] = csvthings[0];
frg[numis] = csvthings[3];
ffrom[numis] = csvthings[1];
fto[numis] = csvthings[2];
//if (document.getElementById('tdfn').innerHTML.indexOf("<br>") == -1) {
// document.getElementById('tdfn').innerHTML=document.getElementById('tdfn').innerHTML.replace(/<sub/g, "<br><br><br><sub");
//}
spano=document.getElementById('df' + numis);
spanoih="<sub>F" + numis + "</sub> "; //spano.innerHTML.replace("<br><br><br>", "");
//spano.innerHTML = ftz[numis] + ("<br>" + ffrom[numis] + " --> <br>").replace("<br> --> <br>", "<br><br>") + fto[numis] + "<br>" + frg[numis] + spanoih;
spano.innerHTML = ("<font style='background-color:#f0f0f0' color=blue>[" + ftz[numis] + "]").replace("[]", "") + (" " + ffrom[numis] + " --> ").replace(" --> ", " ") + fto[numis] + (" (" + frg[numis] + ")</font>").replace("()", "") + spanoih;
}
}
}
}
} catch (ee) { }
}
function fkeyi(numis) {
var csvthings, fconto, spano, spanoih="", iois=document.getElementById('iffn' + numis), ee;
try {
if (iois != null) {
fconto = (iois.contentWindow || iois.contentDocument);
if (fconto != null) {
if (fconto.document) { fconto = fconto.document; }
if (fconto.body != null) {
csvthings=fconto.body.innerHTML.split(",");
if (csvthings.length >= 4) {
ftz[numis] = csvthings[0];
frg[numis] = csvthings[3];
ffrom[numis] = csvthings[1];
fto[numis] = csvthings[2];
//if (document.getElementById('tdfn').innerHTML.indexOf("<br>") == -1) {
// document.getElementById('tdfn').innerHTML=document.getElementById('tdfn').innerHTML.replace(/<sub/g, "<br><br><br><sub");
//}
spano=document.getElementById('df' + numis);
spanoih="<sub>F" + numis + "</sub> "; //spano.innerHTML.replace("<br><br><br>", "");
//spano.innerHTML = ftz[numis] + ("<br>" + ffrom[numis] + " --> <br>").replace("<br> --> <br>", "<br><br>") + fto[numis] + "<br>" + frg[numis] + spanoih;
spano.innerHTML = ("<font style='background-color:#f0f0f0' color=blue>[" + ftz[numis] + "]").replace("[]", "") + (" " + ffrom[numis] + " --> ").replace(" --> ", " ") + fto[numis] + (" (" + frg[numis] + ")</font>").replace("()", "") + spanoih;
}
}
}
}
} catch (ee) { }
}
function savethis(thisfcb) {
var fnkeynum=thisfcb.id.replace("df", "").replace("sf", "");
var tz=document.getElementById('timezone').value;
var rg=document.getElementById('region').value;
var pfrom=document.getElementById('place').value;
var pto=document.getElementById('to').value;
var rnum = Math.floor(Math.random() * 20000) + 1;
if (tz == "" && rg == "" && pfrom == "" && pto == "") {
document.getElementById('timezone').value=ftz[fnkeynum];
document.getElementById('region').value=frg[fnkeynum];
document.getElementById('place').value=ffrom[fnkeynum];
document.getElementById('to').value=fto[fnkeynum];
if (ffrom[fnkeynum] != "") {
otzmaybe(document.getElementById('place'));
justcheck(ffrom[fnkeynum],'sfrom');
}
if (fto[fnkeynum] != "") {
otzmaybe(document.getElementById('to'));
justcheck(ffrom[fnkeynum],'sto');
}
//document.getElementById('mystrb').click();
setTimeout(process,2000);
document.getElementById('mygform').submit();
} else if (ftz[fnkeynum] != "" || frg[fnkeynum] != "" || ffrom[fnkeynum] != "" || fto[fnkeynum] != "") {
if (clobber) {
document.getElementById('fnkeyd').innerHTML='<iframe id="iffn' + fnkeynum + '" style="display:none;" onload="fkeyi(' + fnkeynum + ');" src="./daylight_saving_time.php?rnum=' + rnum + '&fnkey=' + fnkeynum + '&timezone=' + tz + '®ion=' + rg + '&place=' + pfrom + '&to=' + pto + '"></iframe>';
} else {
document.getElementById('timezone').value=ftz[fnkeynum];
document.getElementById('region').value=frg[fnkeynum];
document.getElementById('place').value=ffrom[fnkeynum];
document.getElementById('to').value=fto[fnkeynum];
if (ffrom[fnkeynum] != "") {
otzmaybe(document.getElementById('place'));
justcheck(ffrom[fnkeynum],'sfrom');
}
if (fto[fnkeynum] != "") {
otzmaybe(document.getElementById('to'));
justcheck(ffrom[fnkeynum],'sto');
}
//document.getElementById('mystrb').click();
setTimeout(process,2000);
document.getElementById('mygform').submit();
}
} else {
//document.getElementById('fnkeyd').innerHTML='<input type="hidden" name="fnkey" value="./daylight_saving_time.php?fnkey=' + fnkeynum + '"></iframe>';
document.getElementById('fnkeyd').innerHTML='<iframe id="iffn' + fnkeynum + '" style="display:none;" onload="fkeyi(' + fnkeynum + ');" src="./daylight_saving_time.php?rnum=' + rnum + '&fnkey=' + fnkeynum + '&timezone=' + tz + '®ion=' + rg + '&place=' + pfrom + '&to=' + pto + '"></iframe>';
//document.getElementById('mystrb').click();
}
clobber=false;
//alert("f" + fnkeynum + " pressed");
}
</script>
</head>
<body style='background-color: lightgreen; border: 3px olive solid;' onload='checkforcallback(); ' onkeydown='fnkeys(event);'>
<h1 align='center'>Daylight Saving Time Information - RJM Programming - September, 2015</h1>
<h3 align='center' style='margin-top:-15px;'>Check out Timezone Places or Check a Particular Place ... Thanks to <a target=_blank title='Gomashup.com' href='http://www.gomashup.com'>GoMashup</a> and <a target=_blank title='Wikipedia Timezone page ... thanks' href='https://en.wikipedia.org/wiki/List_of_tz_database_time_zones'>Wikipedia</a> and <a target=_blank title='Google Maps (directions) ... thanks' href='http://maps.google.com'>Google</a> and <a target=_blank title='The Global Airport Database' href='http://www.partow.net/miscellaneous/airportdatabase/'>Global Airport Database</a></h3>
<!--h4 align='center'>Check out Timezone Places or Check a Particular Place</h4-->
<div align='center' style='margin-top:-15px;'>
<form id='mygform' target='myxiframe' action='./daylight_saving_time.php' method='GET'><div id='fnkeyd'></div>
<table style="border: 0; "><tr id='trfn'><td id='tdfn'><span onclick='savethis(this);' id='df1' style='background-color:yellow'><sub>F1</sub> </span><span onclick='savethis(this);' id='df2' style='background-color:yellow'><sub>F2</sub> </span><span onclick='savethis(this);' id='df3' style='background-color:yellow'><sub>F3</sub> </span><span onclick='savethis(this);' id='df4' style='background-color:yellow'><sub>F4</sub> </span><span onclick='savethis(this);' id='df5' style='background-color:yellow'><sub>F5</sub> </span><span onclick='savethis(this);' id='df6' style='background-color:yellow'><sub>F6</sub> </span></td></tr><tr><td><span onclick='savethis(this);' id='df7' style='background-color:yellow'><sub>F7</sub> </span><span onclick='savethis(this);' id='df8' style='background-color:yellow'><sub>F8</sub> </span><span onclick='savethis(this);' id='df9' style='background-color:yellow'><sub>F9</sub> </span><span onclick='savethis(this);' id='df10' style='background-color:yellow'><sub>F10</sub> </span><span onclick='savethis(this);' id='df11' style='background-color:yellow'><sub>F11</sub> </span><span onclick='savethis(this);' id='df12' style='background-color:yellow'><sub>F12</sub> </span> </td><td>Timezone (nominal hours from GMT): <select onchange='fixit(this.value);' id='timezone' name='timezone'><option id='otz' value=''>Please select a timezone below ...</option>
<option value='-18'>-18</option>
<option value='-17'>-17</option>
<option value='-16'>-16</option>
<option value='-15'>-15</option>
<option value='-14'>-14</option>
<option value='-13'>-13</option>
<option value='-12'>-12</option>
<option value='-11'>-11</option>
<option value='-10'>-10</option>
<option value='-9'>-9</option>
<option value='-8'>-8</option>
<option value='-7'>-7</option>
<option value='-6'>-6</option>
<option value='-5'>-5</option>
<option value='-4'>-4</option>
<option value='-3'>-3</option>
<option value='-2'>-2</option>
<option value='-1'>-1</option>
<option value='0'>Greenwich Mean Time</option>
<option value='1'>1</option>
<option value='2'>2</option>
<option value='3'>3</option>
<option value='4'>4</option>
<option value='5'>5</option>
<option value='6'>6</option>
<option value='7'>7</option>
<option value='8'>8</option>
<option value='9'>9</option>
<option value='10'>10</option>
<option value='11'>11</option>
<option value='12'>12</option>
<option value='13'>13</option>
<option value='14'>14</option>
<option value='15'>15</option>
<option value='16'>16</option>
<option value='17'>17</option>
<option value='18'>18</option>
</select></td></tr></table><br><div id='tripplanner' style='background-color:pink;' title='Trip Planner?'><br>
Place(s) (optional - can be states): <input autocomplete="off" style='background-color:yellow; z-index:4; opacity:0.8;' onkeyup='otzmaybe(this);' onchange='otzmaybe(this); ' onblur=" justcheck(this.value,'sfrom'); if (9 == 8) { document.getElementById('dfrom').innerHTML=''; } " type='text' name='place' id='place' value='' autofocus></input><div id='d_to_from' style='display:inline;'> <select id='sfrom' onchange=" goesinto(this.value,'place'); sepfrom(this);"><option value=''>This (Trip Planner) From place can go in at left</option></select> <span id='thetrip'>----->----->--->-->-></span> <select id='sto' onchange="goesinto(this.value,'to'); septo(this);"><option value=''>This (Trip Planner) To place can go in at right</option></select> <input autocomplete="off" style='background-color:yellow; z-index:4; opacity:0.8;' onkeyup='otzmaybe(this);' onchange='otzmaybe(this);' onblur=" justcheck(this.value,'sto'); if (9 == 8) { document.getElementById('dto').innerHTML=''; } " type='text' name='to' id='to' value=''></input></div><br><br></div><br>
<table style="border: 0; "><tr><td><div id='dfrom' style='background-color:lightblue;'></div></td><td>Region (optional): <select onfocus=" document.getElementById('dfrom').innerHTML=''; document.getElementById('dto').innerHTML=''; " onchange=" populatesel(document.getElementById('lookif'));" id='region' name='region'><option value=''>Optionally, please select a region below ...</option>
<option value='Africa'>Africa</option>
<option value='America'>America</option>
<option value='Antarctica'>Antarctica</option>
<option value='Arctic'>Arctic</option>
<option value='Asia'>Asia</option>
<option value='Atlantic'>Atlantic</option>
<option value='Australia'>Australia</option>
<option value='Europe'>Europe</option>
<option value='Indian'>Indian</option>
<option value='Pacific'>Pacific</option>
</select></td><td><div id='dto' style='background-color:lightblue;'></div></td></tr></table>
<input name='url' id='url' type='hidden' value='http://gomashup.com/json.php?fds=geo/timezone/gmt/&jsoncallback=?'></input>
<input id='mystrb' onclick='setTimeout(process,2000);' style='background-color:orange;' type='submit' value='Show Timezone Results Below'></input>
</form> <br>
</div>
<iframe name='myxiframe' style='display:none;width:100%;' onload=' if (firsttime) { firsttime=false; } else if (1 == 2) { setTimeout(process,2000); }' id='myxiframe' src=''></iframe>
<iframe id='myziframe' style='display:none;' onload=' getipetc(); ' src='./daylight_saving_time.php?justip=y'></iframe>
<iframe id='lookif' style='display:none;' onload='populatesel(this);' style='width:100%;' src='wbits.html'></iframe>
<div align='center' id='result' style='background-color:white;' title='Click for images on digital clock below (on a place of interest) ... you will have to be quick!'><iframe onload=" ifol=true; " style="display:none;" id="myiframe" width=400 height=430 src="http://www.rjmprogramming.com.au/PHP/Map/map.php?title=Airports&label=['Lat',&value='Lon','Name']&data=,[51.5072,-0.1275,~London~]"></iframe></div>
<!--iframe onload=" ifol=true; " style="opacity:0.5; position: absolute; top:350px; left:10px; display:none;" id="myiframe" width=430 height=400 src="http://www.rjmprogramming.com.au/PHP/Map/map.php?title=Airports&label=['Lat',&value='Lon','Name']&data=,[51.5072,-0.1275,~London~]"></iframe-->
<a id='mya' style="position: absolute; top:1000px; left:860px; " href='#' title='-42.8806,147.3250' onclick='prereturnxy(this);' style='display:none;'> click</a><iframe id='mypiframe' style='display:none;' src='intair.php' title='International Airport plot'></iframe>
<div id='dkeyfn'></div>
</body>
</html>