// gchartgen.js
// Email functionality for H1 onclick event specifics for Google Chart work
// RJM Programming
// Robert Metcalfe
// January 2015
// Added event functionality in July 2015

var dependssuffix='';
var wua = navigator.userAgent;
var wisiPad = /iPad/i.test(wua) || /iPhone OS 3_1_2/i.test(wua) || /Android/i.test(wua) || /iPhone OS 3_2_2/i.test(wua);
var wisTouch = /touch/i.test(wua) || /Touch/i.test(wua);
var gcadvice = ' ... To email a snapshot of this Google Chart click me.';
var wisMobile = false;
var wisWebView = false;
var toobigform = null;
var ourbae = null;
var formid = '';
var xnewfbit = '';
var divid = '';
var emailtitle = 'Email Attachment Title suffixes are &ema' + 'ilto=[emailTo] &emailsubject=[EmailSubject] ';
var yesgo='noway' + 'okay' + '675';
var nogo=yesgo;
var yesgo2=yesgo;
var nogo2=yesgo;
var yesgo3=yesgo;
var nogo3=yesgo;
var yesgo4=yesgo;
var nogo4=yesgo;
var yesgo5=yesgo;
var nogo5=yesgo;
var ghurl='';
var ghform='';
var tdghuhta='';
var oncprefix='';
var remail='remail';
var deftois='';
var bimode=-1;
var titlezwords=' ';
var titleywords=' ';
var titleid='';
var abconto=null;
var gansis='', oansis='';
var oneway='youwillneverfindthis';
var twoway='youwillneverfindthis';

var pnum=1, lastfi=false;
var issatisfied=false;
var satisfiedvalue=null;
var isSafari = /Safari/.test(navigator.userAgent) && /Apple Computer/.test(navigator.vendor);
// var xpnum=1; // done back at supervisor
// var allowed=true; // done back at supervisor
if (typeof paramdata === "undefined") {
var paramdata="";
}

var lhpassed=('' + location.hash);
if (decodeURIComponent(lhpassed).indexOf('%20') != -1) {
lhpassed=decodeURIComponent(lhpassed);
}

setTimeout(function(){
if (document.getElementById('remail')) {
//if (!navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
if (document.getElementById('remail').innerHTML.indexOf('Email') == 0) {
var inplace=document.getElementById('remail').outerHTML.replace(document.getElementById('remail').outerHTML.split(' href="')[1].split('body=')[0], 'sms:&').replace('To email ', 'To SMS (and if it fails for lengthy messages the email methodology may work better) ').replace('remail','rsms');
//alert('Inplace=' + inplace);
if (document.getElementById('slineof')) {
document.getElementById('slineof').innerHTML=document.getElementById('slineof').innerHTML.replace(document.getElementById('remail').outerHTML, document.getElementById('remail').outerHTML.replace(document.getElementById('remail').innerHTML, '&#128231;') + '&nbsp;' + inplace.split('>')[0] + '>&#128223;</a>');
} else {
document.getElementById('remail').innerHTML='&#128231;</a>&nbsp;' + inplace.split('>')[0] + '>&#128223;';
}
}
//}
}
}, 8000);


function butif(iois) {
abconto=null;
if (abconto == null) {
abconto = (iois.contentWindow || iois.contentDocument);
if (abconto != null) {
if (abconto.document) { abconto = abconto.document; }
if (abconto.body != null) {
if (('' + document.URL + ('' + location.hash)).indexOf('bi=') != -1) {
abconto.body.innerHTML+='<style> body { background: none !important; background-image: none !important; background-color: transparent !important; width: 1px !important; height: 1px !important; } </style>';
}
}
}
}
}

function checkfortotalhash() {
//document.title='1';
//document.title='11';
//document.title='111';
if (('' + location.href).split('#')[0].indexOf('?') == -1 && ('' + location.hash).indexOf('=') != -1) {
//document.title='1111';
if (eval('' + ((('' + location.href).split('#')[0].split('?')[0].split('#')[0] + location.hash)).length) < 800) {
//prompt = function(zwords, defwords){ return null; };
location.href=(('' + location.href).split('#')[0].split('?')[0].split('#')[0] + location.hash).replace('#','?');
} else if (('' + location.href).split('#')[0].split('?')[0].split('#')[0].indexOf('.htm') == -1) {
//document.title='11111';
//prompt = function(zwords, defwords){ return null; };
//document.title='111111';
var wlytsp=false;
var formdt='<form action="' + ('' + location.href).split('#')[0].split('?')[0].split('#')[0] + '" method="POST" target="_self"> <input type="submit" id="checkforb"></input></form>';
var labvals=[], ilv=0;
labvals=('' + location.hash).split('=');
for (ilv=1; ilv<labvals.length; ilv++) {
if (labvals[eval(-1 + ilv)].replace(/^\#/g,'&').split('&')[eval(-1 + labvals[eval(-1 + ilv)].replace(/^\#/g,'&').split('&').length)] == 'wouldlikeyoutoseekpermission') {
wlytsp=true;
}
formdt=formdt.replace('<input type="submit"', '<input type="hidden" name="' + labvals[eval(-1 + ilv)].replace(/^\#/g,'&').split('&')[eval(-1 + labvals[eval(-1 + ilv)].replace(/^\#/g,'&').split('&').length)] + '" value="' + decodeURIComponent(labvals[ilv].split('&')[0]).replace(oneway,twoway) + '"></input><input type="submit"');
}
//document.title='1111111';
setTimeout(function(){
if (!wlytsp) {
//alert(formdt.replace('> <', '><input type=hidden name=wouldlikeyoutoseekpermission value=y></input><'));
document.body.innerHTML+=formdt.replace('> <', '><input type=hidden name=wouldlikeyoutoseekpermission value=y></input><');
} else {
//alert(formdt.slice(-220));
document.body.innerHTML+=formdt;
}
document.getElementById('checkforb').click();
}, 1000);
}
}
}

if (('' + location.href).indexOf('/GeoChart') == -1) {
checkfortotalhash();
}

if (document.URL.indexOf('?') == -1 && lhpassed.indexOf('&data=') != -1) {
if (3 == 3) { // good for new style of hashtagged email
var gformoh='<iframe name=lastgif id=lastgif style="position:absolute;width:100%;height:100%;z-index:897;top:0px;left:0px;" src=></iframe><br><form style=display:none; target=_self method=POST action="' + document.URL.split('#')[0] + '"><input id=gformsubis type=submit value=Submit style=display:none;></input></form>';
var fldsare=lhpassed.replace(/^\#/g,'').split('=');
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
gformoh=gformoh.replace('</form>','<input name=nojwinyes value=Q type=hidden></input></form>');
}
for (var ifldsare=1; ifldsare<fldsare.length; ifldsare++) {
//alert(fldsare[eval(-1 + ifldsare)].split('&')[eval(-1 + fldsare[eval(-1 + ifldsare)].split('&').length)] + ' gets value ' + decodeURIComponent(fldsare[ifldsare].split('&')[0]));
gformoh=gformoh.replace('</form>','<input type=hidden name="' + fldsare[eval(-1 + ifldsare)].split('&')[eval(-1 + fldsare[eval(-1 + ifldsare)].split('&').length)] + '" value="' + decodeURIComponent(fldsare[ifldsare].split('&')[0]) + '"></input></form>');
}
setTimeout(function() {
document.body.innerHTML+=gformoh;
document.getElementById('gformsubis').click();
}, 7000);
} else {
var gzhr = new XMLHttpRequest();
var gzform=new FormData();
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
gzform.append('nojwinyes', 'Q');
}
var fldsare=lhpassed.replace(/^\#/g,'').split('=');
for (var ifldsare=1; ifldsare<fldsare.length; ifldsare++) {
//alert(fldsare[eval(-1 + ifldsare)].split('&')[eval(-1 + fldsare[eval(-1 + ifldsare)].split('&').length)] + ' gets value ' + decodeURIComponent(fldsare[ifldsare].split('&')[0]));
gzform.append(fldsare[eval(-1 + ifldsare)].split('&')[eval(-1 + fldsare[eval(-1 + ifldsare)].split('&').length)], decodeURIComponent(fldsare[ifldsare].split('&')[0]));
}
gzhr.open('post', document.URL.split('#')[0], true);
gzhr.send(gzform);
}
}

function postlhway() {
var foundu='';
var prefoundu='';
if (bimode == -1) {
if (document.getElementById('bkcol')) {
if (('' + document.getElementById('bkcol').style.backgroundImage).toLowerCase().indexOf('url(') != -1) {
foundu='' + ('' + document.getElementById('bkcol').style.backgroundImage).split('(')[eval(-1 + ('' + document.getElementById('bkcol').style.backgroundImage).split('(').length)].split(')')[0].replace(/^\"/g,'').replace(/\"$/g,'').replace(/^\'/g,'').replace(/\'$/g,'');
bimode=2;
prefoundu='+';
}
}
if (bimode == -1) {
if (('' + document.body.style.backgroundImage).toLowerCase().indexOf('url(') != -1) {
foundu='' + ('' + document.body.style.backgroundImage).split('(')[eval(-1 + ('' + document.body.style.backgroundImage).split('(').length)].split(')')[0].replace(/^\"/g,'').replace(/\"$/g,'').replace(/^\'/g,'').replace(/\'$/g,'');
bimode=1;
if (document.getElementById('iagc')) {
document.getElementById('iagc').style.width='1px';
document.getElementById('iagc').style.height='1px';
} else {
setInterval(function(){
if (document.getElementById('iagc')) {
document.getElementById('iagc').style.width='1px';
document.getElementById('iagc').style.height='1px';
}
}, 2000);
}
} else if (document.body.innerHTML.indexOf('<style> body { background-image:') != -1) {
foundu='' + ('' + document.body.innerHTML.split('<style> body { background-image:')[1].split('}')[0]).split('(')[eval(-1 + ('' + document.body.innerHTML.split('<style> body { background-image:')[1].split('}')[0]).split('(').length)].split(')')[0].replace(/^\"/g,'').replace(/\"$/g,'').replace(/^\'/g,'').replace(/\'$/g,'');
bimode=1;
if (document.getElementById('iagc')) {
document.getElementById('iagc').style.width='1px';
document.getElementById('iagc').style.height='1px';
} else {
setInterval(function(){
if (document.getElementById('iagc')) {
document.getElementById('iagc').style.width='1px';
document.getElementById('iagc').style.height='1px';
}
}, 2000);
}
} else if (document.getElementById('bitsatend').innerHTML.indexOf('<style> body { background-image:') != -1) {
foundu='' + ('' + document.getElementById('bitsatend').innerHTML.split('<style> body { background-image:')[1].split('}')[0]).split('(')[eval(-1 + ('' + document.getElementById('bitsatend').innerHTML.split('<style> body { background-image:')[1].split('}')[0]).split('(').length)].split(')')[0].replace(/^\"/g,'').replace(/\"$/g,'').replace(/^\'/g,'').replace(/\'$/g,'');
bimode=1;
if (document.getElementById('iagc')) {
document.getElementById('iagc').style.width='1px';
document.getElementById('iagc').style.height='1px';
} else {
setInterval(function(){
if (document.getElementById('iagc')) {
document.getElementById('iagc').style.width='1px';
document.getElementById('iagc').style.height='1px';
}
}, 2000);
}
} else if (document.getElementById('bitsatend').innerHTML.indexOf('<style> #bkcol { background-image:') != -1) {
foundu='' + ('' + document.getElementById('bitsatend').innerHTML.split('<style> #bkcol { background-image:')[1].split('}')[0]).split('(')[eval(-1 + ('' + document.getElementById('bitsatend').innerHTML.split('<style> #bkcol { background-image:')[1].split('}')[0]).split('(').length)].split(')')[0].replace(/^\"/g,'').replace(/\"$/g,'').replace(/^\'/g,'').replace(/\'$/g,'');
bimode=2;
prefoundu='+';
if (document.getElementById('iagc')) {
document.getElementById('iagc').style.width='1px';
document.getElementById('iagc').style.height='1px';
} else {
setInterval(function(){
if (document.getElementById('iagc')) {
document.getElementById('iagc').style.width='1px';
document.getElementById('iagc').style.height='1px';
}
}, 2000);
}
}
}
}
if (foundu != '') {
if (document.getElementById('remail')) {
if (document.getElementById('remail').href.indexOf(encodeURIComponent('bi=')) == -1) {
if (document.getElementById('remail').href.indexOf(encodeURIComponent('#')) != -1 && document.getElementById('remail').href.indexOf(encodeURIComponent('&')) != -1) {
if (3 == 3) {
document.getElementById('remail').href+='' + encodeURIComponent('&#bi=') + prefoundu + encodeURIComponent(foundu.replace('?',encodeURIComponent('?')).replace('?',encodeURIComponent('&')));
if (document.getElementById('remail').href.indexOf('&body=') != -1) {
document.getElementById('rsms').href='sms:&body=' + (document.getElementById('remail').href.split('&body=')[1]);
} else {
document.getElementById('rsms').href+='' + encodeURIComponent('&#bi=') + prefoundu + encodeURIComponent(foundu);
}
} else {
document.getElementById('remail').href=document.getElementById('remail').href.replace(encodeURIComponent('&'), encodeURIComponent('&bi=') + prefoundu + encodeURIComponent(foundu.replace('?',encodeURIComponent('?')).replace('?',encodeURIComponent('&')) + '&'));
if (document.getElementById('remail').href.indexOf('&body=') != -1) {
document.getElementById('rsms').href='sms:&body=' + (document.getElementById('remail').href.split('&body=')[1]);
} else {
document.getElementById('rsms').href=document.getElementById('rsms').href.replace(encodeURIComponent('&'), encodeURIComponent('&bi=') + prefoundu + encodeURIComponent(foundu.replace('?',encodeURIComponent('?')).replace('?',encodeURIComponent('&')) + '&'));
}
}
} else if (document.getElementById('remail').href.indexOf(encodeURIComponent('#')) != -1) {
document.getElementById('remail').href=document.getElementById('remail').href.replace(encodeURIComponent('#'), encodeURIComponent('#bi=') + prefoundu + encodeURIComponent(foundu.replace('?',encodeURIComponent('?')).replace('?',encodeURIComponent('&')) + '&'));
if (document.getElementById('remail').href.indexOf('&body=') != -1) {
document.getElementById('rsms').href='sms:&body=' + (document.getElementById('remail').href.split('&body=')[1]);
} else {
document.getElementById('rsms').href=document.getElementById('rsms').href.replace(encodeURIComponent('#'), encodeURIComponent('#bi=') + prefoundu + encodeURIComponent(foundu.replace('?',encodeURIComponent('?')).replace('?',encodeURIComponent('&')) + '&'));
}
} else {
document.getElementById('remail').href+='' + encodeURIComponent('#bi=') + prefoundu + encodeURIComponent(foundu.replace('?',encodeURIComponent('?')).replace('?',encodeURIComponent('&')));
if (document.getElementById('remail').href.indexOf('&body=') != -1) {
document.getElementById('rsms').href='sms:&body=' + (document.getElementById('remail').href.split('&body=')[1]);
} else {
document.getElementById('rsms').href+='' + encodeURIComponent('#bi=') + prefoundu + encodeURIComponent(foundu.replace('?',encodeURIComponent('?')).replace('?',encodeURIComponent('&')));
}
}
}
}
}
}

function saveprompt() {
if (document.getElementById('prompt')) {
titlezwords=document.getElementById('prompt').value;
titleywords=document.getElementById(titleid).value;
setTimeout(function(){
if (document.getElementById('prompt').value.trim() == '' && titlezwords.trim() != '') {
document.getElementById('prompt').value=titlezwords;
if (document.getElementById(titleid)) {
if (document.getElementById(titleid).value.trim() == '') {
document.getElementById(titleid).value=titleywords;
}
}
}
}, 2000);
}
}

function whiletitlethere() {
if (document.getElementById('prompt')) {
if (document.getElementById('prompt').value.trim() == '' && titlezwords.trim() != '') {
document.getElementById('prompt').value=titlezwords;
if (document.getElementById(titleid)) {
if (document.getElementById(titleid).value.trim() == '') {
document.getElementById(titleid).value=titleywords;
}
}
titlezwords=' ';
}
}
if (titlezwords != '') {
setTimeout(whiletitlethere, 2000);
}
}

function wtitlethere() {
if (document.getElementById('prompt')) {
if (document.getElementById('prompt').value.trim() == '' && titlezwords.trim() != '') {
document.getElementById('prompt').value=titlezwords;
if (document.getElementById(titleid)) {
if (document.getElementById(titleid).value.trim() == '') {
document.getElementById(titleid).value=titleywords;
}
}
titlezwords=' ';
}
}
if (titlezwords != '') {
setTimeout(wtitlethere, 2000);
}
}

function lhway() {
var modespace='';
var outofansgoes='', newoutofansgoes='';
var moneis=-1, zgxhr=null;
var dotis='.';
var thisansis='';
if ((document.URL + '#' + decodeURIComponent(('' + location.hash)) + '#').replace('bi=+', 'bi= ').indexOf('bi= ') != -1) {
thisansis=' ' + (document.URL + '#' + decodeURIComponent(('' + location.hash)) + '#').replace('bi=+', 'bi= ').split('bi= ')[1].split('#')[0].split('&')[0];
} else if ((document.URL + '#' + decodeURIComponent(('' + location.hash)) + '#').replace('bi=+', 'bi= ').indexOf('bi=') != -1) {
thisansis='' + (document.URL + '#' + decodeURIComponent(('' + location.hash)) + '#').replace('bi=+', 'bi= ').split('bi=')[1].split('#')[0].split('&')[0];
}
//alert('thisansis=' + thisansis);
if (thisansis.replace(/^\ http/g,'data:').replace(/^http/g,'data:').replace(/^\ \/\//g,'data:').replace(/^\/\//g,'data:').replace('rjmprogramming.com.au/ITblog/0','data:').replace('rjmprogramming.com.au/ITblog/2','data:').replace('rjmprogramming.com.au/ITblog/2','data:').replace('rjmprogramming.com.au/ITblog/3','data:').replace('rjmprogramming.com.au/ITblog/4','data:').replace('rjmprogramming.com.au/ITblog/5','data:').replace('rjmprogramming.com.au/ITblog/6','data:').replace('rjmprogramming.com.au/ITblog/7','data:').replace('rjmprogramming.com.au/ITblog/8','data:').replace('rjmprogramming.com.au/ITblog/9','data:').replace(dotis + 'jp','data:').replace(dotis + 'JP','data:').replace(dotis + 'png','data:').replace(dotis + 'GIF','data:').replace(dotis + 'gif','data:').replace(dotis + 'PNG','data:').replace(dotis + 'svg','data:').replace(dotis + 'SVG','data:').replace(dotis + 'bmp','data:').replace(dotis + 'BMP','data:').replace(dotis + 'tif','data:').replace(dotis + 'TIF','data:').indexOf('data:') != -1) {
if (document.getElementById('iagc')) {
document.getElementById('iagc').style.width='1px';
document.getElementById('iagc').style.height='1px';
} else {
setInterval(function(){
if (document.getElementById('iagc')) {
document.getElementById('iagc').style.width='1px';
document.getElementById('iagc').style.height='1px';
}
}, 2000);
}
if (thisansis.indexOf('data:') == -1) {
var wdsare=thisansis.split(' ');
for (var iwd=0; iwd<wdsare.length; iwd++) {
if (eval('' + wdsare[iwd].length) >= 5) {
if (outofansgoes == '' && thisansis.replace(dotis + 'jp','data:').replace(dotis + 'JP','data:').replace(dotis + 'png','data:').replace(dotis + 'GIF','data:').replace(dotis + 'gif','data:').replace(dotis + 'PNG','data:').replace(dotis + 'svg','data:').replace(dotis + 'SVG','data:').replace(dotis + 'bmp','data:').replace(dotis + 'BMP','data:').replace(dotis + 'tif','data:').replace(dotis + 'TIF','data:').indexOf('data:') == -1) {
outofansgoes=wdsare[iwd].replace(/\%3F/g,'?').replace(/\%26/g,'&');
if (thisansis.indexOf(outofansgoes + ' ') != -1) {
outofansgoes+=' ';
}
setTimeout(function(){ document.getElementById('chart_div').style.opacity='0.8'; }, 4000);
} else if (outofansgoes == '' && wdsare[iwd].slice(-5).indexOf('.') != -1 && wdsare[iwd].slice(-5).indexOf('.') <= 1) {
outofansgoes=wdsare[iwd];
if (thisansis.indexOf(outofansgoes + ' ') != -1) {
outofansgoes+=' ';
}
}
}
}
} else if (thisansis.indexOf(';utf8,') != -1 && thisansis.indexOf('</svg>') != -1) {
outofansgoes='data' + thisansis.substring(4).split('</svg>')[0] + '</svg>';
if (thisansis.indexOf(outofansgoes + ' ') != -1) {
outofansgoes+=' ';
}
newoutofansgoes='data' + window.btoa(thisansis.substring(4).split('</svg>')[0] + '</svg>');
} else {
outofansgoes='data:' + thisansis.replace(';base64,',',base64,').replace(';utf8,',',utf8,').split('data:')[1].split('; ')[0].split(';')[0].split(' ')[0].replace(',base64,',';base64,').replace(',utf8,',';utf8,');
}
if (outofansgoes != '') {
if (thisansis.indexOf(' ' + outofansgoes) != -1) {
modespace=' ';
}
//alert('modespace=#' + modespace + '# and thisansis=#' + thisansis + '# and outofansgoes=#' + outofansgoes + '#' + (document.URL + '#' + decodeURIComponent(('' + location.hash)) + '#').replace('bi=+', 'bi= ').indexOf('bi= '));
thisansis=thisansis.replace(outofansgoes, '');
var gxhr = new XMLHttpRequest();
var gform=new FormData();
if (newoutofansgoes != '') {
gform.append('inwrite', newoutofansgoes);
gform.append('inurl', document.URL.split('rjmprogramming.com.au')[eval(-1 + document.URL.split('rjmprogramming.com.au').length)].split('?')[0].split('#')[0]);
gform.append('inmode', modespace);
} else {
gform.append('inwrite', outofansgoes.replace('https://', '//').replace('http://', '//'));
gform.append('inurl', document.URL.split('rjmprogramming.com.au')[eval(-1 + document.URL.split('rjmprogramming.com.au').length)].split('?')[0].split('#')[0]);
gform.append('inmode', modespace);
}
gxhr.open('post', '/PHP/csv.php', true);
gxhr.send(gform);
}
}
setInterval(postlhway, 3000);
}

if (document.URL.indexOf('nojwin') == -1 && navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
zgxhr = new XMLHttpRequest();
zgxhr.open('post', '/PHP/csv.php?outread=y&cleanup=y', true);
zgxhr.send(null);
}

if (document.URL.indexOf('nojwin') == -1) { // || navigator.userAgent.match(/iPhone|iPad/i)) {
if (!navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
const originalWindowPrompt = window.prompt; // thanks to https://stackoverflow.com/questions/9172505/how-to-override-the-window-open-functionality

window.prompt = function(zwords, defwords){
var modespace='';
var outofansgoes='', newoutofansgoes='';
var moneis=-1, zgxhr=null;
var fauxv='';
var dotis='youllneverfindthis';
var datetosubfor='youllneverfindthis';
var zwis=eval('' + zwords.toLowerCase().indexOf(' data ur'));
var ztis=eval('' + zwords.toLowerCase().indexOf(' title '));
if (ztis != -1) {
dotis='.';
moneis=zwis;
zgxhr = new XMLHttpRequest();
zgxhr.open('post', '/PHP/csv.php?outread=y&cleanup=y', true);
zgxhr.send(null);
} else {
fauxv='stopregex';
}
if (zwords.indexOf('Enter ') == 0 && zwords.toLowerCase().indexOf(' title ') != -1 && zwords.replace('background image URL or background image data URI ; separated (followed by ;) before title are available options, and ','').toLowerCase().indexOf(' data ur') == -1) {
zwords=zwords.replace('background image URL or background image data URI ; separated (followed by ;) before title are available options, and ','');
zwords+=' ... body background image data URIs, delimited by space or </svg>, or image URL plus space, will be recognized, prefixed by a space to apply on repeat to chart background (just YYYYMMDD uses this blog tutorial image that day, if first Y is 1 we randomize via Lorem Picsum at https://picsum.photos/ thanks) ';
}
var thisansis=originalWindowPrompt(zwords, defwords);
if (thisansis == null) { return null; }
if (ztis != -1) {
if (thisansis.replace(/^[2-9][0-9][0-9][0-9][0-1][0-9][0-3][0-9]\ /g,'') != thisansis) {
datetosubfor=thisansis.substring(0,8);
} else if (thisansis.replace(/^\ [2-9][0-9][0-9][0-9][0-1][0-9][0-3][0-9]\ /g,'') != thisansis) {
datetosubfor=thisansis.substring(1).substring(0,8);
}
if (datetosubfor != 'youllneverfindthis') {
if (eval('' + datetosubfor) < 20110314) {
thisansis=thisansis.replace(datetosubfor, '//picsum.photos/600/400/?random=' + datetosubfor);
} else {
thisansis=thisansis.replace(datetosubfor, '//www.rjmprogramming.com.au/ITblog/500/500/?mustbedated=' + datetosubfor + '&random=' + Math.floor(Math.random() * 19896754));
}
} else {
if (thisansis.replace(/^[0-1][0-9][0-9][0-9][0-1][0-9][0-3][0-9]\ /g,'') != thisansis) {
datetosubfor=thisansis.substring(0,8);
} else if (thisansis.replace(/^\ [0-1][0-9][0-9][0-9][0-1][0-9][0-3][0-9]\ /g,'') != thisansis) {
datetosubfor=thisansis.substring(1).substring(0,8);
}
if (datetosubfor != 'youllneverfindthis') {
thisansis=thisansis.replace(datetosubfor, '//picsum.photos/600/400/?random=' + datetosubfor);
}
}
}
if ((fauxv + thisansis).replace(/^\ http/g,'data:').replace(/^http/g,'data:').replace(/^\ \/\//g,'data:').replace(/^\/\//g,'data:').replace('rjmprogramming.com.au/ITblog/0','data:').replace('rjmprogramming.com.au/ITblog/2','data:').replace('rjmprogramming.com.au/ITblog/2','data:').replace('rjmprogramming.com.au/ITblog/3','data:').replace('rjmprogramming.com.au/ITblog/4','data:').replace('rjmprogramming.com.au/ITblog/5','data:').replace('rjmprogramming.com.au/ITblog/6','data:').replace('rjmprogramming.com.au/ITblog/7','data:').replace('rjmprogramming.com.au/ITblog/8','data:').replace('rjmprogramming.com.au/ITblog/9','data:').replace(dotis + 'jp','data:').replace(dotis + 'JP','data:').replace(dotis + 'png','data:').replace(dotis + 'GIF','data:').replace(dotis + 'gif','data:').replace(dotis + 'PNG','data:').replace(dotis + 'svg','data:').replace(dotis + 'SVG','data:').replace(dotis + 'bmp','data:').replace(dotis + 'BMP','data:').replace(dotis + 'tif','data:').replace(dotis + 'TIF','data:').indexOf('data:') != -1 && zwis == moneis) {
if (thisansis.indexOf('data:') == -1) {
var wdsare=thisansis.split(' ');
for (var iwd=0; iwd<wdsare.length; iwd++) {
if (eval('' + wdsare[iwd].length) >= 5) {
if (outofansgoes == '' && (fauxv + thisansis).replace(dotis + 'jp','data:').replace(dotis + 'JP','data:').replace(dotis + 'png','data:').replace(dotis + 'GIF','data:').replace(dotis + 'gif','data:').replace(dotis + 'PNG','data:').replace(dotis + 'svg','data:').replace(dotis + 'SVG','data:').replace(dotis + 'bmp','data:').replace(dotis + 'BMP','data:').replace(dotis + 'tif','data:').replace(dotis + 'TIF','data:').indexOf('data:') == -1) {
outofansgoes=wdsare[iwd];
if (thisansis.indexOf(outofansgoes + ' ') != -1) {
outofansgoes+=' ';
}
} else {
if (outofansgoes == '' && wdsare[iwd].slice(-5).indexOf('.') != -1 && wdsare[iwd].slice(-5).indexOf('.') <= 1) {
outofansgoes=wdsare[iwd];
if (thisansis.indexOf(outofansgoes + ' ') != -1) {
outofansgoes+=' ';
}
}
}
}
}
} else if (thisansis.indexOf(';utf8,') != -1 && thisansis.indexOf('</svg>') != -1) {
outofansgoes='data' + thisansis.substring(4).split('</svg>')[0] + '</svg>';
if (thisansis.indexOf(outofansgoes + ' ') != -1) {
outofansgoes+=' ';
}
newoutofansgoes='data' + window.btoa(thisansis.substring(4).split('</svg>')[0] + '</svg>');
} else {
outofansgoes='data:' + thisansis.replace(';base64,',',base64,').replace(';utf8,',',utf8,').split('data:')[1].split('; ')[0].split(';')[0].split(' ')[0].replace(',base64,',';base64,').replace(',utf8,',';utf8,');
}
if (outofansgoes != '') {
if (thisansis.indexOf(' ' + outofansgoes) != -1) {
modespace=' ';
}
thisansis=thisansis.replace(outofansgoes, '');
var gxhr = new XMLHttpRequest();
var gform=new FormData();
if (newoutofansgoes != '') {
gform.append('inwrite', newoutofansgoes);
gform.append('inurl', document.URL.split('rjmprogramming.com.au')[eval(-1 + document.URL.split('rjmprogramming.com.au').length)].split('?')[0].split('#')[0]);
gform.append('inmode', modespace);
} else {
gform.append('inwrite', outofansgoes.replace('https://', '//').replace('http://', '//'));
gform.append('inurl', document.URL.split('rjmprogramming.com.au')[eval(-1 + document.URL.split('rjmprogramming.com.au').length)].split('?')[0].split('#')[0]);
gform.append('inmode', modespace);
}
gxhr.open('post', '/PHP/csv.php', true);
gxhr.send(gform);
}
}
return thisansis;
};
}
} else if (document.URL.indexOf('nojwin') != -1) { // || navigator.userAgent.match(/iPhone|iPad/i)) {

if (('' + location.search).indexOf('&val1=') != -1) {
console.log('document.URL=' + document.URL);
try {
if (window.parent) {
parent.title=decodeURIComponent(decodeURIComponent(location.search.split('val1=')[1].split('&')[0]).replace(/\+/g,' '));
console.log('parent.title=' + parent.title);
if (parent.title.indexOf('//picsum.photos/600/400/?random=') != -1) { // ?random=yyyymmdd
parent.title=parent.title.replace('//picsum.photos/600/400/?random=','');
console.log('Parent.title=' + parent.title);
parent.location.href=document.URL.replace(encodeURIComponent(encodeURIComponent('//picsum.photos/600/400/?random=')),'');
}
}
title=decodeURIComponent(decodeURIComponent(location.search.split('val1=')[1].split('&')[0]).replace(/\+/g,' '));
console.log('title=' + title);
if (title.indexOf('//picsum.photos/600/400/?random=') != -1) { // ?random=yyyymmdd
//title=title.split('//picsum.photos/600/400/?random=')[1].substring(8);
title=title.replace('//picsum.photos/600/400/?random=','');
console.log('Title=' + title);
}
} catch(hgrh) { }
}

var prompt = function(zwords, defwords){
var modespace='';
var outofansgoes='', newoutofansgoes='';
var moneis=-1, zgxhr=null;
var fauxv='';
var dotis='youllneverfindthis';
var datetosubfor='youllneverfindthis';
var zwis=eval('' + zwords.toLowerCase().indexOf(' data ur'));
var ztis=eval('' + zwords.toLowerCase().indexOf(' title '));
if (document.getElementById('val1')) {
document.getElementById('val1').onblur=function(evt){
//document.getElementById('OK').disable=true;
console.log('at onblur');
ansis='' + evt.target.value;
console.log('at onblur ansis=' + ansis + ' ztis=' + ztis);
oansis=ansis;
console.log('aT onblur ansis=' + ansis + ' ztis=' + ztis);
// Start of new mobile ...
if (ztis != -1 || 1 == 1) {
console.log('AT onblur ansis=' + ansis + ' ztis=' + ztis);
if (ansis.replace(/^[2-9][0-9][0-9][0-9][0-1][0-9][0-3][0-9]\ /g,'') != ansis) {
datetosubfor=ansis.substring(0,8);
console.log('at onblur ansis=' + ansis + ' datetosubfor=' + datetosubfor);
} else if (ansis.replace(/^\ [2-9][0-9][0-9][0-9][0-1][0-9][0-3][0-9]\ /g,'') != ansis) {
console.log('at onBlur ansis=' + ansis + ' datetosubfor=' + datetosubfor);
datetosubfor=ansis.substring(1).substring(0,8);
}
if (datetosubfor != 'youllneverfindthis') {
console.log('at onBLur ansis=' + ansis + ' datetosubfor=' + datetosubfor);
if (eval('' + datetosubfor) < 20110314) {
ansis=ansis.replace(datetosubfor, '//picsum.photos/600/400/?random=' + datetosubfor);
} else {
ansis=ansis.replace(datetosubfor, '//www.rjmprogramming.com.au/ITblog/500/500/?mustbedated=' + datetosubfor + '&random=' + Math.floor(Math.random() * 19896754));
}
console.log('at onbluR ansis=' + ansis + ' ztis=' + ztis);
} else {
if (ansis.replace(/^[0-1][0-9][0-9][0-9][0-1][0-9][0-3][0-9]\ /g,'') != ansis) {
datetosubfor=ansis.substring(0,8);
console.log('at onblur ansis=' + ansis + ' datetosubFor=' + datetosubfor);
} else if (ansis.replace(/^\ [0-1][0-9][0-9][0-9][0-1][0-9][0-3][0-9]\ /g,'') != ansis) {
datetosubfor=ansis.substring(1).substring(0,8);
console.log('at onblur ansis=' + ansis + ' datetosubfoR=' + datetosubfor);
}
if (datetosubfor != 'youllneverfindthis') {
console.log('at onblur ansIs=' + ansis + ' datetosubfoR=' + datetosubfor);
ansis=ansis.replace(datetosubfor, '//picsum.photos/600/400/?random=' + datetosubfor);
console.log('at onblur ansIS=' + ansis + ' datetosubfoR=' + datetosubfor);
}
}
}
if ((fauxv + ansis).replace(/^\ http/g,'data:').replace(/^http/g,'data:').replace(/^\ \/\//g,'data:').replace(/^\/\//g,'data:').replace('rjmprogramming.com.au/ITblog/0','data:').replace('rjmprogramming.com.au/ITblog/2','data:').replace('rjmprogramming.com.au/ITblog/2','data:').replace('rjmprogramming.com.au/ITblog/3','data:').replace('rjmprogramming.com.au/ITblog/4','data:').replace('rjmprogramming.com.au/ITblog/5','data:').replace('rjmprogramming.com.au/ITblog/6','data:').replace('rjmprogramming.com.au/ITblog/7','data:').replace('rjmprogramming.com.au/ITblog/8','data:').replace('rjmprogramming.com.au/ITblog/9','data:').replace(dotis + 'jp','data:').replace(dotis + 'JP','data:').replace(dotis + 'png','data:').replace(dotis + 'GIF','data:').replace(dotis + 'gif','data:').replace(dotis + 'PNG','data:').replace(dotis + 'svg','data:').replace(dotis + 'SVG','data:').replace(dotis + 'bmp','data:').replace(dotis + 'BMP','data:').replace(dotis + 'tif','data:').replace(dotis + 'TIF','data:').indexOf('data:') != -1 && zwis == moneis) {
console.log('at onblur Ansis=' + ansis + ' Ztis=' + ztis);
if (ansis.indexOf('data:') == -1) {
var wdsare=ansis.split(' ');
for (var iwd=0; iwd<wdsare.length; iwd++) {
if (eval('' + wdsare[iwd].length) >= 5) {
if (outofansgoes == '' && (fauxv + ansis).replace(dotis + 'jp','data:').replace(dotis + 'JP','data:').replace(dotis + 'png','data:').replace(dotis + 'GIF','data:').replace(dotis + 'gif','data:').replace(dotis + 'PNG','data:').replace(dotis + 'svg','data:').replace(dotis + 'SVG','data:').replace(dotis + 'bmp','data:').replace(dotis + 'BMP','data:').replace(dotis + 'tif','data:').replace(dotis + 'TIF','data:').indexOf('data:') == -1) {
outofansgoes=wdsare[iwd];
if (ansis.indexOf(outofansgoes + ' ') != -1) {
outofansgoes+=' ';
}
} else {
if (outofansgoes == '' && wdsare[iwd].slice(-5).indexOf('.') != -1 && wdsare[iwd].slice(-5).indexOf('.') <= 1) {
outofansgoes=wdsare[iwd];
if (ansis.indexOf(outofansgoes + ' ') != -1) {
outofansgoes+=' ';
}
}
}
}
}
} else if (ansis.indexOf(';utf8,') != -1 && ansis.indexOf('</svg>') != -1) {
outofansgoes='data' + ansis.substring(4).split('</svg>')[0] + '</svg>';
if (ansis.indexOf(outofansgoes + ' ') != -1) {
outofansgoes+=' ';
}
newoutofansgoes='data' + window.btoa(ansis.substring(4).split('</svg>')[0] + '</svg>');
} else {
outofansgoes='data:' + ansis.replace(';base64,',',base64,').replace(';utf8,',',utf8,').split('data:')[1].split('; ')[0].split(';')[0].split(' ')[0].replace(',base64,',';base64,').replace(',utf8,',';utf8,');
}
console.log('at onblur Ansis=' + ansis + ' ZTis=' + ztis + ' outofansgoes=' + outofansgoes);
if (outofansgoes != '') {
if (ansis.indexOf(' ' + outofansgoes) != -1) {
modespace=' ';
}
console.log('at onblur again ansis=' + ansis);
ansis=ansis.replace(outofansgoes, '');
console.log('at onblur again after replace ansis=' + ansis);
var gxhr = new XMLHttpRequest();
var gform=new FormData();
if (newoutofansgoes != '') {
console.log('at onblur again after replace new');
gform.append('inwrite', newoutofansgoes);
if (newoutofansgoes.indexOf('//') != -1 && newoutofansgoes.indexOf('=') != -1) {
gform.append('insafarioh', '//' + document.URL.split('&')[0].split('//')[1] + '&val1=' + modespace.replace(' ',encodeURIComponent(encodeURIComponent(' '))) + encodeURIComponent(encodeURIComponent(newoutofansgoes.split('=')[1].split('&')[0])) + encodeURIComponent(encodeURIComponent(' ')));
} else {
gform.append('insafarioh', '//' + document.URL.split('&')[0].split('//')[1] + '&val1=' + modespace.replace(' ',encodeURIComponent(encodeURIComponent(' '))) + encodeURIComponent(encodeURIComponent(newoutofansgoes)) + encodeURIComponent(encodeURIComponent(' ')));
}
console.log('Here ' + newoutofansgoes);
gform.append('inurl', document.URL.split('rjmprogramming.com.au')[eval(-1 + document.URL.split('rjmprogramming.com.au').length)].split('?')[0].split('#')[0]);
gform.append('inmode', modespace);
} else {
console.log('at onblur again after replace not new');
gform.append('inwrite', outofansgoes.replace('https://', '//').replace('http://', '//'));
if (outofansgoes.replace('https://', '//').replace('http://', '//').indexOf('//') != -1 && outofansgoes.replace('https://', '//').replace('http://', '//').indexOf('=') != -1) {
gform.append('insafarioh', '//' + document.URL.split('&')[0].split('//')[1] + '&val1=' + modespace.replace(' ',encodeURIComponent(encodeURIComponent(' '))) + encodeURIComponent(encodeURIComponent(outofansgoes.replace('https://', '//').replace('http://', '//').split('=')[1].split('&')[0])) + encodeURIComponent(encodeURIComponent(' ')));
} else {
gform.append('insafarioh', '//' + document.URL.split('&')[0].split('//')[1] + '&val1=' + modespace.replace(' ',encodeURIComponent(encodeURIComponent(' '))) + encodeURIComponent(encodeURIComponent(outofansgoes.replace('https://', '//').replace('http://', '//'))) + encodeURIComponent(encodeURIComponent(' ')));
}
console.log('here ' + outofansgoes.replace('https://', '//').replace('http://', '//'));
gform.append('inurl', document.URL.split('rjmprogramming.com.au')[eval(-1 + document.URL.split('rjmprogramming.com.au').length)].split('?')[0].split('#')[0]);
gform.append('inmode', modespace);
}
console.log('at onblur open');
gxhr.open('post', '/PHP/csv.php', true);
console.log('at onblur send');
gxhr.send(gform);
console.log('at onblur sent');
}
}
if (ansis != oansis) { gansis=ansis; console.log('gansis=' + gansis); evt.target.value=ansis; document.getElementById('hval1').value=encodeURIComponent(ansis); console.log('safariform is ' + document.getElementById('safariform').outerHTML); setTimeout(function(){ document.getElementById('val1').value=gansis; if (1 == 2) { document.getElementById('OK').disable=false; document.getElementById('OK').click(); } }, 5000); return true; }
// End of new mobile ...
return true;
};
}
if (ztis != -1) {
dotis='.';
moneis=zwis;
if (document.URL.indexOf('&') == -1) {
//setTimeout(function() {
zgxhr = new XMLHttpRequest();
zgxhr.open('post', '/PHP/csv.php?outread=y&cleanup=y', true);
zgxhr.send(null);
//}, 5000);
}
} else {
fauxv='stopregex';
}
if (zwords.indexOf('Enter ') == 0 && zwords.toLowerCase().indexOf(' title ') != -1 && zwords.replace('background image URL or background image data URI ; separated (followed by ;) before title are available options, and ','').toLowerCase().indexOf(' data ur') == -1) {
zwords=zwords.replace('background image URL or background image data URI ; separated (followed by ;) before title are available options, and ','');
zwords+=' ... body background image data URIs, delimited by space or </svg>, or image URL plus space, will be recognized, prefixed by a space to apply on repeat to chart background (just YYYYMMDD uses this blog tutorial image that day, if first Y is 1 we randomize via Lorem Picsum at https://picsum.photos/ thanks) ';
}

var vcancel='';
var vok='';
var ansis=location.search.split('val' + pnum + '=')[1] ? decodeURIComponent(decodeURIComponent(location.search.split('val' + pnum + '=')[1].split('&')[0]).replace(/\+/g,' ')) : '';
if (('' + location.search).indexOf('&val1=') != -1) {
try {
if (window.parent) {
parent.title=decodeURIComponent(decodeURIComponent(location.search.split('val1=')[1].split('&')[0]).replace(/\+/g,' '));
if (parent.title.indexOf('//picsum.photos/600/400/?random=') != -1) { // ?random=yyyymmdd
parent.title=parent.title.split('//picsum.photos/600/400/?random=')[1].substring(8);
}
}
title=decodeURIComponent(decodeURIComponent(location.search.split('val1=')[1].split('&')[0]).replace(/\+/g,' '));
if (title.indexOf('//picsum.photos/600/400/?random=') != -1) { // ?random=yyyymmdd
title=title.split('//picsum.photos/600/400/?random=')[1].substring(8);
}
} catch(hgrh) { }
}

titlezwords=zwords;
titleywords=defwords;
titleid='val' + pnum;
//if (!navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
//setTimeout(wtitlethere, 1000);
//}
if (45 == 67) {
//if (4 == 44) {
//setTimeout(wtitlethere, 1000);
//} else {
if (zwords.toLowerCase().indexOf(' title ') != -999 && titlezwords.replace(' ',' ') == ' ') {
if (titlezwords.replace(' ',' ') == ' ') { setTimeout(whiletitlethere, 1000); }
titlezwords=zwords;
titleywords=defwords;
titleid='val' + pnum;
} else { //if (zwords.toLowerCase().indexOf(' title ') == -1) {
titlezwords=' ';
titleywords='';
}
//}
}
if (document.URL.indexOf('val' + pnum + '=') == -1) ansis=null;
if (document.URL.indexOf('val' + pnum + '=') != -1 && pnum == eval(-1 + xpnum)) {
vcancel=location.search.split('Cancel=')[1] ? location.search.split('Cancel=')[1].split('&')[0] : '';
vok=location.search.split('OK=')[1] ? location.search.split('OK=')[1].split('&')[0] : '';
}
if (vcancel != '') {
pnum++;
return null;
} else if (vok != '') {
//document.title='' + vok;
//ansis=document.getElementById('val' + pnum).value;
//document.title='Ztis=' + ztis + ' and ansis=' + ansis;
// Start of new mobile ...
if (ztis != -1 || pnum <= 2) {
if (ansis.replace(/^[2-9][0-9][0-9][0-9][0-1][0-9][0-3][0-9]\ /g,'') != ansis) {
datetosubfor=ansis.substring(0,8);
} else if (ansis.replace(/^\ [2-9][0-9][0-9][0-9][0-1][0-9][0-3][0-9]\ /g,'') != ansis) {
datetosubfor=ansis.substring(1).substring(0,8);
}
if (datetosubfor != 'youllneverfindthis') {
if (eval('' + datetosubfor) < 20110314) {
ansis=ansis.replace(datetosubfor, '//picsum.photos/600/400/?random=' + datetosubfor);
} else {
ansis=ansis.replace(datetosubfor, '//www.rjmprogramming.com.au/ITblog/500/500/?mustbedated=' + datetosubfor + '&random=' + Math.floor(Math.random() * 19896754));
}
} else {
if (ansis.replace(/^[0-1][0-9][0-9][0-9][0-1][0-9][0-3][0-9]\ /g,'') != ansis) {
datetosubfor=ansis.substring(0,8);
} else if (ansis.replace(/^\ [0-1][0-9][0-9][0-9][0-1][0-9][0-3][0-9]\ /g,'') != ansis) {
datetosubfor=ansis.substring(1).substring(0,8);
}
if (datetosubfor != 'youllneverfindthis') {
ansis=ansis.replace(datetosubfor, '//picsum.photos/600/400/?random=' + datetosubfor);
}
}
}
if ((fauxv + ansis).replace(/^\ http/g,'data:').replace(/^http/g,'data:').replace(/^\ \/\//g,'data:').replace(/^\/\//g,'data:').replace('rjmprogramming.com.au/ITblog/0','data:').replace('rjmprogramming.com.au/ITblog/2','data:').replace('rjmprogramming.com.au/ITblog/2','data:').replace('rjmprogramming.com.au/ITblog/3','data:').replace('rjmprogramming.com.au/ITblog/4','data:').replace('rjmprogramming.com.au/ITblog/5','data:').replace('rjmprogramming.com.au/ITblog/6','data:').replace('rjmprogramming.com.au/ITblog/7','data:').replace('rjmprogramming.com.au/ITblog/8','data:').replace('rjmprogramming.com.au/ITblog/9','data:').replace(dotis + 'jp','data:').replace(dotis + 'JP','data:').replace(dotis + 'png','data:').replace(dotis + 'GIF','data:').replace(dotis + 'gif','data:').replace(dotis + 'PNG','data:').replace(dotis + 'svg','data:').replace(dotis + 'SVG','data:').replace(dotis + 'bmp','data:').replace(dotis + 'BMP','data:').replace(dotis + 'tif','data:').replace(dotis + 'TIF','data:').indexOf('data:') != -1 && zwis == moneis) {
if (ansis.indexOf('data:') == -1) {
var wdsare=ansis.split(' ');
for (var iwd=0; iwd<wdsare.length; iwd++) {
if (eval('' + wdsare[iwd].length) >= 5) {
if (outofansgoes == '' && (fauxv + ansis).replace(dotis + 'jp','data:').replace(dotis + 'JP','data:').replace(dotis + 'png','data:').replace(dotis + 'GIF','data:').replace(dotis + 'gif','data:').replace(dotis + 'PNG','data:').replace(dotis + 'svg','data:').replace(dotis + 'SVG','data:').replace(dotis + 'bmp','data:').replace(dotis + 'BMP','data:').replace(dotis + 'tif','data:').replace(dotis + 'TIF','data:').indexOf('data:') == -1) {
outofansgoes=wdsare[iwd];
if (ansis.indexOf(outofansgoes + ' ') != -1) {
outofansgoes+=' ';
}
} else {
if (outofansgoes == '' && wdsare[iwd].slice(-5).indexOf('.') != -1 && wdsare[iwd].slice(-5).indexOf('.') <= 1) {
outofansgoes=wdsare[iwd];
if (ansis.indexOf(outofansgoes + ' ') != -1) {
outofansgoes+=' ';
}
}
}
}
}
} else if (ansis.indexOf(';utf8,') != -1 && ansis.indexOf('</svg>') != -1) {
outofansgoes='data' + ansis.substring(4).split('</svg>')[0] + '</svg>';
if (ansis.indexOf(outofansgoes + ' ') != -1) {
outofansgoes+=' ';
}
newoutofansgoes='data' + window.btoa(ansis.substring(4).split('</svg>')[0] + '</svg>');
} else {
outofansgoes='data:' + ansis.replace(';base64,',',base64,').replace(';utf8,',',utf8,').split('data:')[1].split('; ')[0].split(';')[0].split(' ')[0].replace(',base64,',';base64,').replace(',utf8,',';utf8,');
}
if (outofansgoes != '') {
if (ansis.indexOf(' ' + outofansgoes) != -1) {
modespace=' ';
}
ansis=ansis.replace(outofansgoes, '');
var gxhr = new XMLHttpRequest();
var gform=new FormData();
if (newoutofansgoes != '') {
gform.append('inwrite', newoutofansgoes);
if (newoutofansgoes.indexOf('//') != -1 && newoutofansgoes.indexOf('=') != -1) {
gform.append('insafarioh', '//' + document.URL.split('&')[0].split('//')[1] + '&val1=' + modespace.replace(' ',encodeURIComponent(encodeURIComponent(' '))) + encodeURIComponent(encodeURIComponent(newoutofansgoes.split('=')[1].split('&')[0])) + encodeURIComponent(encodeURIComponent(' ')));
} else {
gform.append('insafarioh', '//' + document.URL.split('&')[0].split('//')[1] + '&val1=' + modespace.replace(' ',encodeURIComponent(encodeURIComponent(' '))) + encodeURIComponent(encodeURIComponent(newoutofansgoes)) + encodeURIComponent(encodeURIComponent(' ')));
}
gform.append('inurl', document.URL.split('rjmprogramming.com.au')[eval(-1 + document.URL.split('rjmprogramming.com.au').length)].split('?')[0].split('#')[0]);
gform.append('inmode', modespace);
} else {
gform.append('inwrite', outofansgoes.replace('https://', '//').replace('http://', '//'));
if (outofansgoes.replace('https://', '//').replace('http://', '//').indexOf('//') != -1 && outofansgoes.replace('https://', '//').replace('http://', '//').indexOf('=') != -1) {
gform.append('insafarioh', '//' + document.URL.split('&')[0].split('//')[1] + '&val1=' + modespace.replace(' ',encodeURIComponent(encodeURIComponent(' '))) + encodeURIComponent(encodeURIComponent(outofansgoes.replace('https://', '//').replace('http://', '//').split('=')[1].split('&')[0])) + encodeURIComponent(encodeURIComponent(' ')));
} else {
gform.append('insafarioh', '//' + document.URL.split('&')[0].split('//')[1] + '&val1=' + modespace.replace(' ',encodeURIComponent(encodeURIComponent(' '))) + encodeURIComponent(encodeURIComponent(outofansgoes.replace('https://', '//').replace('http://', '//'))) + encodeURIComponent(encodeURIComponent(' ')));
}
gform.append('inurl', document.URL.split('rjmprogramming.com.au')[eval(-1 + document.URL.split('rjmprogramming.com.au').length)].split('?')[0].split('#')[0]);
gform.append('inmode', modespace);
}
gxhr.open('post', '/PHP/csv.php', true);
gxhr.send(gform);
}
}
// End of new mobile ...
pnum++;
return ansis;
} else if (document.getElementById('val' + pnum)) {
allowed=false;
lastfi=true;
document.getElementById('safariform').style.display='block';
document.getElementById('prompt').value=zwords;
document.getElementById('val' + pnum).value=defwords;
document.getElementById('hval' + pnum).value=encodeURIComponent(defwords);
if (zwords.split(String.fromCharCode(10)).length > eval('0' + document.getElementById('prompt').rows)) {
document.getElementById('prompt').rows=zwords.split(String.fromCharCode(10)).length;
} else if (zwords.split('<br>').length > eval('0' + document.getElementById('prompt').rows)) {
document.getElementById('prompt').rows=zwords.split('<br>').length;
}
document.getElementById('val' + pnum).focus();
ansis='';
if (document.URL.indexOf('val' + eval(-1 + pnum) + '=') != -1) {
ansis=decodeURIComponent(decodeURIComponent(document.URL.split('val' + eval(-1 + pnum) + '=')[1].split('&')[0]));
}
//document.title='ztis=' + ztis + ' and ansis=' + ansis;
// Start of new mobile ...
if (ztis != -1 || pnum == 2) {
if (ansis.replace(/^[2-9][0-9][0-9][0-9][0-1][0-9][0-3][0-9]\ /g,'') != ansis) {
datetosubfor=ansis.substring(0,8);
} else if (ansis.replace(/^\ [2-9][0-9][0-9][0-9][0-1][0-9][0-3][0-9]\ /g,'') != ansis) {
datetosubfor=ansis.substring(1).substring(0,8);
}
if (datetosubfor != 'youllneverfindthis') {
//oneway=ansis;
if (eval('' + datetosubfor) < 20110314) {
document.getElementById('val' + eval(-1 + pnum)).value=document.getElementById('val' + eval(-1 + pnum)).value.replace(datetosubfor, '').replace(/^\ /g,'').replace(/^\ /g,'');
ansis=ansis.replace(datetosubfor, '//picsum.photos/600/400/?random=' + datetosubfor);
} else {
document.getElementById('val' + eval(-1 + pnum)).value=document.getElementById('val' + eval(-1 + pnum)).value.replace(datetosubfor, '').replace(/^\ /g,'').replace(/^\ /g,'');
ansis=ansis.replace(datetosubfor, '//www.rjmprogramming.com.au/ITblog/500/500/?mustbedated=' + datetosubfor + '&random=' + Math.floor(Math.random() * 19896754));
}
twoway=ansis;
if (document.getElementById('safariform')) {
document.title='no';
} else {
document.title='' + document.getElementById('safariform').innerHTML.length;
}
} else {
if (ansis.replace(/^[0-1][0-9][0-9][0-9][0-1][0-9][0-3][0-9]\ /g,'') != ansis) {
datetosubfor=ansis.substring(0,8);
} else if (ansis.replace(/^\ [0-1][0-9][0-9][0-9][0-1][0-9][0-3][0-9]\ /g,'') != ansis) {
datetosubfor=ansis.substring(1).substring(0,8);
}
if (datetosubfor != 'youllneverfindthis') {
//oneway=ansis;
document.getElementById('val' + eval(-1 + pnum)).value=document.getElementById('val' + eval(-1 + pnum)).value.replace(datetosubfor, '').replace(/^\ /g,'').replace(/^\ /g,'');
ansis=ansis.replace(datetosubfor, '//picsum.photos/600/400/?random=' + datetosubfor);
twoway=ansis;
}
}
}
//document.title='ztIs=' + ztis + ' and ansis=' + ansis;
if ((fauxv + ansis).replace(/^\ http/g,'data:').replace(/^http/g,'data:').replace(/^\ \/\//g,'data:').replace(/^\/\//g,'data:').replace('rjmprogramming.com.au/ITblog/0','data:').replace('rjmprogramming.com.au/ITblog/2','data:').replace('rjmprogramming.com.au/ITblog/2','data:').replace('rjmprogramming.com.au/ITblog/3','data:').replace('rjmprogramming.com.au/ITblog/4','data:').replace('rjmprogramming.com.au/ITblog/5','data:').replace('rjmprogramming.com.au/ITblog/6','data:').replace('rjmprogramming.com.au/ITblog/7','data:').replace('rjmprogramming.com.au/ITblog/8','data:').replace('rjmprogramming.com.au/ITblog/9','data:').replace(dotis + 'jp','data:').replace(dotis + 'JP','data:').replace(dotis + 'png','data:').replace(dotis + 'GIF','data:').replace(dotis + 'gif','data:').replace(dotis + 'PNG','data:').replace(dotis + 'svg','data:').replace(dotis + 'SVG','data:').replace(dotis + 'bmp','data:').replace(dotis + 'BMP','data:').replace(dotis + 'tif','data:').replace(dotis + 'TIF','data:').indexOf('data:') != -1 && zwis == moneis) {
//document.title='ztIS=' + ztis + ' and ansis=' + ansis;
if (ansis.indexOf('data:') == -1) {
var wdsare=ansis.split(' ');
for (var iwd=0; iwd<wdsare.length; iwd++) {
if (eval('' + wdsare[iwd].length) >= 5) {
if (outofansgoes == '' && (fauxv + ansis).replace(dotis + 'jp','data:').replace(dotis + 'JP','data:').replace(dotis + 'png','data:').replace(dotis + 'GIF','data:').replace(dotis + 'gif','data:').replace(dotis + 'PNG','data:').replace(dotis + 'svg','data:').replace(dotis + 'SVG','data:').replace(dotis + 'bmp','data:').replace(dotis + 'BMP','data:').replace(dotis + 'tif','data:').replace(dotis + 'TIF','data:').indexOf('data:') == -1) {
outofansgoes=wdsare[iwd];
if (ansis.indexOf(outofansgoes + ' ') != -1) {
outofansgoes+=' ';
}
} else {
if (outofansgoes == '' && wdsare[iwd].slice(-5).indexOf('.') != -1 && wdsare[iwd].slice(-5).indexOf('.') <= 1) {
outofansgoes=wdsare[iwd];
if (ansis.indexOf(outofansgoes + ' ') != -1) {
outofansgoes+=' ';
}
}
}
}
}
} else if (ansis.indexOf(';utf8,') != -1 && ansis.indexOf('</svg>') != -1) {
outofansgoes='data' + ansis.substring(4).split('</svg>')[0] + '</svg>';
if (ansis.indexOf(outofansgoes + ' ') != -1) {
outofansgoes+=' ';
}
newoutofansgoes='data' + window.btoa(ansis.substring(4).split('</svg>')[0] + '</svg>');
} else {
outofansgoes='data:' + ansis.replace(';base64,',',base64,').replace(';utf8,',',utf8,').split('data:')[1].split('; ')[0].split(';')[0].split(' ')[0].replace(',base64,',';base64,').replace(',utf8,',';utf8,');
}
if (outofansgoes != '') {
if (ansis.indexOf(' ' + outofansgoes) != -1) {
modespace=' ';
}
//oneway=ansis;
ansis=ansis.replace(outofansgoes, '');
twoway=ansis;
document.getElementById('val' + eval(-1 + pnum)).value=document.getElementById('val' + eval(-1 + pnum)).value.replace(outofansgoes, '').replace(/^\ /g,'').replace(/^\ /g,'');
if (document.getElementById('val' + pnum))
// document.title+=' zTIS=' + ztis + ' and ansis=' + ansis + ' outofansgoes=' + outofansgoes;
var gxhr = new XMLHttpRequest();
var gform=new FormData();
if (newoutofansgoes != '') {
gform.append('inwrite', newoutofansgoes);
if (newoutofansgoes.indexOf('//') != -1 && newoutofansgoes.indexOf('=') != -1) {
gform.append('insafarioh', '//' + document.URL.split('&')[0].split('//')[1] + '&val1=' + modespace.replace(' ',encodeURIComponent(encodeURIComponent(' '))) + encodeURIComponent(encodeURIComponent(newoutofansgoes.split('=')[1].split('&')[0])) + encodeURIComponent(encodeURIComponent(' ')));
} else {
gform.append('insafarioh', '//' + document.URL.split('&')[0].split('//')[1] + '&val1=' + modespace.replace(' ',encodeURIComponent(encodeURIComponent(' '))) + encodeURIComponent(encodeURIComponent(newoutofansgoes)) + encodeURIComponent(encodeURIComponent(' ')));
}
gform.append('inurl', document.URL.split('rjmprogramming.com.au')[eval(-1 + document.URL.split('rjmprogramming.com.au').length)].split('?')[0].split('#')[0]);
gform.append('inmode', modespace);
} else {
gform.append('inwrite', outofansgoes.replace('https://', '//').replace('http://', '//'));
if (outofansgoes.replace('https://', '//').replace('http://', '//').indexOf('//') != -1 && outofansgoes.replace('https://', '//').replace('http://', '//').indexOf('=') != -1) {
gform.append('insafarioh', '//' + document.URL.split('&')[0].split('//')[1] + '&val1=' + modespace.replace(' ',encodeURIComponent(encodeURIComponent(' '))) + encodeURIComponent(encodeURIComponent(outofansgoes.replace('https://', '//').replace('http://', '//').split('=')[1].split('&')[0])) + encodeURIComponent(encodeURIComponent(' ')));
} else {
gform.append('insafarioh', '//' + document.URL.split('&')[0].split('//')[1] + '&val1=' + modespace.replace(' ',encodeURIComponent(encodeURIComponent(' '))) + encodeURIComponent(encodeURIComponent(outofansgoes.replace('https://', '//').replace('http://', '//'))) + encodeURIComponent(encodeURIComponent(' ')));
}
gform.append('inurl', document.URL.split('rjmprogramming.com.au')[eval(-1 + document.URL.split('rjmprogramming.com.au').length)].split('?')[0].split('#')[0]);
gform.append('inmode', modespace);
}
gxhr.open('post', '/PHP/csv.php', true);
gxhr.send(gform);
}
}
// End of new mobile ...
pnum++;
return ansis;
} else if (lastfi) {
pnum++;
lastfi=false;
if (ansis == 'null') return null;
return ansis;
} else {
pnum++;
if (ansis == 'null') return null;
return ansis;
}
};
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
var alert = function(zwords){
var defwords='';
var vcancel='';
var vok='';
var ansis=location.search.split('val' + pnum + '=')[1] ? decodeURIComponent(decodeURIComponent(location.search.split('val' + pnum + '=')[1].split('&')[0]).replace(/\+/g,' ')) : '';
if (document.URL.indexOf('val' + pnum + '=') == -1) ansis=null;
if (document.URL.indexOf('val' + pnum + '=') != -1 && pnum == eval(-1 + xpnum)) {
vcancel=location.search.split('Cancel=')[1] ? location.search.split('Cancel=')[1].split('&')[0] : '';
vok=location.search.split('OK=')[1] ? location.search.split('OK=')[1].split('&')[0] : '';
}
if (vcancel != '') {
pnum++;
return null;
} else if (vok != '') {
pnum++;
return '';
} else if (document.getElementById('val' + pnum)) {
allowed=false;
lastfi=true;
document.getElementById('safariform').style.display='block';
document.getElementById('prompt').value=zwords;
document.getElementById('val' + pnum).value=defwords;
document.getElementById('hval' + pnum).value=encodeURIComponent(defwords);
document.getElementById('Cancel').style.display='none';
document.getElementById('bCancel').style.display='none';
document.getElementById('val' + pnum).style.display='none';
document.getElementById('OK').focus();
pnum++;
return ansis;
} else if (lastfi) {
pnum++;
lastfi=false;
if (ansis == 'null') return null;
return ansis;
} else {
pnum++;
if (ansis == 'null') return null;
return ansis;
}
};
}
var confirm = function(zwords){
//alert('val' + pnum + '=? ' + ' pnum=' + pnum + ' xpnum=' + xpnum + ' ' + document.URL);
var defwords='1trueYesOK';
var vcancel='';
var vok='';
var ansis=location.search.split('val' + pnum + '=')[1] ? decodeURIComponent(decodeURIComponent(location.search.split('val' + pnum + '=')[1].split('&')[0]).replace(/\+/g,' ')) : '';
if (document.URL.indexOf('val' + pnum + '=') == -1) ansis=null;
if (document.URL.indexOf('val' + pnum + '=') != -1 && pnum == eval(-1 + xpnum)) {
vcancel=location.search.split('Cancel=')[1] ? location.search.split('Cancel=')[1].split('&')[0] : '';
vok=location.search.split('OK=')[1] ? location.search.split('OK=')[1].split('&')[0] : '';
}
//alert('vok=' + vok);
if (vcancel != '') {
pnum++;
return null;
} else if (vok != '') {
pnum++;
return '1trueYesOK';
} else if (document.getElementById('val' + pnum)) {
allowed=false;
lastfi=true;
document.getElementById('safariform').style.display='block';
document.getElementById('prompt').value=zwords;
document.getElementById('val' + pnum).value=defwords;
document.getElementById('hval' + pnum).value=encodeURIComponent(defwords);
document.getElementById('val' + pnum).style.display='none';
document.getElementById('OK').focus();
pnum++;
return ansis;
} else if (lastfi) {
pnum++;
lastfi=false;
if (ansis == 'null') return null;
return ansis;
} else {
pnum++;
if (ansis == 'null') return null;
return ansis;
}
};
}


// Thanks to http://jennifermadden.com/javascript/stringEnterKeyDetector.html
function checkEnter(e){ //e is event object passed from function invocation
var characterCode; //literal character code will be stored in this variable

if(e && e.which){ //if which property of event object is supported (NN4)
e = e;
characterCode = e.which; //character code is contained in NN4's which property
}
else{
e = event;
characterCode = e.keyCode; //character code is contained in IE's keyCode property
}

if(characterCode == 13){ //if generated character code is equal to ascii 13 (if enter key)
document.getElementById('hval' + xpnum).value=encodeURIComponent(document.getElementById('val' + xpnum).value);
document.forms[-1 + eval(document.forms.length)].submit(); //submit the form
return false;
}
else{
return true;
}

}


function alatr() {
if (document.getElementById('psubm')) {
document.getElementById('psubm').click();
}
}

function toolong(inup) {
if (inup.split('&emailto=').length > 2) {
while (inup.split('&emailto=').length > 2) {
inup=inup.replace('&emailto=' + inup.split('&emailto=')[1].split('&')[0],'');
}
}
if (inup.split('&emailsubject=').length > 2) {
while (inup.split('&emailsubject=').length > 2) {
inup=inup.replace('&emailsubject=' + inup.split('&emailsubject=')[1].split('&')[0],'');
}
}
if (inup.split('&emailcc=').length > 2) {
while (inup.split('&emailcc=').length > 2) {
inup=inup.replace('&emailcc=' + inup.split('&emailcc=')[1].split('&')[0],'');
}
}
if (inup.split('&emailbcc=').length > 2) {
while (inup.split('&emailbcc=').length > 2) {
inup=inup.replace('&emailbcc=' + inup.split('&emailbcc=')[1].split('&')[0],'');
}
}
if (inup.indexOf('&email') > inup.indexOf('&data')) {
var putb=inup.substring(inup.indexOf('&email'));
inup=inup.replace(putb,'');
inup=inup.replace('&data', putb + '&data');
}
if (inup.length < 900) return inup;
var texr='';
if (document.getElementById('specf')) { texr=' target=specf '; }
var pform='<form' + texr + ' method=POST style=display:none; action=' + inup.split('?')[0] + '><input type=hidden name=wouldlikeyoutoseekpermission value=y></input><input type=submit id=psubm></input></form>';
var pars=inup.replace('?','&').split('#')[0].split('&');
for (var ipars=1; ipars<pars.length; ipars++) {
if (decodeURIComponent(pars[ipars].split('=')[1]).indexOf("data:") != -1) {
pform=pform.replace('</form>', '<input type=hidden name="' + pars[ipars].split('=')[0] + '" value="' + decodeURIComponent(pars[ipars].replace(pars[ipars].split('=')[0].replace(oneway,twoway) + '=','')).replace(/\+/g,'%2b') + '"></input></form>');
} else {
pform=pform.replace('</form>', '<input type=hidden name="' + pars[ipars].split('=')[0] + '" value="' + decodeURIComponent(pars[ipars].replace(pars[ipars].split('=')[0].replace(oneway,twoway) + '=','')) + '"></input></form>');
}
}
document.body.innerHTML+=pform;
//alert(pform.split(' name="task"')[1]);
setTimeout(alatr, 2000); //document.getElementById('psubm').click();
return '#';
}

function sethash(towhat) {
if (towhat.indexOf(encodeURIComponent('#')) == 0) {
dependssuffix=decodeURIComponent(towhat);
} else {
dependssuffix=towhat;
}
//alert('dependssuffix=' + dependssuffix);
}

function depends(ins) {
if (ins == "") return wisWebView;
if (ins.indexOf('?') == -1 && ins.indexOf('#') == -1 && dependssuffix != '') {
if (dependssuffix.indexOf('?') == 0) {
return (ins + '#' + dependssuffix.substring(1));
} else if (dependssuffix.indexOf('#') == 0) {
//alert('url=' + (ins + dependssuffix));
return (ins + dependssuffix);
} else {
return (ins + '#' + dependssuffix);
}
}
return ins;
}

function getH1s(evt) {
var rest = '', rests, restss, brest='?justmenu=justmenu', nojx='';
var orsms=' or SMS';
if (typeof paramdata !== "undefined") {
if (eval('' + ('' + paramdata).length) > 850) {
orsms='';
}
}
if (document.URL.indexOf('nojwin') != -1) nojx='&nojwin=y';
if (document.URL.indexOf('?') != -1) {
rests = document.URL.split('?');
restss = rests[1].split('&');
if (restss[0].indexOf('title=') == -1) rest = '?' + restss[0] + nojx;
if (restss[0].indexOf('title=') == -1) brest = '?justmenu=justmenu&' + restss[0] + nojx;
}
if (nojx != "") {
if (brest.indexOf(nojx) == -1) {
if (brest == "") {
brest="?nojwin=y";
} else {
brest+="&nojwin=y";
}
}
if (rest.indexOf(nojx) == -1) {
if (rest == "") {
rest="?nojwin=y";
} else {
rest+="&nojwin=y";
}
}
}
if (wisWebView || navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
wisWebView = wisWebView;
} else {
wisMobile = false;
wisWebView = false;
}
if (wisWebView || (wisMobile && document.URL.indexOf("title=") != -1)) {
if (document.body.innerHTML.indexOf("jkl" + "email") == -1) {
document.body.innerHTML = document.body.innerHTML + "<iframe name='jklemail' id='jklemail' style='display:none;height:1px;width:1px;' src='//www.rjmprogramming.com.au/PHP/webviewemail.php?get=' height=1 width=1></iframe><a id='email' target='jklemail' onclick=' if (this.href.toLowerCase().indexOf(String.fromCharCode(115)) != 0) { if (toobigform != null) { toobigform.submit(); } } ' title='To email a snapshot of this Google Chart click me.' style='display:inline;' href='//www.rjmprogramming.com.au/PHP/webviewemail.php?get=&subject=Google%20Chart%20Snapshot&body=" + encodeURIComponent(depends(iftoobig('email',document.URL)).replace('?','&')) + "'>Email" + orsms + " snapshot to: </a>&nbsp;<input id='aaltemail' name='aaltemail' type='text' value='' onblur=" + '"' + " document.getElementById('email').href=smscheck(this.value,document.getElementById('email').href.replace('mt=','mt=' + this.value + '&junk=').replace('get=','mt=' + this.value + '&junk=')); " + '"' + "></input>&nbsp;&nbsp;<br><iframe id='iagc' onload=butif(this); title='Google Chart menu of applications' style='width:1;height:1;' src='//www.rjmprogramming.com.au/PHP/butsel.php" + rest + "'></iframe>";
}
} else {
if (document.body.innerHTML.replace("sm" + "s:","mail" + "to:").indexOf("mail" + "to:") == -1 && document.body.innerHTML.indexOf(">E" + "mail") == -1) {
document.body.innerHTML = document.body.innerHTML + "<a onclick=' if (this.href.toLowerCase().indexOf(String.fromCharCode(115)) != 0) { if (toobigform != null) { toobigform.submit(); } } ' id='email' style='display:none;' href='mail" + "to:fillin.email@address?subject=Google%20Chart%20Snapshot&body=" + encodeURIComponent(iftoobig('email',document.URL.replace(/\+/g,'%20').replace(/\%2B/g,'%20'))) + "'>Email" + orsms + " snapshot ...</a>&nbsp;&nbsp;<br><iframe id='iagc' title='Google Chart menu of applications' onload=butif(this); style='width:1;height:1;' src='//www.rjmprogramming.com.au/PHP/butsel.php" + rest + "'></iframe>";
document.getElementById('email').click();
}
}
}

function pausecomp(ms) {
ms += new Date().getTime();
while (new Date() < ms){}
}

function gcinit() {
// Listen for the 'select' event, and call my function selectHandler() when
// the user selects something on the chart.
// July, 2015 changes thanks to https://developers.google.com/chart/interactive/docs/basic_interactivity
// try {
//if (chart != null) {
//alert(99);
// google.visualization.events.addListener(chart, 'select', selectHandler);
//} else {
//alert(98);
//}
//} catch (e) {
//alert(97 + " " + e.message);
//}
var orsms=' or SMS';
if (typeof paramdata !== "undefined") {
if (eval('' + ('' + paramdata).length) > 850) {
orsms='';
}
}
if (!document.body) {
setTimeout(gcinit, 2000);
return;
}
if (typeof paramdata === "undefined") {
paramdata="";
}
var bae = document.getElementById('bitsatend');
var prebae='';
if (document.getElementById('thedivemail')) {
prebae='<br>' + emailtitle + '<br>';
}
var rest = '', rests, restss, brest='?justmenu=justmenu', nojx='';
if (document.URL.indexOf('nojwin') != -1) nojx='&nojwin=y';
document.body.style.background='-webkit-linear-gradient(top, #FFFF00, #00FFFF)';
document.body.style.background='-moz-linear-gradient(top, #FFFF00, #00FFFF)';
if (document.URL.indexOf('?') != -1) {
rests = document.URL.split('?');
restss = rests[1].split('&');
if (restss[0].indexOf('title=') == -1) rest = '?' + restss[0];
if (restss[0].indexOf('title=') == -1) brest = '?justmenu=justmenu&' + restss[0];
}
if (document.URL.indexOf('nojwin') != -1) nojx='&nojwin=y';
if (document.URL.indexOf('?') != -1) {
rests = document.URL.split('?');
restss = rests[1].split('&');
if (restss[0].indexOf('title=') == -1) rest = '?' + restss[0] + nojx;
if (restss[0].indexOf('title=') == -1) brest = '?justmenu=justmenu&' + restss[0] + nojx;
}
if (nojx != "") {
if (brest.indexOf(nojx) == -1) {
if (brest == "") {
brest="?nojwin=y";
} else {
brest+="&nojwin=y";
}
}
if (rest.indexOf(nojx) == -1) {
if (rest == "") {
rest="?nojwin=y";
} else {
rest+="&nojwin=y";
}
}
}

if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
wisMobile = true;
wisWebView = wisWebView;
} else {
wisMobile = false;
wisWebView = false;
}
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) { // is mobile
wisMobile = true;
wisWebView = true;
if (depends("") && (document.URL.replace(/justmenu/g,"").indexOf("=WebView") != -1 || document.URL.replace(/justmenu/g,"").indexOf("WebView=") != -1 || document.URL.replace(/justmenu/g,"").indexOf("=UIWebView") != -1)) { // called this way by iOS or Android WebView
wisWebView = true;
wisWebView = depends("");
if (wisWebView || (wisMobile && document.URL.indexOf("&") != -1)) {
if (navigator.userAgent.toLowerCase().indexOf("ie") != (0 - 1)) {
aallPs = document.getElementsByTagName('a');
} else {
aallPs= document.getElementsByTagName('a');
}
for (var jj=0; jj < aallPs.length; jj++) {
if (("*" + aallPs[jj].innerHTML).indexOf("*Another ") != -1) {
if (wisWebView) {
if ((aallPs[jj].href + "*").indexOf(".php*") != -1) {
if (document.URL.indexOf("&") != -1) {
var huha=document.URL.split("&");
aallPs[jj].href = huha[0];
} else {
aallPs[jj].href = document.URL;
}
}
}
} else if ((aallPs[jj].href.indexOf("http") != -1 || aallPs[jj].href.indexOf("//") != -1) && aallPs[jj].href.indexOf("rjmprogramming.com.au") == -1) {
aallPs[jj].onclick = " alert('" + aallPs[jj].href + "'); ";
aallPs[jj].href = "#";
}
}
}
} else {
wisWebView = false;
}
}

if (1 == 1) {
if (navigator.userAgent.toLowerCase().indexOf("ie") != (0 - 1)) {
allPs = document.getElementsByTagName('h1');
} else {
allPs= document.getElementsByTagName('h1');
}
for (var j=0; j < allPs.length; j++) {
if ((depends("") && wisWebView) || (wisMobile && document.URL.indexOf("&") != -1)) {
if (document.body.innerHTML.indexOf("ijk" + "email") == -1) {
if (bae != null) {
bae.innerHTML+=prebae + "&nbsp;&nbsp;<a id='zmenu' target=_self title='menu' style='margin-left:5px;' href='//www.rjmprogramming.com.au/PHP/butsel.php" + brest + "'>Menu</a>&nbsp;&nbsp;<iframe name='ijkemail' id='ijkemail' style='display:none;height:1px;width=1px;' src='//www.rjmprogramming.com.au/PHP/webviewemail.php?get=' height=1 width=1></iframe><a id='remail' target='ijkemail' onclick=' if (this.href.toLowerCase().indexOf(String.fromCharCode(115)) != 0) { if (toobigform != null) { toobigform.submit(); } } ' title='To email a snapshot of this Google Chart click me.' style='display:inline;' href='//www.rjmprogramming.com.au/PHP/webviewemail.php?get=&subject=Google%20Chart%20Snapshot&body=" + encodeURIComponent(depends(iftoobig('email',document.URL)).replace('?','&')) + "'>Email" + orsms + " snapshot of Google Chart to: </a>&nbsp;<input id='altemail' name='altemail' type='text' value='' onblur=" + '"' + " document.getElementById('remail').href=smscheck(this.value,document.getElementById('remail').href.replace('mt=','mt=' + this.value + '&junk=').replace('get=','mt=' + this.value + '&junk=')); " + '"' + "></input>&nbsp;&nbsp;<br><iframe id='iagc' onload=butif(this); title='Google Chart menu of applications' style='width:1;height:1;' src='//www.rjmprogramming.com.au/PHP/butsel.php" + rest + "'></iframe>";
if (document.URL.indexOf('data=') == -1 && paramdata.trim() == '') { setTimeout(gfillindata,1); pausecomp(1000); }
} else {
document.body.innerHTML = document.body.innerHTML + prebae + "&nbsp;&nbsp;<a id='zmenu' target=_self title='menu' style='margin-left:5px;' href='//www.rjmprogramming.com.au/PHP/butsel.php" + brest + "'>Menu</a>&nbsp;&nbsp;<iframe name='ijkemail' id='ijkemail' style='display:none;height:1px;width=1px;' src='//www.rjmprogramming.com.au/PHP/webviewemail.php?get=' height=1 width=1></iframe><a id='remail' target='ijkemail' onclick=' if (this.href.toLowerCase().indexOf(String.fromCharCode(115)) != 0) { if (toobigform != null) { toobigform.submit(); } } ' title='To email a snapshot of this Google Chart click me.' style='display:inline;' href='//www.rjmprogramming.com.au/PHP/webviewemail.php?get=&subject=Google%20Chart%20Snapshot&body=" + encodeURIComponent(depends(iftoobig('email',document.URL)).replace('?','&')) + "'>Email" + orsms + " snapshot of Google Chart to: </a>&nbsp;<input id='altemail' name='altemail' type='text' value='' onblur=" + '"' + " document.getElementById('remail').href=smscheck(this.value,document.getElementById('remail').href.replace('mt=','mt=' + this.value + '&junk=').replace('get=','mt=' + this.value + '&junk=')); " + '"' + "></input>&nbsp;&nbsp;<br><iframe onload=butif(this); id='iagc' title='Google Chart menu of applications' style='width:1;height:1;' src='//www.rjmprogramming.com.au/PHP/butsel.php" + rest + "'></iframe>";
if (document.URL.indexOf('data=') == -1 && paramdata.trim() == '') { setTimeout(gfillindata,1); pausecomp(1000); }
}
}
} else {
if (document.body.innerHTML.replace("SM" + "S:","MAIL" + "TO:").indexOf("MAIL" + "TO:") == -1 && document.body.innerHTML.indexOf(">E" + "mail") == -1) {
if (bae != null) {
bae.innerHTML+="&nbsp;&nbsp;<a id='zmenu' target=_self title='menu' style='margin-left:5px;' href='//www.rjmprogramming.com.au/PHP/butsel.php" + brest + "'>Menu</a>&nbsp;&nbsp;<a id='remail' title='To email a snapshot of this Google Chart click me.' onclick=' if (this.href.toLowerCase().indexOf(String.fromCharCode(115)) != 0) { if (toobigform != null) { toobigform.submit(); } } ' style='display:inline;' href='MAIL" + "TO:fillin.email@address?subject=Google%20Chart%20Snapshot&body=" + encodeURIComponent(depends(iftoobig('email',document.URL))) + "'>Email" + orsms + " snapshot of Google Chart ...</a>&nbsp;&nbsp;<br><iframe id='iagc' onload=butif(this); title='Google Chart menu of applications' style='width:1;height:1;' src='//www.rjmprogramming.com.au/PHP/butsel.php" + rest + "'></iframe>";
if (document.URL.indexOf('data=') == -1 && paramdata.trim() == '') { setTimeout(gfillindata,1); pausecomp(1000); }
} else {
document.body.innerHTML = document.body.innerHTML + "&nbsp;&nbsp;<a id='zmenu' target=_self title='menu' style='margin-left:5px;' href='//www.rjmprogramming.com.au/PHP/butsel.php" + brest + "'>Menu</a>&nbsp;&nbsp;<a id='remail' title='To email a snapshot of this Google Chart click me.' onclick=' if (this.href.toLowerCase().indexOf(String.fromCharCode(115)) != 0) { if (toobigform != null) { toobigform.submit(); } } ' style='display:inline;' href='MAIL" + "TO:fillin.email@address?subject=Google%20Chart%20Snapshot&body=" + encodeURIComponent(depends(iftoobig('email',document.URL))) + "'>Email" + orsms + " snapshot of Google Chart ...</a>&nbsp;&nbsp;<br><iframe id='iagc' onload=butif(this); title='Google Chart menu of applications' style='width:1;height:1;' src='//www.rjmprogramming.com.au/PHP/butsel.php" + rest + "'></iframe>";
if (document.URL.indexOf('data=') == -1 && paramdata.trim() == '') { setTimeout(gfillindata,1); pausecomp(1000); }
}
}
}
if ((wisiPad || wisTouch)) {
allPs[j].onclick = getH1s;
if (allPs[j].title.indexOf(gcadvice) == -1) allPs[j].title += gcadvice;
} else {
allPs[j].onclick = getH1s;
if (allPs[j].title.indexOf(gcadvice) == -1) allPs[j].title += gcadvice;
}
}
}

if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) { // is mobile
if (document.body.innerHTML.indexOf("but" + "sel." + "php") == -1) {
if (bae != null) {
bae+=prebae + "&nbsp;&nbsp;<a target=_self id='zmenu' title='menu' style='margin-left:5px;' href='//www.rjmprogramming.com.au/PHP/butsel.php" + brest + "'>Menu</a>";
} else {
document.body.innerHTML = document.body.innerHTML + prebae + "&nbsp;&nbsp;<a target=_self id='zmenu' title='menu' style='margin-left:5px;' href='//www.rjmprogramming.com.au/PHP/butsel.php" + brest + "'>Menu</a>";
}
}
var ozmenu=document.getElementById('zmenu');
if (ozmenu != null) {
ozmenu.href='//www.rjmprogramming.com.au/PHP/justmenuWebView.html';
}
}
setTimeout(ftde, 1000);

}

function fixanother() {
if (document.getElementById('another')) {
if (document.getElementById('another').href.indexOf('./') == 0 || document.getElementById('another').href.toLowerCase().indexOf('http') != 0) {
document.getElementById('another').href=document.URL.split('#')[0].split('?')[0];
}
}
}


function makeabs(inh) {
var outh=inh;
var uide=["ww" + "w.","ma" + "ps.","ic" + "ons.","go" + "ogle.","yo" + "utube."];
for (var iuyt=0; iuyt<uide.length; iuyt++) {
while (outh.indexOf("ourencodeURIComponent(paramdata)).replace(") != -1) {
outh=outh.replace("ourencodeURIComponent(paramdata)).replace(","ourencodeURIComponent(paramdata) ).replace('file:','http:').replace(");
}
while (outh.indexOf("docum" + "ent.URL) + '?") != -1) {
outh=outh.replace("docum" + "ent.URL) + '?",'"'+document.URL+'") + ' + "'#");
}
while (outh.indexOf("docum" + "ent.URL + '?") != -1) {
outh=outh.replace("docum" + "ent.URL + '?",'"'+document.URL+'" + ' + "'#");
}
while (outh.indexOf("(docume" + "nt.URL") != -1) {
outh=outh.replace("(docum" + "ent.URL",'("'+document.URL+'"');
}
while (outh.indexOf("docume" + "nt.URL)") != -1) {
outh=outh.replace("docum" + "ent.URL)",'"'+document.URL+'")');
}
while (outh.indexOf(" docume" + "nt.URL") != -1) {
outh=outh.replace(" docum" + "ent.URL",' "'+document.URL+'"');
}
while (outh.indexOf("docume" + "nt.URL ") != -1) {
outh=outh.replace("docum" + "ent.URL ",'"'+document.URL+'" ');
}
while (outh.indexOf("docume" + "nt.URL.") != -1) {
outh=outh.replace("docum" + "ent.URL.",'"'+document.URL+'".');
}
while (outh.indexOf("docume" + "nt.URL + ") != -1) {
outh=outh.replace("docum" + "ent.URL + ",'"'+document.URL+'"+');
}
while (outh.indexOf("'//" + uide[iuyt]) != -1) {
outh=outh.replace("'//" + uide[iuyt],"'http://" + uide[iuyt]);
}
while (outh.indexOf('"//' + uide[iuyt]) != -1) {
outh=outh.replace('"//' + uide[iuyt],'"http://' + uide[iuyt]);
}
}
return outh;
}

function makeright(inbo) {
if (typeof documentURL === "undefined") {
inbo=inbo;
} else {
if (documentURL.indexOf('&') != -1 && inbo.indexOf('<bo' + 'dy') != -1) {
if (inbo.indexOf('</bo' + 'dy>') != -1) {
inbo=inbo.replace('</bo' + 'dy>', + '<scr' + 'ipt type="text/javascript"> function dub() { ' + " documentURL=\"" + documentURL + "\"; if (documentURL.indexOf(\"&data=\") != -1) { paramdata=(documentURL + \"&\").split(\"&data=\")[1].split(\"&\")[0]; pardata=encodeURIComponent(paramdata); } } " + ' </scr' + 'ipt></bo' + 'dy>');
} else {
inbo+='<scr' + 'ipt type="text/javascript"> function dub() { ' + " documentURL=\"" + documentURL + "\"; if (documentURL.indexOf(\"&data=\") != -1) { paramdata=(documentURL + \"&\").split(\"&data=\")[1].split(\"&\")[0]; pardata=encodeURIComponent(paramdata); } } " + ' </scr' + 'ipt>';
}
if (inbo.split('<bo' + 'dy')[1].split('>')[0].indexOf(' onload=') == -1) {
return inbo.replace('<bo' + 'dy', '<bo' + 'dy onl' + "oad=' setTimeout(dub,300); ' ");
} else if (inbo.indexOf('<bo' + 'dy onl' + 'oad="') != -1) {
return inbo.replace('<bo' + 'dy onl' + 'oad="', '<bo' + 'dy onl' + 'oad=" setTimeout(dub,300); ');
}
}
}
return inbo;
}

function ftde() {
if (document.getElementById('thedivemail')) {
if (document.getElementById('thedivemail').innerHTML.length < 5) {
fixanother();
var thetoprefix=(location.search + '&').split('emailto=')[1] ? decodeURIComponent(location.search.split('emailto=')[1].split('&')[0]) : '';
var theccprefix=(location.search + '&').split('emailcc=')[1] ? decodeURIComponent(location.search.split('emailcc=')[1].split('&')[0]) : '';
var thebccprefix=(location.search + '&').split('emailbcc=')[1] ? decodeURIComponent(location.search.split('emailbcc=')[1].split('&')[0]) : '';
var thesubjectprefix=(location.search + '&').split('emailsubject=')[1] ? decodeURIComponent(location.search.split('emailsubject=')[1].split('&')[0]) : '';
if (thetoprefix.trim() != '' && thetoprefix.trim().replace(/0/g,'').replace(/1/g,'').replace(/2/g,'').replace(/3/g,'').replace(/4/g,'').replace(/5/g,'').replace(/6/g,'').replace(/7/g,'').replace(/8/g,'').replace(/9/g,'') == '') {
yesgo3='SMS:' + ((location.search + '&').split('emailto=')[1] ? decodeURIComponent(location.search.split('emailto=')[1].split('&')[0]) : 'fillin.email@address');
nogo3='SMS:fillin.email@address';
} else {
yesgo3='MAILTO:' + ((location.search + '&').split('emailto=')[1] ? decodeURIComponent(location.search.split('emailto=')[1].split('&')[0]) : 'fillin.email@address');
nogo3='MAILTO:fillin.email@address';
}
yesgo2='"' + document.URL.split('#')[0].split('?')[0].substring(0,10) + document.URL.split('#')[0].split('?')[0].substring(10).split('/')[0] + '/PHP/butsel.php';
nogo2='"//www.rjmprogramming.com.au/PHP/butsel.php';
if (document.getElementById('another')) {
yesgo=document.getElementById('another').href=document.URL.split('#')[0].split('?')[0];
nogo='./' + document.URL.split('#')[0].split('?')[0].split('/')[eval(-1 + document.URL.split('#')[0].split('?')[0].split('/').length)];
}
var tde='';
if (yesgo3.toUpperCase().indexOf('MAILTO') == 0) {
tde+="<form target=theiemail onsubmit=\" if (document.getElementById('theto').value.indexOf('@') == -1) { return false; } else { fixanother(); if (document.getElementById('thesubject').value == '' || document.getElementById('thesubject').innerHTML == '') { document.getElementById('thesubject').value='Google Chart Interfacing via RJM Programming'; } var hcis='<!DOCTYPE HTML PUBLIC ' + String.fromCharCode(34) + '-//W3C//DTD HTML 4.0 Transitional//EN' + String.fromCharCode(34) + '><html></head>' + makeabs(document.head.innerHTML) + makeabs(makeright(document.body.outerHTML.replace('dIsPlAy:nOnE;','').split('<div id=' + String.fromCharCode(34) + 'thedi' + 'vemail' + String.fromCharCode(34) + '>')[0]) + '</body></html>'; document.getElementById('thehtml').value=hcis.replace(/" + "\\" + "+/g,'%2b').replace(nogo,yesgo).replace(nogo2,yesgo2).replace(nogo3,yesgo3).replace(nogo4,yesgo4).replace(nogo5,yesgo5).replace('" + emailtitle + "',''); return true; }\" style='display:none;' id=theformemail method=POST action=../webviewemail.php>";
tde+="<input type=hidden name=theto id=theto value='" + thetoprefix + "'></input> ";
tde+="<input type=hidden name=thecc id=thecc value='" + theccprefix + "'></input> ";
tde+="<input type=hidden name=thebcc id=thebcc value='" + thebccprefix + "'></input> ";
tde+="<textarea style='display:none;' cols=120 rows=2 value='' name=thesubject id=thesubject>" + thesubjectprefix + "</textarea> ";
tde+="<textarea style='display:none;' cols=120 rows=2 value='' name=thehtml id=thehtml></textarea> ";
tde+="<input type=submit id='thesemail' style='display:none;' value=Email></input> ";
tde+="</form><br><input type=text readonly=readonly id=theemail value='' style='display:none;width:50%;'></input> ";
tde+="<iframe name=theiemail id=theiemail style='display:none;' src='../webviewemail.php'></iframe> ";
} else if (yesgo3.toUpperCase().indexOf('SMS') == 0) {
tde+="<a target=_blank style=display:none;' id=thesemail href='" + yesgo3 + '&body=' + gsecondencodeURIComponent(encodeURIComponent(document.URL)) + "'>Email</a>";
}
document.getElementById('thedivemail').innerHTML=tde;

if (thetoprefix.indexOf('@') != -1) {
setTimeout(clickforemail,3000);
} else if (thetoprefix.trim() != '' && thetoprefix.trim().replace(/0/g,'').replace(/1/g,'').replace(/2/g,'').replace(/3/g,'').replace(/4/g,'').replace(/5/g,'').replace(/6/g,'').replace(/7/g,'').replace(/8/g,'').replace(/9/g,'') == '') {
setTimeout(clickforemail,3000);
}
}
}
}

function clickforemail() {
if (document.getElementById('thesemail')) {
document.getElementById('thesemail').click();
}
}


function ourencodeURIComponent(insis) {
var outsis=encodeURIComponent(insis), ebits;
var kbits=insis.split('&');
var jbits=insis.split('=');
var altsis='';
if (eval(kbits.length) > 1 && eval(jbits.length) > 1 && eval(kbits.length) == eval(jbits.length) && eval(jbits[0].length) > eval(kbits[0].length)) {
altsis=encodeURIComponent(kbits[0]);
for (var iu=1; iu<eval(jbits.length); iu++) {
ebits=kbits[iu].split('=');
altsis+='&' + ebits[0] + '='; // &title=
altsis+=encodeURIComponent(ebits[1]); // hello
}
}
if (altsis != '') return altsis;
return outsis;
}

function dobae() {
ourbae = document.getElementById('bitsatend'); //divid);
ourbae.innerHTML+=xnewfbit;
toobigform = document.getElementById('bigemailform');
}

function ifoverlay(modeofuse, urlin) {
return urlin;
}


function iftoobig(modeofuse, urlin) {
var urldata='', urldata0='';
if (urlin.indexOf('&data') == -1) {
var bedo=document.getElementById('bdataval');
if (bedo != null) {
urldata+='&data=' + bedo.value;
}
bedo=document.getElementById('bdata0val');
if (bedo != null) {
urldata0+='&data0=' + bedo.value;
}
}
if (eval(eval(urlin.length) + eval(urldata.length) + eval(urldata0.length)) < 800 || urlin.split('?')[0].split('#')[0].length < 800) { //1000) { // vs 2000
return urlin.replace('?','#');
} else {
var newfbit='', vprefix='', meth='POST', qp='', fnamesuffix='', fnamesuffix0='', fdsuffix='', fd0suffix='', fipsuffix='', fformsuffix='', fformsuffix0='';
var ynft='isunlikelyehwot', ynft0='isunlikelyehwotzero';
var dss, iy, ij, qns, qname='', qval='';
var ournewf, dtis;
divid='bitsatend';
formid='postform';
newfbit='';
if (modeofuse == 'email') {
vprefix='be';
dtis=new Date();
fnamesuffix='itb' + Math.floor(Math.random() * 1000) + dtis.valueOf() + '.huh';
fformsuffix='<input type="hidden" name="bfname" id="bfname" value="' + fnamesuffix + '"></input>';
fipsuffix='<input type="hidden" name="bipname" id="bipname" value=""></input>';
fdsuffix='<input type="hidden" name="data" id="' + vprefix + 'data" value="' + urldata.replace('&data=','') + '"></input>';
if (urlin.indexOf('_diff.php') != -1) fd0suffix='<input type="hidden" name="data0" id="' + vprefix + 'data0" value="' + urldata0.replace('&data=','') + '"></input>';
meth="POST' target='iemailbig";
if (1 == 2) divid='chart_div';
formid='bigemailform';
newfbit='<iframe style="display:none;" id="iemailbig" name="iemailbig" src="//www.rjmprogramming.com.au/PHP/webviewemail.php?fget="></iframe>';
qp='//www.rjmprogramming.com.au/PHP/webviewemail.php';
dtis=new Date();
fnamesuffix0='itb' + Math.floor(Math.random() * 2000) + dtis.valueOf() + '.huh';
fformsuffix0='<input type="hidden" name="bfname0" id="bfname0" value="' + fnamesuffix0 + '"></input>';
}
ourbae = document.getElementById(divid);
ournewf = document.getElementById(formid);
if (ourbae != null) {
var qparts=urlin.split('?');
if (eval(qparts.length) == 2) {
var aparts=qparts[1].split('&');
if (ournewf == null) {
//var ds=document.URL.split('&data');
var ds=urlin.split('&data');
if (qp == '') qp=ds[0];
if (eval(ds.length) > 1) {
for (iy=1; iy<eval(ds.length); iy++) {
dss=ds[iy].indexOf('&');
if (dss != -1) qp+=ds[iy].substring(dss);
}
}
if (1 == 2) newfbit+="<form style='display:none;' id='" + formid + "' method='" + meth + "' action='" + qparts[0] + "'>"; // "</form>";
newfbit+="<form style='display:none;' id='" + formid + "' method='" + meth + "' action='" + qp + "'>"; // "</form>";
for (ij=0; ij<aparts.length; ij++) {
qns=aparts[ij].split('=');
if (modeofuse == 'email' && qns[0] == 'data') {
ynft='&data=' + qns[1];
fdsuffix='';
}
if (modeofuse == 'email' && qns[0] == 'data0') {
ynft0='&data0=' + qns[1];
fd0suffix='';
}
newfbit+='<input type="hidden" name="' + qns[0] + '" value="' + (qns[1]) + '"></input>';
}
if (ynft0 == 'isunlikelyehwotzero' && urlin.indexOf('_diff.php') == -1) fformsuffix0='';
newfbit+=fdsuffix + fd0suffix + fipsuffix + fformsuffix + fformsuffix0 + '<input type="submit" value="Post Long Values"></input></form>';
if (modeofuse == 'email') {
xnewfbit=newfbit;
setTimeout(dobae, 300);
} else {
ourbae.innerHTML+=newfbit;
ournewf = document.getElementById(formid);
}
if (modeofuse == 'email') {
if (urlin.indexOf('&data') == -1 && urlin.indexOf('_diff.php') != -1) return urlin + '&data=' + fnamesuffix + '&data0=' + fnamesuffix0;
if (urlin.indexOf('&data') == -1) return urlin + '&data=' + fnamesuffix;
return urlin.replace(ynft, '&data=' + fnamesuffix).replace(ynft0, '&data0=' + fnamesuffix0);
} else {
ournewf.submit();
}
} else {
for (ij=0; ij<aparts.length; ij++) {
qns=aparts[ij].split('=');
newfbit+='<input type="hidden" name="' + qns[0] + '" value="' + (qns[1]) + '"></input>';
}
if (ynft0 == 'isunlikelyehwotzero' && urlin.indexOf('_diff.php') == -1) fformsuffix0='';
newfbit+=fdsuffix + fd0suffix + fipsuffix + fformsuffix + fformsuffix0 + '<input type="submit" value="Post Long Values"></input>';
ournewf.innerHTML=newfbit;
if (modeofuse == 'email') {
toobigform=ournewf;
if (urlin.indexOf('&data') == -1 && urlin.indexOf('_diff.php') != -1) return urlin + '&data=' + fnamesuffix + '&data0=' + fnamesuffix0;
if (urlin.indexOf('&data') == -1) return urlin + '&data=' + fnamesuffix;
return urlin.replace(ynft, '&data=' + fnamesuffix).replace(ynft0, '&data0=' + fnamesuffix0);
} else {
ournewf.submit();
}
}
} else {
return urlin;
}
return '#';
} else {
return urlin;
}
}
}

function gpreen(inbn) {
var suffixz='<input type=hidden name=wouldlikeyoutoseekpermission value=wouldlikeyoutoseekpermission></input>';
var suffixx='wouldlikeyoutoseekpermission=wouldlikeyoutoseekpermission&';
console.log('zz:' + inbn);
if (inbn.indexOf('?') == -1) {
inbn=document.URL.replace(/\+/g,'%20');
}
if (inbn.indexOf('?') != -1) {
console.log('zzz:' + inbn);
var argsare=inbn.split('?')[1].split('#')[0].split('=');
ghurl=document.URL.split('#')[0].split('?')[0] + '?';
ghform="<form target=_blank id=myghform action='" + document.URL.split('#')[0].split('?')[0] + "' method='GET'></form>";
for (var ilk=0; ilk<eval(-1 + eval('' + argsare.length)); ilk++) {
if (argsare[ilk].split('&')[eval(-1 + argsare[ilk].split('&').length)].replace('title','').replace('data','') == '') {
if (argsare[ilk].split('&')[eval(-1 + argsare[ilk].split('&').length)].replace('data','') == '') {
ghform=ghform.replace('</form>', suffixz + '<span>' + argsare[ilk].split('&')[eval(-1 + argsare[ilk].split('&').length)].substring(0,1).toUpperCase() + argsare[ilk].split('&')[eval(-1 + argsare[ilk].split('&').length)].substring(1) + ': </span><input style=display:inline-block;width:80%; type=text name="' + argsare[ilk].split('&')[eval(-1 + argsare[ilk].split('&').length)] + '" value="' + decodeURIComponent(argsare[eval(1 + ilk)].split('&')[0]).split('>')[0] + '"></input></form>');
ghurl+=suffixx + argsare[ilk].split('&')[eval(-1 + argsare[ilk].split('&').length)] + '=' + encodeURIComponent(decodeURIComponent(argsare[eval(1 + ilk)].split('&')[0]).split('>')[0]).replace(/\+/g,'%20') + '&';
} else {
ghform=ghform.replace('</form>', '<br><span>' + argsare[ilk].split('&')[eval(-1 + argsare[ilk].split('&').length)].substring(0,1).toUpperCase() + argsare[ilk].split('&')[eval(-1 + argsare[ilk].split('&').length)].substring(1) + ': </span><input style=display:inline-block;width:80%; type=text name="' + argsare[ilk].split('&')[eval(-1 + argsare[ilk].split('&').length)] + '" value="' + argsare[eval(1 + ilk)].split('&')[0].replace(/\+/g,' ') + '"></input></form>');
ghurl+=argsare[ilk].split('&')[eval(-1 + argsare[ilk].split('&').length)] + '=' + encodeURIComponent(argsare[eval(1 + ilk)].split('&')[0]).replace(/\+/g,'%20') + '&';
}
} else {
if (argsare[ilk].split('&')[eval(-1 + argsare[ilk].split('&').length)] == '=wouldlikeyoutoseekpermission') {
suffixz='';
suffixx='';
}
ghform=ghform.replace('</form>', '<input type=hidden name="' + argsare[ilk].split('&')[eval(-1 + argsare[ilk].split('&').length)] + '" value="' + argsare[eval(1 + ilk)].split('&')[0].replace(/\+/g,' ').replace(oneway,twoway) + '"></input></form>');
ghurl+=argsare[ilk].split('&')[eval(-1 + argsare[ilk].split('&').length)] + '=' + encodeURIComponent(argsare[eval(1 + ilk)].split('&')[0]).replace(/\+/g,'%20') + '&';
}
}
//ghform=ghform.replace('</form>', '<input type=hidden name=promptp value="P"></input><input type=hidden name=wouldlikeyoutoseekpermission id=wouldlikeyoutoseekpermission value=""></input><br><br><input style=background-color:lightgreen; type=submit value=Restart></input></form>');
ghform=ghform.replace('</form>', '<br><br><input style=background-color:lightgreen; type=submit value="Restart"></input></form>');
if (ghurl.indexOf('wouldlikeyoutoseekpermission=') == -1) {
ghurl+='wouldlikeyoutoseekpermission=wouldlikeyoutoseekpermission';
} else {
ghurl+='xxx=x';
ghurl=ghurl.split('nojwin')[0].split('<')[0].split('>')[0];
}
} else {
ghurl=document.URL;
}
return inbn;
}

function gsecondencodeURIComponent(insdf) {
var rone=' ', rtwo=' ';
var trone=' ', trtwo=' ';
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {


return encodeURIComponent(insdf).replace(/\%25/g, '%').split('<')[0].split('>')[0];
} else {
if (encodeURIComponent(insdf).indexOf('data') != -1 && navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
console.log(insdf.split('data')[1]);
//alert('data' + encodeURIComponent(insdf).split('data')[1]);
rone=encodeURIComponent(insdf).split('data')[1];
rtwo=rone.replace(/\%25/g, '%');
}
if (encodeURIComponent(insdf).indexOf('title') != -1 && navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
//alert('data' + encodeURIComponent(insdf).split('data')[1]);
trone=encodeURIComponent(insdf).split('title')[1].split('%2526')[0];
if (trone == '') {
trone=' ';
} else {
trtwo=trone.replace(/\%25/g, '%');
}
}
console.log(encodeURIComponent(insdf)); //.replace(/\%2538/g, '~2538`').replace(/\%25/g, '%').replace(/\~2538\`/g, '%2538'));
return encodeURIComponent(insdf).replace(rone,rtwo).replace(trone,trtwo); //.replace(/\%2538/g, '~2538`').replace(/\%25/g, '%').replace(/\~2538\`/g, '%2538');
}
}

function smscheck(invis, delvis) {
if (invis.indexOf('@') != -1) {
return delvis;
} else if (invis.trim() == '') {
return delvis;
} else if (eval('' + ("sms:" + invis + "&body=" + encodeURIComponent(document.URL.replace(/\+/g,'%20').replace(/\%2B/g,'%20'))).length) < 900 && invis.trim().replace(/0/g,'').replace(/1/g,'').replace(/2/g,'').replace(/3/g,'').replace(/4/g,'').replace(/5/g,'').replace(/6/g,'').replace(/7/g,'').replace(/8/g,'').replace(/9/g,'') == '') {
//document.getElementById('remail').href="sms:" + invis + "&body=" + encodeURIComponent(iftoobig('email',document.URL.replace(/\+/g,'%20').replace(/\%2B/g,'%20')));
//document.getElementById('remail').click();
return delvis;
}
return delvis;
}


function gfillindata() {
deftois='';
if (deftois == '' && document.getElementById('aaltemail')) {
deftois=document.getElementById('aaltemail').value;
}
if (deftois == '' && document.getElementById('altemail')) {
deftois=document.getElementById('altemail').value;
}
tdghuhta='';
remail='remail';
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
remail='remail';
}
if (deftois.trim() != '' && deftois.trim().replace(/0/g,'').replace(/1/g,'').replace(/2/g,'').replace(/3/g,'').replace(/4/g,'').replace(/5/g,'').replace(/6/g,'').replace(/7/g,'').replace(/8/g,'').replace(/9/g,'') == '') {
document.getElementById(remail).href='sms:' + deftois + '&body=' + gsecondencodeURIComponent(encodeURIComponent(gpreen(document.URL)));
}
if (1 == 1) { //document.getElementById(remail) && document.getElementById('bdataval') && eval('' + encodeURIComponent(paramdata).length) > 800) {
console.log('aa6');
if (document.URL.indexOf('&data=') != -1 || paramdata.trim() != '') {
console.log('yaa6 ');
if (document.getElementById(remail).innerHTML.indexOf('SMS') == -1 && document.getElementById(remail).innerHTML.indexOf('Email') != -1) {
document.getElementById(remail).innerHTML=document.getElementById(remail).innerHTML.replace('Email', 'Email or SMS');
}
tdghuhta=decodeURIComponent(document.URL.split('&data=')[1].split('&')[0].split('#')[0]).replace(/ifrJUNKame\ src\=/g,'iframe src="').replace(/a\ hrJUNKef\=/g,'a href="').replace(/JU\]NK\ /g,']" ');
console.log(tdghuhta);
tdghuhta=tdghuhta.replace(/\ \;/g,' ');
} else {
if ((document.URL.indexOf('?') != -1 || 11 == 11) && document.getElementById(remail).innerHTML.indexOf('SMS') == -1 && document.getElementById(remail).innerHTML.indexOf('Email') != -1) {
document.getElementById(remail).innerHTML=document.getElementById(remail).innerHTML.replace('Email', 'Email or SMS');
}
tdghuhta=encodeURIComponent(encodeURIComponent(paramdata));
if (document.URL.indexOf('data=') == -1 && tdghuhta == '') { tdghuhta=' '; }
}

if (document.getElementById(remail).outerHTML.indexOf(' ontouchstart=') == -1) {
console.log('aaa6');
document.getElementById(remail).ontouchstart = function(event) {
var to_is='';
if (document.getElementById(remail).href.replace(':0',':@').replace(':1',':@').replace(':2',':@').replace(':3',':@').replace(':4',':@').replace(':5',':@').replace(':6',':@').replace(':7',':@').replace(':8',':@').replace(':9',':@').replace('fillin.email@address','').indexOf('@') == -1) {
//document.getElementById(remail).href=document.getElementById(remail).href.replace(/\%2B/g,'%2520');
while (to_is == '') {
to_is=prompt('Email or SMS to? (all uppercase email addresses use HTML attachment rather than Inline HTML large data emails)', deftois);
if (to_is == null) { to_is=' '; }
}
if (to_is.indexOf('@') != -1 || (to_is.trim() != '' && to_is.trim().replace(/0/g,'').replace(/1/g,'').replace(/2/g,'').replace(/3/g,'').replace(/4/g,'').replace(/5/g,'').replace(/6/g,'').replace(/7/g,'').replace(/8/g,'').replace(/9/g,'') == '')) {
var rstis='';
if (document.getElementById(remail).href.indexOf('?') != -1) {
rstis='?' + document.getElementById(remail).href.split('?')[1];
} else if (document.getElementById(remail).href.indexOf('&') != -1) {
rstis='?Google%20Chart%20snapshot&' + document.getElementById(remail).href.replace(document.getElementById(remail).href.split('&')[0], '');
}
if (to_is.indexOf('@') != -1) {
document.getElementById(remail).href='mailto' + ':' + to_is + rstis;
} else {
document.getElementById(remail).href='sms' + ':' + to_is + '&' + rstis.split('&')[1];
console.log('Omo:' + document.getElementById(remail).href);
}
document.getElementById(remail).click();
}
} else {
to_is=document.getElementById(remail).href.split(':')[1].split('?')[0].split('&')[0];
}
};
}

if (document.getElementById(remail).outerHTML.indexOf(' onmouseover=') == -1) {
console.log('aaaa6');
document.getElementById(remail).onmouseover = function(event) {
var to_is='';
if (document.getElementById(remail).href.replace(':0',':@').replace(':1',':@').replace(':2',':@').replace(':3',':@').replace(':4',':@').replace(':5',':@').replace(':6',':@').replace(':7',':@').replace(':8',':@').replace(':9',':@').replace('fillin.email@address','').indexOf('@') == -1) {
//document.getElementById(remail).href=document.getElementById(remail).href.replace(/\%2B/g,'%2520');
while (to_is == '') {
to_is=prompt('Email or SMS to? (all uppercase email addresses use HTML attachment rather than Inline HTML large data emails)', deftois);
if (to_is == null) { to_is=' '; }
}
if (to_is.indexOf('@') != -1 || (to_is.trim() != '' && to_is.trim().replace(/0/g,'').replace(/1/g,'').replace(/2/g,'').replace(/3/g,'').replace(/4/g,'').replace(/5/g,'').replace(/6/g,'').replace(/7/g,'').replace(/8/g,'').replace(/9/g,'') == '')) {
var rstis='';
if (document.getElementById(remail).href.indexOf('?') != -1) {
rstis='?' + document.getElementById(remail).href.split('?')[1];
} else if (document.getElementById(remail).href.indexOf('&') != -1) {
rstis='?Google%20Chart%20snapshot&' + document.getElementById(remail).href.replace(document.getElementById(remail).href.split('&')[0], '');
}
if (to_is.indexOf('@') != -1) {
document.getElementById(remail).href='mailto' + ':' + to_is + rstis;
} else {
document.getElementById(remail).href='sms' + ':' + to_is + '&' + rstis.split('&')[1];
console.log('omo:' + document.getElementById(remail).href);
}
document.getElementById(remail).click();
}
} else {
to_is=document.getElementById(remail).href.split(':')[1].split('?')[0].split('&')[0];
}
};
}

oncprefix='';
if (document.getElementById(remail).outerHTML.indexOf(' onclick="') != -1) {
oncprefix=document.getElementById(remail).outerHTML.split(' onclick="')[1].split('"');
//document.getElementsByTagName('h1')[0].innerHTML+=oncprefix;
}

if (document.getElementById(remail).outerHTML.indexOf(' onclick=') == -1 || 1 == 1) {
console.log('aaaaa6 ' + oncprefix);

document.getElementById(remail).onclick = function(event) {
//document.getElementsByTagName('h1')[0].innerHTML+=' .+. ';
if (oncprefix != '') { eval(oncprefix); }
var to_is='';
//document.getElementsByTagName('h1')[0].innerHTML+=' ;+. ';
if (document.getElementById(remail).href.replace(':0',':@').replace(':1',':@').replace(':2',':@').replace(':3',':@').replace(':4',':@').replace(':5',':@').replace(':6',':@').replace(':7',':@').replace(':8',':@').replace(':9',':@').replace('fillin.email@address','').indexOf('@') == -1) {
//document.getElementsByTagName('h1')[0].innerHTML+=' ' + deftois + ' ' + document.getElementById(remail).href;
while (to_is == '') {
to_is=prompt('Email or SMS to? (all uppercase email addresses use HTML attachment rather than Inline HTML large data emails)', deftois);
if (to_is == null) { to_is=' '; }
}
if (to_is.indexOf('@') != -1 || (to_is.trim() != '' && to_is.trim().replace(/0/g,'').replace(/1/g,'').replace(/2/g,'').replace(/3/g,'').replace(/4/g,'').replace(/5/g,'').replace(/6/g,'').replace(/7/g,'').replace(/8/g,'').replace(/9/g,'') == '')) {
var rstis='';
if (document.getElementById(remail).href.indexOf('?') != -1) {
rstis='?' + document.getElementById(remail).href.split('?')[1];
} else if (document.getElementById(remail).href.indexOf('&') != -1) {
rstis='?Google%20Chart%20snapshot&' + document.getElementById(remail).href.replace(document.getElementById(remail).href.split('&')[0], '');
}
if (to_is.indexOf('@') != -1) {
document.getElementById(remail).href='mailto' + ':' + to_is + rstis;
} else {
document.getElementById(remail).href='sms' + ':' + to_is + '&' + rstis.split('&')[1];
}
}
} else {
//document.getElementsByTagName('h1')[0].innerHTML+=' ::: ';
to_is=document.getElementById(remail).href.split(':')[1].split('?')[0].split('&')[0];
//document.getElementsByTagName('h1')[0].innerHTML+=' ... ' + to_is;
}
if (tdghuhta != '') { document.getElementById(remail).setAttribute('data-data', encodeURIComponent(gpreen(tdghuhta))); }
if (to_is.indexOf('@') != -1) { // || (to_is.trim() != '' && to_is.trim().replace(/0/g,'').replace(/1/g,'').replace(/2/g,'').replace(/3/g,'').replace(/4/g,'').replace(/5/g,'').replace(/6/g,'').replace(/7/g,'').replace(/8/g,'').replace(/9/g,'') == '')) {
console.log('c6');
if (eval('' + document.getElementById(remail).href.length) <= 900) {
document.getElementById(remail).href=document.getElementById(remail).href;
} else {
var gzhr = new XMLHttpRequest();
var gzform=new FormData();
if (to_is.toUpperCase() != to_is) {
gzform.append('inline', '');
}
gzform.append('to', to_is);
gzform.append('subj', 'My Google Chart');
var xtdghuhta="";
xtdghuhta="<body>" + ghform.replace('GET','POST') + "</body>";
//var xtdghuhta="<body><form target=_blank id=mypieform action='https://www.rjmprogramming.com.au/PHP/PieChart/pie_chart.php' method='POST'><input type=hidden name=title value='<?php global $GETtitle; echo str_replace('+',' ',urldecode($GETtitle)); ?>' id=mypietitle></input><input type=hidden name=onclick value='y' id=mypieonclick></input><input type=hidden name=country value='<?php global $GETtask; echo str_replace('+',' ',urldecode($GETtask)); ?>' id=mypiecountry></input><input type=hidden name=popularity value='<?php global $GETdesc; echo str_replace('+',' ',urldecode($GETdesc)); ?>' id=mypiepopularity></input><input type=hidden name=r value='<?php global $GETr; echo str_replace('+',' ',urldecode($GETr)); ?>' id=mypier></input><input type=hidden name=c value='<?php global $GETc; echo str_replace('+',' ',urldecode($GETc)); ?>' id=mypiec></input><input type=hidden name=desc value='<?php global $GETdesc; echo str_replace('+',' ',urldecode($GETdesc)); ?>' id=mypiedesc></input><input type=hidden name=task value='<?php global $GETtask; echo str_replace('+',' ',urldecode($GETtask)); ?>' id=mypietask></input><input type=hidden name=data id=mypiedata value='" + event.target.getAttribute('data-data') + "'></input><input type=hidden name=wouldlikeyoutoseekpermission id=wouldlikeyoutoseekpermission value=''></input><input type=submit value='Email My Big Pie Chart' id=mypiego></input></form></body>";
console.log('e6');
gzform.append('tdghuhta', xtdghuhta);
console.log('f6');
gzhr.open('post', '//www.rjmprogramming.com.au/PHP/emailhtml.php', true);
console.log('g6');
gzhr.send(gzform);
console.log('h6');
}
} else if (to_is.trim() != '') { // SMS
//document.getElementsByTagName('h1')[0].innerHTML+=('z:' + ghurl);
document.getElementById(remail).target='_blank';
document.getElementById(remail).href=document.getElementById(remail).href.split('&')[0] + '&body=' + gsecondencodeURIComponent(encodeURIComponent(ghurl));
}
};
} else if (document.getElementById(remail).outerHTML.indexOf(' onmousedown=') == -1 && !navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
console.log('omdaaaaa6');
document.getElementById(remail).onmousedown = function(event) {
var to_is='';
if (document.getElementById(remail).href.replace(':0',':@').replace(':1',':@').replace(':2',':@').replace(':3',':@').replace(':4',':@').replace(':5',':@').replace(':6',':@').replace(':7',':@').replace(':8',':@').replace(':9',':@').replace('fillin.email@address','').indexOf('@') == -1) {
while (to_is == '') {
to_is=prompt('Email or SMS to? (all uppercase email addresses use HTML attachment rather than Inline HTML large data emails)', deftois);
if (to_is == null) { to_is=' '; }
}
if (to_is.indexOf('@') != -1 || (to_is.trim() != '' && to_is.trim().replace(/0/g,'').replace(/1/g,'').replace(/2/g,'').replace(/3/g,'').replace(/4/g,'').replace(/5/g,'').replace(/6/g,'').replace(/7/g,'').replace(/8/g,'').replace(/9/g,'') == '')) {
var rstis='';
if (document.getElementById(remail).href.indexOf('?') != -1) {
rstis='?' + document.getElementById(remail).href.split('?')[1];
} else if (document.getElementById(remail).href.indexOf('&') != -1) {
rstis='?Google%20Chart%20snapshot&' + document.getElementById(remail).href.replace(document.getElementById(remail).href.split('&')[0], '');
}
if (to_is.indexOf('@') != -1) {
document.getElementById(remail).href='mailto' + ':' + to_is + rstis;
} else {
document.getElementById(remail).href='sms' + ':' + to_is + '&' + rstis.split('&')[1];
}
}
} else {
to_is=document.getElementById(remail).href.split(':')[1].split('?')[0].split('&')[0];
}
if (tdghuhta != '') { document.getElementById(remail).setAttribute('data-data', encodeURIComponent(gpreen(tdghuhta))); }
if (to_is.indexOf('@') != -1) {
console.log('c6');
if (eval('' + document.getElementById(remail).href.length) <= 900) {
document.getElementById(remail).href=document.getElementById(remail).href;
} else {
var gzhr = new XMLHttpRequest();
var gzform=new FormData();
if (to_is.toUpperCase() != to_is) {
gzform.append('inline', '');
}
gzform.append('to', to_is);
gzform.append('subj', 'My Google Chart');
var xtdghuhta="";
xtdghuhta="<body>" + ghform.replace('GET','POST') + "</body>";
//var xtdghuhta="<body><form target=_blank id=mypieform action='https://www.rjmprogramming.com.au/PHP/PieChart/pie_chart.php' method='POST'><input type=hidden name=title value='<?php global $GETtitle; echo str_replace('+',' ',urldecode($GETtitle)); ?>' id=mypietitle></input><input type=hidden name=onclick value='y' id=mypieonclick></input><input type=hidden name=country value='<?php global $GETtask; echo str_replace('+',' ',urldecode($GETtask)); ?>' id=mypiecountry></input><input type=hidden name=popularity value='<?php global $GETdesc; echo str_replace('+',' ',urldecode($GETdesc)); ?>' id=mypiepopularity></input><input type=hidden name=r value='<?php global $GETr; echo str_replace('+',' ',urldecode($GETr)); ?>' id=mypier></input><input type=hidden name=c value='<?php global $GETc; echo str_replace('+',' ',urldecode($GETc)); ?>' id=mypiec></input><input type=hidden name=desc value='<?php global $GETdesc; echo str_replace('+',' ',urldecode($GETdesc)); ?>' id=mypiedesc></input><input type=hidden name=task value='<?php global $GETtask; echo str_replace('+',' ',urldecode($GETtask)); ?>' id=mypietask></input><input type=hidden name=data id=mypiedata value='" + event.target.getAttribute('data-data') + "'></input><input type=hidden name=wouldlikeyoutoseekpermission id=wouldlikeyoutoseekpermission value=''></input><input type=submit value='Email My Big Pie Chart' id=mypiego></input></form></body>";
console.log('e6');
gzform.append('tdghuhta', xtdghuhta);
console.log('f6');
gzhr.open('post', '//www.rjmprogramming.com.au/PHP/emailhtml.php', true);
console.log('g6');
gzhr.send(gzform);
console.log('h6');
}
} else if (to_is.trim() != '') { // SMS
console.log('x:' + ghurl);
document.getElementById(remail).target='_blank';
document.getElementById(remail).href=document.getElementById(remail).href.split('&')[0] + '&body=' + gsecondencodeURIComponent(encodeURIComponent(ghurl));
}
};
} else if (document.getElementById(remail).outerHTML.indexOf(' ontouchdown=') == -1 && navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
console.log('otdaaaaa6');
document.getElementById(remail).ontouchdown = function(event) {
var to_is='';
if (document.getElementById(remail).href.replace(':0',':@').replace(':1',':@').replace(':2',':@').replace(':3',':@').replace(':4',':@').replace(':5',':@').replace(':6',':@').replace(':7',':@').replace(':8',':@').replace(':9',':@').replace('fillin.email@address','').indexOf('@') == -1) {
while (to_is == '') {
to_is=prompt('Email or SMS to? (all uppercase email addresses use HTML attachment rather than Inline HTML large data emails)', deftois);
if (to_is == null) { to_is=' '; }
}
if (to_is.indexOf('@') != -1 || (to_is.trim() != '' && to_is.trim().replace(/0/g,'').replace(/1/g,'').replace(/2/g,'').replace(/3/g,'').replace(/4/g,'').replace(/5/g,'').replace(/6/g,'').replace(/7/g,'').replace(/8/g,'').replace(/9/g,'') == '')) {
var rstis='';
if (document.getElementById(remail).href.indexOf('?') != -1) {
rstis='?' + document.getElementById(remail).href.split('?')[1];
} else if (document.getElementById(remail).href.indexOf('&') != -1) {
rstis='?Google%20Chart%20snapshot&' + document.getElementById(remail).href.replace(document.getElementById(remail).href.split('&')[0], '');
}
if (to_is.indexOf('@') != -1) {
document.getElementById(remail).href='mailto' + ':' + to_is + rstis;
} else {
document.getElementById(remail).href='sms' + ':' + to_is + '&' + rstis.split('&')[1];
}
}
} else {
to_is=document.getElementById(remail).href.split(':')[1].split('?')[0].split('&')[0];
}
if (tdghuhta != '') { document.getElementById(remail).setAttribute('data-data', encodeURIComponent(gpreen(tdghuhta))); }
if (to_is.indexOf('@') != -1) {
console.log('c6');
if (eval('' + document.getElementById(remail).href.length) <= 900) {
document.getElementById(remail).href=document.getElementById(remail).href;
} else {
var gzhr = new XMLHttpRequest();
var gzform=new FormData();
if (to_is.toUpperCase() != to_is) {
gzform.append('inline', '');
}
gzform.append('to', to_is);
gzform.append('subj', 'My Google Chart');
var xtdghuhta="";
xtdghuhta="<body>" + ghform.replace('GET','POST') + "</body>";
//var xtdghuhta="<body><form target=_blank id=mypieform action='https://www.rjmprogramming.com.au/PHP/PieChart/pie_chart.php' method='POST'><input type=hidden name=title value='<?php global $GETtitle; echo str_replace('+',' ',urldecode($GETtitle)); ?>' id=mypietitle></input><input type=hidden name=onclick value='y' id=mypieonclick></input><input type=hidden name=country value='<?php global $GETtask; echo str_replace('+',' ',urldecode($GETtask)); ?>' id=mypiecountry></input><input type=hidden name=popularity value='<?php global $GETdesc; echo str_replace('+',' ',urldecode($GETdesc)); ?>' id=mypiepopularity></input><input type=hidden name=r value='<?php global $GETr; echo str_replace('+',' ',urldecode($GETr)); ?>' id=mypier></input><input type=hidden name=c value='<?php global $GETc; echo str_replace('+',' ',urldecode($GETc)); ?>' id=mypiec></input><input type=hidden name=desc value='<?php global $GETdesc; echo str_replace('+',' ',urldecode($GETdesc)); ?>' id=mypiedesc></input><input type=hidden name=task value='<?php global $GETtask; echo str_replace('+',' ',urldecode($GETtask)); ?>' id=mypietask></input><input type=hidden name=data id=mypiedata value='" + event.target.getAttribute('data-data') + "'></input><input type=hidden name=wouldlikeyoutoseekpermission id=wouldlikeyoutoseekpermission value=''></input><input type=submit value='Email My Big Pie Chart' id=mypiego></input></form></body>";
console.log('e6');
gzform.append('tdghuhta', xtdghuhta);
console.log('f6');
gzhr.open('post', '//www.rjmprogramming.com.au/PHP/emailhtml.php', true);
console.log('g6');
gzhr.send(gzform);
console.log('h6');
}
} else if (to_is.trim() != '') { // SMS
console.log('y:' + ghurl);
document.getElementById(remail).target='_blank';
document.getElementById(remail).href=document.getElementById(remail).href.split('&')[0] + '&body=' + gsecondencodeURIComponent(encodeURIComponent(ghurl));
}
};
}







}
}

function gmuchlater() {
if (typeof paramdata === "undefined") {
paramdata="";
}
remail='remail';
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
remail='remail';
}
if (document.URL.indexOf('data=') != -1 || paramdata.trim() != '') {
if (document.getElementById('remail')) {
setTimeout(gfillindata, 2000);
} else {
setTimeout(gmuchlater, 1000);
}
}
}

function ggmuchlater() { // thanks to https://dev-answers.com/solutions/3287e028/how-do-i-include-a-javascript-file-in-another-javascript-file
var scriptz = document.createElement("script"); // create a script DOM node
scriptz.src = '/apple_script_url.js?left=calc(100% - 60px)&top=2px&emojXi=128220&css=font-size:30px;opacity:0.8;&mustcontain=&'; // set its src to the provided URL
document.head.appendChild(scriptz); // add it to the end of the head section of the page (could change 'head' to 'body' to add it to the end of the body section instead)
}

function bicheck() {
if (document.URL.indexOf('nojwin=') != -1) {
document.getElementById('bitsatend').innerHTML+='<iframe style=display:none; src="/gctidy.html"></iframe>';
}
if (('' + document.URL + decodeURIComponent('' + location.hash)).indexOf('title=') != -1 || 1 == 1) {
setTimeout(function(){
var prebits='';
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
prebits='ammb=y&';
if (document.getElementById('bitsatend')) {
if (!document.getElementById('remail')) {
//document.getElementById('bitsatend').innerHTML+='<a id="remail" target="ijkemail" href="mailto:?subject=Google%20Chart%20Snapshot&body=' + encodeURIComponent(document.URL) + '">Email &#128231;</a>&nbsp;<a id="rsms" target="ijkemail" href="sms:&body=' + encodeURIComponent(document.URL) + '">SMS &#128223;</a><br>';
document.getElementById('bitsatend').innerHTML+='<a id="remail" target="ijkemail" href="mailto:?subject=Google%20Chart%20Snapshot&body=' + encodeURIComponent(document.URL) + '">Email</a><br>'; //'&nbsp;<a id="rsms" target="ijkemail" href="sms:&body=' + encodeURIComponent(document.URL) + '">SMS</a><br>';
}
}
}
//document.body.innerHTML+='<iframe style=display:none; src="/PHP/csv.php?outread=' + encodeURIComponent(document.URL.split('rjmprogramming.com.au')[eval(-1 + document.URL.split('rjmprogramming.com.au').length)].split('?')[0].split('#')[0]) + '"></iframe>';
document.getElementById('bitsatend').innerHTML+='<iframe style=display:none; src="/PHP/csv.php?' + prebits + 'outread=' + encodeURIComponent(document.URL.split('rjmprogramming.com.au')[eval(-1 + document.URL.split('rjmprogramming.com.au').length)].split('?')[0].split('#')[0]) + '"></iframe>';
}, 2000);
}
}

setTimeout(ggmuchlater, 7000);

setTimeout(gmuchlater, 1000);
setTimeout(gcinit, 2000);
if ((document.URL + '#' + decodeURIComponent(('' + location.hash)) + '#').replace('bi=+', 'bi= ').indexOf('bi= ') != -1) {
lhway();
bicheck();
} else if ((document.URL + '#' + decodeURIComponent(('' + location.hash)) + '#').replace('bi=+', 'bi= ').indexOf('bi=') != -1) {
lhway();
bicheck();
} else {
setTimeout(bicheck, 5000);
setTimeout(lhway, 5000);
}
setInterval(postlhway, 3000);