<html>
<head>
<title>Diagon Alley - RJM Programming - January, 2026</title>
<meta id=”myviewport” name=”viewport” content=”width=device-width, initial-scale=0.5, minimum-scale=0.25, maximum-scale=8, user-scalable=yes” />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style id=mystyle>

body { margin: 0; box-sizing: border-box; }

td { vertical-align: top; }

input[type="text"] { width: 55px; }
input[type="number"] { width: 55px; }

#xtl { background-color: rgba(255,0,0,0.0); }
#xbr { background-color: rgba(0,255,0,0.5); }

.defbody {
overflow: hidden;
height: 100%;
}

.container {
width: 800px;
height: 800px;
border: 2px solid black;
background-color: silver;
text-align: center;
/* display:flex;
min-width:0; */
position: relative; /* Essential for positioning the child element */
text-overflow: clip; /* overflow: hidden; */ /* Keeps the rotated text inside the visible box */
overflow-Y: hidden;
}

.rotated-text-bl-to-tr {
position: absolute;
/* Position the center of the element roughly at the center of the bottom-left */
bottom: 0;
left: 0;
/* Adjust origin of rotation to the bottom left corner */
transform-origin: bottom left !important;
/* Rotate 45 degrees clockwise */
transform: rotate(-45deg) !important;

/* Optional styling */
/* padding: 10px; */
// background-color: lightblue;
margin: 0; /* Remove default paragraph margins */
white-space: nowrap; /* Prevents text from wrapping onto multiple lines */
}

.rotated-text-tr-to-bl {
position: absolute;
/* Position the center of the element roughly at the center of the bottom-left */
top: 0;
right: 0;
/* Adjust origin of rotation to the bottom left corner */
transform-origin: bottom left !important;
/* Rotate 45 degrees clockwise */
transform: rotate(135deg) !important;

border:1px solid red;

/* Optional styling */
/* padding: 10px; */
// background-color: lightblue;
margin: 0; /* Remove default paragraph margins */
white-space: nowrap; /* Prevents text from wrapping onto multiple lines */
}


.rotated-text-tl-to-br {
position: absolute;
/* Position the center of the element roughly at the center of the bottom-left */
top: 0;
left: 0;
/* Adjust origin of rotation to the bottom left corner */
transform-origin: top left !important;
/* Rotate 45 degrees clockwise */
transform: rotate(45deg) !important;

/* Optional styling */
/* padding: 10px; */
// background-color: lightgreen;
margin: 0; /* Remove default paragraph margins */
white-space: nowrap; /* Prevents text from wrapping onto multiple lines */
}

</style>
<script type=text/javascript>

var charsare='⚊';
//charsare='❘';
var fs='96px';
var fttd='sub';
var ftbu='sup';
var rownum=1;
var cellnum=1;
var curcellnum=1;
var nextnum=2;
var nextto=null;
var ten=8.0;
var ourtwo=1;

var sd='', sdtwo='';
var oktolook=true, preokay=false;

var onets=[], twots=[];
var tconto=null, oconto=null, cconto=null;
var trecto=null, orecto=null;
var mtopt=0, mleftt=0;
var mtopo=0, mlefto=0;
var ct='', cl='';
var glinh='';
var lconto=null, rconto=null;
var areacnt=0;

var ft=fttd;
var repeats=8;
var showing=false;
var showingc=false;
var lastans='';
var isgif=false, yisgif=false;
var lsto="";


var cpone="Text <input style=display:inline-block;width:40px; type=number value=1 id=tnum min=1></input> from now on Colour Size Direction Rotation Style Family ideas ... <br><input onblur=fromnowon(this); style=display:inline-block; type=color id=tcol value=#000000></input> <input onblur=fromnowon(this); style=display:inline-block;width:40px; type=number step=1 min=0 id=tsiz value=16></input>px <select onchange=fromnowon(this); id=tdir><option value=R>Right</option><option value=L>Left</option><option value=D>Down</option><option value=U>Up</option></select> <input title='Text or Image rotation in degrees' onblur=fromnowon(this); onchange=filltrot(this); style=display:inline-block; type=number step=1 min=0 max=359 id=trot value=0></input>° <select onchange=fromnowon(this); id=tsty><option value=>Bold</option><option value=N>Normal</option><option value=I>Italic</option><option value=U>Underline</option></select> <select onchange=fromnowon(this); id=tfam><option value=Arial>Arial</option><option value=Courier>Coiurier</option><option value=Helvetica>Helvetica</option><option value=Times>Times</option><option value=Symbol>Symbol</option><option value=ZapfDingbats>ZapfDingbats</option></select>  <input style=background-color:yellow; type=button onclick='showingc=showing; event.stopPropagation(); fromnowon(this);' id=tbut value='Apply From Now On ...'></input>  <button id=bannotations title='Annotations Menu defaults to Scribble Mode for Signatures' onclick=annoit(this);>✍</button>  <input style=background-color:silver; type=button onclick='showingc=showing; event.stopPropagation(); alert(document.body.title);' id=tblb value='Long Explanation ...'></input><br><div id=saveas><button onclick=lsnamesaveas(); style=background-color:orange;>Save As ...</button> <button title='Zoom In' onclick=zoomin();>+</button> <button title='Zoom Out' onclick=zoomout();>-</button> <button title='Actual Size' onclick=zoomone();>=</button> <select id=sfilter onchange=zoomsame(this.value);><option value=''>Image Filter ...</option><option value=' '>Image Filter Ask Arguments ...</option><option style=display:none; id=redoopt value=redo>Undo Last ...</option><option value=flip>Flip</option><option value=flipvertical>Flip Vertical</option><option value=fliphorizontal>Flip Horizontal</option><option value=rotation>Rotation</option><option value=emboss>Emboss</option><option value=negate>Negate</option><option value=edge>Edge</option><option value=negedge>Negedge</option><option value=grayscale>Grayscale</option><option value=gaussianblur>Gaussian Blur</option><option value=selectiveblur>Selective Blur</option><option value=sharpen>Sharpen</option><option value=boxblur>Boxblur</option><option value=colourize>Colourize</option><option value=pixellate>Pixellate</option><option value=smooth>Smooth</option><option value=contrast>Contrast</option><option value=brightness>Brightness</option><option value=sketchy>Sketchy</option><option value=colourizered>Colourize Red</option><option value=colourizegreen>Colourize Green</option><option value=colourizeblue>Colourize Blue</option></select></div><br><details><summary style=background-color:lightblue;>For next click establish default text ...</summary><textarea id=mytextarea cols=40 rows=10 value=></textarea></details><div id=nextetc></div>";
cpone="<input style=visibility:hidden;display:inline-block;width:40px; type=number value=1 id=tnum min=1></input><input onblur=fromnowon(this); style=visibility:hidden;display:inline-block; type=color id=tcol value=#000000></input><input onblur=fromnowon(this); style=visibility:hidden;display:inline-block;width:40px; type=number step=1 min=0 id=tsiz value=16></input><select style=visibility:hidden; onchange=fromnowon(this); id=tdir><option value=R>Right</option><option value=L>Left</option><option value=D>Down</option><option value=U>Up</option></select><input title='Text or Image rotation in degrees' onblur=fromnowon(this); onchange=filltrot(this); style=visibility:hidden;display:inline-block; type=number step=1 min=0 max=359 id=trot value=0></input><select style=visibility:hidden; onchange=fromnowon(this); id=tsty><option value=>Bold</option><option value=N>Normal</option><option value=I>Italic</option><option value=U>Underline</option></select><select style=visibility:hidden; onchange=fromnowon(this); id=tfam><option value=Arial>Arial</option><option value=Courier>Coiurier</option><option value=Helvetica>Helvetica</option><option value=Times>Times</option><option value=Symbol>Symbol</option><option value=ZapfDingbats>ZapfDingbats</option></select><input style=visibility:hidden;background-color:yellow; type=button onclick='showingc=showing; event.stopPropagation(); fromnowon(this);' id=tbut value='Apply From Now On ...'></input><button style=visibility:hidden; id=bannotations title='Annotations Menu defaults to Scribble Mode for Signatures' onclick=annoit(this);>✍</button><input style=visibility:hidden;background-color:silver; type=button onclick='showingc=showing; event.stopPropagation(); alert(document.body.title);' id=tblb value='Long Explanation ...'></input><div id=saveas><button onclick=lsnamesaveas(); style=visibility:hidden;background-color:orange;>Save As ...</button><button style=visibility:hidden; title='Zoom In' onclick=zoomin();>+</button><button style=visibility:hidden; title='Zoom Out' onclick=zoomout();>-</button><button style=visibility:hidden; title='Actual Size' onclick=zoomone();>=</button><select style=visibility:hidden; id=sfilter onchange=zoomsame(this.value);><option value=''>Image Filter ...</option><option value=' '>Image Filter Ask Arguments ...</option><option style=display:none; id=redoopt value=redo>Undo Last ...</option><option value=flip>Flip</option><option value=flipvertical>Flip Vertical</option><option value=fliphorizontal>Flip Horizontal</option><option value=rotation>Rotation</option><option value=emboss>Emboss</option><option value=negate>Negate</option><option value=edge>Edge</option><option value=negedge>Negedge</option><option value=grayscale>Grayscale</option><option value=gaussianblur>Gaussian Blur</option><option value=selectiveblur>Selective Blur</option><option value=sharpen>Sharpen</option><option value=boxblur>Boxblur</option><option value=colourize>Colourize</option><option value=pixellate>Pixellate</option><option value=smooth>Smooth</option><option value=contrast>Contrast</option><option value=brightness>Brightness</option><option value=sketchy>Sketchy</option><option value=colourizered>Colourize Red</option><option value=colourizegreen>Colourize Green</option><option value=colourizeblue>Colourize Blue</option></select></div><details><summary style=visibility:hidden;background-color:lightblue;>For next click establish default text ...</summary><textarea style=visibility:hidden; id=mytextarea cols=40 rows=10 value=></textarea></details><div style=visibility:hidden; id=nextetc></div>";
var areaclick=false;
var curls=-1;
var x=-1, y=-1;
var xs=[], ys=[], xxs=[], yys=[];
var ixy=0;
var coordn=1;
var relevant=false; // false

var fourfive='4500';
var doitok=false;
var twospaces='';
var setjuststop='';
var awo=null, awowatchsofar='', awobackup='';
var fans='', jfans=0;

var sofarso='';
var sofarsoatend='';
var sofarsonext=1;
var sofarmode="1"; // 1=step through and 2=stop at sequences and dates and 3=fully automate and 4=review a full automation run
var lastrub='', lastrubvalid=false;


// Thanks to https://stackoverflow.com/questions/4770025/how-to-disable-scrolling-temporarily
// left: 37, up: 38, right: 39, down: 40,
// spacebar: 32, pageup: 33, pagedown: 34, end: 35, home: 36
var keys = {37: 1, 38: 1, 39: 1, 40: 1};

function preventDefault(e) {
e.preventDefault();
}

function preventDefaultForScrollKeys(e) {
if (keys[e.keyCode]) {
preventDefault(e);
return false;
}
}

// modern Chrome requires { passive: false } when adding event
var supportsPassive = false;
try {
window.addEventListener("test", null, Object.defineProperty({}, 'passive', {
get: function () { supportsPassive = true; }
}));
} catch(e) {}

var wheelOpt = supportsPassive ? { passive: false } : false;
var wheelEvent = 'onwheel' in document.createElement('div') ? 'wheel' : 'mousewheel';

// call this to Disable
function disableScroll() {
window.addEventListener('DOMMouseScroll', preventDefault, false); // older FF
window.addEventListener(wheelEvent, preventDefault, wheelOpt); // modern desktop
window.addEventListener('touchmove', preventDefault, wheelOpt); // mobile
window.addEventListener('keydown', preventDefaultForScrollKeys, false);
}

// call this to Enable
function enableScroll() {
document.body.className='nondefbody';
document.getElementById('bsquare').style.visibility='visible';
document.getElementById('bclock').style.visibility='visible';
window.removeEventListener('DOMMouseScroll', preventDefault, false);
window.removeEventListener(wheelEvent, preventDefault, wheelOpt);
window.removeEventListener('touchmove', preventDefault, wheelOpt);
window.removeEventListener('keydown', preventDefaultForScrollKeys, false);
}

function ost(incb) {
var ret=incb;
if (incb == ' mt') {
ret='" style="display:inline-block;transform:translate(-10px,-20px);font-size:' + fs + ';';
}
return ret;
}

function pinkize(evt) {
}

function lgc(otb) {
var wasdeg='', maxgoes=100, goes=0, thisnum=-1, endone='</sup>', cursu='';
var tds=document.getElementsByTagName('textarea');
for (var itds=0; itds<tds.length; itds++) {
if (('' + tds[itds].id).indexOf('taecll') == 0) {
goes=0;
if (tds[itds].value.indexOf('<') == 0) {
if (thisnum == -1) {
thisnum=eval('' + (tds[itds].value + '~').replace('</sub>~','').replace('</sup>~','').split('</su').length);
endone='</sup>';
if ((tds[itds].value + '~').replace('</sub>~','').replace('</sup>~','').indexOf('</sub>') != -1) { endone='</sub>'; }
}
maxgoes=eval(4 + eval('' + otb.value));
while (('' + thisnum) != '' && ('' + thisnum) != ('' + otb.value) && goes < maxgoes) {
if (thisnum > eval('' + otb.value)) {
//alert('remove');
cursu=endone.replace('/','').replace('>','') + (tds[itds].value + '~').replace('</sub>~','').replace('</sup>~','').split(endone)[0].split(endone.replace('/','').replace('>',''))[eval(-1 + (tds[itds].value + '~').replace('</sub>~','').replace('</sup>~','').split(endone)[0].split(endone.replace('/','').replace('>','')).length)] + endone;
//alert(cursu);
tds[itds].value=tds[itds].value.replace(cursu, '');
thisnum=eval('' + (tds[itds].value + '~').replace('</sub>~','').replace('</sup>~','').split('</su').length);
} else {
//alert('add');
cursu=endone.replace('/','').replace('>','') + (tds[itds].value + '~').replace('</sub>~','').replace('</sup>~','').split(endone)[0].split(endone.replace('/','').replace('>',''))[eval(-1 + (tds[itds].value + '~').replace('</sub>~','').replace('</sup>~','').split(endone)[0].split(endone.replace('/','').replace('>','')).length)] + endone;
//alert(cursu);
tds[itds].value=tds[itds].value.replace(cursu, cursu.replace(endone,'') + cursu + endone);
thisnum=eval('' + (tds[itds].value + '~').replace('</sub>~','').replace('</sup>~','').split('</su').length);
}
goes++;
}
if (document.getElementById(('' + tds[itds].id).replace('taecll','cell')).innerText.replace('+','') != '') {
document.getElementById(('' + tds[itds].id).replace('taecll','cell')).innerHTML=tds[itds].value;
}
thisnum=-1;
}
}
}
tds=document.getElementsByTagName('td');
sdfs(tds[0].innerHTML, tds[ourtwo].innerHTML);
}

function nonp(otb) {
var wasdeg='', maxgoes=100, goes=0;
var tds=document.getElementsByTagName('textarea');
for (var itds=0; itds<tds.length; itds++) {
if (('' + tds[itds].id).indexOf('taecll') == 0) {
goes=0;
if (tds[itds].value.indexOf('<') == 0) {
if (wasdeg == '') { wasdeg=tds[itds].value.split('<')[1].split(' ')[0].split('>')[0]; }
while (tds[itds].value.indexOf('</' + wasdeg + '>') != -1 && wasdeg != '' && wasdeg != otb.value && goes < maxgoes) {
tds[itds].value=tds[itds].value.replace('<' + wasdeg + ' ', '<' + otb.value + ' ').replace('</' + wasdeg + '>', '</' + otb.value + '>').replace(' title="' + wasdeg + '"', ' title="' + otb.value + '"');
goes++;
}
if (document.getElementById(('' + tds[itds].id).replace('taecll','cell')).innerText.replace('+','') != '' && wasdeg != '') {
document.getElementById(('' + tds[itds].id).replace('taecll','cell')).innerHTML=tds[itds].value;
}
}
}
}
tds=document.getElementsByTagName('td');
sdfs(tds[0].innerHTML, tds[ourtwo].innerHTML);
}

function trxc(otb) {
var wasdeg='', maxgoes=100, goes=0;
var tds=document.getElementsByTagName('textarea');
for (var itds=0; itds<tds.length; itds++) {
if (('' + tds[itds].id).indexOf('taecll') == 0) {
goes=0;
if (tds[itds].value.indexOf('translate(') != -1) {
if (wasdeg == '') { wasdeg=tds[itds].value.split('translate(')[1].split('px')[0]; }
while (tds[itds].value.indexOf('translate(' + wasdeg + 'px') != -1 && wasdeg != otb.value && wasdeg != '' && goes < maxgoes) {
tds[itds].value=tds[itds].value.replace('translate(' + wasdeg + 'px', 'translate(' + otb.value + 'px');
goes++;
}
if (document.getElementById(('' + tds[itds].id).replace('taecll','cell')).innerText.replace('+','') != '' && wasdeg != '') {
document.getElementById(('' + tds[itds].id).replace('taecll','cell')).innerHTML=tds[itds].value;
}
}
}
}
tds=document.getElementsByTagName('td');
sdfs(tds[0].innerHTML, tds[ourtwo].innerHTML);
}

function tryc(otb) {
var wasdeg='', maxgoes=100, goes=0;
var tds=document.getElementsByTagName('textarea');
for (var itds=0; itds<tds.length; itds++) {
if (('' + tds[itds].id).indexOf('taecll') == 0) {
goes=0;
if (tds[itds].value.indexOf('translate(') != -1) {
if (wasdeg == '') { wasdeg=tds[itds].value.split('translate(')[1].split(',')[1].split('px')[0]; }
if ((wasdeg.indexOf('-') != -1 && otb.value.indexOf('-') != -1) || (wasdeg.indexOf('-') == -1 && otb.value.indexOf('-') == -1)) {
while (tds[itds].value.indexOf(',' + wasdeg + 'px') != -1 && wasdeg != otb.value && wasdeg != '' && goes < maxgoes) {
tds[itds].value=tds[itds].value.replace(',' + wasdeg + 'px', ',' + otb.value + 'px');
goes++;
}
if (document.getElementById(('' + tds[itds].id).replace('taecll','cell')).innerText.replace('+','') != '' && wasdeg != '') {
document.getElementById(('' + tds[itds].id).replace('taecll','cell')).innerHTML=tds[itds].value;
}
} else {
wasdeg='';
}
}
}
}
tds=document.getElementsByTagName('td');
sdfs(tds[0].innerHTML, tds[ourtwo].innerHTML);
}



function chrc(otb) {
var wasdeg='', maxgoes=100, goes=0;
var tds=document.getElementsByTagName('textarea');
for (var itds=0; itds<tds.length; itds++) {
if (('' + tds[itds].id).indexOf('taecll') == 0) {
goes=0;
if (tds[itds].value.indexOf('</su') != -1) {
if (wasdeg == '') { wasdeg=tds[itds].value.split('</su')[0].split('>')[eval(-1 + tds[itds].value.split('</su')[0].split('>').length)]; }
while (tds[itds].value.indexOf('>' + wasdeg + '<') != -1 && wasdeg != otb.value && wasdeg != '' && goes < maxgoes) {
tds[itds].value=tds[itds].value.replace('>' + wasdeg + '<', '>' + otb.value + '<');
goes++;
}
if (document.getElementById(('' + tds[itds].id).replace('taecll','cell')).innerText.replace('+','') != '' && wasdeg != '') {
document.getElementById(('' + tds[itds].id).replace('taecll','cell')).innerHTML=tds[itds].value;
}
}
}
}
tds=document.getElementsByTagName('td');
sdfs(tds[0].innerHTML, tds[ourtwo].innerHTML);
}

function fsnc(otb) {
var wasdeg='', maxgoes=100, goes=0;
var tds=document.getElementsByTagName('textarea');
for (var itds=0; itds<tds.length; itds++) {
if (('' + tds[itds].id).indexOf('taecll') == 0) {
goes=0;
if (tds[itds].value.indexOf('deg)') != -1) {
if (wasdeg == '') { wasdeg=tds[itds].value.split('font-size:')[1].split('px;')[0]; }
while (tds[itds].value.indexOf('font-size:' + wasdeg + 'px;') != -1 && wasdeg != otb.value && wasdeg != '' && goes < maxgoes) {
tds[itds].value=tds[itds].value.replace('font-size:' + wasdeg + 'px;', 'font-size:' + otb.value + 'px;');
goes++;
}
if (document.getElementById(('' + tds[itds].id).replace('taecll','cell')).innerText.replace('+','') != '' && wasdeg != '') {
document.getElementById(('' + tds[itds].id).replace('taecll','cell')).innerHTML=tds[itds].value;
}
}
}
}
tds=document.getElementsByTagName('td');
sdfs(tds[0].innerHTML, tds[ourtwo].innerHTML);
}

function rotc(otb) {
var wasdeg='', maxgoes=100, goes=0;
var tds=document.getElementsByTagName('textarea');
for (var itds=0; itds<tds.length; itds++) {
if (('' + tds[itds].id).indexOf('taecll') == 0) {
goes=0;
if (tds[itds].value.indexOf('deg)') != -1) {
if (wasdeg == '') { wasdeg=tds[itds].value.split('deg)')[0].split('(')[eval(-1 + tds[itds].value.split('deg)')[0].split('(').length)].replace('-',''); }
while ((tds[itds].value.indexOf('(-' + wasdeg + 'deg') != -1 || tds[itds].value.indexOf('(' + wasdeg + 'deg') != -1) && wasdeg != otb.value && wasdeg != '' && goes < maxgoes) {
if (tds[itds].value.indexOf('</sub>') != -1) {
tds[itds].value=tds[itds].value.replace('(' + wasdeg + 'deg', '(' + Math.abs(otb.value) + 'deg').replace('(-' + wasdeg + 'deg', '(-' + Math.abs(otb.value) + 'deg');
} else if (tds[itds].value.indexOf('</sup>') != -1) {
tds[itds].value=tds[itds].value.replace('(' + wasdeg + 'deg', '(-' + Math.abs(otb.value) + 'deg').replace('(-' + wasdeg + 'deg', '(-' + Math.abs(otb.value) + 'deg');
} else {
tds[itds].value=tds[itds].value.replace('(' + wasdeg + 'deg', '(' + Math.abs(otb.value) + 'deg').replace('(-' + wasdeg + 'deg', '(-' + Math.abs(otb.value) + 'deg');
}
goes++;
}
if (document.getElementById(('' + tds[itds].id).replace('taecll','cell')).innerText.replace('+','') != '' && wasdeg != '') {
document.getElementById(('' + tds[itds].id).replace('taecll','cell')).innerHTML=tds[itds].value;
}
}
}
}
tds=document.getElementsByTagName('td');
sdfs(tds[0].innerHTML, tds[ourtwo].innerHTML);
}

function tait(tao) {
document.getElementById(tao.id.replace('taecll','cell')).innerHTML=tao.value;
var tds=document.getElementsByTagName('td');
sdfs(tds[0].innerHTML, tds[ourtwo].innerHTML);
}

function andthen() {
var tds=document.getElementsByTagName('td');
ourtwo=1;
for (var itds=0; itds<tds.length; itds++) {
if (('' + tds[itds].id).indexOf('cell') == 0) {
if (eval('' + tds[itds].innerText.length) < 7) {
//alert(tds[0].innerHTML.split('rotate(')[1].split('deg')[0]);
var zx=(tds[0].innerHTML.replace(/sub/g,'sup').replace('rotate(' + tds[0].innerHTML.split('rotate(')[1].split('deg')[0],'rotate(' + eval(360 - ten)).replace('rotate(' + tds[0].innerHTML.split('rotate(')[1].split('deg')[0],'rotate(' + eval(360 - ten)).replace('rotate(' + tds[0].innerHTML.split('rotate(')[1].split('deg')[0],'rotate(' + eval(360 - ten)).replace('rotate(' + tds[0].innerHTML.split('rotate(')[1].split('deg')[0],'rotate(' + eval(360 - ten)));
ten=eval(-1 * ten);
ourtwo=itds;
tds[itds].innerHTML=tds[0].innerHTML.replace(' style="',' style="color:blue;margin-top:-256px;').replace(/0001/g,'0002').replace(/sub/g,'sup').replace('rotate(' + tds[0].innerHTML.split('rotate(')[1].split('deg')[0],'rotate(' + eval(ten)).replace(/\,\-20px/g,',32px');
document.getElementById(('' + tds[itds].id).replace('cell','ecll')).innerHTML='<textarea rows=17 cols=80 id=' + ('' + tds[itds].id).replace('cell','taecll') + ' onclick="event.stopPropagation();" onblur=tait(this); style=width=100%;>' + document.getElementById('cell' + ('0000' + curcellnum).slice(-4)).innerHTML.replace(' style="',' style="color:blue;margin-top:-256px;').replace(/0001/g,'0002').replace(/sub/g,'sup').replace('rotate(' + tds[0].innerHTML.split('rotate(')[1].split('deg')[0],'rotate(' + eval(ten)).replace(/\,\-20px/g,',32px') + '</textarea>';
} else {
tds[itds].innerHTML=tds[itds].innerHTML.replace(/background\-color\:\ pink\;/g, 'background-color: white;').replace(/background\-color\:pink\;/g, 'background-color:white;');
document.getElementById(('' + tds[itds].id).replace('cell','ecll')).innerHTML='<textarea rows=17 cols=80 id=' + ('' + tds[itds].id).replace('cell','taecll') + ' onclick="event.stopPropagation();" onblur=tait(this); style=width=100%;>' + document.getElementById('cell' + ('0000' + curcellnum).slice(-4)).innerHTML + '</textarea>';
}
}
}
var recto=document.getElementById('fibothone').getBoundingClientRect();
//document.getElementById('fibothtwo').style.position='absolute';
//document.getElementById('fibothtwo').style.left='' + recto.left + 'px';
//document.getElementById('fibothtwo').style.top='' + recto.top + 'px';
//document.getElementById('fibothtwo').style.width='' + recto.width + 'px';
//document.getElementById('fibothtwo').style.height='' + recto.height + 'px';
document.getElementById('ifbothone').srcdoc=maybeclock(tds[0].innerHTML.replace(' style="', ' style="margin-top:0px;margin-left:0px;'));
document.getElementById('ifbothtwo').srcdoc=tds[ourtwo].innerHTML;
recto=document.getElementById('ifbothone').getBoundingClientRect();
document.getElementById('ifbothtwo').style.position='absolute';
document.getElementById('ifbothtwo').style.left='' + recto.left + 'px';
document.getElementById('ifbothtwo').style.top='' + recto.top + 'px';
document.getElementById('ifbothtwo').style.width='' + recto.width + 'px';
document.getElementById('ifbothtwo').style.height='' + recto.height + 'px';
recto=document.getElementById('fibothone').getBoundingClientRect();
document.getElementById('fibothtwo').style.position='absolute';
document.getElementById('fibothtwo').style.left='' + recto.left + 'px';
document.getElementById('fibothtwo').style.top='' + recto.top + 'px';
document.getElementById('fibothtwo').style.width='' + recto.width + 'px';
document.getElementById('fibothtwo').style.height='' + recto.height + 'px';
document.getElementById('fiboththree').style.position='absolute';
document.getElementById('fiboththree').style.left='' + recto.left + 'px';
document.getElementById('fiboththree').style.top='' + recto.top + 'px';
document.getElementById('fiboththree').style.width='' + recto.width + 'px';
document.getElementById('fiboththree').style.height='' + recto.height + 'px';
if (!oktolook && !preokay) {
preokay=true;
enableScroll();
} else {
preokay=true;
}

}

function premaybeclock() {
if (glinh != '') {
//alert('ct=' + ct + ' and glinh=' + glinh);
maybeclock(glinh);
}
}

function minuteang() {
var tss=('' + new Date());
if (cconto) {
cconto.body.title=tss;
}
document.getElementById('fiboththree').title=tss;
var th=eval(tss.split(':')[0].split(' ')[eval(-1 + tss.split(':')[0].split(' ').length)] % 12);
var tm=eval(tss.split(':')[1]);
var ts=eval(tss.split(':')[2].split(' ')[0].split('.')[0]);
tm+=eval(ts / 60);
return '' + eval((90 + tm * 6) % 360);
}

function hourang() {
var tss=('' + new Date());
var th=eval(tss.split(':')[0].split(' ')[eval(-1 + tss.split(':')[0].split(' ').length)] % 12);
var tm=eval(tss.split(':')[1]);
var ts=eval(tss.split(':')[2].split(' ')[0].split('.')[0]);
th+=eval(tm / 60);
th+=eval(ts / (60 * 60));
return '' + eval((90 + th * 30) % 360);
}

function maybeclock(linh) {
var absbit='position:absolute;top:350px;left:300px;';
var rotv=linh.split('rotate(')[1].split('deg')[0];
var thisfs=linh.split('font-size:')[1].split('px')[0];
var huh='<br><br><br><br><br><br><br><br><br><br><br><br>';
document.getElementById('fibothone').srcdoc='' + linh.replace('>' + document.getElementById('chars').value + '</su', ' id=lastsu>' + document.getElementById('chars').value + '</su').replace('margin-top:','padding-top:').replace('margin-left:','padding-left:').replace('rotate(' + rotv,'rotate(' + hourang()).replace(' style="', ' style="' + ct + cl + absbit + 'transform-origin:50% 33%;') + '<style> sub:last-of-type { font-weight:bold; color: olive !important; } sup:last-of-type { font-weight:bold; color: olive !important; } </style>'; //.replace(/inline\-block\;/g, 'inline;');
var origlinh=linh;
if (glinh == '') {
glinh=linh.replace('margin-top:','padding-top:').replace('margin-left:','padding-left:');
setInterval(premaybeclock, 5000);
}
while (origlinh.indexOf('font-size:' + thisfs + 'px') != -1) {
origlinh=origlinh.replace('font-size:' + thisfs + 'px', 'font-size:' + eval(-3 + eval('' + thisfs)) + 'px');
}
document.getElementById('fibothtwo').srcdoc='' + origlinh.replace('>' + document.getElementById('chars').value + '</su', ' id=lastsu>' + document.getElementById('chars').value + '</su').replace('margin-top:','padding-top:').replace('margin-left:','padding-left:').replace('rotate(' + rotv,'rotate(' + minuteang()).replace(' style="', ' style="' + absbit + 'text-shadow:-0.5px 0.5px 0.5px #95ff2d;transform-origin:50% 33%;color:rgba(0,0,255,0.4);') + '<style> sub:last-of-type { font-weight:bold; color: pink !important; } sup:last-of-type { font-weight:bold; color: pink !important; } </style>'; // + "<style>.logo { width: 100vw; height: 100vh; position: relative; } .logo__svg { width: 300px; height: 300px; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);}</style><div class=\"logo\"><svg class=\"logo__svg\"><circle cx=\"50%\" cy=\"50%\" r=\"150\" style=\"fill:rgba(255,0,0,0.6);stroke:white;stroke-width:1;\"/></svg></div>"; //.replace(/inline\-block\;/g, 'inline;');
document.getElementById('fiboththree').srcdoc="<head><title>" + ('' + new Date()) + "</title><style> .logo { width: 100vw; height: 100vh; position: relative; } .logo__svg { width: 312px; height: 312px; position: absolute; top: 47%; left: 49%; transform: translate(-50%, -50%); } </style></head><body id=xbody><div class=\"logo\"><svg class=\"logo__svg\"><circle cx=\"50%\" cy=\"50%\" r=\"155\" style=\"fill:rgba(255,0,0,1);stroke:white;stroke-width:1;\"/></svg></div></body>"; //.replace(/inline\-block\;/g, 'inline;');
return linh;
}

function sdfs(ones,twos) {
document.getElementById('ifbothone').srcdoc=maybeclock(ones.replace(' style="', ' style="margin-top:0px;margin-left:0px;'));
document.getElementById('ifbothtwo').srcdoc=twos;
}

function rit(cis) {
var outcis=cis;
var atend='';
for (var jits=1; jits<repeats; jits++) {
atend+='</' + ft + '>';
outcis+='<' + ft + ' class="ele' + ('0000' + cellnum).slice(-4) + ost(' mt') + '" title=' + ft + '>' + cis;
}
return ' style="font-size:' + fs + ';transform:rotate(' + ten + 'deg); ">' + outcis + atend;
}

function fbt(iois) {
if (iois != null) {
tconto = (iois.contentWindow || iois.contentDocument);
if (tconto != null) {
if (tconto.document) { tconto = tconto.document; }
if (tconto.body != null) {
if (tconto.body.innerHTML.indexOf('</sub>') != -1) {
if (tconto.body.innerHTML.indexOf('<') != -1) {
onets=tconto.getElementsByTagName(tconto.body.innerHTML.replace(/\<br\>/g,'').replace(/\<br\ \/\>/g,'').replace(/\<br\/\>/g,'').split('<')[1].split(' ')[0].split('>')[0]);
}
var subs=tconto.getElementsByTagName('sub');
//alert(subs[eval(-1 + subs.length)].outerHTML);
if (!trecto || 1 == 1) {
if (tconto.getElementById('lastsu')) {
trecto=tconto.getElementById('lastsu').getBoundingClientRect();
} else {
trecto=subs[eval(-1 + subs.length)].getBoundingClientRect();
}
//trecto=subs[0].getBoundingClientRect();
//subs[eval(-1 + subs.length)].style.backgroundColor='olive';
}
}
}
}
}
}


function fbc(iois) {
if (iois != null) {
cconto = (iois.contentWindow || iois.contentDocument);
if (cconto != null) {
if (cconto.document) { cconto = cconto.document; }
if (cconto.body != null) {
cconto.body.title=('' + new Date());
}
}
}
}

function analyze(iois) {
var arecto=null, brecto=null, brecto=null, elesa=[], subsups=[], huh='';
if (!oktolook) { return ''; }
if (iois != null) {
var aconto = (iois.contentWindow || iois.contentDocument);
if (aconto != null) {
if (aconto.document) { aconto = aconto.document; }
if (aconto.body != null) {
elesa=aconto.getElementsByTagName(aconto.body.innerHTML.split('<')[2].split(' ')[0].split('>')[0]);
for (var ivb=0; ivb<elesa.length; ivb+=eval(elesa.length / 2)) {
arecto=elesa[ivb].getBoundingClientRect();
if (ivb == 0 && iois.id == 'ifleft') {
subsups=aconto.getElementsByTagName('sub');
brecto=subsups[0].getBoundingClientRect();
crecto=subsups[eval(-1 + subsups.length)].getBoundingClientRect();
huh='arecto brecto crecto ' + String.fromCharCode(10);
huh+=' left: ' + arecto.left + ' ' + brecto.left + ' ' + crecto.left + ' ' + String.fromCharCode(10);
huh+=' top: ' + arecto.top + ' ' + brecto.top + ' ' + crecto.top + ' ' + String.fromCharCode(10);
huh+=' width: ' + arecto.width + ' ' + brecto.width + ' ' + crecto.width + ' ' + String.fromCharCode(10);
huh+='height: ' + arecto.height + ' ' + brecto.height + ' ' + crecto.height + ' ' + String.fromCharCode(10);
aconto.getElementById('mycontainer').style.width=aconto.getElementById('mycontainer').style.height; //'' + eval(eval('' + crecto.right) + 0 + eval(0.0 * eval('' + crecto.width))) + 'px';
//prompt(huh,'one;' + iois.id);
//aconto.body.innerHTML+='<div style="position:absolute;left:' + Math.max(0,arecto.left) + 'px;top:' + brecto.top + 'px;width:' + brecto.right + 'px;height:' + brecto.height + 'px;background-color:rgba(255,0,0,0.5);"></div>';
elesa[ivb].style.left='50px';
elesa[ivb].style.marginTop='75px';
for (var iop=0; iop<15; iop++) {
elesa[0].innerHTML.replace(subsups[eval(-1 + subsups.length)].outerHTML, subsups[eval(-1 + subsups.length)].outerHTML.replace('</sub>','') + subsups[eval(-1 + subsups.length)].outerHTML + '</sub>');
}
lconto=aconto;
lconto.querySelectorAll('sub').forEach(xsub => {
xsub.addEventListener('click', () => {
alert('Diagonal to square 276 x 276 ... ' + (eval(276 / Math.sin(45))) + ' pixels long');
});
});
} else {
subsups=aconto.getElementsByTagName('su' + aconto.body.innerHTML.split('</su')[1].split('>')[0]);
brecto=subsups[0].getBoundingClientRect();
crecto=subsups[eval(-1 + subsups.length)].getBoundingClientRect();
huh='arecto brecto crecto ' + String.fromCharCode(10);
huh+=' left: ' + arecto.left + ' ' + brecto.left + ' ' + crecto.left + ' ' + String.fromCharCode(10);
huh+=' top: ' + arecto.top + ' ' + brecto.top + ' ' + crecto.top + ' ' + String.fromCharCode(10);
huh+=' width: ' + arecto.width + ' ' + brecto.width + ' ' + crecto.width + ' ' + String.fromCharCode(10);
huh+='height: ' + arecto.height + ' ' + brecto.height + ' ' + crecto.height + ' ' + String.fromCharCode(10);
if (iois.id == 'ifright') {
elesa[ivb].style.left='50px';
subsups=aconto.getElementsByTagName('su' + aconto.body.innerHTML.split('</su')[1].split('>')[0]);
brecto=subsups[0].getBoundingClientRect();
crecto=subsups[eval(-1 + subsups.length)].getBoundingClientRect();
//prompt(huh,'two;' + iois.id);
}
aconto.getElementById('mycontainer').style.width=aconto.getElementById('mycontainer').style.height; //'' + eval(eval('' + crecto.right) + 0 + eval(0.0 * eval('' + crecto.width))) + 'px';
//aconto.body.innerHTML+='<div style="position:absolute;left:' + Math.max(0,arecto.left) + 'px;bottom:' + arecto.bottom + 'px;width:' + brecto.right + 'px;height:' + brecto.height + 'px;background-color:rgba(0,255,0,0.5);"></div>';
if (iois.id == 'ifright') {
oktolook=false;
var xtdcrect=null;
if (document.getElementById('ifleft')) {
xtdcrect=document.getElementById('ifleft').getBoundingClientRect();
} else {
xtdcrect=document.getElementById('tdcontainer').getBoundingClientRect();
}
iois.style.top='' + xtdcrect.top + 'px';
iois.style.left='' + xtdcrect.left + 'px';
elesa=aconto.getElementsByTagName(aconto.body.innerHTML.split('<')[2].split(' ')[0].split('>')[0]);
subsups=aconto.getElementsByTagName('su' + aconto.body.innerHTML.split('</su')[1].split('>')[0]);
arecto=elesa[ivb].getBoundingClientRect();
brecto=subsups[0].getBoundingClientRect();
crecto=subsups[eval(-1 + subsups.length)].getBoundingClientRect();
//aconto.getElementById('mycontainer').style.width='' + eval(eval('' + crecto.right) + 0 + eval(0.0 * eval('' + crecto.width))) + 'px';
for (var iozp=0; iozp<15; iozp++) {
elesa[0].innerHTML.replace(subsups[eval(-1 + subsups.length)].outerHTML, subsups[eval(-1 + subsups.length)].outerHTML.replace('</sup>','') + subsups[eval(-1 + subsups.length)].outerHTML + '</sup>');
}
huh='arecto brecto crecto ' + String.fromCharCode(10);
huh+=' left: ' + arecto.left + ' ' + brecto.left + ' ' + crecto.left + ' ' + String.fromCharCode(10);
huh+=' top: ' + arecto.top + ' ' + brecto.top + ' ' + crecto.top + ' ' + String.fromCharCode(10);
huh+=' x: ' + arecto.x + ' ' + brecto.x + ' ' + crecto.x + ' ' + String.fromCharCode(10);
huh+=' y: ' + arecto.y + ' ' + brecto.y + ' ' + crecto.y + ' ' + String.fromCharCode(10);
huh+=' width: ' + arecto.width + ' ' + brecto.width + ' ' + crecto.width + ' ' + String.fromCharCode(10);
huh+='height: ' + arecto.height + ' ' + brecto.height + ' ' + crecto.height + ' ' + String.fromCharCode(10);
//prompt(huh,'tWo;' + iois.id);
aconto.getElementById('xbr').style.position='absolute';
aconto.getElementById('xbr').style.left='33px';
aconto.getElementById('xbr').style.top='40px';
aconto.getElementById('xbr').style.width='276px';
aconto.getElementById('xbr').style.height='276px';
aconto.getElementById('xbr').style.backgroundColor='orange';
aconto.getElementById('xbr').title='Square 276 x 276';
rconto=aconto;
rconto.querySelectorAll('sup').forEach(xsub => {
xsub.addEventListener('click', () => {
alert('Diagonal to square 276 x 276 ... ' + (eval(276 / Math.sin(45))) + ' pixels long');
});
});
//subsups[eval(-1 + subsups.length)].title='Diagonal to square 276 x 276 ... ' + (eval(276 / Math.sin(45))) + ' pixels long';
//setTimeout(function(){ document.getElementById('precon').style.display='table-cell'; }, 3000);
if (!oktolook && preokay) {
enableScroll();
}
}
}
}
}
}
}

if (iois.id == 'ifright' && 5 == 7) {
var xtdcrect=parent.document.getElementById('ifleft').getBoundingClientRect();
iois.style.top='' + xrectcrect.top + 'px';
iois.style.left='' + xrectcrect.left + 'px';
}
}

function fbo(iois) {
if (iois != null) {
oconto = (iois.contentWindow || iois.contentDocument);
if (oconto != null) {
if (oconto.document) { oconto = oconto.document; }
if (oconto.body != null) {
if (oconto.body.innerHTML.indexOf('</sub>') != -1) {
if (oconto.body.innerHTML.indexOf('<') != -1) {
twots=oconto.getElementsByTagName(oconto.body.innerHTML.replace(/\<br\>/g,'').replace(/\<br\ \/\>/g,'').replace(/\<br\/\>/g,'').split('<')[1].split(' ')[0].split('>')[0]);
}
var subs=oconto.getElementsByTagName('sub');
//alert(subs[eval(-1 + subs.length)].outerHTML);
if (!orecto || 1 == 1) {
if (oconto.getElementById('lastsu')) {
orecto=oconto.getElementById('lastsu').getBoundingClientRect();
} else {
orecto=subs[eval(-1 + subs.length)].getBoundingClientRect();
}
//orecto=subs[0].getBoundingClientRect();
//subs[eval(-1 + subs.length)].style.backgroundColor='pink';
}
}
}
}
}
}

function tom() {
var wasq=0;
if (1 == 1 || (trecto && orecto)) {
//var mtopt=0, mleftt=0;
//var mtopo=0, mlefto=0;
if (trecto && orecto) {
if (mtopt == 0 || 3 == 3) {
wasq=mtopt;
mtopt=eval(1.0 * eval(eval(Math.round(trecto.top) + Math.round(trecto.height) / 1) - eval(Math.round(orecto.top) + Math.round(orecto.height) / 1)));
//ct='text-shadow:-0.5px 0.5px 0.5px #ff2d95;margin-top:' + mtopt + 'px;';
mleftt=eval(0 + eval(eval(Math.round(trecto.left) + Math.round(trecto.width) / 1) - eval(Math.round(orecto.left) + Math.round(orecto.width) / 1)));
//cl='margin-left:' + mleftt + 'px;';
if (wasq == 0) {
onets[0].style.marginTop='' + mtopt + 'px';
onets[0].style.marginLeft='' + mleftt + 'px';
}
//document.title='t: ' + eval(Math.round(trecto.left) + Math.round(trecto.width) / 1) + ',' + eval(Math.round(trecto.top) + Math.round(trecto.height) / 1) + ' o: ' + eval(Math.round(orecto.left) + Math.round(orecto.width) / 1) + ',' + eval(Math.round(orecto.top) + Math.round(orecto.height) / 1);
}
}
setTimeout(tom, 500);
} else {
setTimeout(tom, 2000);
}
}

function jccheck() {
if (document.URL.indexOf('justclock=') != -1) {
setTimeout(function() { document.getElementById('fibothone').scrollIntoView(); }, 15000);
}
if (document.URL.indexOf('justsquare=') != -1) {
setTimeout(function() { document.getElementById('prerrow').scrollIntoView(); }, 15000);
}

setTimeout(function(){
if (document.getElementById('taecll0001') && document.getElementById('taecll0002')) {
//alert(document.getElementById('taecll0001').value.replace(' style="',' style="margin-left:40px;'));
document.getElementById('mycontainer').innerHTML=document.getElementById('taecll0001').value.replace(' style="',' style="margin-left:40px;').replace(/rotate\(8/g, 'rotate(0').replace(/rotate\(\-8/g, 'rotate(0').replace(' id="', ' id=tl class="') + document.getElementById('taecll0002').value.replace(/rotate\(8/g, 'rotate(0').replace(/rotate\(\-8/g, 'rotate(0').replace(' id="', ' id=br class="');
var rectbr=document.getElementById('br').getBoundingClientRect();
document.getElementById('mycontainer').style.width='' + eval(0.70710678118 * eval(0.70710678118 * Math.sqrt((Math.abs(rectbr.width) * Math.abs(rectbr.width)) + (Math.abs(rectbr.height) * Math.abs(rectbr.height))))) + 'px';
document.getElementById('mycontainer').style.height='' + eval(0.70710678118 * eval(0.70710678118 * Math.sqrt((Math.abs(rectbr.width) * Math.abs(rectbr.width)) + (Math.abs(rectbr.height) * Math.abs(rectbr.height))))) + 'px';
sd=document.getElementById('taecll0001').value.replace(' style="',' style="margin-left:40px;').replace('margin-top:-256px;','').replace(/rotate\(8/g, 'rotate(0').replace(' id="', ' id=tl class="rotated-text-tl-to-br ');
sd=sd +'</div>' + document.getElementById('taecll0001').value.replace(' style="margin-left:40px;',' style="').replace('margin-top:-256px;','').replace(/rotate\(8/g, 'rotate(0').replace(' id="', ' id=xtl class="rotated-text-tl-to-br ').replace(/\ id\=\"/g, ' id="x').replace(/\ class\=\"/g, ' class="x').replace(' style="', ' style="padding-top:20px;opacity:0.2;color:transparent;');
sdtwo=document.getElementById('taecll0002').value.replace('margin-top:-256px;','').replace(/rotate\(8/g, 'rotate(0').replace(/rotate\(\-8/g, 'rotate(0').replace(/rotate\(\-8/g, 'rotate(0').replace(' id="', ' id=br class="rotated-text-bl-to-tr ');
sdtwo=sdtwo + '</div>' + document.getElementById('taecll0002').value.replace('margin-top:-256px;','').replace(/rotate\(8/g, 'rotate(0').replace(/rotate\(\-8/g, 'rotate(0').replace(/rotate\(\-8/g, 'rotate(0').replace(' id="', ' id=xbr class="rotated-text-bl-to-tr ').replace(/\ id\=\"/g, ' id="x').replace(/\ class\=\"/g, ' class="x').replace('color:blue;','').replace(' style="', ' style="margin-top:-256px;opacity:0.3;color:transparent;'); // used to be -520
setTimeout(function(){
var tdcrect=document.getElementById('tdcontainer').getBoundingClientRect();
document.getElementById('tdcontainer').innerHTML='<iframe frameborder=0 id=ifleft onload="analyze(this);" style=opacity:0.6;width:100%;height:100%;background-color:white; srcdoc="<style>' + document.getElementById('mystyle').innerHTML.replace('background-color: silver;',' ').replace(/\"/g,"'").replace('800px', '' + document.getElementById('mycontainer').style.width + '').replace('800px', '' + document.getElementById('mycontainer').style.height + '') + '</style>' + document.getElementById('mycontainer').outerHTML.split('>')[0].replace(' style="',' style="background-color:white;').replace(/\"/g,"'") + '>' + sd.replace(/\"/g,"'") + '</div>'.replace('</div>','') + '"></iframe>' + '<iframe frameborder=0 id=ifright onload="analyze(this);" style="position:absolute;top:' + tdcrect.top + 'px;left:' + tdcrect.left + 'px;opacity:0.6;width:100%;height:100%;background-color:white;" srcdoc="<style>' + document.getElementById('mystyle').innerHTML.replace('background-color: silver;',' ').replace(/\"/g,"'").replace('800px', '' + document.getElementById('mycontainer').style.width + '').replace('800px', '' + document.getElementById('mycontainer').style.height + '') + '</style>' + document.getElementById('mycontainer').outerHTML.split('>')[0].replace(' style="',' style="background-color:white;').replace(/\"/g,"'") + '>' + sdtwo.replace(/\"/g,"'").replace('margin-top:-256px;','').replace('margin-top:-256px;','') + '</div>'.replace('</div>','') + '"></iframe>';
//document.getElementById('rrow0001').innerHTML='<td id=tdcontainer colspan=2 style=text-align:center;><iframe frameborder=0 id=ifleft onload="analyze(this);" style=opacity:0.6;width:100%;height:100%;background-color:white; srcdoc="<style>' + document.getElementById('mystyle').innerHTML.replace('background-color: silver;',' ').replace(/\"/g,"'").replace('800px', '' + document.getElementById('mycontainer').style.width + '').replace('800px', '' + document.getElementById('mycontainer').style.height + '') + '</style>' + document.getElementById('mycontainer').outerHTML.split('>')[0].replace(' style="',' style="background-color:white;').replace(/\"/g,"'") + '>' + sd.replace(/\"/g,"'") + '</div>'.replace('</div>','') + '"></iframe>' + '<iframe frameborder=0 id=ifright onload="analyze(this);" style="position:absolute;top:' + tdcrect.top + 'px;left:' + tdcrect.left + 'px;opacity:0.6;width:100%;height:100%;background-color:white;" srcdoc="<style>' + document.getElementById('mystyle').innerHTML.replace('background-color: silver;',' ').replace(/\"/g,"'").replace('800px', '' + document.getElementById('mycontainer').style.width + '').replace('800px', '' + document.getElementById('mycontainer').style.height + '') + '</style>' + document.getElementById('mycontainer').outerHTML.split('>')[0].replace(' style="',' style="background-color:white;').replace(/\"/g,"'") + '>' + sdtwo.replace(/\"/g,"'").replace('margin-top:-256px;','').replace('margin-top:-256px;','') + '</div>'.replace('</div>','') + '"></iframe></td>';
}, 2000);
}
}, 2000);
}

function lineDistance(x, y, x0, y0) { // thanks to https://codepen.io/daveboling/pen/jWOorz
return Math.sqrt((x -= x0) * x + (y -= y0) * y);
}

function ourDrawLine(myxs1, myys1) { // thanks to https://codepen.io/daveboling/pen/jWOorz
var xs0=0, ys1=0;
if (relevant && xs.length > 0) {
if (xs.length > 1) { return ''; }
if (xs.length > 1) {
if (xs[0] > xs[1]) {
xs0=xs[0];
ys0=ys[0];
myxs1=xs[1];
myys1=ys[1];
} else {
xs0=xs[1];
ys0=ys[1];
myxs1=xs[0];
myys1=ys[0];
}
} else if (xs[0] > myxs1) {
xs0=myxs1;
ys0=myys1;
myxs1=xs[0];
myys1=ys[0];
} else {
xs0=xs[0];
ys0=ys[0];
}
var zangle = Math.atan2(myys1 - ys0, myxs1 - xs0) * 180 / Math.PI;
var zdistance = lineDistance(xs0, ys0, myxs1, myys1);
if (eval('' + zdistance) >= 40) {
var xs1=xs0 + Math.sin(eval(zangle + 90.0) / (180 / Math.PI)) * zdistance;
var ys1=ys0 + Math.cos(eval(zangle + 90.0) / (180 / Math.PI)) * zdistance;
var trf='';
trf+=' translate(' + eval((xs1 - xs0) / 2) + 'px,' + eval((ys0 - ys1) / 2) + 'px) ';
console.log('(x,y)=(' + xs0 + ',' + ys0 + ') bearing=' + eval(zangle + 90.0) + ' and angle=' + zangle + ' and distance=' + zdistance + ' trf=' + trf + ' left=' + eval(xs0 - eval((myxs1 - xs0) / 2)) + 'px');
document.getElementById('rubberband').innerHTML='<hr id=myhr style=z-index:300;background-color:transparent;background-color:rgba(255,0,0,0.5);width:' + zdistance + 'px;></hr><div id=drect></div>';
document.getElementById('myhr').style.position='absolute';
document.getElementById('myhr').style.zIndex='300';
document.getElementById('myhr').style.margin='0 0 0 0';
document.getElementById('myhr').style.padding='0 0 0 0';
//document.getElementById('myhr').style.opacity='0.5';
document.getElementById('myhr').style.left='' + eval(xs0 - eval(Math.abs(myxs1 - xs0) / 2)) + 'px';
//document.getElementById('myhr').style.left='' + xs0 + 'px';
document.getElementById('myhr').style.top='' + ys0 + 'px';
document.getElementById('myhr').style.transformOrigin='' + xs0 + 'px ' + ys0 + 'px';
document.getElementById('myhr').style.transform='rotate(' + eval(360.0 + zangle) + 'deg)'; // + trf;
//document.getElementById('myhr').style.backgroundColor='transparent';
document.getElementById('rubberband').style.backgroundColor='transparent';
document.getElementById('myhr').style.marginLeft='' + eval(xs0 - document.getElementById('myhr').getBoundingClientRect().left) + 'px';
if (ys0 < myys1) {
document.getElementById('myhr').style.marginTop='' + eval(ys0 - document.getElementById('myhr').getBoundingClientRect().top) + 'px';
} else {
document.getElementById('myhr').style.marginTop='' + eval(myys1 - document.getElementById('myhr').getBoundingClientRect().top) + 'px';
}
document.getElementById('myhr').style.borderBottom='1px dashed green';
document.getElementById('myhr').title='Click again for further line and rectangle and annotation and text options';
document.getElementById('myhr').title='Rubber banding retained rectangle with hr diagonal';
document.getElementById('rubberband').style.zIndex='300';

document.getElementById('drect').style.position='absolute';
document.getElementById('drect').style.zIndex='300';
document.getElementById('drect').style.margin='0 0 0 0';
document.getElementById('drect').style.padding='0 0 0 0';
document.getElementById('drect').style.opacity='0.5';
document.getElementById('drect').style.left='' + Math.min(xs0,myxs1) + 'px';
document.getElementById('drect').style.top='' + Math.min(ys0,myys1) + 'px';
document.getElementById('drect').style.width='' + Math.abs(xs0 - myxs1) + 'px';
document.getElementById('drect').style.height='' + Math.abs(ys0 - myys1) + 'px';
document.getElementById('drect').style.backgroundColor='transparent';
document.getElementById('drect').style.border='1px dotted green';
document.getElementById('drect').title='Click again for further line and rectangle and annotation and text options';
document.getElementById('drect').title='Rubber banding retained rectangle with hr diagonal';
if (document.getElementById('rubberband').innerHTML != '') {
lastrub=document.getElementById('rubberband').outerHTML;
if (!lastrubvalid) {
lastrubvalid=true;
setTimeout(whenlastrubinvalid, 1000);
}
lastrubvalid=true;
}
console.log(document.getElementById('rubberband').outerHTML + ' ' + document.getElementById('myhr').getBoundingClientRect().left + ' ' + document.getElementById('myhr').getBoundingClientRect().top);
}
} else {
relevant=false;
document.getElementById('rubberband').innerHTML='';
lastrubvalid=false;
}
}

function tbs() {
document.getElementById('rubberband').innerHTML='';
lastrubvalid=false;
}

function hideIt() {
document.getElementById('custom-alert-1').style.display='none';
}

function showPromptIt() {
showing=true;
showingc=false;
document.getElementById('custom-prompt-1').style.display='block';
if (cpone == '') {
cpone=document.getElementById('custom-prompt-1').innerHTML;
}
setTimeout(hidePromptIt, 20000);
}

function hidePromptIt() {
showing=false;
showingc=false;
document.getElementById('custom-prompt-1').style.display='none';
setTimeout(showPromptIt, 10000);
}

function xize(thexs, thex, they) {
console.log(thexs);
console.log('x=' + thex + ' and y=' + they);
return '';
}

function omd(e) {
if (relevant) {
var yes=false;
if (areaclick) {
areaclick=false;
} else {
e = e || window.event;
e.preventDefault();
console.log('click showingc=' + showingc);
if (!showingc) {
startrecording=true;
if (e.originalEvent) {
if (e.originalEvent.touches) {
yes=true;
}
}
var rectis=document.body.getBoundingClientRect();
if (e.touches) {
if (e.touches[0].pageX) {
console.log('a click showingc=' + showingc);
x = e.touches[0].pageX;
y = e.touches[0].pageY;
if (eval('' + xs.length) == 0) {
//alert('0:' + document.body.offsetLeft + ',' + document.body.offsetTop);
document.getElementById('blob').innerHTML+='<div class=dblob onmouseover=" blobover(this); " onmouseout=" blobout(this);" onclick=" blobdel(this.id); " title="" id="bpdftext' + coordn + '" style="position:absolute;left:' + eval(0 + x) + 'px;top:' + eval(0 + y) + 'px;background-color:red;z-index:100;">x</div>';
document.getElementById('immap').innerHTML+="<area id=area" + areacnt + " alt='" + cidurls + "' shape=rect onclick=ack(this.alt," + coordn + ",true); coords='" + eval(-8 + x) + "," + eval(-8 + y) + "," + eval(8 + x) + "," + eval(8 + y) + "' nohref />";
areacnt++;
xs.push(x);
ys.push(y);
xxs.push(x);
yys.push(y);
setTimeout(askaway,eval('' + fourfive));
} else if (eval('' + xs.length) >= 2) {
xxs.push(x);
yys.push(y);
if (eval('' + xs.length) == 2) {
// document.title+=' | ';
xs.push(Math.abs(xs[0] - xs[1]));
ys.push(Math.abs(ys[0] - ys[1]));
xs.push(Math.abs(xs[0] - xs[1]));
ys.push(Math.abs(ys[0] - ys[1]));
xs[0]=Math.min(xs[0], xs[1]);
ys[0]=Math.min(ys[0], ys[1]);
xs[1]=xs[2];
ys[1]=ys[2];
x=xs[0];
y=ys[0];
// alert(xs.length + ' ? RE rect');
} else {
x=xs[0];
y=ys[0];
if (eval('' + xs.length) == 4) { xs[0]+=0.00001; }
}
} else {
xxs.push(x);
yys.push(y);
xs.push(x);
ys.push(y);
x=xs[0];
y=ys[0];
}
} else {
console.log('b click showingc=' + showingc);
x = eval(-rectis.left + e.touches[0].clientX);
y = eval(-rectis.top + e.touches[0].clientY);
if (eval('' + xs.length) == 0) {
//alert('1:' + document.body.offsetLeft + ',' + document.body.offsetTop);
document.getElementById('blob').innerHTML+='<div class=dblob onmouseover=" blobover(this); " onmouseout=" blobout(this);" onclick=" blobdel(this.id); " title="" id="bpdftext' + coordn + '" style="position:absolute;left:' + eval(0 + x) + 'px;top:' + eval(0 + y) + 'px;background-color:red;z-index:100;">x</div>';
document.getElementById('immap').innerHTML+="<area id=area" + areacnt + " alt='" + cidurls + "' shape=rect onclick=ack(this.alt," + coordn + ",true); coords='" + eval(-8 + x) + "," + eval(-8 + y) + "," + eval(8 + x) + "," + eval(8 + y) + "' nohref />";
areacnt++;
xs.push(x);
ys.push(y);
xxs.push(x);
yys.push(y);
setTimeout(askaway,eval('' + fourfive));
} else if (eval('' + xs.length) >= 2) {
xxs.push(x);
yys.push(y);
if (eval('' + xs.length) == 2) {
// document.title+=' | ';
xs.push(Math.abs(xs[0] - xs[1]));
ys.push(Math.abs(ys[0] - ys[1]));
xs.push(Math.abs(xs[0] - xs[1]));
ys.push(Math.abs(ys[0] - ys[1]));
xs[0]=Math.min(xs[0], xs[1]);
ys[0]=Math.min(ys[0], ys[1]);
xs[1]=xs[2];
ys[1]=ys[2];
x=xs[0];
y=ys[0];
// alert(xs.length + ' ? RE rect');
} else {
x=xs[0];
y=ys[0];
if (eval('' + xs.length) == 4) { xs[0]+=0.00001; }
}
} else {
xxs.push(x);
yys.push(y);
xs.push(x);
ys.push(y);
x=xs[0];
y=ys[0];
}
}
//console.log('pos3=' + pos3 + ',pos4=' + pos4);
} else if (yes) {
console.log('c click showingc=' + showingc);

if (e.originalEvent.touches[0].pageX) {
x = e.originalEvent.touches[0].pageX;
y = e.originalEvent.touches[0].pageY;
if (eval('' + xs.length) == 0) {
//alert('0:' + document.body.offsetLeft + ',' + document.body.offsetTop);
document.getElementById('blob').innerHTML+='<div class=dblob onmouseover=" blobover(this); " onmouseout=" blobout(this);" onclick=" blobdel(this.id); " title="" id="bpdftext' + coordn + '" style="position:absolute;left:' + eval(0 + x) + 'px;top:' + eval(0 + y) + 'px;background-color:red;z-index:100;">x</div>';
document.getElementById('immap').innerHTML+="<area id=area" + areacnt + " alt='" + cidurls + "' shape=rect onclick=ack(this.alt," + coordn + ",true); coords='" + eval(-8 + x) + "," + eval(-8 + y) + "," + eval(8 + x) + "," + eval(8 + y) + "' nohref />";
areacnt++;
xs.push(x);
ys.push(y);
xxs.push(x);
yys.push(y);
setTimeout(askaway,eval('' + fourfive));
} else if (eval('' + xs.length) >= 2) {
xxs.push(x);
yys.push(y);
if (eval('' + xs.length) == 2) {
// document.title+=' | ';
xs.push(Math.abs(xs[0] - xs[1]));
ys.push(Math.abs(ys[0] - ys[1]));
xs.push(Math.abs(xs[0] - xs[1]));
ys.push(Math.abs(ys[0] - ys[1]));
xs[0]=Math.min(xs[0], xs[1]);
ys[0]=Math.min(ys[0], ys[1]);
xs[1]=xs[2];
ys[1]=ys[2];
x=xs[0];
y=ys[0];
// alert(xs.length + ' ? RE rect');
} else {
x=xs[0];
y=ys[0];
if (eval('' + xs.length) == 4) { xs[0]+=0.00001; }
}
} else {
xxs.push(x);
yys.push(y);
xs.push(x);
ys.push(y);
x=xs[0];
y=ys[0];
}
} else {
x = eval(-rectis.left + e.originalEvent.touches[0].clientX);
y = eval(-rectis.top + e.originalEvent.touches[0].clientY);
if (eval('' + xs.length) == 0) {
//alert('1:' + document.body.offsetLeft + ',' + document.body.offsetTop);
document.getElementById('blob').innerHTML+='<div class=dblob onmouseover=" blobover(this); " onmouseout=" blobout(this);" onclick=" blobdel(this.id); " title="" id="bpdftext' + coordn + '" style="position:absolute;left:' + eval(0 + x) + 'px;top:' + eval(0 + y) + 'px;background-color:red;z-index:100;">x</div>';
document.getElementById('immap').innerHTML+="<area id=area" + areacnt + " alt='" + cidurls + "' shape=rect onclick=ack(this.alt," + coordn + ",true); coords='" + eval(-8 + x) + "," + eval(-8 + y) + "," + eval(8 + x) + "," + eval(8 + y) + "' nohref />";
areacnt++;
xs.push(x);
ys.push(y);
xxs.push(x);
yys.push(y);
setTimeout(askaway,eval('' + fourfive));
} else if (eval('' + xs.length) >= 2) {
xxs.push(x);
yys.push(y);
if (eval('' + xs.length) == 2) {
// document.title+=' | ';
xs.push(Math.abs(xs[0] - xs[1]));
ys.push(Math.abs(ys[0] - ys[1]));
xs.push(Math.abs(xs[0] - xs[1]));
ys.push(Math.abs(ys[0] - ys[1]));
xs[0]=Math.min(xs[0], xs[1]);
ys[0]=Math.min(ys[0], ys[1]);
xs[1]=xs[2];
ys[1]=ys[2];
x=xs[0];
y=ys[0];
// alert(xs.length + ' ? RE rect');
} else {
x=xs[0];
y=ys[0];
if (eval('' + xs.length) == 4) { xs[0]+=0.00001; }
}
} else {
xxs.push(x);
yys.push(y);
xs.push(x);
ys.push(y);
x=xs[0];
y=ys[0];
}
//setTimeout(askaway,eval('' + fourfive));
}
//console.log('pos3=' + pos3 + ',pos4=' + pos4);


} else if (e.clientX || e.clientY) {
console.log('d click showingc=' + showingc);
x = eval(-rectis.left + e.clientX);
y = eval(-rectis.top + e.clientY);
if (eval('' + xs.length) == 0) {
console.log('dd click showingc=' + showingc);
//alert('2:' + rectis.left + ',' + rectis.top);
document.getElementById('blob').innerHTML+='<div class=dblob onmouseover=" blobover(this); " onmouseout=" blobout(this);" onclick=" blobdel(this.id); " title="" id="bpdftext' + coordn + '" style="position:absolute;left:' + eval(0 + x) + 'px;top:' + eval(0 + y) + 'px;background-color:red;z-index:100;">x</div>';
document.getElementById('immap').innerHTML+="<area id=area" + areacnt + " alt='" + cidurls + "' shape=rect onclick=ack(this.alt," + coordn + ",true); coords='" + eval(-8 + x) + "," + eval(-8 + y) + "," + eval(8 + x) + "," + eval(8 + y) + "' nohref />";
areacnt++;
xs.push(x);
ys.push(y);
xxs.push(x);
yys.push(y);
console.log('ddd click showingc=' + showingc);
setTimeout(askaway,eval('' + fourfive));
console.log('dddd click showingc=' + showingc);
} else if (eval('' + xs.length) >= 2) {
xxs.push(x);
yys.push(y);
if (eval('' + xs.length) == 2) {
// document.title+=' | ';
xs.push(Math.abs(xs[0] - xs[1]));
ys.push(Math.abs(ys[0] - ys[1]));
xs.push(Math.abs(xs[0] - xs[1]));
ys.push(Math.abs(ys[0] - ys[1]));
xs[0]=Math.min(xs[0], xs[1]);
ys[0]=Math.min(ys[0], ys[1]);
xs[1]=xs[2];
ys[1]=ys[2];
x=xs[0];
y=ys[0];
// alert(xs.length + ' ? RE rect');
} else {
x=xs[0];
y=ys[0];
if (eval('' + xs.length) == 4) { xs[0]+=0.00001; }
}
} else {
xxs.push(x);
yys.push(y);
xs.push(x);
ys.push(y);
x=xs[0];
y=ys[0];
}
} else {
console.log('e click showingc=' + showingc);
x = e.pageX;
y = e.pageY;
if (eval('' + xs.length) == 0) {
//alert('3:' + document.body.offsetLeft + ',' + document.body.offsetTop);
document.getElementById('blob').innerHTML+='<div class=dblob onmouseover=" blobover(this); " onmouseout=" blobout(this);" onclick=" blobdel(this.id); " title="" id="bpdftext' + coordn + '" style="position:absolute;left:' + eval(0 + x) + 'px;top:' + eval(0 + y) + 'px;background-color:red;z-index:100;">x</div>';
document.getElementById('immap').innerHTML+="<area id=area" + areacnt + " alt='" + cidurls + "' shape=rect onclick=ack(this.alt," + coordn + ",true); coords='" + eval(-8 + x) + "," + eval(-8 + y) + "," + eval(8 + x) + "," + eval(8 + y) + "' nohref />";
areacnt++;
xs.push(x);
ys.push(y);
xxs.push(x);
yys.push(y);
setTimeout(askaway,eval('' + fourfive));
} else if (eval('' + xs.length) >= 2) {
xxs.push(x);
yys.push(y);
if (eval('' + xs.length) == 2) {
// document.title+=' | ';
xs.push(Math.abs(xs[0] - xs[1]));
ys.push(Math.abs(ys[0] - ys[1]));
xs.push(Math.abs(xs[0] - xs[1]));
ys.push(Math.abs(ys[0] - ys[1]));
xs[0]=Math.min(xs[0], xs[1]);
ys[0]=Math.min(ys[0], ys[1]);
xs[1]=xs[2];
ys[1]=ys[2];
x=xs[0];
y=ys[0];
// alert(xs.length + ' ? RE rect');
} else {
x=xs[0];
y=ys[0];
if (eval('' + xs.length) == 4) { xs[0]+=0.00001; }
}
} else {
xxs.push(x);
yys.push(y);
xs.push(x);
ys.push(y);
x=xs[0];
y=ys[0];
}
}
} else {
console.log('z click showingc=' + showingc);
}
}
}
}


function askaway() {
var retval=true;
var awb='';
if (awobackup != '') { awb='u for Undo Last ' + String.fromCharCode(10); }
console.log('at askaway fans=' + fans);
if (fans.trim() != '') { return false; }
var ans=' ', filledr='', xfilledr='';
var plusy='';
fans='';
jfans=0;
if (eval('' + xs.length) > 1) {
if (eval('' + xs.length) < 3) {
if (5 == 5) {
fans='x';
} else {
fans=prompt('Draw a line? ' + String.fromCharCode(10) + String.fromCharCode(10) + 'OK for line ' + String.fromCharCode(10) + 'Cancel for text ' + String.fromCharCode(10) + 'x for rectangle ' + String.fromCharCode(10) + '* for infilled rectangle ' + String.fromCharCode(10) + awb + '+ for Annotations and Signatures Canvas Menu', '');
}
//awobackup='';
//document.getElementById('sfilter').value='';
//document.getElementById('redoopt').style.display='none';
if (fans != null) {
if (fans.trim().toLowerCase().substring(0,1) != 'u') {
awobackup='';
document.getElementById('sfilter').value='';
document.getElementById('redoopt').style.display='none';
}
}
if (fans != null) {
if (fans.trim().toLowerCase() == 'x') {
xfilledr='';
xs.push(Math.abs(xs[0] - xs[1]));
ys.push(Math.abs(ys[0] - ys[1]));
xs.push(Math.abs(xs[0] - xs[1]));
ys.push(Math.abs(ys[0] - ys[1]));
xs[0]=Math.min(xs[0], xs[1]);
ys[0]=Math.min(ys[0], ys[1]);
xs[1]=xs[2];
ys[1]=ys[2];
x=xs[0];
y=ys[0];
fans=' ';
} else if (fans.trim().toLowerCase().substring(0,1) == 'u') {
redo();
xs=[];
ys=[];
xxs=[];
yys=[];
fans='';
return '';
} else if (fans.trim().toLowerCase() == '*') {
xfilledr='x';
xs.push(Math.abs(xs[0] - xs[1]));
ys.push(Math.abs(ys[0] - ys[1]));
xs.push(Math.abs(xs[0] - xs[1]));
ys.push(Math.abs(ys[0] - ys[1]));
xs[0]=Math.min(xs[0], xs[1]);
ys[0]=Math.min(ys[0], ys[1]);
xs[1]=xs[2];
ys[1]=ys[2];
x=xs[0];
y=ys[0];
fans=' ';
}
}
} else {
if (Math.abs(xs[0] - x) <= 0.000004) {
xfilledr='';
if (5 == 5) {
fans='';
} else {
fans=prompt('Draw a rectangle? ' + String.fromCharCode(10) + String.fromCharCode(10) + 'OK for rectangle ' + String.fromCharCode(10) + 'Cancel for text ' + String.fromCharCode(10) + '- for lines ' + String.fromCharCode(10) + awb + '+ for Annotations and Signatures Canvas Menu', '');
}
//awobackup='';
//document.getElementById('sfilter').value='';
//document.getElementById('redoopt').style.display='none';
} else {
xfilledr='x';
if (5 == 5) {
fans='';
} else {
fans=prompt('Infill a rectangle? ' + String.fromCharCode(10) + String.fromCharCode(10) + 'OK for infilled rectangle ' + String.fromCharCode(10) + 'Cancel for text ' + String.fromCharCode(10) + '- for lines ' + String.fromCharCode(10) + awb + '+ for Annotations and Signatures Canvas Menu', '');
}
//awobackup='';
//document.getElementById('sfilter').value='';
//document.getElementById('redoopt').style.display='none';
}
}
if (fans != null) {
if (fans.trim().toLowerCase().substring(0,1) != 'u') {
awobackup='';
document.getElementById('sfilter').value='';
document.getElementById('redoopt').style.display='none';
}
}
if (fans == null) {
x=xxs[eval(-1 + xxs.length)];
y=yys[eval(-1 + yys.length)];
xs=[];
ys=[];
xxs=[];
yys=[];
fans='';
} else if (fans.trim() == '') {
x=x;
filledr=xfilledr;
fans='';
} else if (fans.trim() == '-') {
filledr='-';
xfilledr='-';
plusy+='.';
x=xxs[0];
y=yys[0];
plusy='.';
for (jfans=1; jfans<xxs.length; jfans++) {
plusy+='000' + xxs[jfans] + '000' + yys[jfans];
}
} else if (fans.trim().toLowerCase().substring(0,1) == 'u') {
redo();
return '';
} else if (fans.trim() == '+') {
fans='';
xs=[];
ys=[];
xxs=[];
yys=[];
mycanvas = document.getElementById('canvas');
ctx = mycanvas.getContext('2d');
myimg = new Image;
myimg.onload = function() {
mycanvas.width=myimg.width;
mycanvas.height=myimg.height;
mycanvas.style.width='' + myimg.width + 'px';
mycanvas.style.height='' + myimg.height + 'px';
if (document.getElementById('tsiz')) {
ctx.font = '' + document.getElementById('tsiz').value.trim() + 'px ' + document.getElementById('tfam').value.trim();
}
if (document.getElementById('tcol')) {
ctx.fillStyle='' + document.getElementById('tcol').value.trim();
}
ctx.drawImage(myimg,0,0); // Or at whatever offset you like
//alert(564);
document.getElementById('dimap').innerHTML="<img id=imimg style='z-index:99;visibility:visible;position:absolute;top:0px;left:0px;' src='" + datauri + "' width='" + myimg.width + "' height='" + myimg.height + "' alt='Map' usemap='#immap'><map name='immap' id='immap'><area data-onclick='areaclick=true;' shape='default' nohref alt='' /></map>";
awo=window.open('./HTMLCSS/user_of_signature_signature.htm?zoom=0.6&cancontw=' + myimg.width + '&canconth=' + myimg.height,'_blank','top=100,left=100,width=1200,height=900');
};
awowatchsofar=document.getElementById('slideshow').value;
awobackup=document.getElementById('slideshow').value;
document.getElementById('redoopt').style.display='block';
myimg.src = document.getElementById('slideshow').value;
setTimeout(awowatch, 5000);
return '';
} else {
x=xxs[eval(-1 + xxs.length)];
y=yys[eval(-1 + yys.length)];
xs=[];
ys=[];
xxs=[];
yys=[];
//alert('Fans=' + fans + '@');
document.getElementById('mytextarea').value='';
}
}
if (eval('' + xs.length) > 1) {
if (eval('' + xs.length) < 3) {
areaclick=true;
//alert('line');
if (plusy == '') {
plusy+='.';
x=xs[0];
y=ys[0];
plusy+='000' + xs[1] + '000' + ys[1];
}
//alert('x=' + x + ' and xs[1]=' + xs[1] + ' ... @!@' + plusy.substring(1) + '!!!' + ('' + x).split('.')[0] + '@@@' + Math.floor(y));
if (lsto != '') { wlsa(lsto, '@!@' + plusy.substring(1) + '!!!' + ('' + x).split('.')[0] + '@@@' + Math.floor(y)); }
sofarsoatend+='@!@' + plusy.substring(1) + '!!!' + ('' + x).split('.')[0] + '@@@' + Math.floor(y);
document.getElementById('coords').innerHTML+='<input type=hidden name=pdfx' + coordn + ' value="' + ('' + x).split('.')[0] + '"></input>';
document.getElementById('coords').innerHTML+='<input type=hidden name=pdfy' + coordn + ' value="' + ('' + y).split('.')[0] + '"></input>';
document.getElementById('coords').innerHTML+='<input type=hidden id=pdftext' + coordn + ' name=pdftext' + coordn + ' value="' + plusy.substring(1) + '"></input>';
coordn++;
xs=[];
ys=[];
xxs=[];
yys=[];
fans='';
return true;
} else {
filledr=xfilledr;
//if (Math.abs(xs[0] - x) <= 0.000004) {
//alert('rectangle');
//} else {
//alert('filled rectangle');
//filledr='x';
//}
areaclick=true;
if (plusy == '') {
plusy+='.';
plusy+='000' + xs[1] + '000' + ys[1];
plusy+='000' + xs[2] + '000' + ys[2];
plusy+='000' + xs[3] + '000' + ys[3];
}
if (lsto != '') { wlsa(lsto, '@!@' + plusy.substring(1) + '!!!' + ('' + x).split('.')[0] + '@@@' + Math.floor(y)); }
sofarsoatend+='@!@' + plusy.substring(1) + '!!!' + ('' + x).split('.')[0] + '@@@' + Math.floor(y);
document.getElementById('coords').innerHTML+='<input type=hidden name=pdfx' + coordn + ' value="' + ('' + x).split('.')[0] + '"></input>';
document.getElementById('coords').innerHTML+='<input type=hidden name=pdfy' + coordn + ' value="' + ('' + y).split('.')[0] + '"></input>';
document.getElementById('coords').innerHTML+='<input type=hidden id=pdftext' + coordn + ' name=pdftext' + coordn + ' value="' + filledr + plusy.substring(1) + '"></input>';
coordn++;
xs=[];
ys=[];
xxs=[];
yys=[];
fans='';
return true;
}
xs=[];
ys=[];
xxs=[];
yys=[];
}
if (areaclick) {
areaclick=false;
fans='';
return '';
}
if (startrecording && !showingc) {
//fans='';
if (repeats > 0) {
fourfive='500';
ans=lastans;
if (ans == null) { ans=''; }
if (ans.trim() != '' && x >= 0 && y >= 0) {
if (lsto != '') { wlsa(lsto, '@!@' + ans + '!!!' + x + '@@@' + y); }
sofarsoatend+='@!@' + ans + '!!!' + x + '@@@' + y;
} else if (ans.trim() == '' && ans != '' && x >= 0 && y >= 0) {
if (lsto != '') { wlsa(lsto, '@!@!!!' + x + '@@@' + y); }
sofarsoatend+='@!@!!!' + x + '@@@' + y;
lsnamesaveas();
ans='';
}
if (analyze(ans).trim() == '') {
startrecording=false;
if (1 == 11) {
alert(document.getElementById('coords').innerHTML);
} if (9 == 99) {
document.getElementById('isub').click();
} else {
if (isgif && 1 == 6) {
setTimeout(huhf,8000);
} else {
huhf();
}
if (document.getElementById('myform')) {
document.getElementById('myform').submit();
}
}
} else {
addtoform(ans);
setTimeout(askaway, 5000);
}
} else {
repeats=0;
fourfive='4500';
lastans='';
var indef='';
if (document.getElementById('mytextarea')) {
if (document.getElementById('mytextarea').value != '') {
indef=document.getElementById('mytextarea').value;
while (indef.indexOf(String.fromCharCode(10)) != -1) {
indef=indef.replace(String.fromCharCode(10), '~~')
}
if (sofarmode == 0) { document.getElementById('mytextarea').value=''; }
}
}
if (xans != '') {
var nondebatable=false;
if (sofarmode == 2 && xans.toUpperCase().indexOf('DATE') != 0 && xans.toUpperCase().replace(' * ',' x ').indexOf(' x ') == -1) { nondebatable=true; }
if (sofarmode == 3 || nondebatable) {
ans=xans.trim();
xans='';
} else if (sofarmode == 1 || (sofarmode == 2 && !nondebatable)) {
if (isokay) {
indef=xans.trim();
}
//xans='';
//retval=false;
if (indef == '') { indef=fans; }
ans=prompt('Append more spaces to default suggestion in order to indicate you want to click again in a new place for this entry, and note that you can change wording, as well over at the textarea if you wish. Enter with nothing to proceed or space to Save As along the way to creating PDF. Else enter text number ' + coordn + ' to place where last click was made. Can use a suffix such as x 5 to repeat value on the 4 clicks to follow. Optionally prefix by text Font Family (for all text if Arial no good versus Courier or Helvetica or Arial or Times or Symbol or ZapfDingbats);Font Style (double semicolon delimit for all text default if Bold no good else single semicolon delimit for this text only versus Normal or Italic or Bold or Underline);Font Size in px (for this text if 16px no good) delimited by semicolon. Line feed via ~~ anywhere.',indef);
awobackup='';
document.getElementById('sfilter').value='';
document.getElementById('redoopt').style.display='none';
fans='';
if (ans.trim() == xans.trim() && xans != ans) { retval=false; return retval; } else { retval=true; xans=''; }
}
} else {
if (!window.opener) {
if (eval('' + datauris.length) > 1) {
twospaces=' Enter with two spaces to Save As here and for the PDF Book second and on pages, of ' + datauris.length + '. ';
}
if (" . sizeof($datauris) . " > 1 || document.body.outerHTML.indexOf('im' + 'age/gi' + 'f') != -1) {
twospaces=' Prefix with ++ anytime to populate all animated GIF pages with these text nodes, noting {Page} usage too. ';
}
}

if (fans.trim() != '') { // && indef == '') {
//ans=fans;
ans=fans;
fans='';
} else {
ans=prompt('Enter with nothing to proceed or space to Save As along the way to creating PDF. ' + twospaces + ' Else enter text number ' + coordn + ' to place where last click was made. Can use a suffix such as x 5 to repeat value on the 4 clicks to follow. Optionally prefix by text Font Family (for all text if Arial no good versus Courier or Helvetica or Arial or Times or Symbol or ZapfDingbats);Font Style (double semicolon delimit for all text default if Bold no good else single semicolon delimit for this text only versus Normal or Italic or Bold or Underline);Font Size in px (for this text if 16px no good) delimited by semicolon. Line feed via ~~ anywhere.',indef);
awobackup='';
document.getElementById('sfilter').value='';
document.getElementById('redoopt').style.display='none';
fans='';
}

}
if (ans == null) { ans=''; }
if (ans == '' && window.opener) {
//alert('lsto=' + lsto + ' and gettwospaces()=' + gettwospaces());
if (('' + lsto) != '' && ('' + gettwospaces()) == '') {
//alert('Lsto=' + lsto + ' and gettwospaces()=' + gettwospaces());
ans=' ';
}
}
if (ans.trim() == '' && !window.opener && datauris.length > 1 && ans.indexOf(' ') == -1 && twospaces != '') {
twospaces='';
document.getElementById('aaacoords').innerHTML='';
}
var dn=false;
if (ans.trim() != '' && x >= 0 && y >= 0) {
if (ans.trim() != '' && ans.indexOf('++ ') == 0) {
if (document.getElementById('aaacoords').innerHTML.indexOf('textrepeat') == -1) {
//document.getElementById('isub').name='textrepeat';
//alert(56);
document.getElementById('aaacoords').innerHTML+=cthen('<input type=hidden name=textrepeat value=y></input>');
//alert('here');
}
//document.getElementById('myform').action=document.getElementById('myform').action.split('?')[0].split('#')[0] + '?textrepeat=y';
ans=ans.replace('++ ',' ').replace('++ ','');
if (lsto != '') { dn=true; wlsa(lsto, '@!@++' + ans + '!!!' + x + '@@@' + y); }
sofarsoatend+='@!@++' + ans + '!!!' + x + '@@@' + y;
} else if (ans.trim() != '' && ans.indexOf('++') == 0) {
if (document.getElementById('aaacoords').innerHTML.indexOf('textrepeat') == -1) {
//document.getElementById('isub').name='textrepeat';
//alert(156);
document.getElementById('aaacoords').innerHTML+=cthen('<input type=hidden name=textrepeat value=y></input>');
//alert('Here');
}
//document.getElementById('myform').action=document.getElementById('myform').action.split('?')[0].split('#')[0] + '?textrepeat=y';
ans=ans.replace('++','');
if (lsto != '') { dn=true; wlsa(lsto, '@!@++' + ans + '!!!' + x + '@@@' + y); }
sofarsoatend+='@!@++' + ans + '!!!' + x + '@@@' + y;
} else {
if (lsto != '') { dn=true; wlsa(lsto, '@!@' + ans + '!!!' + x + '@@@' + y); }
sofarsoatend+='@!@' + ans + '!!!' + x + '@@@' + y;
}
}
if (ans.trim() == '' && ans != '' && x >= 0 && y >= 0) {
if (lsto != '' && !dn) { wlsa(lsto, '@!@!!!' + x + '@@@' + y); }
sofarsoatend+='@!@!!!' + x + '@@@' + y;
if (!window.opener && ('' + gettwospaces()) != '' && eval(eval('' + ans.length) - eval('' + ans.trim().length)) < 2) {
twospaces='';
} else if (!window.opener && ('' + gettwospaces()) != '' && eval(eval('' + ans.length) - eval('' + ans.trim().length)) >= 2) {
if (twospaces != '') {
twospaces=twospaces;
}
}
lsnamesaveas();
ans='';
} else if (ans == '' && !window.opener && ('' + gettwospaces()) != '') {
twospaces='';
} else if (ans == '' && lsto != '') {
if (lsto != '' && !dn) { wlsa(lsto, '@!@!!!' + x + '@@@' + y); }
}
var rarris=ans.replace(' * ',' x ').split(' x 1');
if (rarris.length == 1) { rarris=ans.replace(' * ',' x ').split(' x 2'); }
if (rarris.length == 1) { rarris=ans.replace(' * ',' x ').split(' x 3'); }
if (rarris.length == 1) { rarris=ans.replace(' * ',' x ').split(' x 4'); }
if (rarris.length == 1) { rarris=ans.replace(' * ',' x ').split(' x 5'); }
if (rarris.length == 1) { rarris=ans.replace(' * ',' x ').split(' x 6'); }
if (rarris.length == 1) { rarris=ans.replace(' * ',' x ').split(' x 7'); }
if (rarris.length == 1) { rarris=ans.replace(' * ',' x ').split(' x 8'); }
if (rarris.length == 1) { rarris=ans.replace(' * ',' x ').split(' x 9'); }
if (rarris.length == 1) { rarris=ans.replace(' * ',' x ').split(' x 0'); }
if (rarris.length > 1) { repeats=eval(0 + eval('' + ans.replace(' * ',' x ').split(' x ')[1])); if (repeats > 0) { fourfive='500'; } else { fourfive='4500'; } lastans=ans.replace(' * ',' x ').split(' x ')[0]; } else if (1 == 3) { lastans=''; }
if (analyze(ans).trim() == '') { document.body.style.cursor='progress'; startrecording=false; if (1 == 11) { alert(document.getElementById('coords').innerHTML); } if (isgif && 1 == 11) { setTimeout(huhf,8000); } else { huhf(); } document.getElementById('myform').submit(); } else { addtoform(ans); setTimeout(askaway, 5000); }
}
}
if (retval) { xans=''; }
return retval;
}

function whenlastrubinvalid() {
if (!lastrubvalid) {
if (lastrub != '') {
document.getElementById('dmore').innerHTML+=lastrub.replace(/\ id\=/g, ' data-id=');
}
lastrub='';
xs=[];
ys=[];
xxs=[];
yys=[];
ixy=0;
coordn=1;
relevant=false;
} else {
setTimeout(whenlastrubinvalid, 1000);
}
}

function huhf() {
//if (document.body.outerHTML.indexOf(datauris[0]) == -1) {
//alert('Huh');
//} else {
//alert('' + document.body.outerHTML.split(datauris[0]).length + ' ... ' + datauris[0]);
// }

var thisstart='pdftimesheet';

if (doitok) { postcthen(); doitok=false; }

if (!document.getElementById('myform')) {
if (1 == 5) { alert(document.getElementById('rubberband').outerHTML); }
} else if (document.getElementById('myform')) {

//alert('target=' + document.getElementById('myform').target + ' ' + window.opener);
if (('' + document.getElementById('myform').target) == '_top' || (ofval != '' && onlval.indexOf(thisstart) == 0 && sofarmode != 0 && datauris.length == 1 && !window.opener && gettwospaces() == '')) {
if (1 == 6) {
document.getElementById('relfind').style.display='block';
location.href='#relfind';
}
var woo=null;
var itop=50;
var ileft=50;
//alert('0:' + datauris.length + ' ofval=' + ofval + ' onlval=' + onlval + ' sofarmode=' + sofarmode + ' thisstart=' + thisstart);
if (datauris.length != 1 || (ofval != '' && onlval.indexOf(thisstart) == 0 && sofarmode != 0 && datauris.length == 1 && !window.opener && gettwospaces() == '')) {
//alert('1:' + datauris.length + ' ofval=' + ofval + ' onlval=' + onlval + ' sofarmode=' + sofarmode + ' thisstart=' + thisstart);
if (!window.opener || datauris.length > 1) {
//alert('2:' + datauris.length + ' ofval=' + ofval + ' onlval=' + onlval + ' sofarmode=' + sofarmode + ' thisstart=' + thisstart);
//alert(876);
document.getElementById('dimap').innerHTML='';
document.getElementById('myform').innerHTML+="<input name=postsuggestion value='-0.pdf' type=hidden></input>";
//if (document.body.outerHTML.indexOf('web_share_api_text.') != -1) {
// alert('web_share_api_text.' + document.body.outerHTML.split('web_share_api_text.')[1]);
//} else {
// alert('zbit=' + zbit);
//}
var truncval='';
var huhts=[];
if (gettwospaces() != '') {
truncval=(sofarso + sofarsoatend);
huhts=truncval.split('@!@');
if (truncval.indexOf('!!!') != -1) {
truncval=truncval.split('!!!')[0];
if (huhts[eval(-1 + huhts.length)] != '') {
truncval=(truncval + '~').replace('@!@' + huhts[eval(-1 + huhts.length)] + '~', ''); // '@!@'
} else {
truncval=(truncval + '~').replace('@!@~', ''); // '@!@'
}
} else if (huhts[eval(-1 + huhts.length)] == '') {
truncval=(truncval + '~').replace('@!@~', ''); // '@!@'
}
}
var origsofarsonext=sofarsonext;
var thispdfind=-1;
var bigval='';
var anyextras='';
var ioff=0;
//alert('ofval=' + ofval + ' and onlval=' + onlval);
if (ofval != '' && onlval.indexOf(thisstart) == 0 && sofarmode != 0 && datauris.length == 1 && !window.opener && gettwospaces() == '') {
//alert(0);
if (sofarmode == 2 || sofarmode == 1 || sofarmode == 4) {
anyextras=' setTimeout(setupgn, 2000); ';
}
thispdfind=eval('' + onlval.split(thisstart)[1]);
//alert('thispdfind=' + thispdfind);
if (datauri.trim() != '') {
datauris[0]=datauri;
} else {
datauris[0]=document.getElementById('slideshow').value;
}
if (datauris[0].replace('.gif','image/gif').indexOf('image/gif') != -1) {
//isgif=true;
if (yisgif) { subagsuffix=prepare(subagsuffix); }
yisgif=true;
document.getElementById('agslides' + subagsuffix).value=document.getElementById('slideshow').value;
document.getElementById('subag' + prepare(subagsuffix)).click();
beenherecnt++;
alert(89);
console.log('beenHeRecnt=' + beenherecnt);
}
for (var ikn=1; ikn<eval(ofval.split(' of ')[1]); ikn++) {
bigval=window.localStorage.getItem(thisstart + eval(thispdfind + ikn));
if (eval('' + decodeURIComponent(bigval).split('@!@').length) > 1) {
//alert('push ' + decodeURIComponent(bigval).split('@!@')[1].replace(/\ /g,'+'));
datauris.push(decodeURIComponent(bigval).split('@!@')[1].replace(/\ /g,'+'));
}
}
}
var ynft='you will ' + 'never find this';
var iijk=0;
//for (var ijk=1; ijk<datauris.length; ijk++) {
for (var ijk=(-1 + datauris.length); ijk>=1; ijk--) {
//alert(datauris[0] + ' ... ' + datauris[ijk] + ' . ' + document.body.outerHTML.split(datauris[0]).length);
if (twospaces == '') { ynft=document.getElementById('coords').innerHTML; }
if (ijk == 1 && document.getElementById('slideshow').value != datauris[0]) {
datauris[0]=document.getElementById('slideshow').value;
}

if (1 == 1 || datauris[ijk].toLowerCase().replace('.gif','image/gif').indexOf('image/gif') == -1) {
iijk++;
if (gettwospaces() != '') {
//if (ijk != 1) { sofarsonext++; }
if (ijk != (-1 + datauris.length)) { sofarsonext++; }
if (('' + window.localStorage.getItem('pdftimesheet' + eval(sofarsonext + ioff))).replace(/^undefined/g,'').replace(/^null/g,'') != '') {
while (('' + window.localStorage.getItem('pdftimesheet' + eval(sofarsonext + ioff))).replace(/^undefined/g,'').replace(/^null/g,'') != '') { //while (decodeURIComponent(('' + window.localStorage.getItem('pdftimesheet' + eval(sofarsonext + ioff)))).indexOf(' of ') == -1) {
ioff++;
}
}
//alert('datauris.length=' + datauris.length + ' and sofarsonext=' + sofarsonext + ' and ioff=' + ioff + ' truncval=' + truncval);
window.localStorage.setItem('pdftimesheet' + eval(ioff + sofarsonext), encodeURIComponent(truncval.replace('@!@',' ' + eval(1 + ijk) + ' of ' + datauris.length + '@!@').replace(datauris[0], datauris[ijk])));
//alert(1);
woos.push(window.open('./pdfimageplustext.php?ipsuff=' + encodeURIComponent('-' + ijk + '.' + zbit) + '&total=' + datauris.length,'_blank','top=' + itop + ',left=' + ileft + ',width=500,height=500'));
woos[eval(-1 + woos.length)].document.write('<html>' + document.head.outerHTML.replace('var zbit=\"\"', 'var zbit=\"' + zbit + '\"').replace('var lsto=\"\"', 'var lsto=\"' + 'pdftimesheet' + sofarsonext + '\"') + document.body.outerHTML.replace(ynft,'').replace(' data-pref=\"\" value=\"\"', ' data-pref=\"\" value=\"' + zbit + '\"').replace(' data-title=\"\" value=\"', ' data-title=\"\" value=\"-' + ijk).replace(datauris[0], datauris[ijk]).replace(datauris[0], datauris[ijk]).replace(datauris[0], datauris[ijk]).replace(datauris[0], datauris[ijk]).replace(datauris[0], datauris[ijk]).replace(datauris[0], datauris[ijk]) + '</html>');
} else if (ofval != '' && onlval.indexOf(thisstart) == 0 && sofarmode != 0 && eval('' + datauris.length) > 1 && !window.opener && gettwospaces() == '') {
//alert('sfm=' + sofarmode);
if (('' + window.localStorage.getItem('pdftimesheet' + eval(thispdfind + ioff + ijk))).replace(/^undefined/g,'').replace(/^null/g,'') == '') {
while (ioff < 400 && ('' + window.localStorage.getItem('pdftimesheet' + eval(thispdfind + ioff + ijk))).replace(/^undefined/g,'').replace(/^null/g,'') == '') { //while (decodeURIComponent(('' + window.localStorage.getItem('pdftimesheet' + eval(sofarsonext + ioff)))).indexOf(' of ') == -1) {
ioff++;
}
}
//alert('Datauris.length=' + datauris.length + ' and sofarsonext=' + sofarsonext + ' and ioff=' + ioff + ' truncval=' + truncval);
if (('' + window.localStorage.getItem('pdftimesheet' + eval(ioff + thispdfind + ijk))).replace(/^undefined/g,'').replace(/^null/g,'') != '') {
//alert('good ' + document.head.outerHTML.indexOf('setTimeout(lookfordata' + 'uri, 1000);'));
//alert(11);
woos.push(window.open('./pdfimageplustext.php?ipsuff=' + encodeURIComponent('-' + ijk + '.' + zbit) + '&total=' + datauris.length,'_blank','top=' + itop + ',left=' + ileft + ',width=500,height=500'));
woos[eval(-1 + woos.length)].document.write('<html>' + document.head.outerHTML.replace('setTimeout(lookfordata' + 'uri, 1001);', 'setTimeout(look' + 'fordatauri, 1001); setTimeout(lslook, 1000); ').replace('var zbit=\"\"', 'var zbit=\"' + zbit + '\"').replace('' + 'sofarmod' + 'e=sofar' + 'mode;', '' + 'sofarmod' + 'e=' + sofarmode + ';' + anyextras).replace('' + 'onlva' + 'l=onlva' + 'l;', 'onlva' + 'l=\"' + thisstart + eval(ijk + ioff + thispdfind) + '\";') + document.body.outerHTML.replace(ynft,'').replace(' data-pref=\"\" value=\"\"', ' data-pref=\"\" value=\"' + zbit + '\"').replace(' data-title=\"\" value=\"', ' data-title=\"\" value=\"-' + ijk).replace(datauris[0], datauris[ijk]).replace(datauris[0], datauris[ijk]).replace(datauris[0], datauris[ijk]).replace(datauris[0], datauris[ijk]).replace(datauris[0], datauris[ijk]).replace(datauris[0], datauris[ijk]) + '</html>');
}
} else {
//alert(111);
woos.push(window.open('./pdfimageplustext.php?ipsuff=' + encodeURIComponent('-' + ijk + '.' + zbit) + '&total=' + datauris.length,'_blank','top=' + itop + ',left=' + ileft + ',width=500,height=500'));
woos[eval(-1 + woos.length)].document.write('<html>' + document.head.outerHTML.replace('var zbit=\"\"', 'var zbit=\"' + zbit + '\"') + document.body.outerHTML.replace(ynft,'').replace(' data-pref=\"\" value=\"\"', ' data-pref=\"\" value=\"' + zbit + '\"').replace(' data-title=\"\" value=\"', ' data-title=\"\" value=\"-' + ijk).replace(datauris[0], datauris[ijk]).replace(datauris[0], datauris[ijk]).replace(datauris[0], datauris[ijk]).replace(datauris[0], datauris[ijk]).replace(datauris[0], datauris[ijk]).replace(datauris[0], datauris[ijk]) + '</html>');
}
woos[eval(-1 + woos.length)].document.title='Page ' + eval(1 + ijk) + ' of ' + datauris.length + ' for your PDF Book';
ileft+=10;
}
}
}
}
} //else {
//alert(document.getElementById('myform').target);
//}
}
return true;
}

function posthuhf() {
if (isgif && 1 == 11) {
isgif=false;
document.getElementById('isub').click();
}
}

function prehuhf() {
if (isgif && 1 == 11) {
setTimeout(huhf,8000);
setTimeout(posthuhf,12000);
} else {
return huhf();
}
return false;
}


function atthestart() {
document.getElementById('mybody').onclick=function(e){
var yes=false;
if (areaclick) {
areaclick=false;
} else {
e = e || window.event;
e.preventDefault();
console.log('click showingc=' + showingc);
if (!showingc) {
startrecording=true;
if (e.originalEvent) {
if (e.originalEvent.touches) {
yes=true;
}
}
var rectis=document.body.getBoundingClientRect();
if (e.touches) {
if (e.touches[0].pageX) {
console.log('a click showingc=' + showingc);
x = e.touches[0].pageX;
y = e.touches[0].pageY;
if (eval('' + xs.length) == 0) {
//alert('0:' + document.body.offsetLeft + ',' + document.body.offsetTop);
//document.getElementById('blob').innerHTML+='<div class=dblob onmouseover=" blobover(this); " onmouseout=" blobout(this);" onclick=" blobdel(this.id); " title="" id="bpdftext' + coordn + '" style="position:absolute;left:' + eval(0 + x) + 'px;top:' + eval(0 + y) + 'px;background-color:red;z-index:100;">' + xize(xs,x,y) + '</div>';
//document.getElementById('immap').innerHTML+="<area id=area" + areacnt + " alt='" + cidurls + "' shape=rect onclick=ack(this.alt," + coordn + ",true); coords='" + eval(-8 + x) + "," + eval(-8 + y) + "," + eval(8 + x) + "," + eval(8 + y) + "' nohref />";
areacnt++;
xs.push(x);
ys.push(y);
xxs.push(x);
yys.push(y);
setTimeout(askaway,eval('' + fourfive));
} else if (eval('' + xs.length) >= 2) {
xxs.push(x);
yys.push(y);
if (eval('' + xs.length) == 2) {
// document.title+=' | ';
xs.push(Math.abs(xs[0] - xs[1]));
ys.push(Math.abs(ys[0] - ys[1]));
xs.push(Math.abs(xs[0] - xs[1]));
ys.push(Math.abs(ys[0] - ys[1]));
xs[0]=Math.min(xs[0], xs[1]);
ys[0]=Math.min(ys[0], ys[1]);
xs[1]=xs[2];
ys[1]=ys[2];
x=xs[0];
y=ys[0];
// alert(xs.length + ' ? RE rect');
} else {
x=xs[0];
y=ys[0];
if (eval('' + xs.length) == 4) { xs[0]+=0.00001; }
}
} else {
xxs.push(x);
yys.push(y);
xs.push(x);
ys.push(y);
x=xs[0];
y=ys[0];
}
} else {
console.log('b click showingc=' + showingc);
x = eval(-rectis.left + e.touches[0].clientX);
y = eval(-rectis.top + e.touches[0].clientY);
if (eval('' + xs.length) == 0) {
//alert('1:' + document.body.offsetLeft + ',' + document.body.offsetTop);
//document.getElementById('blob').innerHTML+='<div class=dblob onmouseover=" blobover(this); " onmouseout=" blobout(this);" onclick=" blobdel(this.id); " title="" id="bpdftext' + coordn + '" style="position:absolute;left:' + eval(0 + x) + 'px;top:' + eval(0 + y) + 'px;background-color:red;z-index:100;">' + xize(xs,x,y) + '</div>';
//document.getElementById('immap').innerHTML+="<area id=area" + areacnt + " alt='" + cidurls + "' shape=rect onclick=ack(this.alt," + coordn + ",true); coords='" + eval(-8 + x) + "," + eval(-8 + y) + "," + eval(8 + x) + "," + eval(8 + y) + "' nohref />";
areacnt++;
xs.push(x);
ys.push(y);
xxs.push(x);
yys.push(y);
setTimeout(askaway,eval('' + fourfive));
} else if (eval('' + xs.length) >= 2) {
xxs.push(x);
yys.push(y);
if (eval('' + xs.length) == 2) {
// document.title+=' | ';
xs.push(Math.abs(xs[0] - xs[1]));
ys.push(Math.abs(ys[0] - ys[1]));
xs.push(Math.abs(xs[0] - xs[1]));
ys.push(Math.abs(ys[0] - ys[1]));
xs[0]=Math.min(xs[0], xs[1]);
ys[0]=Math.min(ys[0], ys[1]);
xs[1]=xs[2];
ys[1]=ys[2];
x=xs[0];
y=ys[0];
// alert(xs.length + ' ? RE rect');
} else {
x=xs[0];
y=ys[0];
if (eval('' + xs.length) == 4) { xs[0]+=0.00001; }
}
} else {
xxs.push(x);
yys.push(y);
xs.push(x);
ys.push(y);
x=xs[0];
y=ys[0];
}
}
//console.log('pos3=' + pos3 + ',pos4=' + pos4);
} else if (yes) {
console.log('c click showingc=' + showingc);

if (e.originalEvent.touches[0].pageX) {
x = e.originalEvent.touches[0].pageX;
y = e.originalEvent.touches[0].pageY;
if (eval('' + xs.length) == 0) {
//alert('0:' + document.body.offsetLeft + ',' + document.body.offsetTop);
//document.getElementById('blob').innerHTML+='<div class=dblob onmouseover=" blobover(this); " onmouseout=" blobout(this);" onclick=" blobdel(this.id); " title="" id="bpdftext' + coordn + '" style="position:absolute;left:' + eval(0 + x) + 'px;top:' + eval(0 + y) + 'px;background-color:red;z-index:100;">' + xize(xs,x,y) + '</div>';
//document.getElementById('immap').innerHTML+="<area id=area" + areacnt + " alt='" + cidurls + "' shape=rect onclick=ack(this.alt," + coordn + ",true); coords='" + eval(-8 + x) + "," + eval(-8 + y) + "," + eval(8 + x) + "," + eval(8 + y) + "' nohref />";
areacnt++;
xs.push(x);
ys.push(y);
xxs.push(x);
yys.push(y);
setTimeout(askaway,eval('' + fourfive));
} else if (eval('' + xs.length) >= 2) {
xxs.push(x);
yys.push(y);
if (eval('' + xs.length) == 2) {
// document.title+=' | ';
xs.push(Math.abs(xs[0] - xs[1]));
ys.push(Math.abs(ys[0] - ys[1]));
xs.push(Math.abs(xs[0] - xs[1]));
ys.push(Math.abs(ys[0] - ys[1]));
xs[0]=Math.min(xs[0], xs[1]);
ys[0]=Math.min(ys[0], ys[1]);
xs[1]=xs[2];
ys[1]=ys[2];
x=xs[0];
y=ys[0];
// alert(xs.length + ' ? RE rect');
} else {
x=xs[0];
y=ys[0];
if (eval('' + xs.length) == 4) { xs[0]+=0.00001; }
}
} else {
xxs.push(x);
yys.push(y);
xs.push(x);
ys.push(y);
x=xs[0];
y=ys[0];
}
} else {
x = eval(-rectis.left + e.originalEvent.touches[0].clientX);
y = eval(-rectis.top + e.originalEvent.touches[0].clientY);
if (eval('' + xs.length) == 0) {
//alert('1:' + document.body.offsetLeft + ',' + document.body.offsetTop);
//document.getElementById('blob').innerHTML+='<div class=dblob onmouseover=" blobover(this); " onmouseout=" blobout(this);" onclick=" blobdel(this.id); " title="" id="bpdftext' + coordn + '" style="position:absolute;left:' + eval(0 + x) + 'px;top:' + eval(0 + y) + 'px;background-color:red;z-index:100;">' + xize(xs,x,y) + '</div>';
//document.getElementById('immap').innerHTML+="<area id=area" + areacnt + " alt='" + cidurls + "' shape=rect onclick=ack(this.alt," + coordn + ",true); coords='" + eval(-8 + x) + "," + eval(-8 + y) + "," + eval(8 + x) + "," + eval(8 + y) + "' nohref />";
areacnt++;
xs.push(x);
ys.push(y);
xxs.push(x);
yys.push(y);
setTimeout(askaway,eval('' + fourfive));
} else if (eval('' + xs.length) >= 2) {
xxs.push(x);
yys.push(y);
if (eval('' + xs.length) == 2) {
// document.title+=' | ';
xs.push(Math.abs(xs[0] - xs[1]));
ys.push(Math.abs(ys[0] - ys[1]));
xs.push(Math.abs(xs[0] - xs[1]));
ys.push(Math.abs(ys[0] - ys[1]));
xs[0]=Math.min(xs[0], xs[1]);
ys[0]=Math.min(ys[0], ys[1]);
xs[1]=xs[2];
ys[1]=ys[2];
x=xs[0];
y=ys[0];
// alert(xs.length + ' ? RE rect');
} else {
x=xs[0];
y=ys[0];
if (eval('' + xs.length) == 4) { xs[0]+=0.00001; }
}
} else {
xxs.push(x);
yys.push(y);
xs.push(x);
ys.push(y);
x=xs[0];
y=ys[0];
}
//setTimeout(askaway,eval('' + fourfive));
}
//console.log('pos3=' + pos3 + ',pos4=' + pos4);


} else if (e.clientX || e.clientY) {
console.log('d click showingc=' + showingc);
x = eval(-rectis.left + e.clientX);
y = eval(-rectis.top + e.clientY);
if (eval('' + xs.length) == 0) {
console.log('dd click showingc=' + showingc);
//alert('2:' + rectis.left + ',' + rectis.top);
//document.getElementById('blob').innerHTML+='<div class=dblob onmouseover=" blobover(this); " onmouseout=" blobout(this);" onclick=" blobdel(this.id); " title="" id="bpdftext' + coordn + '" style="position:absolute;left:' + eval(0 + x) + 'px;top:' + eval(0 + y) + 'px;background-color:red;z-index:100;">' + xize(xs,x,y) + '</div>';
//document.getElementById('immap').innerHTML+="<area id=area" + areacnt + " alt='" + cidurls + "' shape=rect onclick=ack(this.alt," + coordn + ",true); coords='" + eval(-8 + x) + "," + eval(-8 + y) + "," + eval(8 + x) + "," + eval(8 + y) + "' nohref />";
areacnt++;
xs.push(x);
ys.push(y);
xxs.push(x);
yys.push(y);
console.log('ddd click showingc=' + showingc);
setTimeout(askaway,eval('' + fourfive));
console.log('dddd click showingc=' + showingc);
} else if (eval('' + xs.length) >= 2) {
xxs.push(x);
yys.push(y);
if (eval('' + xs.length) == 2) {
// document.title+=' | ';
xs.push(Math.abs(xs[0] - xs[1]));
ys.push(Math.abs(ys[0] - ys[1]));
xs.push(Math.abs(xs[0] - xs[1]));
ys.push(Math.abs(ys[0] - ys[1]));
xs[0]=Math.min(xs[0], xs[1]);
ys[0]=Math.min(ys[0], ys[1]);
xs[1]=xs[2];
ys[1]=ys[2];
x=xs[0];
y=ys[0];
// alert(xs.length + ' ? RE rect');
} else {
x=xs[0];
y=ys[0];
if (eval('' + xs.length) == 4) { xs[0]+=0.00001; }
}
} else {
xxs.push(x);
yys.push(y);
xs.push(x);
ys.push(y);
x=xs[0];
y=ys[0];
}
} else {
console.log('e click showingc=' + showingc);
x = e.pageX;
y = e.pageY;
if (eval('' + xs.length) == 0) {
//alert('3:' + document.body.offsetLeft + ',' + document.body.offsetTop);
//document.getElementById('blob').innerHTML+='<div class=dblob onmouseover=" blobover(this); " onmouseout=" blobout(this);" onclick=" blobdel(this.id); " title="" id="bpdftext' + coordn + '" style="position:absolute;left:' + eval(0 + x) + 'px;top:' + eval(0 + y) + 'px;background-color:red;z-index:100;">' + xize(xs,x,y) + '</div>';
//document.getElementById('immap').innerHTML+="<area id=area" + areacnt + " alt='" + cidurls + "' shape=rect onclick=ack(this.alt," + coordn + ",true); coords='" + eval(-8 + x) + "," + eval(-8 + y) + "," + eval(8 + x) + "," + eval(8 + y) + "' nohref />";
areacnt++;
xs.push(x);
ys.push(y);
xxs.push(x);
yys.push(y);
setTimeout(askaway,eval('' + fourfive));
} else if (eval('' + xs.length) >= 2) {
xxs.push(x);
yys.push(y);
if (eval('' + xs.length) == 2) {
// document.title+=' | ';
xs.push(Math.abs(xs[0] - xs[1]));
ys.push(Math.abs(ys[0] - ys[1]));
xs.push(Math.abs(xs[0] - xs[1]));
ys.push(Math.abs(ys[0] - ys[1]));
xs[0]=Math.min(xs[0], xs[1]);
ys[0]=Math.min(ys[0], ys[1]);
xs[1]=xs[2];
ys[1]=ys[2];
x=xs[0];
y=ys[0];
// alert(xs.length + ' ? RE rect');
} else {
x=xs[0];
y=ys[0];
if (eval('' + xs.length) == 4) { xs[0]+=0.00001; }
}
} else {
xxs.push(x);
yys.push(y);
xs.push(x);
ys.push(y);
x=xs[0];
y=ys[0];
}
}
} else {
console.log('z click showingc=' + showingc);
}
}
if (xs.length < 1) {
relevant=false;
document.body.onmousedown=null;
document.body.onmousemove=null;
document.body.ontouchdown=null;
} else {
relevant=true;
document.body.onmousedown=function(e){ document.getElementById('rubberband').innerHTML=''; lastrubvalid=false; document.body.onmousemove=null; setTimeout(tbs, 500); omd(e); relevant=false; };
document.body.onmousemove=function(e){ var rectis=document.body.getBoundingClientRect(); if (e.clientX) { ourDrawLine(eval(rectis.left + e.clientX), eval(rectis.top + e.clientY)); } else { ourDrawLine(eval(0 + e.pageX), eval(0 + e.pageY)); } };
document.body.ontouchdown=function(e){ var rectis=document.body.getBoundingClientRect(); if (e.touches) { if (e.touches[0].clientX) { ourDrawLine(eval(rectis.left + e.touches[0].clientX), eval(rectis.top + e.touches[0].clientY)); } else { ourDrawLine(eval(0 + e.touches[0].pageX), eval(0 + e.touches[0].pageY)); } } };
}
};
var predbih='Click once where text to be placed in resultant PDF or more for Annotations. Can use suffix such as x 5 to repeat value on 4 clicks to follow. With dates go consult https://www.w3schools.com/php/func_date_date_format.asp DATE_ATOM type entries where DATE_ followed by ymd lowercase character correspondence in 2nd part means change just date via ymd means where date_ followed by hms lowercase character correspondence in 2nd part means change time via hms means where uppercase 2nd part preceeded by ymd lowercase character in 1st part means change datetime via ymd means where datE_ followed by hms lowercase character correspondence in 2nd part means change datetime via hms means. Incrementing scale can be done via ++ or -- or +=2 or -=4 types of strings before x 5 repeat definitions. An offset to DATE_ATOM type entry meaning of today & now can be achieved via no spaces between it & offset ++ or -4 type of string & optional more until string such as Tuesday. Basis date is " . $newdts . "';
predbih='Clicks followed by mouse up mouse move can cause some retainable Rubber Banding to take place, perhaps above.';
document.getElementById('mybody').title=predbih;
var dbih='Click where text node(s) are to be placed in your resultant PDF. You will get prompted for optional styling options. There are also other glowing <i>from now on</i> ways to change the text look.';
dbih=predbih;
document.body.innerHTML+="<div id=custom-alert-1 class=custom-alert style='position:fixed; left: 50%; transform: translate(-50%, -50%); top:50%; display: block;'>" + dbih + "</div>";
document.body.innerHTML+="<div onclick='showingc=showing; event.stopPropagation();' id=custom-prompt-1 class=custom-prompt style='position:fixed; left: 70%; transform: translate(-70%, -10%); top:10%; display: none;'>" + cpone + "</div>";
setTimeout(hideIt, 10000);
setTimeout(showPromptIt, 5000);
if (curls >= 0 && eval('' + lsnames.length) > curone) {
curls=curone;
startrecording=true;
showingc=false;
if (sofarmode == 3) {
setTimeout(processcmd, 3000);
} else {
x=eval(lsnames[curls].split('!!!')[1].split('@@@')[0]);
y=eval(lsnames[curls].split('@@@')[1]);
xans=lsnames[curls].split('!!!')[0] + ' ';
document.getElementById('mytextarea').value=xans.replace(/" . "\\" . "~" . "\\" . "~/g, String.fromCharCode(10));
//alert(5678);
setTimeout(processcmd, 15000);
}
}
}

setTimeout(tom, 2000);

</script>
</head>
<body id=mybody class=defbody onload='atthestart(); disableScroll(); jccheck();'>
<h1 id=myh1>Diagon Alley</h1>
<h2>RJM Programming - January, 2026</h3>
<h4><button onclick="event.stopPropagation(); document.getElementById('fibothone').scrollIntoView(); window.scrollBy(0,80);" id=bclock style=visibility:hidden;>Analogue <br>Clock 🕓</button> <button onclick="event.stopPropagation(); document.getElementById('prerrow').scrollIntoView();" id=bsquare style=visibility:hidden;>Square 🟪<br>Diagonals</button> <select title='Element Type of first ... subsequents will always be sub for top to bottom and sup for bottom to top all left to right' onchange=nonp(this); id=eletype><option value=p>p</option><option value=sub>sub</option><option value=sup>sup</option><option value=span>span</option><option value=sub>sub</option><option value=font>font</option><option value=div>div</option><option value=h1>h1</option><option value=h2>h2</option><option value=h3>h3</option><option value=h4>h4</option></select> <input onblur=chrc(this); title='Content' type=text id=chars name=chars placeholder=Content value='⚊'></input>  <input onblur=fsnc(this); onchange=fsnc(this); title='Font Size' type=number min=0 step=1 id=fsn name=fsn placeholder='Font Size' value='96'></input>px  <input onblur=rotc(this); onchange=rotc(this); title='Rotation in degrees' type=number min=0 max=360 step=0.1 id=rtn name=rtn placeholder='Rotation in degrees' value='8.0'></input>deg  <input onblur=trxc(this); onchange=trxc(this); title='Translate X' type=number step=0.1 id=txn name=txn placeholder='Translate X' value='-10.0'></input>px,<input onblur=tryc(this); onchange=tryc(this); title='Translate Y' type=number step=0.1 id=tyn name=tyn placeholder='Translate Y' value='-20.0'></input>px  <input onblur=lgc(this); onchange=lgc(this); title='Components' type=number min=1 step=1 id=fsn name=lgn placeholder='Components' value='8'></input></h4>
<table id-mytable border=1>
<script type=text/javascript>
document.write('<tr id=frow' + ('0000' + rownum).slice(-4) + '><td onblur=obr(this); id=cell' + ('0000' + cellnum).slice(-4) + '><' + ft.replace('sub','p').replace('sup','p') + ' id=ele' + ('0000' + cellnum).slice(-4) + ' title=' + ft.replace('sub','p').replace('sup','p') + '' + rit(charsare) + '</' + ft.replace('sub','p').replace('sup','p') + '><td onblur=obr(this); id=cell' + ('0000' + eval(1 + cellnum)).slice(-4) + '><a title=Clone style=background-color:yellow; onclick="event.stopPropagation(); addone();" href=#>➕</a></' + ft + '></td></tr>');
document.write('<tr id=crow' + ('0000' + rownum).slice(-4) + '><td id=ecll' + ('0000' + cellnum).slice(-4) + '><' + ft + ' id=lee' + ('0000' + cellnum).slice(-4) + '><td id=ecll' + ('0000' + eval(1 + cellnum)).slice(-4) + '></' + ft + '></td></tr>');
document.write('<tr id=brow' + ('0000' + rownum).slice(-4) + '><td colspan=2 style=text-align:center;><iframe style="opacity:0.6;width:50%;height:800px;" id=ifbothone srcdoc="" src=#></iframe><iframe style="opacity:0.6;width:50%;height:800px;" id=ifbothtwo srcdoc="" src=#></iframe></tr>');
document.write('<tr id=pretrow' + ('0000' + rownum).slice(-4) + '><td id=pretrow colspan=2><button onclick="event.stopPropagation(); document.getElementById(' + "'fibothone'" + ').scrollIntoView(); window.scrollBy(0,80);">Analogue <br>Clock 🕓</button> <button onclick="event.stopPropagation(); document.getElementById(' + "'prerrow'" + ').scrollIntoView();">Square 🟪<br>Diagonals</button> <button onclick="event.stopPropagation(); document.getElementById(' + "'myh1'" + ').scrollIntoView();">Top</button> </td></tr><tr id=trow' + ('0000' + rownum).slice(-4) + '><td colspan=2 style=text-align:center;><iframe onload="fbo(this);" style="opacity:0.6;width:80%;height:1100px;" id=fibothone srcdoc="" src=#></iframe><iframe onload="fbt(this);" style="opacity:0.6;width:80%;height:1100px;" id=fibothtwo srcdoc="" src=#></iframe><iframe scrolling=no onload="fbc(this);" style="opacity:1.0;width:80%;height:1100px;background-color:transparent;" id=fiboththree srcdoc="" src=#></iframe></td></tr>');
document.write('<tr id=prerrow' + ('0000' + rownum).slice(-4) + '><td id=prerrow colspan=2><button onclick="event.stopPropagation(); document.getElementById(' + "'fibothone'" + ').scrollIntoView(); window.scrollBy(0,80);">Analogue <br>Clock 🕓</button> <button onclick="event.stopPropagation(); document.getElementById(' + "'prerrow'" + ').scrollIntoView();">Square 🟪<br>Diagonals</button> <button onclick="event.stopPropagation(); document.getElementById(' + "'myh1'" + ').scrollIntoView();">Top</button> </td></tr><tr id=rrow' + ('0000' + rownum).slice(-4) + '><td id=tdcontainer colspan=2 style=text-align:center;width:1000px;height:1000px;><div id=mycontainer class=container></div></td></tr>');
setTimeout(andthen, 400);
</script>
</table>
<div id=dstyle>
</div>
<canvas id=canvas style=display:none;></canvas>
<div id=blob></div>
<div id=doverlay>
<div id=doverlay1></div>
<div id=doverlay2></div>
<div id=doverlay3></div>
<div id=doverlay4></div>
</div>
<div id=dpf style=display:none;></div>
<div id=dimap></div>
<div id=aaacoords style=display:none;></div>
<div id=coords style=display:none;></div>
<div id=rubberband></div>
<div id=dmore></div>
</body>
</html>