// multipurpose_buttons.js // Help out multipurpose_buttons.html // January, 2021 var mappingsi=1; var mappingsin=[]; var mappingseval=[]; var mappingsout=[]; var lastmatch=''; var lastprecedes=''; var cpa=[0]; var cps=''; var evalcps=''; var dcnumx=''; var prevint=false; var dotsub=0; if (!String.fromCodePoint) { // thanks to http://xahlee.info/js/js_unicode_code_point.html // ES6 Unicode Shims 0.1 , © 2012 Steven Levithan , MIT License String.fromCodePoint = function fromCodePoint () { var chars = [], point, offset, units, i; for (i = 0; i < arguments.length; ++i) { point = arguments[i]; offset = point - 0x10000; units = point > 0xFFFF ? [0xD800 + (offset >> 10), 0xDC00 + (offset & 0x3FF)] : [point]; chars.push(String.fromCharCode.apply(null, units)); } return chars.join(""); } } // Thanks to https://ourcodeworld.com/articles/read/188/encode-and-decode-html-entities-using-pure-javascript (function(window){ window.htmlentities = { /** * Converts a string to its html characters completely. * * @param {String} str String with unescaped HTML characters **/ encode : function(str) { var buf = []; for (var i=str.length-1;i>=0;i--) { buf.unshift(['&#', str[i].charCodeAt(), ';'].join('')); } return buf.join(''); }, /** * Converts an html characterSet into its original character. * * @param {String} str htmlSet entities **/ mapencode : function(str) { if (mappingsin.indexOf('' + str) == -1) { return '' + str; } //alert('str=' + str); return '' + eval(mappingseval[mappingsin.indexOf('' + str)]); }, /** * Converts an html characterSet into its original character. * * @param {String} str htmlSet entities **/ mapdecode : function(str) { return str.replace(/&#(\d+);/g, function(match, dec) { var restis=[], irestis=0, cps='', evalcps='', xcps=String.fromCodePoint(cpa[0]); var idec=eval('' + match.replace('&#','').replace(';','')); evalcps=''; //cps=''; for (var ii=1; ii= 32 && eval('' + idec) < 128) { cpa=[0]; //if (prevint) { alert('interesting after match=' + match); } prevint=false; return String.fromCharCode(idec); } else if (cpa.indexOf('' + eval('' + match.replace('&#','').replace(';',''))) != -1) { prevint=false; return ''; } else if (lastprecedes.indexOf(match) != -1) { cpa=[0]; lastprecedes=''; prevint=false; return ''; } else if (match == lastmatch && match.indexOf('&#') != -1) { cpa=[0]; prevint=false; return ''; } else if (mappingsout.indexOf(xcps) == -1 && match.length > 6) { // � precedes � if (cpa[0] == 0) { cpa=[]; cps=String.fromCodePoint(eval('' + match.replace('&#','').replace(';',''))); evalcps='String.fromCodePoint(' + eval('' + match.replace('&#','').replace(';','')) + ')'; cpa.push('' + eval('' + match.replace('&#','').replace(';',''))); if (cnumx.substring(dotsub).indexOf(match + '&#') != -1) { dotsub+=cnumx.substring(dotsub).indexOf(match + '&#'); restis=('&#' + cnumx.split(match + '&#')[1]).split(';'); if ((match + ' precedes ' + restis[0] + ';') == lastprecedes) { prevint=false; return ''; } else { lastprecedes=(match + ' precedes ' + restis[0] + ';'); //alert(match + ' precedes ' + restis[0]); while ((restis[irestis] + ' ').replace('&#','').substring(0,1) >= '0' && (restis[irestis] + ' ').replace('&#','').substring(0,1) <= '9' && restis[irestis].length > 6) { //alert(restis[irestis]); if (irestis == 0 || evalcps.indexOf('' + eval('' + match.replace('&#','').replace(';',''))) == -1) { cps+=String.fromCodePoint(eval('' + restis[irestis].replace('&#','').replace(';',''))); evalcps=evalcps.replace(')', ',' + eval('' + restis[irestis].replace('&#','').replace(';','')) + ')'); cpa.push('' + eval('' + restis[irestis].replace('&#','').replace(';',''))); } else { //alert('huh'); prevint=false; return ''; } irestis++; } } } } else { cps=String.fromCodePoint(eval('' + match.replace('&#','').replace(';',''))); evalcps='String.fromCodePoint(' + eval('' + match.replace('&#','').replace(';','')) + ')'; cpa.push('' + eval('' + match.replace('&#','').replace(';',''))); //alert('why'); prevint=false; return ''; } if (mappingsout.indexOf(eval(evalcps)) != -1) { return mappingsin[mappingsout.indexOf(eval(evalcps))]; //String.fromCharCode(dec); } else { //mappingsout.push(cps); //alert('evalcps=' + evalcps); mappingsout.push(eval(evalcps)); mappingseval.push(evalcps); mappingsin.push(String.fromCharCode(mappingsi)); mappingsi++; //alert(evalcps + ' ' + match + ' ... ' + eval(evalcps) + ' ... ' + cnumx); } } else { if (match.indexOf('&#') != -1) { lastmatch=match; } prevint=true; return mappingsin[mappingsout.indexOf(eval(evalcps))]; //String.fromCharCode(dec); } //if (match.indexOf('&#') != -1) { lastmatch=match; } prevint=true; return mappingsin[eval(-1 + mappingsi)]; //String.fromCharCode(dec); }); }, /** * Converts an html characterSet into its original character. * * @param {String} str htmlSet entities **/ decode : function(str) { return str.replace(/&#(\d+);/g, function(match, dec) { return String.fromCharCode(dec); }); } }; })(window); /** * Create string from HTML entities */ String.fromHtmlEntities = function(strng) { return (strng+"").replace(/&#\d+;/gm,function(s) { return String.fromCharCode(s.match(/\d+/gm)[0]); }) }; var vsres=""; var newres=""; var wois=null; var gnewcl=''; var docwrite1=''; var docwrite2=''; var docwrite3=''; var xzhr=null; //new XMLHttpRequest(); var xform=null; //new FormData(); var etois=''; var gevent=null; var gval=''; var ourclicks=location.search.split('cclick=')[1] ? decodeURIComponent(location.search.split('cclick=')[1].split('&')[0]).replace(/\+/g,' ') : ""; var ouremail=location.search.split('cemail=')[1] ? decodeURIComponent(location.search.split('cemail=')[1].split('&')[0]).replace(/\+/g,' ') : ""; var ourcii=location.search.split('cii=')[1] ? decodeURIComponent(location.search.split('cii=')[1].split('&')[0]).replace(/\+/g,' ') : ""; var ourct=location.search.split('ct=')[1] ? decodeURIComponent(location.search.split('ct=')[1].split('&')[0]).replace(/\+/g,' ') : ""; var cmedianame=location.search.split('imedia=')[1] ? decodeURIComponent(location.search.split('imedia=')[1].split('&')[0]).replace(/\+/g,' ') : ""; var cmediacontent=''; var cnum=location.search.split('content=')[1] ? decodeURIComponent(location.search.split('content=')[1].split('&')[0]).replace(/\+/g,' ') : "1 2 3 " + String.fromCharCode(10) + "4 5 6 " + String.fromCharCode(10) + "7 8 9 "; cnum=cnum.replace(/\&\#55357\;/g,'').replace(/\&\#55356\;/g,''); // 56715 blue butterfly is okay ... why? for (var juy=10; juy<=127; juy++) { while (cnum.indexOf('&#' + juy + ';') != -1) { cnum=cnum.replace('&#' + juy + ';', String.fromCharCode(juy)); } } while (cnum.indexOf(' ' + String.fromCharCode(13) + String.fromCharCode(10)) != -1) { cnum=cnum.replace(' ' + String.fromCharCode(13) + String.fromCharCode(10), ' [13][10]'); } while (cnum.indexOf(' ' + String.fromCharCode(10) + String.fromCharCode(13)) != -1) { cnum=cnum.replace(' ' + String.fromCharCode(10) + String.fromCharCode(13), ' [10][13]'); } while (cnum.indexOf(' ' + String.fromCharCode(10)) != -1) { cnum=cnum.replace(' ' + String.fromCharCode(10), ' [10]'); } while (cnum.indexOf(' ' + String.fromCharCode(13)) != -1) { cnum=cnum.replace(' ' + String.fromCharCode(13), ' [13]'); } while (cnum.indexOf(String.fromCharCode(13) + String.fromCharCode(10)) != -1) { cnum=cnum.replace(String.fromCharCode(13) + String.fromCharCode(10), ' [13][10]'); } while (cnum.indexOf(String.fromCharCode(10) + String.fromCharCode(13)) != -1) { cnum=cnum.replace(String.fromCharCode(10) + String.fromCharCode(13), ' [10][13]'); } while (cnum.indexOf(String.fromCharCode(10)) != -1) { cnum=cnum.replace(String.fromCharCode(10), ' [10]'); } while (cnum.indexOf(String.fromCharCode(13)) != -1) { cnum=cnum.replace(String.fromCharCode(13), ' [13]'); } cnum=cnum.replace(/\[13\]\[10\]/g, String.fromCharCode(13) + String.fromCharCode(10)); cnum=cnum.replace(/\[10\]\[13\]/g, String.fromCharCode(10) + String.fromCharCode(13)); cnum=cnum.replace(/\[13\]/g, String.fromCharCode(13)); cnum=cnum.replace(/\[10\]/g, String.fromCharCode(10)); var origcnumx=cnum; //.trim(); var cnumx=cnum; //.trim(); var x=0, y=0, lastx=0,lasty=0; var propx=0.0, propy=0.0; var ifstr=" gval=gval; "; var ifstrone=" gval=gval; "; var maxlh=0; var rectis=null; var dci=false; var fbr=null; var reso=null, lastreso=''; var detailscount=1; var scriptstuff=''; var preso=''; var defname=''; var xname=''; var eventtargets=[]; var attachment=''; var imgd=null, imgh=-1, imgw=-1, altimgw=-1, altimgh=-1, two=2, twotwo=2, wasv='', firstgo=true, ewo=null, ewf=null, prevffs=-11, ffs=-1; var vtrue=true, twentythousand=20000, altsubject='', prevlastisaved='', prevlastvsaved='', prevlastasaved='', lastvsaved='', lastasaved='', lastisaved='', lastaudioname='', lastresult=''; var vsres='', zhr=null, zform=null, lastacnt=1, tgsps=[], tgspsop=[], newres='', preurl='', tgspsopwhat=[], cvis='', prevsv='', thissv='', haikusuffix='', lastu=''; cnumx=cnumx.replace(/\&\#55357\;/g,'').replace(/\&\#55356\;/g,''); for (var iuy=10; iuy<=127; iuy++) { while (cnumx.indexOf('&#' + iuy + ';') != -1) { cnumx=cnumx.replace('&#' + iuy + ';', String.fromCharCode(iuy)); } } //cnum="Cge return separators"; while (cnumx.indexOf(' ' + String.fromCharCode(13) + String.fromCharCode(10)) != -1) { cnumx=cnumx.replace(' ' + String.fromCharCode(13) + String.fromCharCode(10), ' '); } while (cnumx.indexOf(' ' + String.fromCharCode(10) + String.fromCharCode(13)) != -1) { cnumx=cnumx.replace(' ' + String.fromCharCode(10) + String.fromCharCode(13), ' '); } while (cnumx.indexOf(' ' + String.fromCharCode(10)) != -1) { cnumx=cnumx.replace(' ' + String.fromCharCode(10), ' '); } while (cnumx.indexOf(' ' + String.fromCharCode(13)) != -1) { cnumx=cnumx.replace(' ' + String.fromCharCode(13), ' '); } while (cnumx.indexOf(String.fromCharCode(13) + String.fromCharCode(10)) != -1) { cnumx=cnumx.replace(String.fromCharCode(13) + String.fromCharCode(10), ' '); } while (cnumx.indexOf(String.fromCharCode(10) + String.fromCharCode(13)) != -1) { cnumx=cnumx.replace(String.fromCharCode(10) + String.fromCharCode(13), ' '); } while (cnumx.indexOf(String.fromCharCode(10)) != -1) { cnumx=cnumx.replace(String.fromCharCode(10), ' '); } while (cnumx.indexOf(String.fromCharCode(13)) != -1) { cnumx=cnumx.replace(String.fromCharCode(13), ' '); } //alert('cnumx=' + cnumx); var ncnumx=noent(cnumx); var cnums=cnumx.replace(/\ /g,'').split(''); function plusent(inid) { if (noent(cnumx) != cnumx) { return eval(1 + eval('' + inid)); } else { return inid; } } function dnoent(ato) { var retato=''; retato='' + window.htmlentities.decode(('' + ato)).replace(/\&\#10133\;/g, '+').replace(/\&\#32\;/g, ' ').replace(/\&\#10\;/g, String.fromCharCode(10)).replace(/\&\#13\;/g, String.fromCharCode(10)); //.replace(/&#\d+;/gm,return function(s) { return String.fromCharCode(s.match(/\d+/gm)[0]; }); return retato; } function noent(ato) { var retato=''; //if (('' + ato).indexOf('➕') != -1) { // alert(String.fromHtmlEntities('jhgfjhg')); //} var xza=window.htmlentities.mapdecode(('' + ato)).replace(/\&\#10133\;/g, '+').replace(/\&\#32\;/g, ' ').replace(/\&\#10\;/g, String.fromCharCode(10)).replace(/\&\#13\;/g, String.fromCharCode(10)); retato='' + window.htmlentities.decode(('' + ato)).replace(/\&\#10133\;/g, '+').replace(/\&\#32\;/g, ' ').replace(/\&\#10\;/g, String.fromCharCode(10)).replace(/\&\#13\;/g, String.fromCharCode(10)); //.replace(/&#\d+;/gm,return function(s) { return String.fromCharCode(s.match(/\d+/gm)[0]; }); //alert('xza=' + xza); //if (xza != retato) { return xza; } retato=retato.replace(/\ \;/g, ' '); dncnumx=retato; for (var iii=0; iii')[0].split(''; if (wois) { wois.close(); wois=null; } if (!wois) { wois=window.open('', '_blank', 'left=50,top=50,width=600,height=600'); wois.document.write('' + document.getElementById(eventtarget).outerHTML + styleis + ''); } document.getElementById('cii').value+=',' + eventtarget; } function iclicked(event) { var isok=true, styleis='')[0].split(''; rectis=null; if (eventtargets.length > 0) { if (!event) { event=gevent; } event.target=eventtargets[eval(-1 + eventtargets.length)]; eventtargets.shift(); if (eventtargets.length > 0) { defineclick(event.target); return true; } } var allok=true; try { if (typeof event.target !== 'undefined') { allok=true; } } catch(enbfhg) { allok=false; } if (allok) { if (('' + event.target.id) == 'bxandy') { if (gval == '') { if (1 == 1) { clickidin('' + event.target.id); } else { if (wois) { wois.close(); wois=null; } if (!wois) { wois=window.open('', '_blank', 'left=50,top=50,width=600,height=600'); wois.document.write('' + event.target.outerHTML + styleis + ''); } } } else { if (('' + event.target.getAttribute('data-onclick')) == '') { setTimeout(agval, 1000); } else { event.target.onclick=function(event){ eval(event.target.getAttribute('data-onclick')); } eval(event.target.getAttribute('data-onclick')); } } } else if (('' + event.target.className) == 'bxandy') { if (gval == '') { if (1 == 11) { clickidin('' + event.target.id); } else if (('' + event.target.getAttribute('data-onclick')) == '') { if (wois) { wois.close(); wois=null; } if (!wois) { wois=window.open('', '_blank', 'left=50,top=50,width=600,height=600'); wois.document.write('' + event.target.outerHTML + styleis + ''); } } } else { setTimeout(agval, 1000); } } else if (('' + event.target.id) == 'bx') { if (gval == '') { if (1 == 1) { clickidin('' + event.target.id); } else { if (wois) { wois.close(); wois=null; } if (!wois) { wois=window.open('', '_blank', 'left=50,top=50,width=600,height=600'); wois.document.write('' + event.target.outerHTML + styleis + ''); } } } else { if (('' + event.target.getAttribute('data-onclick')) == '') { setTimeout(agval, 1000); } else { event.target.onclick=function(event){ eval(event.target.getAttribute('data-onclick')); } eval(event.target.getAttribute('data-onclick')); } } } else if (('' + event.target.className) == 'bx') { if (gval == '') { if (1 == 11) { clickidin('' + event.target.id); } else if (('' + event.target.getAttribute('data-onclick')) == '') { if (wois) { wois.close(); wois=null; } if (!wois) { wois=window.open('', '_blank', 'left=50,top=50,width=600,height=600'); wois.document.write('' + event.target.outerHTML + styleis + ''); } } } else { setTimeout(agval, 1000); } } else if (('' + event.target.id) == 'ixandy' && ('' + event.target.getAttribute('data-onclick')).replace('null','') != '') { //if (noent(cnumx) != cnumx) { // alert(('' + event.target.getAttribute('data-onclick'))); //} event.target.onclick=function(event){ eval(event.target.getAttribute('data-onclick')); } eval(event.target.getAttribute('data-onclick')); } else if (('' + event.target.id) == 'ixandy') { rectis=event.target.getBoundingClientRect(); if (event.touches) { // thanks to https://stackoverflow.com/questions/24567441/how-do-i-detect-two-fingers-at-touchstart-in-javascript if (event.touches.length > 1) { isok=false; } } if (isok) { if (event.touches) { var touches1 = event.changedTouches; var first1 = touches1[0]; x = first1.clientX; y = first1.clientY; } else if (event.clientX || event.clientY) { x = event.clientX; // - elemLeft; y = event.clientY; // - elemTop; } else { x = event.pageX; // - elemLeft; y = event.pageY; // - elemTop; } lastx=x; lasty=y; propx=eval(eval(x - rectis.x) / rectis.width); propy=eval(eval(y - rectis.y) / rectis.height); if (cnum != ("1 2 3 " + String.fromCharCode(10) + "4 5 6 " + String.fromCharCode(10) + "7 8 9 ")) { gval=''; eval(ifstr); if (gval != '') { setTimeout(agval, 1000); } } else { if (eval(propx) <= 0.333 && eval(propy) <= 0.333) { gval='1'; setTimeout(agval, 1000); } else if (eval(propx) >= 0.666 && eval(propy) <= 0.333) { gval='3'; setTimeout(agval, 1000); } else if (eval(propy) <= 0.333) { gval='2'; setTimeout(agval, 1000); } else if (eval(propx) <= 0.333 && eval(propy) <= 0.666) { gval='4'; setTimeout(agval, 1000); } else if (eval(propx) >= 0.666 && eval(propy) <= 0.666) { gval='6'; setTimeout(agval, 1000); } else if (eval(propy) <= 0.666) { gval='5'; setTimeout(agval, 1000); } else if (eval(propx) <= 0.333) { gval='7'; setTimeout(agval, 1000); } else if (eval(propx) >= 0.666) { gval='9'; setTimeout(agval, 1000); } else { gval='8'; setTimeout(agval, 1000); } } //alert('propx=' + propx + ' and propy=' + propy + ' and x=' + x + ' and y=' + y + ' rectis.x=' + rectis.x + ' rectis.left=' + rectis.left + ' rectis.width=' + rectis.width); } } else if (('' + event.target.id) == 'ix') { rectis=event.target.getBoundingClientRect(); if (event.touches) { // thanks to https://stackoverflow.com/questions/24567441/how-do-i-detect-two-fingers-at-touchstart-in-javascript if (event.touches.length > 1) { isok=false; } } if (isok) { if (event.touches) { var touches1 = event.changedTouches; var first1 = touches1[0]; x = first1.clientX; y = first1.clientY; } else if (event.clientX || event.clientY) { x = event.clientX; // - elemLeft; y = event.clientY; // - elemTop; } else { x = event.pageX; // - elemLeft; y = event.pageY; // - elemTop; } lastx=x; lasty=y; propx=eval(eval(x - rectis.x) / rectis.width); propy=eval(eval(y - rectis.y) / rectis.height); if (cnum != ("1 2 3 " + String.fromCharCode(10) + "4 5 6 " + String.fromCharCode(10) + "7 8 9 ")) { gval=''; eval(ifstrone); if (gval != '') { setTimeout(agval, 1000); } } else { if (eval(propx) <= 0.111) { gval='1'; setTimeout(agval, 1000); } else if (eval(propx) <= 0.222) { gval='2'; setTimeout(agval, 1000); } else if (eval(propx) <= 0.333) { gval='3'; setTimeout(agval, 1000); } else if (eval(propx) <= 0.444) { gval='4'; setTimeout(agval, 1000); } else if (eval(propx) <= 0.555) { gval='5'; setTimeout(agval, 1000); } else if (eval(propx) <= 0.666) { gval='6'; setTimeout(agval, 1000); } else if (eval(propx) <= 0.777) { gval='7'; setTimeout(agval, 1000); } else if (eval(propx) <= 0.888) { gval='8'; setTimeout(agval, 1000); } else { gval='9'; setTimeout(agval, 1000); } } //alert('propx=' + propx + ' and propy=' + propy + ' and x=' + x + ' and y=' + y + ' rectis.x=' + rectis.x + ' rectis.left=' + rectis.left + ' rectis.width=' + rectis.width); } } } } function preagval(mediao) { agval(); } function agval() { if (gval != '') { if (gval.length == 2) { if (gval.substring(0,1) == ' ') { alert('You clicked ' + gval); } else { alert('You clicked ' + gval.substring(0,1)); } } else { alert('You clicked ' + gval); } gval=''; } } function boxit(cm) { var ourdelim=String.fromCharCode(10), blanks=''; if (cnum != ("1 2 3 " + String.fromCharCode(10) + "4 5 6 " + String.fromCharCode(10) + "7 8 9 ")) { var ih='', jh=0, kh=0, lh=0, onelh=0, zero=0, eight=8; maxlh=0; if (cnum != ("1 2 3 " + String.fromCharCode(10) + "4 5 6 " + String.fromCharCode(10) + "7 8 9 ")) { var ccnums=[]; if (cm.indexOf(String.fromCharCode(13) + String.fromCharCode(10)) != -1) { ccnums=cm.split(String.fromCharCode(13) + String.fromCharCode(10)); ourdelim=String.fromCharCode(13) + String.fromCharCode(10); } else if (cm.indexOf(String.fromCharCode(10) + String.fromCharCode(13)) != -1) { ccnums=cm.split(String.fromCharCode(10) + String.fromCharCode(13)); ourdelim=String.fromCharCode(10) + String.fromCharCode(13); } else if (cm.indexOf(String.fromCharCode(13)) != -1) { ccnums=cm.split(String.fromCharCode(13)); ourdelim=String.fromCharCode(13) + String.fromCharCode(13); } else if (cm.indexOf(String.fromCharCode(10)) != -1) { ccnums=cm.split(String.fromCharCode(10)); ourdelim=String.fromCharCode(13) + String.fromCharCode(10); } else { ourdelim=''; } //alert(ccnums.length); for (jh=1; jh<=ccnums.length; jh++) { if (eval('' + ccnums[eval(-1 + jh)].length) > eval('' + maxlh)) { maxlh=ccnums[eval(-1 + jh)].length; } } for (jh=1; jh<=ccnums.length; jh++) { if (eval('' + ccnums[eval(-1 + jh)].length) < eval('' + maxlh)) { blanks=''; while (eval('' + (ccnums[eval(-1 + jh)] + blanks).length) < eval('' + maxlh)) { blanks+=' '; } if (cm.indexOf(ccnums[eval(-1 + jh)] + ourdelim) != -1) { cm=cm.replace(ccnums[eval(-1 + jh)] + ourdelim, ccnums[eval(-1 + jh)] + blanks.replace(/\ /g,' ') + ourdelim); } else { cm=cm.replace(ccnums[eval(-1 + jh)], ccnums[eval(-1 + jh)] + blanks.replace(/\ /g,' ')); } } } } } //alert('' + maxlh + ' ' + cm.replace(/\ /g,'.')); maxlh=0; // 7.8.9....... // a.b.c.d.e return cm.replace(/\ /g,' '); } function onl() { var ih='', jh=0, kh=0, lh=0, onelh=0, zero=0, eight=0; maxlh=0; if (cmedianame != '') { if (window.sessionStorage) { cmediacontent=decodeURIComponent(window.sessionStorage.getItem(cmedianame)); window.sessionStorage.removeItem(cmedianame); } else { cmedianame=''; } } if (cnum != ("1 2 3 " + String.fromCharCode(10) + "4 5 6 " + String.fromCharCode(10) + "7 8 9 ")) { var ccnums=[]; if (origcnumx.indexOf(String.fromCharCode(13) + String.fromCharCode(10)) != -1) { ccnums=anoent(origcnumx).split(String.fromCharCode(13) + String.fromCharCode(10)); document.getElementById('content').rows='' + plusent(ccnums.length); } else if (origcnumx.indexOf(String.fromCharCode(10) + String.fromCharCode(13)) != -1) { ccnums=anoent(origcnumx).split(String.fromCharCode(10) + String.fromCharCode(13)); document.getElementById('content').rows='' + plusent(ccnums.length); } else if (origcnumx.indexOf(String.fromCharCode(13)) != -1) { ccnums=anoent(origcnumx).split(String.fromCharCode(13)); document.getElementById('content').rows='' + plusent(ccnums.length); } else { ccnums=anoent(origcnumx).split(String.fromCharCode(10)); document.getElementById('content').rows='' + plusent(ccnums.length); } //if (origcnumx != anoent(origcnumx)) { //ncnumx=dncnumx; // alert(ncnumx); //} for (jh=1; jh<=ccnums.length; jh++) { if (eval('' + ccnums[eval(-1 + jh)].length) > eval('' + maxlh)) { maxlh=anoent(ccnums[eval(-1 + jh)]).length; } } for (jh=1; jh<=ncnumx.length; jh++) { //if (mappingsin.indexOf(ncnumx.substring(eval(-1 + jh)).substring(0,1)) != -1) { // alert(mappingsout[mappingsin.indexOf(ncnumx.substring(eval(-1 + jh)).substring(0,1))]); //} ih+="" + window.htmlentities.mapencode(ncnumx.substring(eval(-1 + jh)).substring(0,1)) + ""; //if (lh == 0) { alert(cnumx.substring(eval(-1 + jh)).substring(0,1)); } if ((ncnumx + ' ').substring(eval(0 + jh)).substring(0,1)) { zero=eight; if (eight > 0) { eight--; } } else { zero=0; } if (ifstrone.indexOf('if ') == -1) { ifstrone+=" if (eval(propx) <= eval(" + eval(1 + onelh) + "." + zero + " / " + ncnumx.length + ")) { gval='" + ncnumx.substring(eval(-1 + jh)).substring(0,2) + "'; } "; } else { ifstrone+=" else if (eval(propx) <= eval(" + eval(1 + onelh) + "." + zero + " / " + ncnumx.length + ")) { gval='" + ncnumx.substring(eval(-1 + jh)).substring(0,2) + "'; } "; } if (ccnums.length == 1) { if (ifstr.indexOf('if ') == -1) { ifstr+=" if (eval(propx) <= eval(" + eval(1 + lh) + "." + zero + " / " + maxlh + ")) { gval='" + ncnumx.substring(eval(-1 + jh)).substring(0,2) + "'; } "; } else { ifstr+=" else if (eval(propx) <= eval(" + eval(1 + lh) + "." + zero + " / " + maxlh + ")) { gval='" + ncnumx.substring(eval(-1 + jh)).substring(0,2) + "'; } "; } } else { if (ifstr.indexOf('if ') == -1) { ifstr+=" if (eval(propx) <= eval(" + eval(1 + lh) + "." + zero + " / " + maxlh + ") && eval(propy) <= eval(" + eval(1 + kh) + ".0 / " + ccnums.length + ")) { gval='" + ncnumx.substring(eval(-1 + jh)).substring(0,2) + "'; } "; } else { ifstr+=" else if (eval(propx) <= eval(" + eval(1 + lh) + "." + zero + " / " + maxlh + ") && eval(propy) <= eval(" + eval(1 + kh) + ".0 / " + ccnums.length + ")) { gval='" + ncnumx.substring(eval(-1 + jh)).substring(0,2) + "'; } "; } } lh++; onelh++; if (kh < ccnums.length) { if (lh == ccnums[kh].length) { if (lh < maxlh) { while (lh < maxlh) { ih+=" "; if (ccnums.length == 1) { if (ifstr.indexOf('if ') == -1) { ifstr+=" if (eval(propx) <= eval(" + eval(1 + lh) + ".0 / " + maxlh + ")) { gval=' '; } "; } else { ifstr+=" else if (eval(propx) <= eval(" + eval(1 + lh) + ".0 / " + maxlh + ")) { gval=' '; } "; } } else { if (ifstr.indexOf('if ') == -1) { ifstr+=" if (eval(propx) <= eval(" + eval(1 + lh) + ".0 / " + maxlh + ") && eval(propy) <= eval(" + eval(1 + kh) + ".0 / " + ccnums.length + ")) { gval=' '; } "; } else { ifstr+=" else if (eval(propx) <= eval(" + eval(1 + lh) + ".0 / " + maxlh + ") && eval(propy) <= eval(" + eval(1 + kh) + ".0 / " + ccnums.length + ")) { gval=' '; } "; } } lh++; } } ih+="
"; kh++; lh=0; } } } if (maxlh == 0) { maxlh=lh; } //alert(ifstrone); document.getElementById('ix').style.marginLeft='1px'; document.getElementById('ix').style.marginRight='3px'; if (/chrome/i.test( navigator.userAgent )) { document.getElementById('ix').style.width='' + Math.round(eval(0 + ncnumx.length) * 8.0) + 'px'; document.getElementById('ixandy').style.width='' + Math.round(eval(0 + maxlh) * 7.5) + 'px'; } else { document.getElementById('ix').style.width='' + Math.round(eval(0 + ncnumx.length) * 6.75) + 'px'; document.getElementById('ixandy').style.width='' + Math.round(eval(0 + maxlh) * 7.5) + 'px'; // 8.0 } if (dnoent(cnumx) != cnumx) { document.getElementById('ixandy').style.height='' + Math.floor(eval(eval('' + ccnums.length) * 14) + 8) + 'px'; } else { document.getElementById('ixandy').style.height='' + Math.floor(eval(eval('' + ccnums.length) * 14) + 4) + 'px'; } document.getElementById('bxandy').innerHTML=ih.replace(/\>\ \<\/span\>/g, '> '); document.getElementById('bx').innerHTML=ih.replace(/\/g,'').replace(/bxandy/g,'bx'); document.getElementById('ix').title='Please click a character or double click (or two clicks quickly in a row) to define onclick logic.'; document.getElementById('ixandy').title='Please click a character or double click (or two clicks quickly in a row) to define onclick logic.'; document.getElementById('n1').innerHTML='character'; document.getElementById('n2').innerHTML='character'; } else { document.getElementById('ix').style.marginLeft='1px'; document.getElementById('ix').style.marginRight='3px'; if (/chrome/i.test( navigator.userAgent )) { document.getElementById('ix').style.width='' + Math.round(eval(0 + ncnumx.length) * 8.0) + 'px'; document.getElementById('ixandy').style.width='' + Math.round(eval(0 + 6) * 7.5) + 'px'; } else { document.getElementById('ix').style.width='' + Math.round(eval(0 + ncnumx.length) * 6.75) + 'px'; document.getElementById('ixandy').style.width='' + Math.round(eval(0 + 6) * 7.5) + 'px'; // 8.0 } if (dnoent(cnumx) != cnumx) { document.getElementById('ixandy').style.height='' + Math.floor(eval(eval('' + '3') * 14) + 8) + 'px'; } else { document.getElementById('ixandy').style.height='' + Math.floor(eval(eval('' + '3') * 14) + 4) + 'px'; } } if (cmediacontent.indexOf('divbxandy">') != -1) { document.getElementById('bxandy').innerHTML+='
' + cmediacontent.split('divbxandy">')[1].split('
')[0] + ''; } else if (cmediacontent.indexOf("divbxandy'>") != -1) { document.getElementById('bxandy').innerHTML+='
' + cmediacontent.split("divbxandy'>")[1].split('
')[0] + ''; } else if (cmediacontent.indexOf('divbxandy>') != -1) { document.getElementById('bxandy').innerHTML+='
' + cmediacontent.split('divbxandy>')[1].split('
')[0] + ''; } if (cmediacontent.indexOf('divbx">') != -1) { document.getElementById('bx').innerHTML+='
' + cmediacontent.split('divbx">')[1].split('
')[0] + ''; } else if (cmediacontent.indexOf("divbx'>") != -1) { document.getElementById('bx').innerHTML+='
' + cmediacontent.split("divbx'>")[1].split('
')[0] + ''; } else if (cmediacontent.indexOf('divbx>') != -1) { document.getElementById('bx').innerHTML+='
' + cmediacontent.split('divbx>')[1].split('
')[0] + ''; } if (ourct != '') { var ourcts=ourct.split(','); for (var iourc=0; iourc'; } else { buts[ii].innerHTML+='

'; //document.body.style.backgroundImage='linear-gradient(rgba(255,255,255,0.8),rgba(255,255,255,0.8)),URL(data:image/' + dres.split('data:image/')[1].split('"')[0].split("'")[0].split('>')[0] + ')'; //document.body.style.backgoundRepeat='no-repeat'; //document.body.style.backgoundSize='contain'; } } else if (dres.indexOf('data:audio/') != -1) { if (document.getElementById('div' + buts[ii].id)) { document.getElementById('div' + buts[ii].id).innerHTML+='
'; } else { buts[ii].innerHTML+='

'; } } else if (dres.indexOf('data:video/') != -1) { if (document.getElementById('div' + buts[ii].id)) { document.getElementById('div' + buts[ii].id).innerHTML+='
'; } else { buts[ii].innerHTML+='

'; } } document.getElementById('imedia').innerHTML+=encodeURIComponent(document.getElementById('div' + buts[ii].id).outerHTML); } } else if (document.getElementById('resultav').innerHTML != '') { dres=document.getElementById('resultav').innerHTML; document.getElementById('resultav').innerHTML=''; buts=document.getElementsByTagName('button'); document.getElementById('imedia').innerHTML=''; for (ii=0; ii'; } else { buts[ii].innerHTML+='
'; //document.body.style.backgroundImage='linear-gradient(rgba(255,255,255,0.8),rgba(255,255,255,0.8)),URL(data:image/' + dres.split('data:image/')[1].split('"')[0].split("'")[0].split('>')[0] + ')'; //document.body.style.backgoundRepeat='no-repeat'; //document.body.style.backgoundSize='contain'; } } else if (dres.indexOf('data:audio/') != -1) { if (document.getElementById('div' + buts[ii].id)) { document.getElementById('div' + buts[ii].id).innerHTML+='
'; } else { buts[ii].innerHTML+='

'; } } else if (dres.indexOf('data:video/') != -1) { if (document.getElementById('div' + buts[ii].id)) { document.getElementById('div' + buts[ii].id).innerHTML+='
'; } else { buts[ii].innerHTML+='

'; } } document.getElementById('imedia').innerHTML+=encodeURIComponent(document.getElementById('div' + buts[ii].id).outerHTML); } } setTimeout(dotimeaway, 2000); } function ssit() { var ourssname='media' + Math.floor(Math.random() * 19876543); //document.getElementById('bx').value=document.getElementById('bx').innerHTML; //alert(document.getElementById('bx').value); if (document.getElementById('imedia') && document.getElementById('divmedia')) { if (document.getElementById('imedia').value != '') { if (window.sessionStorage) { window.sessionStorage.setItem(ourssname, document.getElementById('imedia').innerHTML); document.getElementById('imedia').innerHTML=''; document.getElementById('divmedia').innerHTML=""; } } } return true; } function dodivstyle() { document.getElementById('ct').value+=',1'; document.getElementById('divstyle').innerHTML+=' '; } function doglow(isbutton) { if (isbutton) { document.getElementById('ct').value+=',2'; document.getElementById('bx').className='' + document.getElementById('bx').className + ' glow'; document.getElementById('bxandy').className='' + document.getElementById('bxandy').className + ' glow'; } else { document.getElementById('ct').value+=',3'; document.getElementById('ix').className='' + document.getElementById('ix').className + ' glow'; document.getElementById('ixandy').className='' + document.getElementById('ixandy').className + ' glow'; } } function xshowStuff(evt) { if (xzhr.readyState == 4) { if (xzhr.status == 200) { //alert('Email sent'); document.getElementById('spanh3').innerHTML=' - Email downloadable HTML attachment sent to ' + etois + ' ... ' + (new Date()); } } } function doemail(eto) { var htmlis='', vhones=[], honeis='', argstuff='', iarg=0; etois=eto; document.getElementById('spanh3').innerHTML=''; if (eto.indexOf('@') != -1) { document.getElementById('cemail').value=eto; xzhr=null; //new XMLHttpRequest(); xform=null; //new FormData(); xzhr=new XMLHttpRequest(); xform=new FormData(); xform.append('to', eto); xform.append('subject', 'My Buttons'); htmlis='' + document.head.outerHTML.replace(/\.\/multipurpose_buttons\.html/g, document.URL.split('#')[0].split('?')[0]).replace(/\ \+\ /g, ' ' + encodeURIComponent('+') + ' ').replace(/\/\/www\.rjmprogramming\.com\.au/g, 'HT' + 'TP://www.rjmprogramming.com.au') + document.body.outerHTML.replace(/\.\/multipurpose_buttons\.html/g, document.URL.split('#')[0].split('?')[0]).replace('/g, '').replace(/\/\/www\.rjmprogramming\.com\.au/g, 'HT' + 'TP://www.rjmprogramming.com.au').replace(/\ data\-ondblclick\=/g,' data-ondblclick=').replace(/\ data\-ontJUNKouchend\=/g,' ontouchend=').replace(/\ data\-ondJUNKblclick\=/g,' ondblclick=').replace(/onclick\=\'makeGvalDelayedHandler\(this\.innerHTML\,2000\)\;\'/g, "onclick='gval=this.innerHTML;'") + ''; vhones=htmlis.split(''); if (vhones.length > 2) { honeis='')[0] + ''; htmlis=htmlis.replace(honeis + vhones[2], vhones[2]); } vhones=htmlis.split(' 2 && 1 == 1) { honeis='')[0] + ''; htmlis=htmlis.replace(honeis, ''); } vhones=htmlis.split(' 2 && 1 == 1) { honeis='')[0] + ''; htmlis=htmlis.replace(honeis, ''); } vhones=htmlis.split(' name="'); if (vhones.length > 1) { for (iarg=1; iarg")[0])); } } } } vhones=htmlis.split(" name='"); if (vhones.length > 1) { for (iarg=1; iarg")[0])); } } } } vhones=htmlis.split(" name="); if (vhones.length > 1) { for (iarg=1; iarg")[0].substring(0,1) != '"' && vhones[iarg].split(" ")[0].split(">")[0].substring(0,1) != "'") { if (argstuff == '') { argstuff='?'; } else { argstuff+='&'; } argstuff+=vhones[iarg].split(" ")[0].split(">")[0] + '='; if (document.getElementById(vhones[iarg].split(" ")[0].split(">")[0])) { if (vhones[iarg].split(" ")[0].split(">")[0] == "content") { if (document.URL.indexOf('&content=') != -1) { argstuff+=encodeURIComponent(document.URL.split('&content=')[1].split('&')[0].split('#')[0].replace(/\+/g,'%20')); } else { argstuff+=encodeURIComponent(encodeURIComponent(origcnumx.replace(/\+/g,'%20'))); } } else { argstuff+=encodeURIComponent(encodeURIComponent(document.getElementById(vhones[iarg].split(" ")[0].split(">")[0]).value)); } console.log(argstuff); } else { argstuff+=vhones[iarg].split(" ")[0].split(">")[0] + '='; if (vhones[iarg].indexOf(' value="') != -1) { argstuff+=encodeURIComponent(encodeURIComponent(vhones[iarg].split(' value="')[1].split('"')[0])); } else if (vhones[iarg].indexOf(" value='") != -1) { argstuff+=encodeURIComponent(encodeURIComponent(vhones[iarg].split(" value='")[1].split("'")[0])); } else if (vhones[iarg].indexOf(" value=") != -1) { argstuff+=encodeURIComponent(encodeURIComponent(vhones[iarg].split(" value=")[1].split(" ")[0].split(">")[0])); } } } } } if (htmlis.indexOf('www.rjmprogramming.com.au/HTMLCSS/multipurpose_buttons.html"') != -1 && htmlis.indexOf('disp' + 'lay:NONE;') != -1 && argstuff != '') { htmlis=htmlis.replace('www.rjmprogramming.com.au/HTMLCSS/multipurpose_buttons.html"', 'www.rjmprogramming.com.au/HTMLCSS/multipurpose_buttons.html' + argstuff + '"').replace('disp' + 'lay:NONE;', 'display:inline-block;'); } xform.append('body', htmlis); xzhr.open('post', '//www.rjmprogramming.com.au/PHP/emailhtml.php', true); xzhr.onreadystatechange = xshowStuff; xzhr.send(xform); document.getElementById('cemail').value=''; document.getElementById('iemail').value=''; } } setTimeout(dotimeaway, 3000); docwrite1=("

Multipurpose Buttons for
  

"); docwrite2=("
"); docwrite3=("
");