// 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 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 pnum=1, lastfi=false; var issatisfied=false; var satisfiedvalue=null; var isSafari = /Safari/.test(navigator.userAgent) && /Apple Computer/.test(navigator.vendor); var emailtitle = 'Email Attachment Title suffixes are &ema' + 'ilto=[emailTo] &emailsubject=[EmailSubject] '; // var xpnum=1; // done back at supervisor // var allowed=true; // done back at supervisor var ghurl=''; var ghform=''; var tdghuhta=''; var oncprefix=''; var remail='remail'; var deftois=''; if (document.URL.indexOf('nojwin') != -1) { // || navigator.userAgent.match(/iPhone|iPad/i)) { var prompt = function(zwords, 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 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('
').length > eval('0' + document.getElementById('prompt').rows)) { document.getElementById('prompt').rows=zwords.split('
').length; } document.getElementById('val' + pnum).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 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 < 800) return inup; var pform='
'; var pars=inup.replace('?','&').split('#')[0].split('&'); for (var ipars=1; ipars', ''); } else { pform=pform.replace('', ''); } } document.body.innerHTML+=pform; //alert(pform.split(' name="task"')[1]); setTimeout(alatr, 2000); //document.getElementById('psubm').click(); return '#'; } function depends(ins) { if (ins == "") return wisWebView; return ins; } function getH1s(evt) { var rest = '', rests, restss, brest='?justmenu=justmenu', nojx=''; 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 + "Email snapshot to:    
"; } } else { if (document.body.innerHTML.indexOf("mail" + "to:") == -1 && document.body.innerHTML.indexOf(">E" + "mail") == -1) { document.body.innerHTML = document.body.innerHTML + "  
"; 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 bae = document.getElementById('bitsatend'); var prebae=''; if (document.getElementById('thedivemail')) { prebae='
' + emailtitle + '
'; } var nojx='',rest = '', rests, restss, brest='?justmenu=justmenu'; 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 (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"; } } } 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 + "  Menu  Email snapshot of Google Chart to:    
"; if (document.URL.indexOf('?') == -1) { setTimeout(gfillindata,1); pausecomp(1000); } } else { document.body.innerHTML = document.body.innerHTML + prebae + "  Menu  Email snapshot of Google Chart to:    
"; if (document.URL.indexOf('?') == -1) { setTimeout(gfillindata,1); pausecomp(1000); } } } } else { if (document.body.innerHTML.indexOf("MAIL" + "TO:") == -1 && document.body.innerHTML.indexOf(">E" + "mail") == -1) { if (bae != null) { bae.innerHTML+=prebae + "  Menu  Email snapshot of Google Chart ...  
"; if (document.URL.indexOf('?') == -1) { setTimeout(gfillindata,1); pausecomp(1000); } } else { document.body.innerHTML = document.body.innerHTML + prebae + "  Menu  Email snapshot of Google Chart ...  
"; if (document.URL.indexOf('?') == -1) { 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+="  Menu"; } else { document.body.innerHTML = document.body.innerHTML + "  Menu"; } } 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 makeright(inbo) { if (typeof documentURL === "undefined") { inbo=inbo; } else { if (documentURL.indexOf('&') != -1 && inbo.indexOf('') != -1) { inbo=inbo.replace('', + ' function dub() { ' + " documentURL=\"" + documentURL + "\"; if (documentURL.indexOf(\"&data=\") != -1) { paramdata=(documentURL + \"&\").split(\"&data=\")[1].split(\"&\")[0]; pardata=encodeURIComponent(paramdata); } } " + ' '); } else { inbo+=' function dub() { ' + " documentURL=\"" + documentURL + "\"; if (documentURL.indexOf(\"&data=\") != -1) { paramdata=(documentURL + \"&\").split(\"&data=\")[1].split(\"&\")[0]; pardata=encodeURIComponent(paramdata); } } " + ' '; } if (inbo.split('')[0].indexOf(' onload=') == -1) { return inbo.replace('' + document.head.innerHTML + makeright(document.body.outerHTML.split('
')[0]) + ''; document.getElementById('thehtml').value=hcis.replace(/" + "\\" + "+/g,'%2b').replace('" + nogo + "','" + yesgo + "').replace('" + emailtitle + "',''); return true; }\" style='display:none;' id=theformemail method=POST action=../webviewemail.php>"; tde+=" "; tde+=" "; tde+=" "; tde+=" "; tde+=" "; tde+=" "; tde+="
"; tde+=" "; document.getElementById('thedivemail').innerHTML=tde; if (thetoprefix.indexOf('@') != -1) { 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 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'); } if (document.URL.indexOf('&data=') == -1) { console.log('paramdata=' + paramdata); tdghuhta=decodeURIComponent(('' + paramdata).split('&')[0].split('#')[0]).replace(/ifrJUNKame\ src\=/g,'iframe src="').replace(/a\ hrJUNKef\=/g,'a href="').replace(/JU\]NK\ /g,']" '); } else { 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="" + ghform.replace('GET','POST') + ""; //var xtdghuhta="
' id=mypietitle>' id=mypiecountry>' id=mypiepopularity>' id=mypier>' id=mypiec>' id=mypiedesc>' id=mypietask>
"; 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="" + ghform.replace('GET','POST') + ""; //var xtdghuhta="
' id=mypietitle>' id=mypiecountry>' id=mypiepopularity>' id=mypier>' id=mypiec>' id=mypiedesc>' id=mypietask>
"; 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="" + ghform.replace('GET','POST') + ""; //var xtdghuhta="
' id=mypietitle>' id=mypiecountry>' id=mypiepopularity>' id=mypier>' id=mypiec>' id=mypiedesc>' id=mypietask>
"; 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() != '' || 1 == 1) { if (document.getElementById('remail')) { setTimeout(gfillindata, 2000); } else { setTimeout(gmuchlater, 1000); } } } function ggmuchlater() { 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) } setTimeout(ggmuchlater, 7000); setTimeout(gmuchlater, 1000); setTimeout(gcinit, 2000);