<!doctype html>
<head>
<title>Flowchart - RJM Programming - January, 2019 ... Thanks to https://enjoycss.com/</title>
<meta name="viewport" content="width=device-width, initial-scale=0.5, minimum-scale=0.1, maximum-scale=10, user-scalable=yes" >
<style>


input[type=button] {
background-color: #e0e0e0;
}

div {
text-align: center;
}

.cglow {
box-shadow-bottom-right-radius: 50%; // thanks to https://stackoverflow.com/questions/2714765/using-border-radius-and-box-shadow-together-css
box-shadow-bottom-left-radius: 50%;
box-shadow-top-right-radius: 50%;
box-shadow-top-left-radius: 50%;
-webkit-animation: cglow 1s ease-in-out infinite alternate;
-moz-animation: cglow 1s ease-in-out infinite alternate;
animation: cglow 1s ease-in-out infinite alternate;
-webkit-border-radius: 50%;
border-radius: 50%;
}

.glow {
-webkit-animation: glow 1s ease-in-out infinite alternate;
-moz-animation: glow 1s ease-in-out infinite alternate;
animation: glow 1s ease-in-out infinite alternate;
}

/* Thanks to https://www.w3schools.com/howto/tryit.asp?filename=tryhow_css_glowing_text */

@-webkit-keyframes cglow {
from {
box-shadow: 0 0 3px #fff, 0 0 5px #fff, 0 0 37px #e60073, 0 0 9px #e60073, 0 0 11px #e60073, 0 0 13px #e60073, 0 0 15px #e60073;
box-shadow-bottom-right-radius: 50%; // thanks to https://stackoverflow.com/questions/2714765/using-border-radius-and-box-shadow-together-css
box-shadow-bottom-left-radius: 50%;
box-shadow-top-right-radius: 50%;
box-shadow-top-left-radius: 50%;
}

to {
box-shadow: 0 0 24px #fff, 0 0 6px #ff4da6, 0 0 8px #ff4da6, 0 0 10px #ff4da6, 0 0 12px #ff4da6, 0 0 14px #ff4da6, 0 0 16px #ff4da6;
box-shadow-bottom-right-radius: 50%; // thanks to https://stackoverflow.com/questions/2714765/using-border-radius-and-box-shadow-together-css
box-shadow-bottom-left-radius: 50%;
box-shadow-top-right-radius: 50%;
box-shadow-top-left-radius: 50%;
}
}

@-webkit-keyframes glow {
from {
box-shadow: 0 0 3px #fff, 0 0 5px #fff, 0 0 37px #e60073, 0 0 9px #e60073, 0 0 11px #e60073, 0 0 13px #e60073, 0 0 15px #e60073;
}

to {
box-shadow: 0 0 24px #fff, 0 0 6px #ff4da6, 0 0 8px #ff4da6, 0 0 10px #ff4da6, 0 0 12px #ff4da6, 0 0 14px #ff4da6, 0 0 16px #ff4da6;
}
}

.diamond {
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
box-sizing: content-box;
width: 0;
height: 0;
position: relative;
top: 0;
border: 50px solid rgba(0,0,0,0);
border-top-width: 0;
border-bottom: 70px solid yellow; //#1abc9c;
font: normal 70%/normal Arial, Helvetica, sans-serif;
color: rgba(0,0,0,1);
//-o-text-overflow: visible; //clip;
//text-overflow: visible; //clip;
white-space: nowrap;
overflow: visible;
text-overflow: ellipsis;
-o-text-overflow: ellipsis;
/* -webkit-animation: glow 1s ease-in-out infinite alternate;
-moz-animation: glow 1s ease-in-out infinite alternate;
animation: glow 1s ease-in-out infinite alternate; */
}

.diamond::after {
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
box-sizing: content-box;
width: 0;
height: 0;
position: absolute;
content: "";
top: 70px;
left: -50px;
border: 50px solid rgba(0,0,0,0);
border-top: 70px solid yellow; //#1abc9c;
font: normal 70%/normal Arial, Helvetica, sans-serif;
color: rgba(0,0,0,1);
//-o-text-overflow: visible; //clip;
//text-overflow: visible; //clip;
white-space: nowrap;
overflow: visible;
text-overflow: ellipsis;
-o-text-overflow: ellipsis;
}


.diamond:hover {
overflow: visible;
}

.circle {
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
box-sizing: content-box;
text-align: center;
width: 200px;
height: 200px;
border: none;
-webkit-border-radius: 50%;
border-radius: 50%;
font: normal 100%/normal Arial, Helvetica, sans-serif;
color: rgba(0,0,0,1);
-o-text-overflow: clip;
text-overflow: clip;
background: pink; //#1abc9c;
opacity:0.5;
/* -webkit-animation: glow 1s ease-in-out infinite alternate;
-moz-animation: glow 1s ease-in-out infinite alternate;
animation: glow 1s ease-in-out infinite alternate; */
}

.oval {
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
box-sizing: content-box;
text-align: center;
width: 200px;
height: 100px;
border: none;
-webkit-border-radius: 50%;
border-radius: 50%;
font: normal 100%/normal Arial, Helvetica, sans-serif;
color: rgba(0,0,0,1);
-o-text-overflow: clip;
text-overflow: clip;
background: lightgreen; //#1abc9c;
/* -webkit-animation: glow 1s ease-in-out infinite alternate;
-moz-animation: glow 1s ease-in-out infinite alternate;
animation: glow 1s ease-in-out infinite alternate; */
}

.rectangle {
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
box-sizing: content-box;
width: 200px;
height: 100px;
border: none;
font: normal 100%/normal Arial, Helvetica, sans-serif;
color: rgba(0,0,0,1);
-o-text-overflow: clip;
text-overflow: clip;
background: lightblue; //#1abc9c;
/* -webkit-animation: glow 1s ease-in-out infinite alternate;
-moz-animation: glow 1s ease-in-out infinite alternate;
animation: glow 1s ease-in-out infinite alternate; */
}
</style>
<script type='text/javascript'>
// http://www.rjmprogramming.com.au/HTMLCSS/flowchart.html?venn=Y
//&feedback=Feedback
//&recim=the-venn
//&emailcc=rmetcalfe15%40gmail.com
//&emailto=rmetcalfe15%40gmail.com
var vennis='', feedback='', recim='', emailcc='', emailto='', equ='=', xfeedback='';
if (document.URL.indexOf('feedback') != -1 && document.URL.indexOf('feedback=') == -1) { equ=encodeURIComponent('='); }


//https://www.rjmprogramming.com.au/HTMLCSS/flowchart.html?feedback=test+it%7Enow&recim=ghfd&emailcc=rmetcalfe15%40gmail.com&emailto=Rmetcalfe15%40gmail.com

feedback=location.search.split('feedback' + equ)[1] ? decodeURIComponent((location.search).split('feedback' + equ)[1].split('&')[0].split('----')[0]).replace(/\+/g,' ') : '';
if (equ != "=") { xfeedback=feedback; }
vennis=(location.search + xfeedback).split('venn' + equ)[1] ? decodeURIComponent((location.search + xfeedback).split('venn' + equ)[1].split('&')[0].split('----')[0]) : '';
recim=(location.search + xfeedback).split('recim' + equ)[1] ? decodeURIComponent((location.search + xfeedback).split('recim' + equ)[1].split('&')[0].split('----')[0]) : '';
emailcc=(location.search + xfeedback).split('emailcc' + equ)[1] ? decodeURIComponent((location.search + xfeedback).split('emailcc' + equ)[1].split('&')[0].split('----')[0]) : '';
emailto=(location.search + xfeedback).split('emailto' + equ)[1] ? decodeURIComponent((location.search + xfeedback).split('emailto' + equ)[1].split('&')[0].split('----')[0]) : '';

var ciss=' class=glow', doglow=true, xciss=' class=cglow';
var idarr=[];
var loosetext=false;
var undoid=-1;
var redoid=-1;
var documentURL=document.URL.replace('.php','.html');
var xcv=documentURL.split(String.fromCharCode(35))[0].split(String.fromCharCode(63))[0].replace(dfrom,dto)+'?venn=Mind%20Map';
var ambeingsupervised=false;
var bodyclick=true, nonbodyclick=0, div1=null, div2=null, dval='';
var x=0,y=0,lastx=0,lasty=0,icnt=0,jcnt=0;
var wording="Start", shape="oval";
var wwok=true;
var myselsc='', urlis='';
var mcnt=0;
var wasglow='';
var fx=0, fy=0;
var rectwas, rectnow;
var sxoff=0, syoff=0;
var xoff=0, yoff=0;
var jnameis='';
var dystyle='', dystylecss='';
var acglow='youllneverfindthis';
var bcglow='glow';
var acolour="youllneverfindthis";
var bcolour=" style='background-color:lightgreen;";
var aclass="youllneverfindthis";
var bclass=" class='cglow";
var prevxoff=0, prevyoff=0;
var outst='';
var bris='<br>';
var htext=' <input style=background-color:lightgreen; id=itext type=button onclick="bodyclick=false; event.stopPropagation(); loosetext=true; prevxoff=xoff; prevyoff=yoff; xoff=0; yoff=0; setTimeout(butlater, 1500); " value=Text></input>';
var gpreb='';
var ncol=0;
var vscnt=0;
var cat='?';
var noeolp='Now other end of line please.  ';
var wdef='';
var bcols=['red','yellow','green','blue','cyan','magenta','pink','lightblue','lightgreen','pink','#ffc0cb','lightpink','#ffb6c1'
,'hotpink','#ff69b4'
,'deeppink','#ff1493'
,'palevioletred','#db7093'
,'mediumvioletred','#c71585'
,'lightsalmon','#ffa07a'
,'salmon','#fa8072'
,'darksalmon','#e9967a'
,'lightcoral','#f08080'
,'indianred','#cd5c5c'
,'crimson','#dc143c'
,'firebrick','#b22222'
,'darkred','#8b0000'
,'red','#ff0000'
,'orangered','#ff4500'
,'tomato','#ff6347'
,'coral','#ff7f50'
,'darkorange','#ff8c00'
,'orange','#ffa500'
,'yellow','#ffff00'
,'lightyellow','#ffffe0'
,'lemonchiffon','#fffacd'
,'lightgoldenrodyellow','#fafad2'
,'papayawhip','#ffefd5'
,'moccasin','#ffe4b5'
,'peachpuff','#ffdab9'
,'palegoldenrod','#eee8aa'
,'khaki','#f0e68c'
,'darkkhaki','#bdb76b'
,'gold','#ffd700'
,'cornsilk','#fff8dc'
,'blanchedalmond','#ffebcd'
,'bisque','#ffe4c4'
,'navajowhite','#ffdead'
,'wheat','#f5deb3'
,'burlywood','#deb887'
,'tan','#d2b48c'
,'rosybrown','#bc8f8f'
,'sandybrown','#f4a460'
,'goldenrod','#daa520'
,'darkgoldenrod','#b8860b'
,'peru','#cd853f'
,'chocolate','#d2691e'
,'saddlebrown','#8b4513'
,'sienna','#a0522d'
,'brown','#a52a2a'
,'maroon','#800000'
,'olive','#808000'
,'olivedrab','#6b8e23'
,'yellowgreen','#9acd32'
,'limegreen','#32cd32'
,'lime','#00ff00'
,'lawngreen','#7cfc00'
,'chartreuse','#7fff00'
,'greenyellow','#adff2f'
,'springgreen','#00ff7f'
,'mediumspringgreen','#00fa9a'
,'lightgreen','#90ee90'
,'palegreen','#98fb98'
,'darkseagreen','#8fbc8f'
,'mediumseagreen','#3cb371'
,'seagreen','#2e8b57'
,'forestgreen','#228b22'
,'green','#008000'
,'darkgreen','#006400'
,'mediumaquamarine','#66cdaa'
,'aqua','#00ffff'
,'cyan','#00ffff'
,'lightcyan','#e0ffff'
,'paleturquoise','#afeeee'
,'aquamarine','#7fffd4'
,'turquoise','#40e0d0'
,'mediumturquoise','#48d1cc'
,'darkturquoise','#00ced1'
,'lightseagreen','#20b2aa'
,'cadetblue','#5f9ea0'
,'darkcyan','#008b8b'
,'teal','#008080'
,'lightsteelblue','#b0c4de'
,'powderblue','#b0e0e6'
,'lightblue','#add8e6'
,'skyblue','#87ceeb'
,'lightskyblue','#87cefa'
,'deepskyblue','#00bfff'
,'dodgerblue','#1e90ff'
,'cornflowerblue','#6495ed'
,'steelblue','#4682b4'
,'royalblue','#4169e1'
,'blue','#0000ff'
,'mediumblue','#0000cd'
,'darkblue','#00008b'
,'navy','#000080'
,'midnightblue','#191970'
,'thistle','#d8bfd8'
,'plum','#dda0dd'
,'violet','#ee82ee'
,'orchid','#da70d6'
,'fuchsia','#ff00ff'
,'magenta','#ff00ff'
,'mediumorchid','#ba55d3'
,'mediumpurple','#9370db'
,'blueviolet','#8a2be2'
,'darkviolet','#9400d3'
,'darkorchid','#9932cc'
,'darkmagenta','#8b008b'
,'purple','#800080'
,'indigo','#4b0082'
,'darkslateblue','#483d8b'
,'rebeccapurple','#663399'
,'slateblue','#6a5acd'
,'mediumslateblue','#7b68ee'
,'snow','#fffafa'
,'honeydew','#f0fff0'
,'mintcream','#f5fffa'
,'azure','#f0ffff'
,'aliceblue','#f0f8ff'
,'ghostwhite','#f8f8ff'
,'whitesmoke','#f5f5f5'
,'seashell','#fff5ee'
,'beige','#f5f5dc'
,'oldlace','#fdf5e6'
,'floralwhite','#fffaf0'
,'ivory','#fffff0'
,'antiquewhite','#faebd7'
,'linen','#faf0e6'
,'lavenderblush','#fff0f5'
,'mistyrose','#ffe4e1'
,'gainsboro','#dcdcdc'
,'lightgrey','#d3d3d3'
,'silver','#c0c0c0'
,'darkgray','#a9a9a9'
,'gray','#808080'
,'dimgray','#696969'
,'lightslategray','#778899'
,'slategray','#708090'
,'darkslategray','#2f4f4f'];

var inp="Flowchart";
var withvenn="?venn=y", withoutvenn="";
var venn="Venn Diagram", novenn='Flowchart"></input> <input id=itbut2 style=display:inline-block; type=button onclick=location.href=documentURL.split(String.fromCharCode(35))[0].split(String.fromCharCode(63))[0].replace(dfrom,dto)+withoutvenn; value="Mind Map"></input>';
var dfrom='.php', dto='.html';
var preh1is=location.search.split('venn=')[1] ? decodeURIComponent(location.search.split('venn=')[1].split('&')[0]) : '';
var h1is='<h1 style=display:inline-block; id="myemail"></h1> <h1 style=display:inline-block; id="myh1">Flowchart</h1> or <input style=display:inline-block; id=itbut type=button onclick=location.href=documentURL.split(String.fromCharCode(35))[0].split(String.fromCharCode(63))[0].replace(dfrom,dto)+withvenn; value="Venn Diagram"></input>';
h1is=location.search.split('venn=')[1] ? '<h1 style=display:inline-block; id="myemail"></h1> <h1 style=display:inline-block; id="myh1">' + venn + '</h1> or <input id=itbut style=display:inline-block; type=button onclick=location.href=documentURL.split(String.fromCharCode(35))[0].split(String.fromCharCode(63))[0].replace(dfrom,dto)+withoutvenn; value="' + novenn + '"></input>' : h1is;
if (h1is.indexOf('"myh1">Venn') != -1) { if (eval('' + preh1is.length) > 1) { inp=decodeURIComponent(location.search.split('venn=')[1].split('&')[0]); cat="rectangle"; wording=cat; noeolp='Is this a new rectangle pointing or you want to place value?  '; } else { inp="Venn Diagram"; cat="circle"; wording=cat; noeolp='Is this a new circle pointing or you want to place value?  '; } }
var tgsps=[], tgspsop=[], tgspsopwhat=[];


/**
* Create string from HTML entities
*/
String.fromHtmlEntities = function(string) {
return (string+"").replace(/&#\d+;/gm,function(s) {
return String.fromCharCode(s.match(/\d+/gm)[0]);
})
};

if (!String.fromCodePoint) { // thanks to http://xahlee.info/js/js_unicode_code_point.html
// ES6 Unicode Shims 0.1 , © 2012 Steven Levithan , MIT License
String.fromCodePoint = function fromCodePoint () {
var chars = [], point, offset, units, i;
for (i = 0; i < arguments.length; ++i) {
point = arguments[i];
offset = point - 0x10000;
units = point > 0xFFFF ? [0xD800 + (offset >> 10), 0xDC00 + (offset & 0x3FF)] : [point];
chars.push(String.fromCharCode.apply(null, units));
}
return chars.join("");
}
}

function throbbingspans() {
var isps, jsps;
if (tgsps.length == 0) {
var sps=document.getElementsByTagName('span');
for (isps=0; isps<sps.length; isps++) {
if (('' + sps[isps].style.opacity) != '') {
if (eval('' + sps[isps].style.opacity) < 1.0) {
tgsps.push(sps[isps]);
tgspsop.push(eval('' + sps[isps].style.opacity));
tgspsopwhat.push(eval('0.10'));
}
}
}
}
if (tgsps.length != 0) {
for (jsps=0; jsps<tgsps.length; jsps+=2) {
if (tgspsop[jsps] > 0.12 && tgspsop[jsps] < 0.88 && tgspsop[1 + jsps] > 0.12 && tgspsop[1 + jsps] < 0.88) { // && tgspsop[jsps] >= tgspsop[1 + jsps]) {
tgspsop[jsps]+=tgspsopwhat[jsps];
tgspsop[1 + jsps]-=tgspsopwhat[1 + jsps];
tgsps[jsps].style.opacity='' + tgspsop[jsps];
tgsps[1 + jsps].style.opacity='' + tgspsop[1 + jsps];
} else if (tgspsop[jsps] > 0.12 && tgspsop[jsps] < 0.88 && tgspsop[1 + jsps] > 0.12 && tgspsop[1 + jsps] < 0.88) { // && tgspsop[jsps] <= tgspsop[1 + jsps]) {
tgspsop[jsps]-=tgspsopwhat[jsps];
tgspsop[1 + jsps]+=tgspsopwhat[1 + jsps];
tgsps[jsps].style.opacity='' + tgspsop[jsps];
tgsps[1 + jsps].style.opacity='' + tgspsop[1 + jsps];
} else if (tgspsop[jsps] > 0.88) {
tgspsop[jsps]-=0.1;
tgspsop[1 + jsps]+=0.1;
tgsps[jsps].style.opacity='' + tgspsop[jsps];
tgsps[1 + jsps].style.opacity='' + tgspsop[1 + jsps];
tgspsopwhat[jsps]=-tgspsopwhat[jsps];
tgspsopwhat[1 + jsps]=-tgspsopwhat[1 + jsps];
} else if (tgspsop[1 + jsps] > 0.88) {
tgspsop[jsps]+=0.1;
tgspsop[1 + jsps]-=0.1;
tgsps[jsps].style.opacity='' + tgspsop[jsps];
tgsps[1 + jsps].style.opacity='' + tgspsop[1 + jsps];
tgspsopwhat[jsps]=-tgspsopwhat[jsps];
tgspsopwhat[1 + jsps]=-tgspsopwhat[1 + jsps];
} else if (tgspsop[1 + jsps] < 0.12) {
tgspsop[jsps]-=0.1;
tgspsop[1 + jsps]+=0.1;
tgsps[jsps].style.opacity='' + tgspsop[jsps];
tgsps[1 + jsps].style.opacity='' + tgspsop[1 + jsps];
tgspsopwhat[jsps]=-tgspsopwhat[jsps];
tgspsopwhat[1 + jsps]=-tgspsopwhat[1 + jsps];
} else if (tgspsop[jsps] < 0.12) {
tgspsop[jsps]+=0.1;
tgspsop[1 + jsps]-=0.1;
tgsps[jsps].style.opacity='' + tgspsop[jsps];
tgsps[1 + jsps].style.opacity='' + tgspsop[1 + jsps];
tgspsopwhat[jsps]=-tgspsopwhat[jsps];
tgspsopwhat[1 + jsps]=-tgspsopwhat[1 + jsps];
}
}
setTimeout(throbbingspans, 500);
}
}

function overdiv(adiv, acol) {
if (inp == "Mind Map") {
bcolour=' style="background-color:' + acol + ';';
}
if (adiv.className == 'diamond') {
adiv.style.borderTop='70px solid ' + acol;
adiv.style.borderBottom='70px solid ' + acol;
} else {
adiv.style.backgroundColor=acol;
}
return adiv;
}

function somuchmore(inst) {
var mycol='', r=0, g=0, b=0, arr='0123456789abcdef'.split('');
outst=inst;
if (h1is.indexOf('"myh1">Venn') != -1) {
outst+='<div id=dcolour style=display:inline-block;><input onclick=notc(); id=icolour type="color" onchange="overdiv(div1,this.value);" value="#90ee90"></input></div>  <div id=dpf style=display:NONE;><input onclick="wnotc(); setTimeout(preprocess,12000);" style=display:inline-block; id=file type=file name=file></input><span class=readBytesButtons><button style=display:none; data-endbyte=4 data-startbyte=0>1-5</button><button style=display:none; data-endbyte=14 data-startbyte=5>6-15</button><button style=display:none; data-endbyte=7 data-startbyte=6>7-8</button><button name=button id=button value=Process data-endbyte=0 data-startbyte=0>Process</button></span></div>';
} else if (idarr.length == 0 && inst == '') {
outst+='<div id=dcolour style=display:inline-block;><input onclick=notc(); id=icolour type="color" onchange="overdiv(div1,this.value);" value="#90ee90"></input></div>  <div id=dpf style=display:NONE;><input onclick="wnotc(); setTimeout(preprocess,12000);" style=display:inline-block; id=file type=file name=file></input><span class=readBytesButtons><button style=display:none; data-endbyte=4 data-startbyte=0>1-5</button><button style=display:none; data-endbyte=14 data-startbyte=5>6-15</button><button style=display:none; data-endbyte=7 data-startbyte=6>7-8</button><button name=button id=button value=Process data-endbyte=0 data-startbyte=0>Process</button></span></div>';
} else if (inst != '' && div1 == null) {
outst+='<div id=dcolour style=display:inline-block;><input onclick=notc(); id=icolour type="color" onchange="overdiv(div1,this.value);" value="#90ee90"></input></div>  <div id=dpf style=display:NONE;><input onclick="wnotc(); setTimeout(preprocess,12000);" style=display:inline-block; id=file type=file name=file></input><span class=readBytesButtons><button style=display:none; data-endbyte=4 data-startbyte=0>1-5</button><button style=display:none; data-endbyte=14 data-startbyte=5>6-15</button><button style=display:none; data-endbyte=7 data-startbyte=6>7-8</button><button name=button id=button value=Process data-endbyte=0 data-startbyte=0>Process</button></span></div>';
} else {
if (inst == '') { div1=document.getElementById(idarr[eval(-1 + idarr.length)]); }
mycol=('' + div1.style.backgroundColor);
if (mycol == '') {
if (div1.outerHTML.indexOf('background-color:') != -1) {
mycol=div1.outerHTML.split('background-color:')[1].split(';')[0].trim();
} else if (div1.outerHTML.indexOf(' class="circle"') != -1) {
mycol='#ffc0cb';
} else if (div1.outerHTML.indexOf(' class="oval"') != -1) {
mycol='#90ee90';
} else if (div1.outerHTML.indexOf(' class="diamond"') != -1) {
mycol='#ffff00';
} else if (div1.outerHTML.indexOf(' class="rectangle"') != -1) {
mycol='#add8e6';
} else {
mycol='#90ee90';
}
}
if (mycol.indexOf('rgb') != -1) {
r=eval(mycol.split('(')[1].split(',')[0].trim());
g=eval(mycol.split('(')[1].split(',')[1].trim());
b=eval(mycol.split('(')[1].split(',')[2].split(')')[0].split(',')[0].trim());
//alert('r=' + r + ' and g=' + g + ' and b=' + b);
mycol ='#' + arr[(r-(r % 16)) / 16] + arr[r % 16] + arr[(g-(g % 16)) / 16] + arr[g % 16] + arr[(b-(b % 16)) / 16] + arr[b % 16];
}
outst+='<div id=dcolour style=display:inline-block;><input onclick=notc(); id=icolour type="color" onchange="overdiv(div1,this.value);" value="' + mycol + '"></input></div>  <div id=dpf style=display:NONE;><input onclick="wnotc(); setTimeout(preprocess,12000);" style=display:inline-block; id=file type=file name=file></input><span class=readBytesButtons><button style=display:none; data-endbyte=4 data-startbyte=0>1-5</button><button style=display:none; data-endbyte=14 data-startbyte=5>6-15</button><button style=display:none; data-endbyte=7 data-startbyte=6>7-8</button><button name=button id=button value=Process data-endbyte=0 data-startbyte=0>Process</button></span></div>';
if (inst == '' && document.getElementById('dcolour')) {
ncol++;
document.getElementById('dcolour').innerHTML='<input onclick=notc(); id=icolour' + ncol + ' type="color" onchange="overdiv(div1,this.value);" value="' + mycol + '"></input>';
//alert(document.getElementById('dcolour').innerHTML);
}
}
//alert(outst);
return inst;
}

function tfc(intb) {
var outtb=intb.replace(';','').trim();
if (outtb.length == 7) {
if (outtb.substring(0,1) == '#') {
if (outtb.toLowerCase().substring(1).replace(/0/g,'').replace(/1/g,'').replace(/2/g,'').replace(/3/g,'').replace(/4/g,'').replace(/5/g,'').replace(/6/g,'').replace(/7/g,'').replace(/8/g,'').replace(/9/g,'').replace(/a/g,'').replace(/b/g,'').replace(/c/g,'').replace(/d/g,'').replace(/e/g,'').replace(/f/g,'') == '') {
if (div1 != null) {
overdiv(div1,outtb);
document.getElementById('dstart').innerHTML=cat;
return cat;
}
}
}
}
return intb;
}

function preprocess() {
//alert(254);
if (document.getElementById("file").value != '') {
//alert(2254);
eh();
document.getElementById('button').click();

//alert(354);
document.getElementById("file").value='';
//alert(454);
bodyclick=true;
//nonbodyclick=0;
}
}

function process(infilecontents) {
//alert(754);
if (infilecontents != null) {
//alert(99);
//alert(1754);
notc();
if (div1.outerHTML.indexOf('diamond') != -1) {
if (gpreb == '') {
div1.style.backgroundImage="URL(data:image/png;base64," + btoa(infilecontents) + ")";
} else {
div1.style.background="linear-gradient(rgba(255,255,255,0.8),rgba(255,255,255,0.8)),URL(data:image/png;base64," + btoa(infilecontents) + ")";
}
gpreb='';
alert(2754);
document.getElementById('dcontentd').innerHTML+=div1.outerHTML.replace('diamond','oval').replace(' id="', ' id="z').replace(' style="', ' style="opacity:0.1;z-index:90;');
//alert(document.getElementById('z' + div1.id).outerHTML);
idarr.push('z' + div1.id);
} else {
if (gpreb == '') {
div1.style.backgroundImage="URL('data:image/png;base64," + btoa(infilecontents) + "')";
} else {
div1.style.background="linear-gradient(rgba(255,255,255,0.8),rgba(255,255,255,0.8)),URL('data:image/png;base64," + btoa(infilecontents) + "')";
}
gpreb='';
}

//alert(999);
//document.getElementById('dpf').style.display='inline-block';
//alert(9999);
wording=cat;
nonbodyclick=0;
document.getElementById('dsave').innerHTML=document.getElementById('dsave').innerHTML.replace(somuchmore(noeolp), '');
}
}

function readBlob(opt_startByte, opt_stopByte) {

//alert(33);
wnotc();
var files = document.getElementById("file").files;
//alert(333);
if (!files.length) {
//alert("Please select a file!");
return;
} else {
//alert(54);
//setTimeout(preprocess, 3000);
w = files[0].name;
//document.getElementById("fil").value = w;
}

var file = files[0];
var start = parseInt(opt_startByte) || 0;
var stop = parseInt(opt_stopByte) || file.size - 1;

//alert(stop);

var reader = new FileReader();

// If we use onloadend, we need to check the readyState.
reader.onloadend = function(evt) {
if (evt.target.readyState == FileReader.DONE) { // DONE == 2
//alert(77);
process(evt.target.result);
//alert(777);
}
};

var blob = file.slice(start, stop + 1);
reader.readAsBinaryString(blob);
}

function eh() {
//alert(45);
document.querySelector('.readBytesButtons').addEventListener('click', function(evt) {
//alert(145);
//alert(2);
wnotc();
if (evt.target.tagName.toLowerCase() == 'button') {
var startByte = evt.target.getAttribute('data-startbyte');
var endByte = evt.target.getAttribute('data-endbyte');
//alert(22);
readBlob(startByte, endByte);
//alert(222);
}
}, false);
}

function doundo() {
notc();
if (undoid >= 0) {
redoid=undoid;
document.getElementById(idarr[undoid]).style.display='none';
document.getElementById('iredo').style.display='inline-block';
undoid--;
if (undoid < 0) {
document.getElementById('iundo').style.display='none';
}
}
}

function doredo() {
notc();
if (redoid >= 0 && redoid < idarr.length) {
undoid=redoid;
document.getElementById(idarr[redoid]).style.display='block';
document.getElementById('iundo').style.display='inline-block';
redoid++;
}
}

function recxy(event) {
var isok=true;
//if (document.getElementById('dpf')) {
// if (('' + document.getElementById('dpf').style.display).toLowerCase().indexOf('block') != -1) { alert('cliCk ' + wording + ' ' + bodyclick); }
//}
if (event.touches) { // thanks to https://stackoverflow.com/questions/24567441/how-do-i-detect-two-fingers-at-touchstart-in-javascript
if (event.touches.length > 1) { isok=false; }
}
if (isok) {
if (x == 0 && y == 0 && lastx == 0 && lasty == 0) {

if (event.touches) {
var touches1 = event.changedTouches;
var first1 = touches1[0];
x = first1.clientX;
y = first1.clientY;
} else if (event.clientX || event.clientY) {
x = event.clientX; // - elemLeft;
y = event.clientY; // - elemTop;
} else {
x = event.pageX; // - elemLeft;
y = event.pageY; // - elemTop;
}
lastx=x;
lasty=y;
//document.title='lastx_one';
//if (document.getElementById('dpf')) {
// if (('' + document.getElementById('dpf').style.display).toLowerCase().indexOf('block') != -1) { alert('Click ' + wording + ' ' + bodyclick); }
//}
setTimeout(xthen, 2000);
setTimeout(andthen, 1000);
} else {

if (event.touches) {
//document.title='pre lastx_2';
var touches2 = event.changedTouches;
var first2 = touches2[0];
lastx=x;
lasty=y;
//document.title='lastx_2';
fx = first2.clientX;
fy = first2.clientY;
setTimeout(xthen, 2000);
setTimeout(andthen, 1000);
} else if (event.clientX || event.clientY) {
if (x != event.clientX || y != event.clientY) {
lastx=x;
lasty=y;
//document.title='lastX_2';
//if (document.getElementById('dpf')) {
// if (('' + document.getElementById('dpf').style.display).toLowerCase().indexOf('block') != -1) { alert('ClIck ' + wording + ' ' + bodyclick); }
//}
setTimeout(xthen, 2000);
setTimeout(andthen, 1000);
//} else {
//document.title+=' ! ';
}
} else {
if (x != event.pageX || y != event.pageY) {
lastx=x;
lasty=y;
//document.title='LastX_2';
//if (document.getElementById('dpf')) {
// if (('' + document.getElementById('dpf').style.display).toLowerCase().indexOf('block') != -1) { alert('clicK ' + wording + ' ' + bodyclick); }
//}
setTimeout(xthen, 2000);
setTimeout(andthen, 1000);
//} else {
//document.title+=' ? ';
}
}

if (event.touches) {
var touches3 = event.changedTouches;
var first3 = touches3[0];
//lastx=x;
//lasty=y;
x = first3.clientX;
y = first3.clientY;
} else if (event.clientX || event.clientY) {
x = event.clientX; // - elemLeft;
y = event.clientY; // - elemTop;
} else {
x = event.pageX; // - elemLeft;
y = event.pageY; // - elemTop;
}
}
//alert('x=' + eval(sxoff + xoff + x) + ' and y=' + y);
}
}

function butlater() {
bodyclick=true;
xoff=prevxoff;
yoff=prevyoff;
}

function butlaterstill() {
loosetext=false;
}

function clickme(dois) {
bodyclick=false;
if (nonbodyclick == 0) {
div1=dois;
} else if (nonbodyclick > 0) {
if (dois.id == div1.id) {
//document.title+=' n ' + dois.id + '*';
nonbodyclick--;
} else {
div2=dois;
}
} else if (nonbodyclick < 0) {
div1=dois;
nonbodyclick=0;
}
if (h1is.indexOf('"myh1">Venn') != -1) {
bodyclick=false;
loosetext=false;
nonbodyclick--;
wdef='';
var vdtitle='', vspare;
if (dois.innerHTML == '') {
wdef=prompt('Enter Venn Diagram circle title (and can separate its integer value by ~ or use it for line feeds), else will plot a new circle', '');
if (wdef == null) { wdef=''; }
if (wdef.indexOf('~') != -1) { vspare=wdef.split('~')[eval(-1 + wdef.split('~').length)]; vdtitle=wdef.substring(0, eval(-1 + eval('' + wdef.length) - eval('' + vspare.length))).replace(/\~/g,'<br>') + '<br>'; wdef=vspare; }
}
if (wdef == '') { wdef=prompt('If you enter an integer, will show this, else will plot a new circle', ''); }
if (wdef == null) { wdef=''; }
if ((wdef + ' ').substring(0,1) >= '0' && (wdef + ' ').substring(0,1) <= '9') {
//alert(div1.outerHTML + ' ' + '<span style="position:absolute;top:' + eval(syoff + yoff + y) + 'px;left:' + eval(sxoff + xoff + x) + 'px;">' + wdef + '</span>');
if (vdtitle != '') { dois.innerHTML=' '; }
idarr.push("sp" + vscnt);
document.getElementById('dcontent').innerHTML+='<span id=sp' + vscnt + ' style="z-index:56;position:absolute;top:' + eval(syoff + y) + 'px;left:' + eval(sxoff + x) + 'px;">' + vdtitle + wdef + '</span>';
vscnt++;
wdef='';
nonbodyclick=-1;
setTimeout(butlater, 1500);
} else {
bodyclick=true;
nonbodyclick=-1;
wdef="";
andthen();
}
}
nonbodyclick++;
}

function resetit() {
bodyclick=true;
}

function getOffset(el) { // thanks to https://stackoverflow.com/questions/8672369/how-to-draw-a-line-between-two-divs
var rect = el.getBoundingClientRect();
return {
left: rect.left + window.pageXOffset,
top: rect.top + window.pageYOffset,
width: rect.width || el.offsetWidth,
height: rect.height || el.offsetHeight
};
}

function connect() { // div1, div2) { //, color, thickness) { // draw a line connecting elements
wording=cat;
var huhm=false; //navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i);
var notwithin=true;
var thisrect;
var thickness = 0;
var ioff=0;
var off1 = 0;
var off2 = 0;
off1 = getOffset(div1);
off2 = getOffset(div2);
// bottom right
var x1 = off1.left + off1.width;
var y1 = off1.top + off1.height;
notwithin=true;
if (huhm) {
thisrect=div1.getBoundingClientRect();
if (lastx >= thisrect.left && lastx <= eval(thisrect.left + thisrect.width) && lasty >= thisrect.top && lasty <= eval(thisrect.top + thisrect.height)) {
notwithin=false;
} else {
x1=eval(thisrect.left + thisrect.width / 2);
y1=eval(thisrect.top + thisrect.height / 2);
}
}
if (notwithin && huhm) {
x2=x2;
} else {
x1=lastx;
y1=lasty;
}
// top right
var x2 = off2.left + off2.width;
var y2 = off2.top;
notwithin=true;
if (huhm) {
thisrect=div2.getBoundingClientRect();
if (lastx >= thisrect.left && lastx <= eval(thisrect.left + thisrect.width) && lasty >= thisrect.top && lasty <= eval(thisrect.top + thisrect.height)) {
notwithin=false;
} else {
x2=eval(thisrect.left + thisrect.width / 2);
y2=eval(thisrect.top + thisrect.height / 2);
}
}
if (notwithin && huhm) {
x2=x2;
} else {
x2=x;
y2=y;
}
// distance
var length = Math.sqrt(((x2-x1) * (x2-x1)) + ((y2-y1) * (y2-y1)));
// center
var cx = ((x1 + x2) / 2) - (length / 2);
var cy = ((y1 + y2) / 2) - (thickness / 2);
// angle
var angle = Math.atan2((y1-y2),(x1-x2))*(180/Math.PI);
// make hr
idarr.push("ld" + mcnt);
undoid=eval(-1 + idarr.length);
document.getElementById('iundo').style.display='inline-block';
//var htmlLine = "<div id=dd" + mcnt + "><div" + ciss + " id=ld" + mcnt + " style='" + dval + "padding:0px;opacity:0.3; margin:0px; height:4px; position:absolute; background-position:" + eval(sxoff + ioff + cx) + "px " + eval(syoff + ioff + cy) + "px; left:" + eval(sxoff + ioff + cx) + "px; top:" + eval(syoff + ioff + cy) + "px; width:" + length + "px; -moz-transform:rotate(" + angle + "deg); -webkit-transform:rotate(" + angle + "deg); -o-transform:rotate(" + angle + "deg); -ms-transform:rotate(" + angle + "deg); transform:rotate(" + angle + "deg);background: linear-gradient(to left, olive 80%, rgba(255,0,0,1) 20%);'>  </div></div>";
var htmlLine = "<div" + ciss + " id=ld" + mcnt + " style='" + dval + "padding:0px;opacity:0.3; margin:0px; height:4px; position:absolute; background-position:" + eval(sxoff + ioff + cx) + "px " + eval(syoff + ioff + cy) + "px; left:" + eval(sxoff + ioff + cx) + "px; top:" + eval(syoff + ioff + cy) + "px; width:" + length + "px; -moz-transform:rotate(" + angle + "deg); -webkit-transform:rotate(" + angle + "deg); -o-transform:rotate(" + angle + "deg); -ms-transform:rotate(" + angle + "deg); transform:rotate(" + angle + "deg);background: linear-gradient(to left, olive 80%, rgba(255,0,0,1) 20%);'>  </div>";
//alert(htmlLine);
mcnt++;
//
// alert(htmlLine);
return htmlLine; //document.body.innerHTML += htmlLine;
}

function xthen() {
if (nonbodyclick < -2) { nonbodyclick=0; }
}

function antiglowit(indivih) {
if (doglow) {
return indivih;
} else {
//alert('Why ' + indivih.replace(' cglow', '').replace(' cglow', '').replace(' glow', '').replace(' glow', '').replace('cglow', '').replace('cglow', '').replace('glow', '').replace('glow', ''));
return indivih.replace(' cglow', '').replace(' cglow', '').replace(' glow', '').replace(' glow', '').replace('cglow', '').replace('cglow', '').replace('glow', '').replace('glow', '');
}
}

function andthen() {
var brbr="<br><br>", biis='', preb='';
//if (document.getElementById('dpf')) {
// if (('' + document.getElementById('dpf').style.display).toLowerCase().indexOf('block') != -1) { alert('' + nonbodyclick + ' ' + document.getElementById('secpoint').innerHTML.indexOf('Now other end of line please.') + ' CLICK ' + wording + ' ' + bodyclick); }
//}
if (bodyclick && document.getElementById('secpoint').innerHTML.indexOf(noeolp.split('&')[0]) == -1) {
if (h1is.indexOf('"myh1">Venn') != -1 && loosetext) {
// alert('here');
//wwok=true;
if (inp == "Mind Map") {
cat="";
} else {
cat="?";
}
}
if (((h1is.indexOf('"myh1">Venn') != -1 && loosetext) || (wording.replace('circle','').replace('?','') == '' && nonbodyclick >= 0))) {
wording='';
while (wording == '' && wwok) {
if (h1is.indexOf('"myh1">Venn') != -1 && !loosetext) { cat="circle"; wording=cat; } else {
if (loosetext) {
wording=prompt("What wording do you want? (~ is carriage return)", wdef);
} else {
wording=prompt("What wording do you want? (~ is carriage return) ... optional (space to) URL will be a background image (append ' /browse' to browse for background image) ... later an #ffffff type of colour can change a background colour (should the colour picker not work)", wdef);
if (wording.indexOf('#') != -1 && inp == "Mind Map") {
bcolour=" style='background-color:#" + wording.split('#')[1].split(';')[0] + ';';
wording=wording.split('#')[0];
//alert(bcolour + ' vs ' + acolour);
}
}
}
if (wording == null) { wording=cat; } else { wording=tfc(wording); }
}
}
if (wording.replace('?','') != '') {
if (wording.toLowerCase().indexOf(' http') != -1) {
if (wording.split(' http')[0].split(' HTTP')[0].split(' Http')[0] != '') { preb='linear-gradient(rgba(255,255,255,0.8),rgba(255,255,255,0.8)),'; }
biis='background:' + preb + 'URL(' + 'http' + wording.replace(' Http',' http').replace(' HTTP',' http').split(' http')[1] + ');';
wording=wording.split(' http')[0].split(' HTTP')[0].split(' Http')[0];
if ((biis.replace(');','') + '.jpg').toLowerCase().indexOf('/browse.') != -1) {
//alert(222);
biis='';
if (!document.getElementById('dpf')) {
if (document.getElementById('dsave').innerHTML != '') {
if (document.getElementById('dsave').innerHTML.indexOf('<') == -1) {
document.getElementById('dsave').innerHTML+='<input style=display:inline-block;background-color:lightblue; id=iundo type=button onclick=doundo(); value=Undo></input>  <input style=display:none;background-color:lightblue; id=iredo type=button onclick=doredo(); value=Redo></input>  ' + outst + '  <br><input style=background-color:orange; id=iemail type=button onclick=ifemail(); value="Email/Feedback"></input>' + htext + '  <input style=background-color:orange; id=isave type=button onclick=ifsave(); value=Save></input>';
eh();
} else if (document.getElementById('dsave').innerHTML.indexOf('iemail') != -1 && document.getElementById('dsave').innerHTML.indexOf('isave') == -1) {
document.getElementById('dsave').innerHTML+='  <input style=background-color:orange; id=isave type=button onclick=ifsave(); value=Save></input>'; // <input style=background-color:orange; id=iemail type=button onclick=ifemail(); value=Email></input>';
}
}
}
//document.getElementById('dpf').style.display='inline-block';
wnotc();
gpreb=wording;
document.getElementById('file').click();
setTimeout(preprocess, 12000);
}
} else if (wording.toLowerCase().indexOf(' //') != -1) {
if (wording.split(' //')[0] != '') { preb='linear-gradient(rgba(255,255,255,0.8),rgba(255,255,255,0.8)),'; }
biis='background:' + preb + 'URL(' + document.URL.split(':')[0] + '://' + wording.split(' //')[1] + ');';
wording=wording.split(' //')[0];
if ((biis.replace(');','') + '.jpg').toLowerCase().indexOf('/browse.') != -1) {
//alert(22);
biis='';
if (!document.getElementById('dpf')) {
if (document.getElementById('dsave').innerHTML != '') {
if (document.getElementById('dsave').innerHTML.indexOf('<') == -1) {
document.getElementById('dsave').innerHTML+='<input style=display:inline-block;background-color:lightblue; id=iundo type=button onclick=doundo(); value=Undo></input>  <input style=display:none;background-color:lightblue; id=iredo type=button onclick=doredo(); value=Redo></input>  ' + outst + '  <br><input style=background-color:orange; id=iemail type=button onclick=ifemail(); value="Email/Feedback"></input>' + htext + '  <input style=background-color:orange; id=isave type=button onclick=ifsave(); value=Save></input>';
eh();
} else if (document.getElementById('dsave').innerHTML.indexOf('iemail') != -1 && document.getElementById('dsave').innerHTML.indexOf('isave') == -1) {
document.getElementById('dsave').innerHTML+='  <input style=background-color:orange; id=isave type=button onclick=ifsave(); value=Save></input>'; // <input style=background-color:orange; id=iemail type=button onclick=ifemail(); value=Email></input>';
}
}
}
//document.getElementById('dpf').style.display='inline-block';
wnotc();
gpreb=wording;
document.getElementById('file').click();
setTimeout(preprocess, 12000);
}
} else if (wording.toLowerCase().indexOf(' /') != -1) {
//alert(1);
if (wording.split(' /')[0] != '') { preb='linear-gradient(rgba(255,255,255,0.8),rgba(255,255,255,0.8)),'; }
//alert(11);
biis='background:' + preb + 'URL(' + document.URL.split('flowchart.')[0] + wording.split(' /')[1] + ');';
//alert(biis);
wording=wording.split(' /')[0];
//alert((biis.replace(');','') + '.jpg').toLowerCase().indexOf('/browse.'));
if ((biis.replace(');','') + '.jpg').toLowerCase().indexOf('/browse.') != -1) {
//alert(2);
biis='';
if (!document.getElementById('dpf')) {
if (document.getElementById('dsave').innerHTML != '') {
if (document.getElementById('dsave').innerHTML.indexOf('<') == -1) {
document.getElementById('dsave').innerHTML+='<input style=display:inline-block;background-color:lightblue; id=iundo type=button onclick=doundo(); value=Undo></input>  <input style=display:none;background-color:lightblue; id=iredo type=button onclick=doredo(); value=Redo></input>  ' + outst + '  <br><input style=background-color:orange; id=iemail type=button onclick=ifemail(); value="Email/Feedback"></input>' + htext + '  <input style=background-color:orange; id=isave type=button onclick=ifsave(); value=Save></input>';
eh();
} else if (document.getElementById('dsave').innerHTML.indexOf('iemail') != -1 && document.getElementById('dsave').innerHTML.indexOf('isave') == -1) {
document.getElementById('dsave').innerHTML+='  <input style=background-color:orange; id=isave type=button onclick=ifsave(); value=Save></input>'; // <input style=background-color:orange; id=iemail type=button onclick=ifemail(); value=Email></input>';
}
}
}
//document.getElementById('dpf').style.display='inline-block';
wnotc();
gpreb=wording;
document.getElementById('file').click();
setTimeout(preprocess, 12000);
}
//alert(11111);
}
wording=wording.replace(/~/g, '<br>');
if (loosetext) {
shape="";
//alert('Here');
setTimeout(butlaterstill, 1500); //loosetext=false;
} else if ((wording.trim() + '~').indexOf('?~') != -1) {
shape="diamond";
brbr="<br>";
} else if (wording.trim().toLowerCase() == 'end' || wording.trim().toLowerCase() == 'stop' || wording.trim().toLowerCase() == 'start') {
shape='oval';
} else {
shape='rectangle';
}
icnt++;
wwok=false;
while (document.getElementById('d' + icnt)) {
icnt++;
}
idarr.push("d" + icnt);
undoid=eval(-1 + idarr.length);
if (h1is.indexOf('"myh1">Venn') != -1) {
if (!loosetext) { shape="circle"; }
var bch=Math.floor(Math.random() * bcols.length);
if (shape == 'diamond') {
document.getElementById('dcontent').innerHTML+=antiglowit(("<div" + xciss.replace(acglow,bcglow) + " id=d" + icnt + " onclick='recxy(event); clickme(this);' class='" + shape + "' style='" + biis + "line-height:20px;background-color:" + bcols[bch] + ";opacity:0.5;position:absolute;left:" + eval(sxoff + xoff + x) + "px;top:" + eval(syoff + yoff + y) + "px;width:" + document.getElementById('idiam').style.width.replace('px','') + "px;height:" + document.getElementById('idiam').style.width.replace('px','') + "px;'></div>").replace(acolour,bcolour).replace(aclass,bclass).replace(aclass.replace("'",""),bclass.replace("'","")));
} else if (xciss != '' && document.URL.indexOf('venn=') != -1 && !loosetext) {
//alert('267 ' + aclass + ' vs ' + bclass + ' ... ' + ("<div" + xciss.replace(acglow,bcglow) + " id=d" + icnt + " onclick='recxy(event); clickme(this);' class='" + shape + xciss.replace(acglow,bcglow).replace('class=','') + "' style='" + biis + "line-height:20px;background-color:" + bcols[bch] + ";opacity:0.5;position:absolute;left:" + eval(sxoff + xoff + x) + "px;top:" + eval(syoff + yoff + y) + "px;width:" + document.getElementById('idiam').style.width.replace('px','') + "px;height:" + document.getElementById('idiam').style.width.replace('px','') + "px;'></div>"));
document.getElementById('dcontent').innerHTML+=antiglowit(("<div" + xciss.replace(acglow,bcglow) + " id=d" + icnt + " onclick='recxy(event); clickme(this);' class='" + shape + xciss.replace(acglow,bcglow).replace('class=','') + "' style='" + biis + "line-height:20px;background-color:" + bcols[bch] + ";opacity:0.5;position:absolute;left:" + eval(sxoff + xoff + x) + "px;top:" + eval(syoff + yoff + y) + "px;width:" + document.getElementById('idiam').style.width.replace('px','') + "px;height:" + document.getElementById('idiam').style.width.replace('px','') + "px;'></div>").replace(acolour,bcolour).replace(aclass,bclass).replace(aclass.replace("'",""),bclass.replace("'","")));
} else if (loosetext) {
//alert(67);
document.getElementById('dcontent').innerHTML+=antiglowit(("<div id=d" + icnt + " onclick='recxy(event); clickme(this);' style='" + biis + "line-height:20px;position:absolute;left:" + eval(sxoff + x) + "px;top:" + eval(syoff + y) + "px;width:" + document.getElementById('idiam').style.width.replace('px','') + "px;height:" + document.getElementById('idiam').style.width.replace('px','') + "px;'>" + wording + "</div>")); //.replace(acolour,bcolour).replace(aclass,bclass).replace(aclass.replace("'",""),bclass.replace("'",""));
} else {
//alert(767);
document.getElementById('dcontent').innerHTML+=antiglowit(("<div id=d" + icnt + " onclick='recxy(event); clickme(this);' class='" + shape + ciss.replace(acglow,bcglow).replace('class=','') + "' style='" + biis + "line-height:20px;background-color:" + bcols[bch] + ";opacity:0.5;position:absolute;left:" + eval(sxoff + xoff + x) + "px;top:" + eval(syoff + yoff + y) + "px;width:" + document.getElementById('idiam').style.width.replace('px','') + "px;height:" + document.getElementById('idiam').style.width.replace('px','') + "px;'></div>").replace(acolour,bcolour).replace(aclass,bclass).replace(aclass.replace("'",""),bclass.replace("'","")));
}
} else {
if (shape == 'diamond') {
var ourtwenty='20';
if (eval('' + wording.split('<br>').length) > 2 && eval('' + wording.split('<br>').length) <= 5) { ourtwenty=('' + eval(45 / eval('' + wording.split('<br>').length))).split('.')[0] + 'px;font-size:' + ('' + eval(-1 + eval(45 / eval('' + wording.split('<br>').length)))).split('.')[0]; }
//alert(967);
document.getElementById('dcontent').innerHTML+=antiglowit(("<div id=d" + icnt + " onclick='clickme(this);' class='" + shape + "' style='" + biis + "line-height:" + ('' + ourtwenty).split('.')[0] + "px;position:absolute;left:" + eval(sxoff + xoff + x) + "px;top:" + eval(syoff + yoff + y) + "px;'>" + brbr + "  " + wording + "</div>").replace(acolour,bcolour).replace(aclass,bclass).replace(aclass.replace("'",""),bclass.replace("'","")));
} else if (xciss != '' && document.URL.indexOf('venn=') != -1 && !loosetext) {
//alert(367);
document.getElementById('dcontent').innerHTML+=antiglowit(("<div id=d" + icnt + " onclick='clickme(this);' class='" + shape + xciss.replace(acglow,bcglow).replace('class=','') + "' style='" + biis + "line-height:20px;position:absolute;left:" + eval(sxoff + xoff + x) + "px;top:" + eval(syoff + yoff + y) + "px;'>" + brbr + "  " + wording + "</div>").replace(acglow,bcglow).replace(acolour,bcolour).replace(aclass,bclass).replace(aclass.replace("'",""),bclass.replace("'","")));
} else if (loosetext) {
//alert(167);
document.getElementById('dcontent').innerHTML+=antiglowit(("<div id=d" + icnt + " onclick='clickme(this);' style='" + biis + "line-height:20px;position:absolute;left:" + eval(sxoff + x) + "px;top:" + eval(syoff + y) + "px;'>" + wording + "</div>")); //.replace(acolour,bcolour).replace(aclass,bclass).replace(aclass.replace("'",""),bclass.replace("'",""));
} else {
//alert('867 ' + ("<div id=d" + icnt + " onclick='clickme(this);' class='" + shape + ciss.replace('class=','') + "' style='" + biis + "line-height:20px;position:absolute;left:" + eval(sxoff + xoff + x) + "px;top:" + eval(syoff + yoff + y) + "px;'>" + brbr + "  " + wording + "</div>").replace(acglow,bcglow).replace(acolour,bcolour).replace(aclass,bclass).replace(aclass.replace("'",""),bclass.replace("'","")));
document.getElementById('dcontent').innerHTML+=antiglowit(("<div id=d" + icnt + " onclick='clickme(this);' class='" + shape + ciss.replace('class=','') + "' style='" + biis + "line-height:20px;position:absolute;left:" + eval(sxoff + xoff + x) + "px;top:" + eval(syoff + yoff + y) + "px;'>" + brbr + "  " + wording + "</div>").replace(acglow,bcglow).replace(acolour,bcolour).replace(aclass,bclass).replace(aclass.replace("'",""),bclass.replace("'","")));
}
}
somuchmore('');
wording=cat;
if (inp == "Mind Map") {
wording="";
cat="";
xciss=' class=glow';
document.getElementById('dstart').innerHTML=cat;
shape="rectangle";
noeolp='Is this a new rectangle pointing or you want to place value?  ';
}
document.getElementById('dstart').innerHTML=wording;

nonbodyclick=0;
if (document.getElementById('dsave').innerHTML != '') {
if (document.getElementById('dsave').innerHTML.indexOf('<') == -1) {
document.getElementById('dsave').innerHTML+='<input style=display:inline-block;background-color:lightblue; id=iundo type=button onclick=doundo(); value=Undo></input>  <input style=display:none;background-color:lightblue; id=iredo type=button onclick=doredo(); value=Redo></input>  ' + outst + '  <br><input style=background-color:orange; id=iemail type=button onclick=ifemail(); value="Email/Feedback"></input>' + htext + '  <input style=background-color:orange; id=isave type=button onclick=ifsave(); value=Save></input>';
eh();
} else if (document.getElementById('dsave').innerHTML.indexOf('iemail') != -1 && document.getElementById('dsave').innerHTML.indexOf('isave') == -1) {
document.getElementById('dsave').innerHTML+='  <input style=background-color:orange; id=isave type=button onclick=ifsave(); value=Save></input>'; // <input style=background-color:orange; id=iemail type=button onclick=ifemail(); value=Email></input>';
}
} //else {
//alert('pre3 ' + document.getElementById('dsave').innerHTML);
//document.getElementById('dsave').innerHTML=' ';
//}
if (document.getElementById('iundo')) {
document.getElementById('iundo').style.display='inline-block';
}
setTimeout(wwokagain, 2000);
}
} else if (nonbodyclick == 1) {
wording=cat;
//document.title+=' xx';
document.getElementById('secpoint').innerHTML=somuchmore(noeolp);
//if (document.title == 'nonbodyclick == 1') {
//document.title='nonbodyclick==1';
//} else {
//document.title='nonbodyclick == 1';
//}
//console.log('nonbodyclick == 1');
} else if (nonbodyclick <= 0) {
nonbodyclick=0;
//alert(134);
//document.title+=' zz' + document.getElementById('secpoint').innerHTML + 'zz ';
document.getElementById('secpoint').innerHTML=document.getElementById('secpoint').innerHTML.replace(somuchmore(noeolp), '');
document.getElementById('dsave').innerHTML=document.getElementById('dsave').innerHTML.replace(somuchmore(noeolp), '');
//document.title='nonbodyclick <= 0';
//console.log('nonbodyclick <= 0');
} else {
//document.title+=' yy';
document.getElementById('secpoint').innerHTML='';
document.getElementById('dcontent').innerHTML+=connect();
bodyclick=true;
nonbodyclick=-5;
//document.title='else';
//console.log('else');
}
}

function wwokagain() {
wwok=true;
}

function ifit(osel) {
if (osel.value != '') {
wording=cat;
jcnt++;
if (inp == "Mind Map") {
document.getElementById('dstart').innerHTML='';
} else {
document.getElementById('dstart').innerHTML='?';
}
if (1 == 1) {
location.href=document.URL.split('?')[0].split('#')[0].replace('.html','.php').replace('.htm','.php') + '?recall=' + encodeURIComponent(osel.value);
} else {
document.getElementById('dcontother').innerHTML+="<iframe style=display:none; id=if" + jcnt + " src='" + document.URL.split('?')[0].split('#')[0].replace('.html','.php').replace('.htm','.php') + '?recall=' + encodeURIComponent(osel.value) + "'></iframe>";
}
}
}

function ath() {
location.href=document.URL.split('?')[0].split('#')[0].replace('.html','.php').replace('.htm','.php') + '?recall=' + encodeURIComponent(urlis);
}

function jfsave(inccis, jnccis) {
if (inccis != '') {
emailcc=inccis;
} else {
emailcc=prompt('Please enter your reply (ie. your) Email Address', emailcc);
}
if (jnccis != '') {
jnameis=jnccis;
} else {
jnameis=prompt('Please enter ' + inp + ' name to Save to (and be able to recall later).', recim);
}
if (jnameis == null) { jnameis=''; } else { jnameis=jnameis.replace(/\-/g,''); }
return jnameis; //ifsave();
}

function ifsave() {
notc();
var nameis='';
if (jnameis != '') {
nameis=jnameis;
jnameis='';
} else {
nameis=prompt('Please enter ' + inp + ' name to Save to (and be able to recall later).', '');
}
if (nameis != null) {
notc();
jcnt++;
document.getElementById('dcontother').innerHTML+="<iframe style=display:none; id=if" + jcnt + " name=if" + jcnt + " src=''></iframe>";
notc();
document.getElementById('dcontother').innerHTML+="<form style=display:none; method=POST target=if" + jcnt + " action=flowchart.php><input type=hidden name=newsave id=newsave value='" + nameis + "'></input><textarea style=display:none; rows=5 cols=5 name=newsavecontent id=newsavecontent value=''>" + document.getElementById('dcontent').innerHTML.replace(/\ \;/g,' ').replace(/\ \;/g,' ') + "</textarea><input type=submit id=ifb" + jcnt + " value=Save></input></fo" + "rm>";
notc();
document.getElementById('isave').value='Saved to ' + nameis.replace(/\ /g,'');
notc();
document.getElementById('ifb' + jcnt).click();
urlis=nameis; //location.href=document.URL.split('?')[0].split('#')[0].replace('.html','.php').replace('.htm','.php') + '?recall=' + encodeURIComponent(nameis);
notc();
setTimeout(ath, 2000);
return nameis.replace(/\ /g,'')
}
return '';
}

function cce(indu) {
if (emailcc.indexOf('@') != -1 && 1 == 2) {
return 'mailto:' + emailcc;
}
return indu;
}

function ifemail() {
notc();
var nameis=prompt('Please enter Email Address (a mix of lowercase and uppercase will setup Feedback email semicolon delimited to optional Email from and Save name)', emailto);
if (nameis != null) {
if (nameis.indexOf('@') != -1) {
notc();
jcnt++;
document.getElementById('dcontother').innerHTML+="<iframe style=display:none; id=if" + jcnt + " name=if" + jcnt + " src=''></iframe>";
notc();
if (nameis.toLowerCase() == nameis || nameis.toUpperCase() == nameis) {
document.getElementById('dcontother').innerHTML+="<form style=display:none; method=POST target=if" + jcnt + " action=flowchart.php><input type=hidden name=newemail id=newemail value='" + nameis + "'></input><textarea style=display:none; rows=5 cols=5 name=newemailcontent id=newemailcontent value=''>" + document.getElementById('dcontent').innerHTML.replace(/\ \;/g,' ') + "</textarea><input type=submit id=ifb" + jcnt + " value=Email></input></fo" + "rm>";
} else {
jnameis='';
var incc='';
var colbits=nameis.split(';');
nameis=nameis.split(';')[0];
for (var jc=1; jc<colbits.length; jc++) {
if (colbits[jc].indexOf('@') != -1) {
incc=colbits[jc];
} else {
jnameis=colbits[jc].replace(/\-/g,'');
}
}
var recim=jfsave(incc, jnameis); //document.getElementById('isave').click();
if (recim != '') {
var iinp=location.search.split('venn=')[1] ? '<input type=hidden name=venn value="' + decodeURIComponent(location.search.split('venn=')[1].split('&')[0]).split(' ')[0] + '"></input>' : '';
//var dbi=String.fromHtmlEntities('<div id=topdiv style=background-color:#f0f0f0;><h1>' + document.getElementById('myh1').innerHTML.split('<')[0] + '</h1>' + iinp + '<br><textarea cols=120 rows=5 name=feedback></textarea><input type=hidden name=recim value="' + recim + '"></input><input type=hidden name=emailcc value="' + emailcc + '"></input><input type=hidden name=emailto value="' + nameis + '"></input> <input type=submit value="Respond Noting + equals Space and ~ equals Return"></input></div><div id="diamond"' + document.body.innerHTML.split('<div id="diamond"')[1]);
var dbi=String.fromHtmlEntities('<div id=topdiv style=background-color:#f0f0f0;><h1>' + document.getElementById('myh1').innerHTML.split('<')[0] + '</h1><br><input style="width:50%;" type=text name=feedback></input><input type=hidden name=recim value="' + recim + '"></input><input type=hidden name=emailcc value="' + emailcc + '"></input><input type=hidden name=emailto value="' + nameis + '"></input>' + iinp + ' <input type=submit value="Respond (Noting ' + String.fromCodePoint(10133) + ' equals Space and ~ equals Return)"></input></div><div id="diamond"' + document.body.innerHTML.split('<div id="diamond"')[1]);
var hbi='<style> ' + dystylecss + ' ' + document.head.innerHTML.split('</sty' + 'le>')[0].split('<sty' + 'le>')[eval(-1 + document.head.innerHTML.split('</sty' + 'le>')[0].split('<sty' + 'le>').length)] + '</style>';
if (vennis == '') {
document.getElementById('dcontother').innerHTML+="<form style=display:none; method=POST target=if" + jcnt + " action=emailhtml.php><input type=hidden name=newemail id=newemail value='" + nameis.toLowerCase() + "'></input><input type=hidden name=inline value=''></input><input type=hidden name=subj value='Feedback for Flow Chart'></input><textarea style=display:none; rows=5 cols=5 name=newemailcontent id=newemailcontent value=''>" + encodeURIComponent('' + '' + '<bo' + 'dy' + dystyle + '>' + hbi + '<form method=GET action=' + cce(document.URL) + '>' + dbi + '</fo' + 'rm></b' + 'ody>') + "</textarea><br><input type=submit id=ifb" + jcnt + " value=Email></input></fo" + "rm>";
} else if (vennis.length == 1) {
document.getElementById('dcontother').innerHTML+="<form style=display:none; method=POST target=if" + jcnt + " action=emailhtml.php><input type=hidden name=newemail id=newemail value='" + nameis.toLowerCase() + "'></input><input type=hidden name=inline value=''></input><input type=hidden name=subj value='Feedback for Venn Diagram'></input><textarea style=display:none; rows=5 cols=5 name=newemailcontent id=newemailcontent value=''>" + encodeURIComponent('' + '' + '<bo' + 'dy' + dystyle + '>' + hbi + '<form method=GET action=' + cce(document.URL) + '>' + dbi + '</fo' + 'rm></b' + 'ody>') + "</textarea><br><input type=submit id=ifb" + jcnt + " value=Email></input></fo" + "rm>";
} else {
document.getElementById('dcontother').innerHTML+="<form style=display:none; method=POST target=if" + jcnt + " action=emailhtml.php><input type=hidden name=newemail id=newemail value='" + nameis.toLowerCase() + "'></input><input type=hidden name=inline value=''></input><input type=hidden name=subj value='Feedback for Mind Map'></input><textarea style=display:none; rows=5 cols=5 name=newemailcontent id=newemailcontent value=''>" + encodeURIComponent('' + '' + '<bo' + 'dy' + dystyle + '>' + hbi + '<form method=GET action=' + cce(document.URL) + '>' + dbi + '</fo' + 'rm></b' + 'ody>') + "</textarea><br><input type=submit id=ifb" + jcnt + " value=Email></input></fo" + "rm>";
}
//document.getElementById('dcontother').innerHTML+="<form style=display:none; method=POST target=if" + jcnt + " action=emailhtml.php><input type=hidden name=newemail id=newemail value='" + nameis.toLowerCase() + "'></input><input type=hidden name=inline value=''></input><input type=hidden name=subj value=Feedback></input><textarea style=display:none; rows=5 cols=5 name=newemailcontent id=newemailcontent value=''>" + encodeURIComponent('' + '' + '<bo' + 'dy>' + hbi + '<form method=GET action=' + cce(document.URL) + '>' + dbi + '</fo' + 'rm></b' + 'ody>') + "</textarea><br><input type=submit id=ifb" + jcnt + " value=Email></input></fo" + "rm>";
}
}
notc();
document.getElementById('iemail').value='Emailed to ' + nameis;
notc();
document.getElementById('ifb' + jcnt).click();
//urlis=nameis; //location.href=document.URL.split('?')[0].split('#')[0].replace('.html','.php').replace('.htm','.php') + '?recall=' + encodeURIComponent(nameis);
notc();
if (jnameis != '') {
setTimeout(ifsave, 2000);
//jnameis='';
}
//setTimeout(ath, 2000);
}
}
}

function minus(hm) {
notc();
var ij=eval('' + document.getElementById('idiam').style.width.replace('px',''));
ij-=hm;
document.getElementById('idiam').style.width='' + ij + 'px';
}

function plus(hm) {
notc();
var ij=eval('' + document.getElementById('idiam').style.width.replace('px',''));
ij+=hm;
document.getElementById('idiam').style.width='' + ij + 'px';
}

function glowit() {
if (doglow && !loosetext) {
ciss=' class=glow';
xciss=' class=cglow';
if (!doglow) {
document.getElementById('dstyle').innerHTML='';
} else {
document.getElementById('dstyle').innerHTML='<style> .circle { -webkit-animation: cglow 1s ease-in-out infinite alternate; -moz-animation: cglow 1s ease-in-out infinite alternate; animation: cglow 1s ease-in-out infinite alternate; } .oval, .rectangle, .glow { -webkit-animation: glow 1s ease-in-out infinite alternate; -moz-animation: glow 1s ease-in-out infinite alternate; animation: glow 1s ease-in-out infinite alternate; } </style>';
}
if (inp != "Mind Map") { xciss=' class=glow'; }
} else if (inp != "Mind Map") {
ciss='';
xciss='';
document.getElementById('dstyle').innerHTML='';
}
if (!doglow) {
document.getElementById('dstyle').innerHTML='';
}
document.getElementById('amr').title=document.getElementById('amr').innerHTML;
document.getElementById('amr').innerHTML='This Link';
//document.getElementById('mytable').style.paddingTop='8px';
}

function xyset(tvi) {
if (tvi != '') {
if (tvi.substring(0,1) >= '0' && tvi.substring(0,1) <= '9') {
xoff=eval(-1 * eval(tvi / 2));
yoff=xoff;
prevxoff=xoff;
prevyoff=yoff;
document.getElementById('idiam').style.width='' + Math.floor(eval(tvi / 1)) + 'px';
document.getElementById('dstyle').innerHTML+=' <style> .circle { width:' + Math.floor(eval(tvi / 1)) + 'px !important; height:' + Math.floor(eval(tvi / 1)) + 'px !important; } </style> ';
//document.title+=' ' + xoff + ',' + yoff;
return false;
}
}
return true;
}

function lookfornbsp() {
var dih=document.getElementById('xbod').innerHTML;
//alert(dih);
//if (dih.indexOf('> <') != -1) { alert(dih.split('> <')[0]); }
if (document.URL.indexOf('venn=') == -1) {
// Flowchart
dih=dih.replace("> <","><span title=\"Animated Emoji\" style='opacity:0.5;font-size:32px;'>🌊</span><span style='margin-left:-32px;opacity:0.5;font-size:32px;'>📊</span> <");
// Venn Diagram
dih=dih.replace("or ","or <span title=\"Animated Emoji\" ontouchdown=\"document.getElementById('itbut').click();\" onmousedown=\"document.getElementById('itbut').click();\" style='opacity:0.5;font-size:32px;'>📎</span><span title=\"Animated Emoji\" ontouchdown=\"document.getElementById('itbut').click();\" onmousedown=\"document.getElementById('itbut').click();\" style='margin-left:-32px;opacity:0.5;font-size:32px;'>🖇</span>");
// Mind Map
dih=dih.replace("> <","> <span title=\"Animated Emoji\" ontouchdown=\"document.getElementById('itbut2').click();\" onmousedown=\"document.getElementById('itbut2').click();\" style='opacity:0.5;font-size:32px;'>🧠</span><span title=\"Animated Emoji\" ontouchdown=\"document.getElementById('itbut2').click();\" onmousedown=\"document.getElementById('itbut2').click();\" style='margin-left:-32px;opacity:0.5;font-size:32px;'>🗺</span><");
} else if (inp == "Mind Map") {
// Mind Map
dih=dih.replace("> <","><span title=\"Animated Emoji\" style='opacity:0.5;font-size:32px;'>🧠</span><span style='margin-left:-32px;opacity:0.5;font-size:32px;'>🗺</span> <");
// Flowchart
dih=dih.replace("or ","or <span title=\"Animated Emoji\" ontouchdown=\"document.getElementById('itbut').click();\" onmousedown=\"document.getElementById('itbut').click();\" style='opacity:0.5;font-size:32px;'>🌊</span><span title=\"Animated Emoji\" ontouchdown=\"document.getElementById('itbut').click();\" onmousedown=\"document.getElementById('itbut').click();\" style='margin-left:-32px;opacity:0.5;font-size:32px;'>📊</span>");
// Venn Diagram
dih=dih.replace("> <","> <span title=\"Animated Emoji\" ontouchdown=\"document.getElementById('itbut2').click();\" onmousedown=\"document.getElementById('itbut2').click();\" style='opacity:0.5;font-size:32px;'>📎</span><span title=\"Animated Emoji\" ontouchdown=\"document.getElementById('itbut2').click();\" onmousedown=\"document.getElementById('itbut2').click();\" style='margin-left:-32px;opacity:0.5;font-size:32px;'>🖇</span><");
} else { // Venn Diagram
// Venn Diagram
dih=dih.replace("> <","><span title=\"Animated Emoji\" style='opacity:0.5;font-size:32px;'>📎</span><span style='margin-left:-32px;opacity:0.5;font-size:32px;'>🖇</span> <");
// Flowchart
dih=dih.replace("or ","or <span title=\"Animated Emoji\" ontouchdown=\"document.getElementById('itbut').click();\" onmousedown=\"document.getElementById('itbut').click();\" style='opacity:0.5;font-size:32px;'>🌊</span><span title=\"Animated Emoji\" ontouchdown=\"document.getElementById('itbut').click();\" onmousedown=\"document.getElementById('itbut').click();\" style='margin-left:-32px;opacity:0.5;font-size:32px;'>📊</span>");
// Mind Map
dih=dih.replace("> <","> <span title=\"Animated Emoji\" ontouchdown=\"document.getElementById('itbut2').click();\" onmousedown=\"document.getElementById('itbut2').click();\" style='opacity:0.5;font-size:32px;'>🧠</span><span title=\"Animated Emoji\" ontouchdown=\"document.getElementById('itbut2').click();\" onmousedown=\"document.getElementById('itbut2').click();\" style='margin-left:-32px;opacity:0.5;font-size:32px;'>🗺</span><");
}

document.getElementById('xbod').innerHTML=dih;
}

function afterfeed() {
if (af != '') { alert(af); af=''; }
}

function dofeedb() {
var th='Flowchart';
//document.getElementById('mysel').value=recim;
if (1 == 1) {
if (vennis == '') {
af=('Feedback from ' + emailcc + ' regarding Flowchart (that shows later after OK below) "' + recim + '": ' + feedback.replace(/\+/g, ' ').replace(/\~/g, String.fromCharCode(10)));
} else if (vennis.length == 1) {
af=('Feedback from ' + emailcc + ' regarding Venn Diagram (that shows later after OK below) "' + recim + '": ' + feedback.replace(/\+/g, ' ').replace(/\~/g, String.fromCharCode(10)));
th='Venn Diagram';
} else {
af=('Feedback from ' + emailcc + ' regarding Mind Map (that shows later after OK below) "' + recim + '": ' + feedback.replace(/\+/g, ' ').replace(/\~/g, String.fromCharCode(10)));
th='Mind Map';
}
}
if (vennis != '') {
if (vennis.length == 1) {
location.href=document.URL.split('?')[0].split('#')[0].replace('.html','.php').replace('.htm','.php') + '?recall=' + encodeURIComponent(recim) + '&venn=' + encodeURIComponent(vennis) + '&tryhard=' + encodeURIComponent('Feedback from ' + emailcc + ' regarding ' + th + ' ' + recim + ' is ... ' + String.fromCharCode(10)) + encodeURIComponent(feedback.replace(/\+/g, ' ').replace(/\~/g, String.fromCharCode(10)));
} else {
location.href=document.URL.split('?')[0].split('#')[0].replace('.html','.php').replace('.htm','.php') + '?recall=' + encodeURIComponent(recim) + '&venn=' + encodeURIComponent('Mind Map') + '&tryhard=' + encodeURIComponent('Feedback from ' + emailcc + ' regarding ' + th + ' ' + recim + ' is ... ' + String.fromCharCode(10)) + encodeURIComponent(feedback.replace(/\+/g, ' ').replace(/\~/g, String.fromCharCode(10)));
}
} else {
location.href=document.URL.split('?')[0].split('#')[0].replace('.html','.php').replace('.htm','.php') + '?recall=' + encodeURIComponent(recim) + '&tryhard=' + encodeURIComponent('Feedback from ' + emailcc + ' regarding ' + th + ' ' + recim + ' is ... ' + String.fromCharCode(10)) + encodeURIComponent(feedback.replace(/\+/g, ' ').replace(/\~/g, String.fromCharCode(10)));
}
//document.getElementById('mysel').value=recim;
setTimeout(afterfeed, 5000);
}

function fboff(instu) {
if (instu.indexOf('?feedback=') != -1) {
if (instu.indexOf('venn=') != -1) {
var oven='venn=' + instu.split('venn=')[1].split('&')[0];
instu=instu.replace(oven, '') + '&' + oven;
}
return instu.split('?feedback=')[0] + '' + '?feedback=' + encodeURIComponent(instu.split('?feedback=')[1].replace(/\ /g,'%2B').replace(/\&/g, ' ')).replace(/\%20\%20\%20\%20/g, '----').replace(/\ /g,'%20');
}
return instu.replace(/\&/g, '----');
}

function givefeedback(ooverlayif, orecim, oemailto, oemailcc, ofeedback) {
if (ooverlayif) {
// https://www.rjmprogramming.com.au/HTMLCSS/flowchart.html?venn=y&feedback=mnf&recim=thewvenn&emailcc=rmetcalfe15%40gmail.com&emailto=Rmetcalfe15%40gmail.com
if (document.URL.indexOf('realn=') == -1 && document.URL.indexOf(encodeURIComponent('realn=')) == -1) {
if (4 == 4) {

var zhr = new XMLHttpRequest();
var zform=new FormData();
zform.append('inline', '');
zform.append('to', oemailto.toLowerCase());
zform.append('bcc', oemailcc.toLowerCase());
var bigstr='';
if (vennis == '') {
zform.append('subj', 'Feedback for Flowchart ' + orecim);
bigstr+='<bo' + 'dy><h1>Feedback for Flowchart ' + orecim + ' from ' + oemailto.toLowerCase() + '</h1><form method=GET action=' + document.URL.split('?')[0] + '>';
} else if (vennis.length == 1) {
zform.append('subj', 'Feedback for Venn Diagram ' + orecim);
bigstr+='<bo' + 'dy><h1>Feedback for Venn Diagram ' + orecim + ' from ' + oemailto.toLowerCase() + '</h1><form method=GET action=' + document.URL.split('?')[0] + '>';
} else {
zform.append('subj', 'Feedback for Mind Map ' + orecim);
bigstr+='<bo' + 'dy><h1>Feedback for Mind Map ' + orecim + ' from ' + oemailto.toLowerCase() + '</h1><form method=GET action=' + document.URL.split('?')[0] + '>';
}
//alert(('<bo' + 'dy><a target=_blank href="' + fboff(document.URL.replace(/\ /g,'%20') + '&realn=y') + '" title=Feedback>' + feedback.replace(/\+/g,' ').replace(/\~/g,'<br>').replace(/\"/g,'`') + '</a></bo' + 'dy>'));

//feedback=location.search.split('feedback' + equ)[1] ? decodeURIComponent((location.search + feedback).split('feedback' + equ)[1].split('&')[0].split('----')[0]).replace(/\+/g,'_') : '';
//vennis=(location.search + feedback).split('venn' + equ)[1] ? decodeURIComponent((location.search + feedback).split('venn' + equ)[1].split('&')[0].split('----')[0]) : '';
//recim=(location.search + feedback).split('recim' + equ)[1] ? decodeURIComponent((location.search + feedback).split('recim' + equ)[1].split('&')[0].split('----')[0]) : '';
//emailcc=(location.search + feedback).split('emailcc' + equ)[1] ? decodeURIComponent((location.search + feedback).split('emailcc' + equ)[1].split('&')[0].split('----')[0]) : '';
//emailto=(location.search + feedback).split('emailto' + equ)[1] ? decodeURIComponent((location.search + feedback).split('emailto' + equ)[1].split('&')[0].split('----')[0]) : '';
bigstr+='<textarea name=feedback id=tdhuhta cols=100 rows=4 value="">' + feedback.replace(/\"/g,'`').replace(/\~/g,String.fromCharCode(10)).replace(/\+/g,' ').replace(/\_/g,' ') + '</textarea>';
//bigstr+='<input type=hidden style=display:none; id=linline name=inline value=""></input>';
bigstr+='<input type=hidden style=display:none; name=emailto id=tdto value="' + oemailcc.toLowerCase() + '"></input>';
bigstr+='<input type=hidden style=display:none; name=emailcc id=tdbcc value="' + oemailto.toLowerCase() + '"></input>';
bigstr+='<input type=hidden style=display:none; name=realn value="y"></input>';
bigstr+='<input type=hidden style=display:none; name=recim value="' + orecim + '"></input>';

if (vennis != '') { bigstr+='<input type=hidden style=display:none; name=venn value="' + vennis + '"></input>'; }
bigstr+='<input type=submit value="Show"></input></fo' + 'rm>';
bigstr+='<a style=display:none; target=_blank href="' + fboff(document.URL.replace(/\ /g,'%20') + '&realn=y') + '" title=Feedback>' + feedback.replace(/\+/g,' ').replace(/\~/g,'<br>').replace(/\"/g,'`') + '</a>';
bigstr+='</bo' + 'dy>';
zform.append('tdhuhta', bigstr);
zhr.open('post', '//www.rjmprogramming.com.au/HTMLCSS/emailhtml.php', true);
//zhr.onreadystatechange = showStuff;
zhr.send(zform);

} else {
//document.getElementById('xifemail').action='flowchart.php';
document.getElementById('tdto').value=oemailto.toLowerCase();
//document.getElementById('tdbcc').value=oemailcc.toLowerCase();
document.getElementById('tdsubj').value='Feedback for ' + orecim + '';
//document.getElementById('tdhuhta').innerHTML=encodeURIComponent('<bo' + 'dy><a target=_blank href="' + document.URL + '&realn=y' + '" title="Feedback for ' + orecim + ' ... click to show that content">' + ofeedback + '</a></b' + 'ody>');
//alert(document.getElementById('xifemail').outerHTML);
//document.getElementById('xifemail').target='overlayif';
//document.getElementById('xifemail').submit(); //document.getElementById('fsubm').click();
document.getElementById('aiemail').href='mailto:' + oemailto.toLowerCase() + '?subject=' + encodeURIComponent('Feedback for ' + orecim) + '&body=' + encodeURIComponent(feedback + String.fromCharCode(10) + String.fromCharCode(10) + document.URL + '&realn=y');
if (1 == 1) {
document.getElementById('fsubm').click();
} else {
document.getElementById('aiemail').click();
}
}
if (vennis == '') {
alert('Feedback sent to originator of Flow Chart "' + orecim + '" ... ' + oemailcc);
} else if (vennis.length == 1) {
alert('Feedback sent to originator of Venn Diagram "' + orecim + '" ... ' + oemailcc);
} else {
alert('Feedback sent to originator of Mind Map "' + orecim + '" ... ' + oemailcc);
}
//alert('Feedback sent to originator of "' + orecim + '" ... ' + oemailcc);
} else {
ooverlayif.style.position='absolute';
ooverlayif.style.zIndex='56';
ooverlayif.style.left='0px';
ooverlayif.style.top='0px';
ooverlayif.style.width='100%';
ooverlayif.style.height='100%';
//document.getElementById('mysel').value=recim;
//ooverlayif.src=document.URL.replace('.html','.php').split('?')[0] + '?recall=' + encodeURIComponent(orecim);
if (ofeedback != '') { setTimeout(dofeedb, 3000); }
}
}
}

function onl() {
var prevtitle='';
if (document.getElementById('topdiv')) {
var rc=document.getElementById('topdiv').getBoundingClientRect();
document.getElementById('topdiv').style.maxHeight='' + rc.height + 'px';
document.getElementById('topdiv').style.height='' + rc.height + 'px';
}
setTimeout(glowit, 5000);
rectwas=document.getElementById('myemail').getBoundingClientRect();
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
document.getElementById('xbod').style.position='absolute';
//document.getElementById('xbod').style.top='0px';
//document.getElementById('xbod').style.left='0px';
}
if (preh1is == 'Mind Map' && h1is.indexOf('"myh1">Venn') != -1 || (h1is.indexOf('"myh1">Venn') == -1 && document.getElementById('dcontent').innerHTML.replace(/\"/g,'').indexOf('class=circle') != -1)) {
//alert('Mind Map ' + document.getElementById('myh1').innerHTML);
venn='Mind Map';
acglow='cglow';
acolour=" style='";
prevtitle=document.getElementById('myh1').title;
document.getElementById('myh1').innerHTML=document.getElementById('myh1').innerHTML.replace('Flowchart', venn);
document.getElementById('myh1').title=prevtitle;
xcv=documentURL.split(String.fromCharCode(35))[0].split(String.fromCharCode(63))[0].replace(dfrom,dto)+'?venn=y';
novenn='Flowchart"></input> <input id=itbut2 style=display:inline-block; type=button onclick="location.href=xcv;" value="Venn Diagram"></input>';
document.getElementById('itbut').value=novenn.split('>')[0].split('"')[0].split("'")[0];
document.getElementById('itbut2').value=novenn.split('"')[eval(-2 + novenn.split('"').length)].split('"')[0];
h1is='<h1 style=display:inline-block; id="myemail"></h1> <h1 style=display:inline-block; id="myh1">' + venn + '</h1> or <input id=itbut style=display:inline-block; type=button onclick=location.href=documentURL.split(String.fromCharCode(35))[0].split(String.fromCharCode(63))[0].replace(dfrom,dto)+withoutvenn; value="' + novenn + '"></input>';
withvenn='';
inp="Mind Map";
cat="Mind Map Topic";
xciss=' class=glow';
document.getElementById('dstart').innerHTML=cat;
wording=cat;
shape="rectangle";
noeolp='Is this a new rectangle pointing or you want to place value?  ';
} else if (h1is.indexOf('"myh1">Venn') != -1 || (h1is.indexOf('"myh1">Venn') == -1 && document.getElementById('dcontent').innerHTML.replace(/\"/g,'').indexOf('class=circle') != -1)) {
xoff=-100;
yoff=-100;
acglow='youllneverfindthis';
bcglow='cglow';
aclass=" class='glow";
//htext=''; //document.getElementById('itext').style.visibility='hidden';
document.getElementById('myh1').innerHTML=document.getElementById('myh1').innerHTML.replace('Flowchart', venn);
document.getElementById('myh1').title="The position you make a Venn Diagram circle is the centre of a circle diameter the same size as adjustable textbox shown below.";
xcv=documentURL.split(String.fromCharCode(35))[0].split(String.fromCharCode(63))[0].replace(dfrom,dto)+'?venn=Mind%20Map';
document.getElementById('itbut').value=novenn.split('>')[0].split('"')[0].split("'")[0];
document.getElementById('itbut2').value=novenn.split('"')[eval(-2 + novenn.split('"').length)].split('"')[0];
h1is='<h1 style=display:inline-block; id="myemail"></h1> <h1 style=display:inline-block; id="myh1">' + venn + '</h1> or <input id=itbut style=display:inline-block; type=button onclick=location.href=documentURL.split(String.fromCharCode(35))[0].split(String.fromCharCode(63))[0].replace(dfrom,dto)+withoutvenn; value="' + novenn + '"></input>';
withvenn='';
inp="Venn Diagram";
cat="circle";
wording=cat;
noeolp='Is this a new circle pointing or you want to place value?  ';
}
if (h1is.indexOf('"myh1">Venn') != -1) { document.getElementById('dstart').innerHTML="circle"; document.getElementById('instruction').innerHTML+='  Venn Diagram Title: <input title="You can add line feeds via ~ character" id=idiam placeholder="Diameter of Venn Diagram circle" onclick=notc(); style=display:inline-block;width:200px; type=text onblur="if (xyset(this.value)) { document.getElementById(' + "'" + 'dheader' + "'" + ').innerHTML=' + "'" + '<h1>' + "'" + ' + this.value.replace(/~/g,bris) + ' + "'" + '</h1>' + "'" + '; }"></input> <a onclick=minus(10); style=cursor:pointer;>--</a> <a onclick=minus(1); style=cursor:pointer;>-</a>  <a onclick=plus(1); style=cursor:pointer;>+</a> <a onclick=plus(10); style=cursor:pointer;>++</a>'; }
if (document.getElementById('d0') || document.getElementById('d1')) {
document.getElementById('dsave').innerHTML+='<input style=display:inline-block;background-color:lightblue; id=iundo type=button onclick=doundo(); value=Undo></input>  <input style=display:none;background-color:lightblue; id=iredo type=button onclick=doredo(); value=Redo></input>  <br><input style=background-color:orange; id=iemail type=button onclick=ifemail(); value="Email/Feedback"></input>' + htext;
}
if (!ambeingsupervised) {
jcnt++;
document.getElementById('dcontother').innerHTML+="<iframe style=display:none; id=if" + jcnt + " src='" + document.URL.split('?')[0].split('#')[0].replace('.html','.php').replace('.htm','.php') + "?rand=" + Math.floor(Math.random() * 123456) + "'></iframe>";
}
lookfornbsp();
if (recim != "" && emailcc.indexOf("@") != -1 && emailto.indexOf("@") != -1) {
givefeedback(document.getElementById('overlayif'), recim, emailto, emailcc, feedback.replace(/\ /g,'+'));
}
}

function wnotc() {
bodyclick=false;
nonbodyclick=-2;
}

function notc() {
wording=cat;
bodyclick=false;
nonbodyclick=-2;
setTimeout(resetit,1000);
}

function mysels() {
var xxxx=myselsc;
if (xxxx != '') {
if (document.getElementById('mysel')) { document.getElementById('mysel').value=xxxx; }
}
}

function makeroom(what) {
var ourrect=[], idivs;
var sbits=[];
var spref=document.getElementById('selroom').value;
if (what == 3) {
ourrect.push(document.body.getBoundingClientRect());
document.body.style.height='' + eval(eval(spref + '100') + ourrect[0].height) + 'px';
if (dystyle == '') {
dystyle=' style="height:' + '' + eval(eval(spref + '100') + ourrect[0].height) + 'px;"';
dystylecss=' body { height:' + '' + eval(eval(spref + '100') + ourrect[0].height) + 'px; } ';
} else if (dystyle.indexOf('height:') != -1) {
dystyle=dystyle.replace('height:' + dystyle.split('height:')[1].split(';')[0], 'height:' + '' + eval(eval(spref + '100') + ourrect[0].height) + 'px');
dystylecss=dystylecss.replace('height:' + dystylecss.split('height:')[1].split(';')[0], 'height:' + '' + eval(eval(spref + '100') + ourrect[0].height) + 'px');
} else {
dystyle=dystyle.replace(';"', ';height:' + '' + eval(eval(spref + '100') + ourrect[0].height) + 'px;"');
dystylecss=dystylecss.replace(';', '; height:' + '' + eval(eval(spref + '100') + ourrect[0].height) + 'px; ');
}
} else if (what == 2) {
ourrect.push(document.body.getBoundingClientRect());
document.body.style.width='' + eval(eval(spref + '100') + ourrect[0].width) + 'px';
if (dystyle == '') {
dystyle=' style="width:' + '' + eval(eval(spref + '100') + ourrect[0].width) + 'px;"';
dystylecss=' body { width:' + '' + eval(eval(spref + '100') + ourrect[0].width) + 'px; } ';
} else if (dystyle.indexOf('width:') != -1) {
dystyle=dystyle.replace('width:' + dystyle.split('width:')[1].split(';')[0], 'width:' + '' + eval(eval(spref + '100') + ourrect[0].width) + 'px');
dystylecss=dystylecss.replace('width:' + dystylecss.split('width:')[1].split(';')[0], 'width:' + '' + eval(eval(spref + '100') + ourrect[0].width) + 'px');
} else {
dystyle=dystyle.replace(';"', ';width:' + '' + eval(eval(spref + '100') + ourrect[0].width) + 'px;"');
dystylecss=dystylecss.replace(';', '; width:' + '' + eval(eval(spref + '100') + ourrect[0].width) + 'px; ');
}
} else {
var divs=document.getElementsByTagName('div');
var sdivs=document.getElementsByTagName('span');
for (idivs=0; idivs<divs.length; idivs++) {
if (('' + divs[idivs].style.position).toLowerCase() == 'absolute') {
ourrect.push(divs[idivs].getBoundingClientRect());
} else {
ourrect.push(null);
}
}
for (var isps=0; isps<sdivs.length; isps++) {
if (('' + sdivs[isps].id).indexOf('sp') == 0 && ('' + sdivs[isps].style.position).toLowerCase() == 'absolute') {
if (what == 1) {
sdivs[isps].style.top='' + eval(eval(spref + '100') + eval(('' + sdivs[isps].style.top).replace('px',''))) + 'px';
} else if (what == 0) {
sdivs[isps].style.left='' + eval(eval(spref + '100') + eval(('' + sdivs[isps].style.left).replace('px',''))) + 'px';
}
}
}
for (idivs=0; idivs<divs.length; idivs++) {
if (ourrect[idivs]) {
if (what == 1) {
divs[idivs].style.position='absolute';
if (('' + divs[idivs].id).indexOf('ld') == 0 || ('' + divs[idivs].id).indexOf('sp') == 0 || ('' + divs[idivs].className).toLowerCase().indexOf('diamond') != -1) {
//if (('' + divs[idivs].id).indexOf('sp') == 0) { alert('yes'); }
divs[idivs].style.top='' + eval(eval(spref + '100') + eval(('' + divs[idivs].style.top).replace('px',''))) + 'px';
} else {
divs[idivs].style.top='' + eval(eval(spref + '100') + ourrect[idivs].top) + 'px';
divs[idivs].style.left='' + eval(0 + ourrect[idivs].left) + 'px';
divs[idivs].style.width='' + eval(0 + ourrect[idivs].width) + 'px';
divs[idivs].style.height='' + eval(0 + ourrect[idivs].height) + 'px';
}
} else if (what == 0) {
divs[idivs].style.position='absolute';
if (('' + divs[idivs].id).indexOf('ld') == 0 || ('' + divs[idivs].id).indexOf('sp') == 0 || ('' + divs[idivs].className).toLowerCase().indexOf('diamond') != -1) {
//if (('' + divs[idivs].id).indexOf('sp') == 0) { alert('Yes'); }
divs[idivs].style.left='' + eval(eval(spref + '100') + eval(('' + divs[idivs].style.left).replace('px',''))) + 'px';
} else {
divs[idivs].style.top='' + eval(0 + ourrect[idivs].top) + 'px';
divs[idivs].style.left='' + eval(eval(spref + '100') + ourrect[idivs].left) + 'px';
divs[idivs].style.width='' + eval(0 + ourrect[idivs].width) + 'px';
divs[idivs].style.height='' + eval(0 + ourrect[idivs].height) + 'px';
}
}
}
}
}
}


window.addEventListener('scroll', function(e){
sxoff=eval('' + window.pageXOffset);
syoff=eval('' + window.pageYOffset);
if (1 == 2) {
rectnow=document.getElementById('myemail').getBoundingClientRect();
sxoff-=eval(eval('' + rectnow.left) - eval('' + rectwas.left));
syoff-=eval(eval('' + rectnow.top) - eval('' + rectwas.top));
sxoff=eval('-' + window.scrollX);
syoff=eval('-' + window.scrollY);
}
//document.getElementById('myh4').innerHTML='' + sxoff + ',' + syoff + ';' + window.scrollX + ',' + window.scrollY;
});

</script>
</head>
<body id=xbod style='width:100%; height: 100vh;' ontouchdown='recxy(event);' onmousedown='recxy(event);' onload='onl(); throbbingspans();'>
<div id=topdiv style='background-color:#f0f0f0;'><h1 style=display:inline-block; id="myemail"></h1> <h1 title="To create link lines click/touch two coloured elements and note that if on the way you make a stopover not on a coloured element the resultant link will go from the stopover to the second coloured element position." style=display:inline-block; id="myh1">Flowchart</h1> or <input style=display:inline-block; id=itbut type=button onclick=location.href=documentURL.split(String.fromCharCode(35))[0].split(String.fromCharCode(63))[0].replace(dfrom,dto)+withvenn; value="Venn Diagram"></input> <input style=display:inline-block; id=itbut2 type=button onclick="location.href=xcv;" value="Mind Map"></input>
<h3 style='display:inline-block;'>RJM Programming - January<a class="glow" ontouchstart='event.stopPropagation();' onmousedown='event.stopPropagation();' onclick="event.stopPropagation(); doglow=!doglow; if (!doglow) { if (wasglow == '') { wasglow=bcglow; } bcglow=''; this.className='xglow'; ciss=''; xciss=''; } else { bcglow=wasglow; this.className='glow'; ciss=' class=glow'; xciss=' class=cglow'; } glowit(); " style="cursor:pointer;text-decoration:none;" title="Click to toggle glow mode">,</a> 2019 ... Thanks to <a style='display:inline-block;' target=_blank id=amr title='Enjoy CSS' href='https://enjoycss.com/'>Online CSS3 Code Generator With a Simple Graphical Interface - EnjoyCSS</a>  <table id=mytable style='display:inline-block;'><tr><td>Make <select ontouchdown='event.stopPropagation();' onmousedown='event.stopPropagation();' id='selroom'><option value=''>Room</option><option value='-'>Less Room</option></select> at the ...</td><td><input ontouchdown='event.stopPropagation(); makeroom(0);' onmousedown='event.stopPropagation(); makeroom(0);' type=button value='Left'></input></td><td><input ontouchdown='event.stopPropagation(); makeroom(1);' onmousedown='event.stopPropagation(); makeroom(1);' type=button value='Top'></input></td><td><input ontouchdown='event.stopPropagation(); makeroom(2);' onmousedown='event.stopPropagation(); makeroom(2);' type=button value='Right'></input></td><td><input ontouchdown='event.stopPropagation(); makeroom(3);' onmousedown='event.stopPropagation(); makeroom(3);' type=button value='Bottom'></input></td></tr></table></h3>
<h4 id='instruction' onclick='notc();'><div onclick='notc();' style='display:inline-block;' id=secpoint></div>Click where you want "<div onclick=" if (this.innerHTML.length == 0) { wording=cat; } bodyclick=false; nonbodyclick=-2; setTimeout(resetit,1000); " style='display:inline-block;background-color:pink;' id=dstart contenteditable=true onblur="wording=tfc(this.innerHTML); " title="What wording do you want? (~ is carriage return) ... optional (space to) URL will be a background image (append ' /browse' to browse for background image) ... later an #ffffff type of colour can change a background colour (should the colour picker not work)">Start</div>" to be placed<span id=myh4></span><div id="dsave" style="display:inline-block;"></div></h4>
<!--div id="dsave"></div-->
<br></div>
<div id="diamond" class="diamond" style='display:none;'></div><div id="oval" class="oval" style='display:none;'></div><div id="rectangle" class="rectangle" style='display:none;'></div><div id="circle" class="circle" style='display:none;'></div>
<div id="dcontent"><div id="dheader"></div></div>
<div id="dcontentd"></div>
<div id="dcontother"></div>
<div id="dstyle"></div>
<input type=text style='position:absolute;top:-200px;left:-200px;' value=''></input>
<iframe id=overlayif name=overlayif style='display:none;' src=></iframe>
<iframe id=iemail name=iemail style='display:none;' src="//www.rjmprogramming.com.au/HTMLCSS/emailhtml.php"></iframe>
<a target=_blank id=aiemail name=iemail style='display:none;' href="mailto:">Email</a>
<p></p>
</body>
</html>