<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Multipurpose Buttons - RJM Programming - January, 2021</title>
<style>
table {
font-family: "Courier New", Courier, "Lucida Sans Typewriter", "Lucida Typewriter", monospace;
}
#ix {
box-sizing: content-box;
-moz-box-sizing: content-box;
-ms-box-sizing: content-box;
-webkit-box-sizing: content-box;
}
#ixandy {
font-size: 12px;
width: 36px;
height: 44px;
overflow-wrap: break-word;
word-wrap: break-word;
-ms-word-break: break-all;
/* This is the dangerous one in WebKit, as it breaks things wherever */
word-break: break-all;
/* Instead use this non-standard one: */
word-break: break-word;
/* Adds a hyphen where the word breaks, if supported (No Blink) */
-ms-hyphens: auto;
-moz-hyphens: auto;
-webkit-hyphens: auto;
hyphens: auto;
white-space: normal;
box-sizing: content-box;
-moz-box-sizing: content-box;
-ms-box-sizing: content-box;
-webkit-box-sizing: content-box;
}
span { background-color: yellow; padding: 2px 2px 2px 2px; width: 12px; margin-left: -3px; }
td { text-align: left; vertical-align: top; }
span:active { border:1px solid red; }
input { border:0; padding:0; font-family: "Courier New", Courier, "Lucida Sans Typewriter", "Lucida Typewriter", monospace; border-radius: 0 !important; -webkit-appearance: none; }
button { text-align: left; }
.glow {
-webkit-animation: glow 1s ease-in-out infinite alternate;
-moz-animation: glow 1s ease-in-out infinite alternate;
animation: glow 1s ease-in-out infinite alternate;
}
/* Thanks to https://www.w3schools.com/howto/tryit.asp?filename=tryhow_css_glowing_text */
@-webkit-keyframes glow {
from {
box-shadow: 0 0 3px #fff, 0 0 5px #fff, 0 0 37px #e60073, 0 0 9px #e60073, 0 0 11px #e60073, 0 0 13px #e60073, 0 0 15px #e60073;
}
to {
box-shadow: 0 0 24px #fff, 0 0 6px #ff4da6, 0 0 8px #ff4da6, 0 0 10px #ff4da6, 0 0 12px #ff4da6, 0 0 14px #ff4da6, 0 0 16px #ff4da6;
}
}
</style>
<script type='text/javascript'>
var vsres="";
var newres="";
var wois=null;
var gval='';
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 ";
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 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='';
//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), ' ');
}
var cnums=cnumx.replace(/\ /g,'').split('');
function lookfvsres() {
fvsres('pointer');
}
function fvsres(inv) {
if (newres == '') {
if (inv == 'progress') {
vsres=document.getElementById('result').innerHTML;
setTimeout(lookfvsres, 2000);
return inv;
} else if (inv == 'pointer') {
if (vsres != document.getElementById('result').innerHTML) {
document.getElementById('inum').innerHTML='1';
document.getElementById('result').style.cursor=inv;
vsres=document.getElementById('result').innerHTML;
} else {
setTimeout(lookfvsres, 2000);
}
}
}
return inv;
}
function laterfbr() {
if (fbr) {
console.log(11);
fbr.accept='.pdf,audio/*,video/*,image/*';
console.log(12);
}
}
function notwotwo() {
twotwo=33;
vtrue=false;
twentythousand=200;
}
function selch(thisvalue) {
if (lastvalue != '.*') {
while (document.getElementById('outputname').value.indexOf(lastvalue) != -1) {
document.getElementById('outputname').value=document.getElementById('outputname').value.replace(lastvalue, '.*');
}
}
document.getElementById('outputname').value=document.getElementById('outputname').value.replace(/\.\*/g,'.' + thisvalue);
lastvalue='.' + thisvalue;
document.getElementById('cbi').src=document.getElementById('cbi').src.split('#')[0].split('?')[0] + '?totype=' + encodeURIComponent(thisvalue.replace('*','html')) + '&d=' + Math.floor(Math.random() * 19876543);
}
function checkmedia(iois) {
if (iois != null) {
var aconto = (iois.contentWindow || iois.contentDocument);
if (aconto != null) {
if (aconto.document) { aconto = aconto.document; }
if (aconto.body != null) {
var hs=aconto.getElementsByTagName('h1');
hs[0].style.display='none';
hs=aconto.getElementsByTagName('h3');
hs[0].style.display='none';
console.log(1);
fbr=aconto.getElementById('files');
setTimeout(laterfbr,3000);
aconto.getElementById('files').accept='.pdf,audio/*,video/*,image/*';
aconto.getElementById('files').style.fontSize='8px';
aconto.getElementById('files').title='Select media file.';
console.log(2);
}
}
}
}
function clickidin(eventtarget) {
var styleis='<style> ' + document.head.innerHTML.split('</style>')[0].split('<style>')[1] + document.getElementById('divstyle').innerHTML.replace(/\<style\>/g,'').replace(/\<\/style\>/g,'') + ' </style>';
if (wois) {
wois.close();
wois=null;
}
if (!wois) {
wois=window.open('', '_blank', 'left=50,top=50,width=600,height=600');
wois.document.write('<html><body>' + document.getElementById(eventtarget).outerHTML + styleis + '</body></html>');
}
document.getElementById('cii').value+=',' + eventtarget;
}
function iclicked(event) {
var isok=true, styleis='<style> ' + document.head.innerHTML.split('</style>')[0].split('<style>')[1] + document.getElementById('divstyle').innerHTML.replace(/\<style\>/g,'').replace(/\<\/style\>/g,'') + ' </style>';
rectis=null;
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('<html><body>' + event.target.outerHTML + styleis + '</body></html>');
}
}
} else {
setTimeout(agval, 1000);
}
} else if (('' + event.target.className) == 'bxandy') {
if (gval == '') {
if (1 == 11) {
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('<html><body>' + event.target.outerHTML + styleis + '</body></html>');
}
}
} 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('<html><body>' + event.target.outerHTML + styleis + '</body></html>');
}
}
} else {
setTimeout(agval, 1000);
}
} else if (('' + event.target.className) == 'bx') {
if (gval == '') {
if (1 == 11) {
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('<html><body>' + event.target.outerHTML + styleis + '</body></html>');
}
}
} else {
setTimeout(agval, 1000);
}
} 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=origcnumx.split(String.fromCharCode(13) + String.fromCharCode(10));
document.getElementById('content').rows='' + ccnums.length;
} else if (origcnumx.indexOf(String.fromCharCode(10) + String.fromCharCode(13)) != -1) {
ccnums=origcnumx.split(String.fromCharCode(10) + String.fromCharCode(13));
document.getElementById('content').rows='' + ccnums.length;
} else if (origcnumx.indexOf(String.fromCharCode(13)) != -1) {
ccnums=origcnumx.split(String.fromCharCode(13));
document.getElementById('content').rows='' + ccnums.length;
} else {
ccnums=origcnumx.split(String.fromCharCode(10));
document.getElementById('content').rows='' + ccnums.length;
}
//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<=cnumx.length; jh++) {
ih+="<span class=bxandy onclick='gval=this.innerHTML;'>" + cnumx.substring(eval(-1 + jh)).substring(0,1) + "</span>";
//if (lh == 0) { alert(cnumx.substring(eval(-1 + jh)).substring(0,1)); }
if ((cnumx + ' ').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 + " / " + cnumx.length + ")) { gval='" + cnumx.substring(eval(-1 + jh)).substring(0,2) + "'; } ";
} else {
ifstrone+=" else if (eval(propx) <= eval(" + eval(1 + onelh) + "." + zero + " / " + cnumx.length + ")) { gval='" + cnumx.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='" + cnumx.substring(eval(-1 + jh)).substring(0,2) + "'; } ";
} else {
ifstr+=" else if (eval(propx) <= eval(" + eval(1 + lh) + "." + zero + " / " + maxlh + ")) { gval='" + cnumx.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='" + cnumx.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='" + cnumx.substring(eval(-1 + jh)).substring(0,2) + "'; } ";
}
}
lh++;
onelh++;
if (lh == ccnums[kh].length && kh < ccnums.length) {
if (lh < maxlh) {
while (lh < maxlh) {
ih+="<span class=bxandy onclick='gval=this.innerHTML;'> </span>";
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+="<br>";
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 + cnumx.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 + cnumx.length) * 6.75) + 'px';
document.getElementById('ixandy').style.width='' + Math.round(eval(0 + maxlh) * 7.5) + 'px'; // 8.0
}
document.getElementById('ixandy').style.height='' + Math.floor(eval(eval('' + ccnums.length) * 14) + 4) + 'px';
document.getElementById('bxandy').innerHTML=ih.replace(/\>\ \<\/span\>/g, '> </span>');
document.getElementById('bx').innerHTML=ih.replace(/\<br\>/g,'').replace(/bxandy/g,'bx');
document.getElementById('ix').title='Please click a character.';
document.getElementById('ixandy').title='Please click a character.';
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 + cnumx.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 + cnumx.length) * 6.75) + 'px';
document.getElementById('ixandy').style.width='' + Math.round(eval(0 + 6) * 7.5) + 'px'; // 8.0
}
document.getElementById('ixandy').style.height='' + Math.floor(eval(eval('' + '3') * 14) + 4) + 'px';
}
if (cmediacontent.indexOf('divbxandy">') != -1) {
document.getElementById('bxandy').innerHTML+='<div id=divbxandy>' + cmediacontent.split('divbxandy">')[1].split('</div>')[0] + '</div>';
} else if (cmediacontent.indexOf("divbxandy'>") != -1) {
document.getElementById('bxandy').innerHTML+='<div id=divbxandy>' + cmediacontent.split("divbxandy'>")[1].split('</div>')[0] + '</div>';
} else if (cmediacontent.indexOf('divbxandy>') != -1) {
document.getElementById('bxandy').innerHTML+='<div id=divbxandy>' + cmediacontent.split('divbxandy>')[1].split('</div>')[0] + '</div>';
}
if (cmediacontent.indexOf('divbx">') != -1) {
document.getElementById('bx').innerHTML+='<div id=divbx>' + cmediacontent.split('divbx">')[1].split('</div>')[0] + '</div>';
} else if (cmediacontent.indexOf("divbx'>") != -1) {
document.getElementById('bx').innerHTML+='<div id=divbx>' + cmediacontent.split("divbx'>")[1].split('</div>')[0] + '</div>';
} else if (cmediacontent.indexOf('divbx>') != -1) {
document.getElementById('bx').innerHTML+='<div id=divbx>' + cmediacontent.split('divbx>')[1].split('</div>')[0] + '</div>';
}
if (ourct != '') {
var ourcts=ourct.split(',');
for (var iourc=0; iourc<ourcts.length; iourc++) {
if (ourcts[iourc].trim() != '') {
document.getElementById('ct' + ourcts[iourc].trim()).click();
}
}
}
if (ourcii != '') {
var ourciis=ourcii.split(',');
for (var iourcc=0; iourcc<ourciis.length; iourcc++) {
if (ourciis[iourcc].trim() != '') {
clickidin(ourciis[iourcc].trim());
}
}
}
if (ouremail != '') {
document.getElementById('aiemail').style.display='inline-block';
document.getElementById('aiemail').title='Email to ' + document.getElementById('cemail').value;
document.getElementById('iemail').value=ouremail;
}
}
function dotimeaway() {
var ii, buts=[], recis;
if (document.getElementById('result').innerHTML != '') {
dres=document.getElementById('result').innerHTML;
document.getElementById('result').innerHTML='';
buts=document.getElementsByTagName('button');
document.getElementById('imedia').innerHTML='';
for (ii=0; ii<buts.length; ii++) {
recis=buts[ii].getBoundingClientRect();
//alert(dres);
if (dres.indexOf('data:image/') != -1) {
if (document.getElementById('div' + buts[ii].id)) {
document.getElementById('div' + buts[ii].id).innerHTML+='<br><img class=' + buts[ii].id + ' onclick="preagval(this);" style="width:' + recis.width + 'px;" src=' + dres + '></img></div>';
} else {
buts[ii].innerHTML+='<div id=div' + buts[ii].id + '><br><img class=' + buts[ii].id + ' onclick="preagval(this);" style="width:' + recis.width + 'px;" src=' + dres + '></img></div>';
//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+='<br><audio class=' + buts[ii].id + ' onclick="preagval(this);" style="width:' + recis.width + 'px;" controls><source type=audio/' + dres.split('data:audio/')[1].split(';')[0] + ' src=' + dres + '></source></audio>';
} else {
buts[ii].innerHTML+='<div id=div' + buts[ii].id + '><br><audio class=' + buts[ii].id + ' onclick="preagval(this);" style="width:' + recis.width + 'px;" controls><source type=audio/' + dres.split('data:audio/')[1].split(';')[0] + ' src=' + dres + '></source></audio></div>';
}
} else if (dres.indexOf('data:video/') != -1) {
if (document.getElementById('div' + buts[ii].id)) {
document.getElementById('div' + buts[ii].id).innerHTML+='<br><video class=' + buts[ii].id + ' onclick="preagval(this);" style="width:' + recis.width + 'px;" controls><source type=video/' + dres.split('data:video/')[1].split(';')[0] + ' src=' + dres + '></source></video>';
} else {
buts[ii].innerHTML+='<div id=div' + buts[ii].id + '><br><video class=' + buts[ii].id + ' onclick="preagval(this);" style="width:' + recis.width + 'px;" controls><source type=video/' + dres.split('data:video/')[1].split(';')[0] + ' src=' + dres + '></source></video></div>';
}
}
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<buts.length; ii++) {
recis=buts[ii].getBoundingClientRect();
//alert(dres);
if (dres.indexOf('data:image/') != -1) {
if (document.getElementById('div' + buts[ii].id)) {
document.getElementById('div' + buts[ii].id).innerHTML+='<br><img class=' + buts[ii].id + ' onclick="preagval(this);" style="width:' + recis.width + 'px;" src=' + dres + '></img>';
} else {
buts[ii].innerHTML+='<br><img class=' + buts[ii].id + ' onclick="preagval(this);" style="width:' + recis.width + 'px;" src=' + dres + '></img></div>';
//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+='<br><audio class=' + buts[ii].id + ' onclick="preagval(this);" style="width:' + recis.width + 'px;" controls><source type=audio/' + dres.split('data:audio/')[1].split(';')[0] + ' src=' + dres + '></source></audio>';
} else {
buts[ii].innerHTML+='<div id=div' + buts[ii].id + '><br><audio class=' + buts[ii].id + ' onclick="preagval(this);" style="width:' + recis.width + 'px;" controls><source type=audio/' + dres.split('data:audio/')[1].split(';')[0] + ' src=' + dres + '></source></audio></div>';
}
} else if (dres.indexOf('data:video/') != -1) {
if (document.getElementById('div' + buts[ii].id)) {
document.getElementById('div' + buts[ii].id).innerHTML+='<br><video class=' + buts[ii].id + ' onclick="preagval(this);" style="width:' + recis.width + 'px;" controls><source type=video/' + dres.split('data:video/')[1].split(';')[0] + ' src=' + dres + '></source></video>';
} else {
buts[ii].innerHTML+='<div id=div' + buts[ii].id + '><br><video class=' + buts[ii].id + ' onclick="preagval(this);" style="width:' + recis.width + 'px;" controls><source type=video/' + dres.split('data:video/')[1].split(';')[0] + ' src=' + dres + '></source></video></div>';
}
}
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="<textarea style=display:none; name=imedia value='" + ourssname + "'>" + ourssname + "</textarea>";
}
}
}
return true;
}
function dodivstyle() {
document.getElementById('ct').value+=',1';
document.getElementById('divstyle').innerHTML+='<style> #bx, .bx, #bxandy, .bxandy { border-radius: 50%; } #bx, #bxandy { padding: 35px 35px 35px 35px; border-color: red; } </style> ';
}
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 doemail(eto) {
if (eto.indexOf('@') != -1) {
document.getElementById('cemail').value=eto;
var xzhr=null; //new XMLHttpRequest();
var xform=null; //new FormData();
xzhr=new XMLHttpRequest();
xform=new FormData();
xform.append('to', eto);
xform.append('subject', 'My Buttons');
xform.append('body', '<html>' + document.head.outerHTML.replace(/\.\/multipurpose_buttons\.html/g, document.URL.split('#')[0].split('?')[0]) + document.body.outerHTML.replace(/\.\/multipurpose_buttons\.html/g, document.URL.split('#')[0].split('?')[0]) + '</html>');
xzhr.open('post', '//www.rjmprogramming.com.au/PHP/emailhtml.php', true);
xzhr.send(xform);
document.getElementById('cemail').value='';
document.getElementById('iemail').value='';
}
}
setTimeout(dotimeaway, 3000);
</script>
</head>
<body onload='onl();'>
<script type='text/javascript'>
document.write("<h1>Multipurpose Buttons for <form onsubmit='return ssit();' id=hform style=display:inline-block; method=GET action=./multipurpose_buttons.html><input type=hidden name=cemail id=cemail value='" + ouremail + "'></input><input type=hidden name=cii id=cii value=''></input><input type=hidden name=ct id=ct value='" + ourct + "'></input><div style=display:none; id=divmedia><textarea style=display:none; id=imedia value=''></textarea></div><textarea rows=3 onblur=\" if (this.value != cnum) { document.getElementById('mysubt').click(); } \" style='display:inline-block;background-color:pink;' name=content id=content>" + cnum + "</textarea><input type=submit id=mysubt style=display:none;</input></form> <iframe onload=\"checkmedia(this);\" frameborder=\"0\" id=\"cbi\" data-style=\"border-top:1px solid black;border-bottom:1px solid black;border-left:2px solid yellow;border-right:1px solid yellow;\" style=\"width:116px;height:28px;margin-top:0px;\" onmouseover=\"vsres=document.getElementById('result').innerHTML; document.getElementById('result').style.cursor=fvsres('progress');\" src=\"client_browsing.htm?gfn=00000220.238.10.100.gif&d=156261280#Most%20people%20recognize%20me%20by%20my%20voice.\"></iframe></h1>");
</script>
<h3>RJM Programming - January, 2021</h3>
<h4>Thanks to <a target=_blank title='Useful link, thanks' href='https://stackoverflow.com/questions/10743763/word-wrap-break-word-does-not-work-in-this-example'>html - word-wrap break-word does not work in this example - Stack Overflow</a> and <a target=_blank title='Useful link, thanks' href='https://stackoverflow.com/questions/13048499/wrapping-an-html-input-buttons-text-value-over-multiple-lines'>Wrapping an HTML input button's text value over multiple lines - Stack Overflow</a> and <a target=_blank title='Useful link, thanks' href='https://stackoverflow.com/questions/5419086/button-height-on-chrome'>html - Button height on Chrome - Stack Overflow</a><br><br>
<table border=4>
<tr><th><a target=_self style='cursor:pointer;text-decoration:none;' title='Restart' href='./multipurpose_buttons.html'>🆕</a> <a id=aiemail style='cursor:pointer;text-decoration:none;display:none;' title='Email' onclick=" doemail(document.getElementById('iemail').value); ">📧</a> <input onblur="if (this.value.indexOf('@') != -1) { doemail(this.value); }" type=email value='' placeholder='📧' id=iemail></input></th><th>Button <a id=ct1 onclick=dodivstyle(); style='cursor:pointer;text-decoration:none;' title='Circular borders'>⭕</a> <a id=ct2 onclick=doglow(true); style='cursor:pointer;text-decoration:none;' title='Glow'>🌟</a></th><th>Input type=button <a id=ct3 onclick=doglow(false); style='cursor:pointer;text-decoration:none;' title='Glow'>🌟</a></th></tr>
<tr><td>Horizontal Dimension<br><font size=1>(please click a <div style=display:inline-block; id=n1>number</div>)</font></td><td>
<button style='background-color: yellow;' title='Please click a number' id=bx onclick=iclicked(event);><span class=bx onclick='gval=this.innerHTML;'>1</span><span class=bx onclick='gval=this.innerHTML;'> </span><span class=bx onclick='gval=this.innerHTML;'>2</span><span class=bx onclick='gval=this.innerHTML;'> </span><span class=bx onclick='gval=this.innerHTML;'>3</span><span class=bx onclick='gval=this.innerHTML;'> </span><span class=bx onclick='gval=this.innerHTML;'>4</span><span class=bx onclick='gval=this.innerHTML;'> </span><span class=bx onclick='gval=this.innerHTML;'>5</span><span class=bx onclick='gval=this.innerHTML;'> </span><span class=bx onclick='gval=this.innerHTML;'>6</span><span class=bx onclick='gval=this.innerHTML;'> </span><span class=bx onclick='gval=this.innerHTML;'>7</span><span class=bx onclick='gval=this.innerHTML;'> </span><span class=bx onclick='gval=this.innerHTML;'>8</span><span class=bx onclick='gval=this.innerHTML;'> </span><span class=bx onclick='gval=this.innerHTML;'>9</span></button>
</td><td>
<script type='text/javascript'>
document.write("<input type=button style='background-color: yellow;' title='Please click a number' id=ix onclick=iclicked(event); value='" + cnumx + "'></input>");
</script>
</td></tr>
<tr><td>Horizontal and Vertical Dimensions<br><font size=1>(please click a <div style=display:inline-block; id=n2>number</div>)</font></td><td>
<button style='background-color: yellow;' title='Please click a number' id=bxandy onclick=iclicked(event);>
<span class=bxandy onclick='gval=this.innerHTML;'>1</span><span class=bxandy onclick='gval=this.innerHTML;'> </span><span class=bxandy onclick='gval=this.innerHTML;'>2</span><span class=bxandy onclick='gval=this.innerHTML;'> </span><span class=bxandy onclick='gval=this.innerHTML;'>3</span><span class=bxandy onclick='gval=this.innerHTML;'> </span><br>
<span class=bxandy onclick='gval=this.innerHTML;'>4</span><span class=bxandy onclick='gval=this.innerHTML;'> </span><span class=bxandy onclick='gval=this.innerHTML;'>5</span><span class=bxandy onclick='gval=this.innerHTML;'> </span><span class=bxandy onclick='gval=this.innerHTML;'>6</span><span class=bxandy onclick='gval=this.innerHTML;'> </span><br>
<span class=bxandy onclick='gval=this.innerHTML;'>7</span><span class=bxandy onclick='gval=this.innerHTML;'> </span><span class=bxandy onclick='gval=this.innerHTML;'>8</span><span class=bxandy onclick='gval=this.innerHTML;'> </span><span class=bxandy onclick='gval=this.innerHTML;'>9</span><span class=bxandy onclick='gval=this.innerHTML;'> </span>
</button>
</td><td>
<script type='text/javascript'>
document.write("<input type=button style='background-color: yellow;' title='Please click a number' id=ixandy onclick=iclicked(event); value='" + boxit(cnum) + "'></input>");
</script>
</td></tr>
</table>
<div id=inum style='display:none;'></div>
<input id=audioname style='display:none;' type=hidden value=''></input>
<input id=saysub style='display:none;' type=hidden value=''></input>
<input id=outputname style='display:none;' type=hidden value=''></input>
<input id=path style='display:none;' type=hidden value=''></input>
<input id=opath style='display:none;' type=hidden value=''></input>
<input id=cto style='display:none;' type=hidden value=''></input>
<a target=_blank id=aemailto style='display:none;' href=''>Email</a><a target=_blank id=asmsto style='display:none;' href=''>SMS</a>
<select id=sin style='display:none;position:absolute;left:-500px;top:-500px;'><option style='display:none;' value=''></option></select>
<div id=thewords style='display:none;'></div>
<div id=result style='display:none;'></div>
<div id=resultav style='display:none;'></div>
<div id=topleftx style='display:none;'></div>
<div id=videoag style='display:none;'></div><br>
<div id=divmore></div>
<div id=divmymsr style='display:none;width:100%;height:600px;'>
<div id=divstyle></div>
<input type=text style='position:absolute;left:-300px;top:-300px;' value=''></input>
</body>
</html>