<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>Canvas HTML Feedback Tutorial ... RJM Programming ... April 2016 ... thanks to http://stackoverflow.com/questions/9880279/how-do-i-add-a-simple-onclick-event-handler-to-a-canvas-element</title>
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=0.25, maximum-scale=8, user-scalable=yes" />
<meta charset="UTF-8">
<!--link href="//afeld.github.io/emoji-css/emoji.css" rel="stylesheet"-->
<link href="//www.rjmprogramming.com.au/HTMLCSS/emoji_zzz.css" rel="stylesheet">
<link href='//www.rjmprogramming.com.au/PHP/emboss_h1.css' rel='stylesheet' type='text/css'>

<script type='text/javascript' src='world.js?xx=dddddddd' defer></script>
<script language="JavaScript">
var pdfs=false;

var basis='justideas=';

var ideasprefix="<details id=detailideas open><summary><select onclick='setTimeout(dil,50);' id='bigselect' onchange='bigchange(this);'><option value=''>Ideas:</option><option value='Cut to the Chase'>Cut to the Chase</option><option value='Feedback'>Feedback ... all versus ...</option></select></summary>"; // "Ideas:";
var ideasmiddle="";
var ideassuffix="</details>";
var ideasdone=false;

var showbt=false;

var imgd=null;
var dval="";

var amongthis='';
var specifically='';
var altamongthis;

var vstvs='';

var si=false;

var filmslidenumber=1, fromfilmslidenumber=0, tofilmslidenumber=0;

var x=0, y=0, lastx=0, lasty=0;
var clickno = 0;
var first=true;
var xxoff=-680;
var yyoff=-74;

var subjectsuffix='';

var inlinehtml=false;

var urlis='';
var titleos='';
var ddmf='';
var ihddmf='';

var xlworld = 'feedback';
var xuworld = 'Feedback';
var xuubits=document.URL.split('.htm');
var xuuubits=xuubits[0].split('/');
xlworld=xuuubits[eval(-1 + xuuubits.length)];
xuworld=xlworld.substring(0,1).toUpperCase() + xlworld.substring(1);

var isxcontact=parent.document.URL.indexOf('Contact');
if (isxcontact == -1) isxcontact=document.URL.indexOf('contact=contact');

var pseudo_sentence = "";

var score = 0.0;
var goes = 0.0;

var cf = "18px Verdana";

function dil() {
if (document.URL.indexOf(basis) == -1) {
document.getElementById('detailideas').setAttribute("open");
}
}

function bigchange(sois) {
if (sois.value.toLowerCase() == sois.value && sois.value != '') {
altamongthis=amongthis.split('</option>')[0] + '</option>';
specifically=sois.value;
//alert(specifically);
addtodd();
setTimeout(dil, 2000);
} else {
document.getElementById('tuts').innerHTML=amongthis;
setTimeout(dil, 2000);
}
}

function addtodd() {
var optionlist=amongthis.split('</option>');
var wordlistc=',', awordlistc=[], thiswis='', thiswlist, ioptl, joptl, oka=false;
for (ioptl=0; ioptl<optionlist.length; ioptl++) {
thiswis=optionlist[ioptl].split('>')[eval(-1 + optionlist[ioptl].split('>').length)].split(' (')[0];
if (specifically != '') {
if ((' ' + thiswis + ' ').toLowerCase().indexOf(' ' + specifically + ' ') != -1) {
thiswis='<option ' + optionlist[ioptl].split('<option ')[eval(-1 + optionlist[ioptl].split('<option ').length)] + '</option>';
altamongthis+=thiswis;
oka=true;
}
} else {
thiswlist=thiswis.split(' ');
for (joptl=0; joptl<thiswlist.length; joptl++) {
if (thiswlist[joptl].indexOf('&') != -1 || thiswlist[joptl].indexOf(':') != -1 || thiswlist[joptl].indexOf('/') != -1 || thiswlist[joptl].indexOf('"') != -1 || thiswlist[joptl].indexOf("'") != -1 || thiswlist[joptl].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(/\./g,'').replace(/\?/g,'').replace(/\)/g,'') == '') {
thiswis=thiswis;
} else if (thiswlist[joptl].substring(0,1) == thiswlist[joptl].substring(0,1).toUpperCase() && thiswlist[joptl].substring(0,1).charCodeAt(0) >= '.'.charCodeAt(0)) {
if (wordlistc.toLowerCase().indexOf(',' + thiswlist[joptl].toLowerCase() + ',') == -1) {
wordlistc+=thiswlist[joptl] + ',';
awordlistc.push(thiswlist[joptl]);
}
}
}
}
}
if (specifically != '') {
//alert(altamongthis);
if (!oka) {
document.getElementById('tuts').innerHTML=amongthis;
} else {
document.getElementById('tuts').innerHTML=altamongthis;
}
} else {
awordlistc.sort();
wordlistc='';
for (ioptl=0; ioptl<awordlistc.length; ioptl++) {
wordlistc+='<option value="' + awordlistc[ioptl].toLowerCase() + '">' + awordlistc[ioptl] + '</option>';
}
var wow=false;
if (parent.document) {
if (parent.document.getElementById('header_course_designer')) {
wow=true;
}
}
if (wow) {
var hdg=parent.document.getElementById('header_course_designer').innerHTML;
parent.document.getElementById('header_course_designer').innerHTML="<select title=\"Course Word Anywhere in Blog Title\" onchange=\" if (this.value != '') { location.href='//www.rjmprogramming.com.au/PHP/design_a_course.php?topic=' + encodeURIComponent(this.value) + '&anywhere=y'; } \"><option value=''></option>" + wordlistc + "</select> " + hdg;
} else if (specifically == '') {
document.getElementById('bigselect').innerHTML+=wordlistc;
}
}
}

function wo(one,two,three) {
document.getElementById('iemoji').value=one.replace('https://emojiterra.com/','').replace('http://emojiterra.com/','').replace('//emojiterra.com/','');
document.getElementById('isubm').click();
}

function andthensubj() {
if (subjectsuffix != '') {
if (document.getElementById('subject')) {
if (document.getElementById('subject').value.indexOf(subjectsuffix) != -1) {
document.getElementById('subject').value=document.getElementById('subject').value.replace(subjectsuffix,'');
}
}
if (document.getElementById('mysubject')) {
if (document.getElementById('mysubject').value.indexOf(subjectsuffix) != -1) {
document.getElementById('mysubject').value=document.getElementById('mysubject').value.replace(subjectsuffix,'');
}
}
if (document.getElementById('myisubject')) {
if (document.getElementById('myisubject').value.indexOf(subjectsuffix) != -1) {
document.getElementById('myisubject').value=document.getElementById('myisubject').value.replace(subjectsuffix,'');
}
}
subjectsuffix='';
}
}

function athy() {
document.getElementById('iimg').innerHTML='<img style="border:8px dashed pink;" src=' + document.getElementById('thegifnamegoeshere').value + '?and=' + Math.floor(Math.random() * 23467) + '></img>';
document.getElementById('thegifnamegoeshere').value=' ';
}

function xcapture(toh, tos, toe) {
//if (navigator.userAgent.match(/Android/i)) alert('isxcontact=' + isxcontact);
//if (isxcontact != -1 && navigator.userAgent.match(/Android/i)) alert(700000);
var aspng=true;
if (filmslidenumber > 1) {
//alert(document.getElementById('slideshow').value);
var gbits=prompt('Leave a delay between slides in milliseconds value to send animation or make blank to send image of canvas as it stands now.','40');
if (gbits == null) gbits='4';
if (gbits != '') {
document.getElementById('delay').value=Math.floor(eval(eval(gbits) * 1.0));
subjectsuffix=' via //www.rjmprogramming.com.au/PHP/animegif/' + document.getElementById('outfile').value.replace('.gif','') + '.gif';
if (document.getElementById('subject')) {
if (document.getElementById('subject').value.indexOf(subjectsuffix) == -1) {
document.getElementById('subject').value+=subjectsuffix;
fixmyemail(document.getElementById('subject').value + ' ',1);
}
}
if (document.getElementById('mysubject')) {
if (document.getElementById('mysubject').value.indexOf(subjectsuffix) == -1) {
document.getElementById('mysubject').value+=subjectsuffix;
fixmyemail(document.getElementById('mysubject').value + ' ',1);
}
}
if (document.getElementById('myisubject')) {
if (document.getElementById('myisubject').value.indexOf(subjectsuffix) == -1) {
document.getElementById('myisubject').value+=subjectsuffix;
fixmyemail(document.getElementById('myisubject').value + ' ',1);
}
}
setTimeout(andthensubj, 12000);
document.getElementById('olbit').click();
aspng=false;
}
}

if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i) && isxcontact == -1) {
if (document.getElementById('myiemail').value.indexOf('@') == -1) {
var femail = prompt('Please supply the Email To address', '');
if (femail == null) femail = '';
if (femail.indexOf('@') != -1) {
fixmyemail(femail, 0);
}
}
} else {
//if (isxcontact != -1 && navigator.userAgent.match(/Android/i)) alert(70000);
//if (isxcontact != -1 && !document.getElementById('myiemail')) alert(7);
if (document.getElementById('myiemail')) {
if (document.getElementById('myiemail').value.indexOf('@') != -1) {
// if (isxcontact != -1) alert(70);
document.getElementById('mode').value = '';
document.getElementById('ismobile').value = 'y';
document.getElementById('myisubject').style.display = 'inline';
document.getElementById('myiemail').style.display = 'inline';
document.getElementById('myform').action = document.getElementById('myform').action.replace('?mode=1', '');
document.getElementById('myform').action = document.getElementById('myform').action.replace('mode=1', 'mode=');
//document.getElementById('myemail').href = '#' + document.getElementById('myemail').href;
// if (isxcontact != -1) alert(700);
}
}
}
//if (isxcontact != -1 && navigator.userAgent.match(/Android/i)) alert(7000);
if (isxcontact == -1) {
var pretoh = inlinecheck(elem.toDataURL("image/png",0));
if (si) {
if (document.getElementById('thegifnamegoeshere').value.trim() != '') {
document.getElementById('iimg').innerHTML='<img style="border:8px dashed pink;" src=' + document.getElementById('thegifnamegoeshere').value + '?and=' + Math.floor(Math.random() * 23467) + '></img>';
setTimeout(athy,9000);
//document.getElementById('thegifnamegoeshere').value=' ';
} else {
document.getElementById('iimg').innerHTML='<img style="border:8px dashed pink;" src=' + pretoh + '></img>';
}
if (document.getElementById('divannotation')) {
if (('' + document.getElementById('divannotation').style.top).indexOf('525') != -1) {
document.getElementById('divannotation').style.top=eval(eval(('' + document.getElementById('divannotation').style.top).replace('px','')) + 240) + 'px';
}
}
}
//toh.value = pretoh.substr(22, pretoh.length);
var xbits=pretoh.split(',');
//toh.value = pretoh.substr(eval(pretoh.indexOf(',') + 1), pretoh.length);
// if (isxcontact != -1 && navigator.userAgent.match(/Android/i)) alert(xbits[0]);
//alert(xbits[0] + ',');
toh.value = pretoh.replace(xbits[0] + ',', '');
// if (isxcontact != -1 && navigator.userAgent.match(/Android/i)) alert(70000);
if (1 == 1) {
//alert(tos.outerHTML);
tos.click();
} else {
document.getElementById('myform').submit();
}
}
// if (isxcontact != -1 && navigator.userAgent.match(/Android/i)) alert(700000);
var things = document.URL.split("?");
// if (isxcontact != -1 && navigator.userAgent.match(/Android/i)) alert("document.getElementById('myfname').value=" + document.getElementById('myfname').value);
if (isxcontact != -1) {
if (toe.href.indexOf('body=') == -1) toe.href+='&body=';
toe.href = toe.href.split('ody=')[0].replace('fill.in.email@address',document.getElementById('myto').value).replace('tJUNK=', 't=' + encodeURIComponent(document.getElementById('mysubject').value) + '%20to%20').replace('&b','&cc=' + encodeURIComponent(document.getElementById('mycc').value) + '&bcc=' + encodeURIComponent(document.getElementById('mybcc').value) + '&b') + 'ody=' + encodeURIComponent(document.getElementById('myfeedback').value); // + (things[0] + "/~").replace("world.html/~", document.getElementById('myfname').value).replace(xxlworld + ".html/~", document.getElementById('myfname').value).replace("index.html/~", document.getElementById('myfname').value).replace("//~", "/" + document.getElementById('myfname').value).replace("/~", "/" + document.getElementById('myfname').value);
} else {
//alert(xxlworld + 'was: ' + toe.href);
toe.href = toe.href + (things[0] + "/~").replace("world.html/~", inlinecheck(document.getElementById('myfname').value)).replace(xxlworld + ".html/~", inlinecheck(document.getElementById('myfname').value)).replace(xxlworld + ".htm/~", inlinecheck(document.getElementById('myfname').value)).replace("index.html/~", inlinecheck(document.getElementById('myfname').value)).replace("//~", "/" + inlinecheck(document.getElementById('myfname').value)).replace("/~", "/" + inlinecheck(document.getElementById('myfname').value));
//alert('is: ' + toe.href);
}
// if (isxcontact != -1 && navigator.userAgent.match(/Android/i)) alert(toe.href);
if (isxcontact != -1) {
if (navigator.userAgent.match(/Android/i)) {
//toe.click();
aemail(toe);
} else {
toe.click();
}
} else {
if (document.getElementById('to').value.indexOf('@') != -1 || navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
toe=toe;
} else {
toe.click();
}
}
}

function alatst() {
}

function toISOLocal(d) { // thanks to https://stackoverflow.com/questions/49330139/date-toisostring-but-local-time-instead-of-utc
var z = n => ('0' + n).slice(-2);
var zz = n => ('00' + n).slice(-3);
var off = d.getTimezoneOffset();
var sign = off < 0? '+' : '-';
off = Math.abs(off);

return d.getFullYear() + '-'
+ z(d.getMonth()+1) + '-' +
z(d.getDate()) + 'T' +
z(d.getHours()) + ':' +
z(d.getMinutes()) + ':' +
z(d.getSeconds()) + '.' +
zz(d.getMilliseconds()) +
sign + z(off/60|0) + ':' + z(off%60);
}

function inlinecheck(canvascont) {
var tdhih='';
var d1 = new Date();
var pred1='', postd1='';
if (inlinehtml) {
if (mapext == '.gif' && agdu != '') {
canvascont=agdu;
//mapext='';
if (document.getElementById('myform')) {
if (document.getElementById('myform').innerHTML.indexOf('is' + 'gif') == -1) {
document.getElementById('myform').innerHTML+="<input type=hidden id=xisgif name=isgif value='.gif'></input>";
} else if (document.getElementById('xisgif')) {
document.getElementById('xisgif').value='.gif';
}
if (document.getElementById('myform').innerHTML.indexOf('td' + 'subj') == -1) {
document.getElementById('myform').innerHTML+="<input type=hidden id=xtdsubj name=tdsubj value='" + document.getElementById('tdsubj').value + "~" + d1.toUTCString() + "'></input>";
} else if (document.getElementById('xtdsubj')) {
document.getElementById('xtdsubj').value=document.getElementById('tdsubj').value + "~" + d1.toUTCString();
}
}
} else {
if (document.getElementById('xtdsubj')) {
document.getElementById('xtdsubj').value='';
}
if (document.getElementById('xisgif')) {
document.getElementById('xisgif').value='';
}
}
if (document.getElementById('tdhuhta')) {
document.getElementById('tdsubj').value=document.getElementById('feedback').value;
if (canvascont.indexOf('data:') == 0) {
//d1.toUTCString();
if (document.getElementById('tdto').value.toLowerCase().indexOf('@gmail.com') != -1) {
pred1='<a target=_blank title="Webmail link" style="cursor:pointer;text-decoration:none;" href="https://gmail.com/#search/' + encodeURIComponent(d1.toUTCString()).replace(/\%20/g,'+') + '">'; // Sat%2C+07+Dec+2019+09%3A20%3A58+GMT
postd1='</a>';
}
tdhih='<body><h1>Feedback and Collaboration of Image Dated <span title="Sender of image local time email date reference is ' + toISOLocal(d1) + '">' + pred1 + d1.toUTCString() + postd1 + '</span><br>to ' + vstvs + ('<br>from ' + document.getElementById('tdcc').value + '</h1>').replace('<br>from </h1>', '</h1>') + '<br><h3>RJM Programming<h3><br><br><form method=GET action="';
tdhih+=document.URL.split('HTMLCSS/feedback.htm')[0].replace('http:','https:') + 'PHP/emoticon_keyboard_shortcuts.php"><input type=hidden value="' + d1.toUTCString() + ' (' + toISOLocal(d1) + ')" name=usingget></input>';
tdhih+='Feedback: <br><textarea rows=15 cols=300 name=already title="Multi-line feedback" style=' + "'" + 'width:';
tdhih+=('' + document.getElementById('canvaselement').width).replace('px','') + 'px;height:';
if (mapext == '.gif' && agdu != '') {
tdhih+=('' + document.getElementById('canvaselement').height).replace('px','') + 'px;';
} else {
tdhih+=('' + document.getElementById('canvaselement').height).replace('px','') + 'px;background:URL("' + canvascont + '");';
}
tdhih+="'" + '></textarea>'; //<!--input type=hidden name=dataurlis value="' + canvascont + '"></input-->';
tdhih+='<br><br>One line feedback: <input style="width:600px;" type=text placeholder="Enter any one line feedback here" value="" name="oneliner"></input>';
tdhih+='<input type=hidden value="' + document.getElementById('tdto').value + '" name="emailtois"></input>';
tdhih+='<br><br>Subject: <input style="width:600px;" type=text placeholder="Enter email subject" value="' + document.getElementById('tdsubj').value;
tdhih+='" name="subject"></input><br><br>';
tdhih+=('<input style="width:600px;" type=hidden value="' + document.getElementById('tdcc').value + '" name="emailfromis"></input>').replace('<input style="width:600px;" type=hidden value=""','Email from: <input style="width:600px;" type=text value=""');
tdhih+='<br><br><input type=submit style="background-color:yellow;" value="Feedback via RJM Programming"></input>';
tdhih+='<input name=width type=hidden value=' + ('' + document.getElementById('canvaselement').width).replace('px','').trim();
tdhih+='></input><input name=height type=hidden value=' + ('' + document.getElementById('canvaselement').height).replace('px','').trim();
tdhih+='></input></form></body>';
document.getElementById('tdhuhta').innerHTML=tdhih;
inlinehtml=false;
if (document.getElementById('tdto').value.indexOf('@') != -1) {
document.getElementById('fsubm').click();
}
} else if (canvascnt != "") {
document.getElementById('tdhuhta').value=document.getElementById('tdhuhta').value.split(' src="')[0] + ' src="' + document.URL.split('HTMLCSS/feedback.htm')[0] + 'PHP/' + canvascont + '"' + document.getElementById('tdhuhta').value.split('"')[eval(-1 + document.getElementById('tdhuhta').innerHTML.split('"').length)];
inlinehtml=false;
//alert(document.URL.split('HTMLCSS/feedback.htm')[0] + 'PHP/' + canvascont);
if (document.getElementById('tdto').value.indexOf('@') != -1) {
document.getElementById('fsubm').click();
}
}
}
//alert('here ' + canvascont.length);
}
return canvascont;
}

function ocheck(oisb, omode) {
return oisb;
}

function ChangeTutNow(selo) {
urlis=selo.value;
if (urlis.toLowerCase().indexOf('http') != 0) {
if (document.URL.indexOf(':') != -1) {
urlis=document.URL.split(':')[0] + ':' + urlis;
}
}
var fthiso=null;
var huhss=urlis.split('title='), thiso;
titleis='';
if (huhss.length > 1) {
titleis=huhss[1].replace(/_/g, " ");
elem.width = elem.width;
if (document.getElementById('bigselect').value.toLowerCase() == 'cut to the chase') {
if (document.getElementById('ideasiframe')) {
document.getElementById('ideas').style.width='1050px';
document.getElementById('ideasiframe').style.width='1050px';
document.getElementById('ideasiframe').style.display='block';
document.getElementById('ideasiframe').src='//www.rjmprogramming.com.au/slideshow.html?title=' + encodeURIComponent(titleis);
} else {
window.open('//www.rjmprogramming.com.au/slideshow.html?title=' + encodeURIComponent(titleis), '_blank', 'top=50,left=50,width=1050,height=800');
}
} else if (document.getElementById('bigselect').value != '') { // if (document.getElementById('bigselect').value == 'Feedback') {
if (document.getElementById('ideasiframe')) {
document.getElementById('ideas').style.width='1050px';
document.getElementById('ideasiframe').style.width='1050px';
document.getElementById('ideasiframe').style.display='block';
document.getElementById('ideasiframe').src='//www.rjmprogramming.com.au/ITblog/' + titleis.toLowerCase().replace("+","").replace("/","").replace(" ","-").replace("/","").replace(" ","-").replace("/","").replace(" ","-").replace("/","").replace(" ","-").replace("/","").replace(" ","-").replace(" ","-").replace(" ","-").replace(" ","-").replace(" ","-").replace(" ","-").replace(/---/g,"-").replace(/--/g,"-") + '#content';
} else {
window.open('//www.rjmprogramming.com.au/ITblog/' + titleis.toLowerCase().replace("+","").replace("/","").replace(" ","-").replace("/","").replace(" ","-").replace("/","").replace(" ","-").replace("/","").replace(" ","-").replace("/","").replace(" ","-").replace(" ","-").replace(" ","-").replace(" ","-").replace(" ","-").replace(" ","-").replace(/---/g,"-").replace(/--/g,"-") + '#content', '_blank', 'top=50,left=50,width=1050,height=800');
}
}
if (document.URL.indexOf(basis) == -1) {
pseudo_sentence = 'Regarding ' + titleis + ' at ' + String.fromCharCode(10) + urlis;
cf = "16px Verdana";
if (isxcontact != -1) cf = "10px Verdana";
placetext();
cf = "18px Verdana";
if (isxcontact != -1) cf = "12px Verdana";
pseudo_sentence = 'Regarding ' + titleis;
thiso=document.getElementById('feedback');
fthiso=document.getElementById('myfeedback');
if (isxcontact != -1 && fthiso != null) {
if (fthiso.value != "") {
fthiso.value=pseudo_sentence + "\n" + fthiso.value;
thiso.value="Feedback " + pseudo_sentence;
} else {
fthiso.value=pseudo_sentence;
thiso.value="Feedback " + pseudo_sentence;
}
if (document.getElementById('myto').value != "") {
document.getElementById('mysubject').value="Feedback " + pseudo_sentence;
document.getElementById('myisubject').value="Feedback " + pseudo_sentence;
fixmyemail(document.getElementById('myto').value + ' ',0);
fixmyemail("Feedback " + pseudo_sentence + ' ',1);
}
} else {
if (thiso.value == 'Feedback') {
document.getElementById('feedback').value+=' ' + pseudo_sentence;
document.getElementById('mysubject').value=thiso.value;
document.getElementById('myisubject').value=thiso.value;
fixmyemail(thiso.value + ' ',1);
} else if (thiso.value.indexOf('Feedback ') != -1 && pseudo_sentence.indexOf(' Tutorial') != -1) {
document.getElementById('feedback').value='Feedback ' + pseudo_sentence;
document.getElementById('mysubject').value=thiso.value;
document.getElementById('myisubject').value=thiso.value;
fixmyemail(thiso.value + ' ',1);
} else if ((thiso.value + '~').indexOf(' Tutorial~') != -1 && pseudo_sentence.indexOf(' Tutorial') != -1) {
document.getElementById('feedback').value=document.getElementById('feedback').value.replace(' Tutorial','') + ' ' + pseudo_sentence.substring(pseudo_sentence.indexOf(' Tutorial'));
document.getElementById('mysubject').value=thiso.value;
document.getElementById('myisubject').value=thiso.value;
fixmyemail(thiso.value + ' ',1);
}
}
}
}
}

function checklast(iois) {
var swih='';
var copts='', huhs;
var sw=null, presw=iois; //top.document.getElementById('ipostings');
if (presw != null) {
var aconto = (presw.contentWindow || presw.contentDocument);
if (aconto != null) {
if (aconto.document) { aconto = aconto.document; }
if (aconto.body != null) {
sw=aconto.body; //.getElementById('tuts');
if (swih == '') {
swih=sw.innerHTML;
var isa=swih.replace('</select','<select').replace('</select','<select').replace('</select','<select').replace('</select','<select').replace('</select','<select').split('<select');
for (var iu=1; iu<isa.length; iu++) {
if (isa[iu].indexOf('tuts') != -1 && document.getElementById('ideas').innerHTML == '') {
//alert('<select' + isa[iu].length + '</select>');
amongthis=' <br><select' + isa[iu] + '</select>';
if (document.URL.indexOf(basis) != -1) {
document.body.innerHTML='<div id=ideas>' + ideasprefix + amongthis + ideassuffix + '</div>';
//document.body.style.opacity='1.0'; // reveal reduced view
} else if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
document.getElementById('ideas').innerHTML=ideasprefix + amongthis + '<br><iframe id=ideasiframe style="display:none;-webkit-overflow-scrolling:touch;overflow:scroll;" src=""></iframe>' + ideassuffix;
} else {
document.getElementById('ideas').innerHTML=ideasprefix + amongthis + ideassuffix;
}
ideasdone=true;
setTimeout(addtodd, 2000);
}
}
}
} else if (!ideasdone) {
document.getElementById('ideas').innerHTML=ideasprefix + ' <br>' + ideasmiddle + ideassuffix;
}
} else if (!ideasdone) {
document.getElementById('ideas').innerHTML=ideasprefix + ' <br>' + ideasmiddle + ideassuffix;
}
} else if (!ideasdone) {
document.getElementById('ideas').innerHTML=ideasprefix + ' <br>' + ideasmiddle + ideassuffix;
}
}


function andlaterdo() {

document.getElementById('divannotation').innerHTML=document.getElementById('divannotation').innerHTML.replace('"black"','"blue"').replace('Annotations++','Annotations++ <input onclick="document.getElementById(' + "'" + 'canbet' + "'" + ').value=' + "'" + 'transparent' + "'" + ';" type=button value="Copy (via 2) and Paste (via 1) Parts of Canvas Above to Canvas Above"></input><br><div id=daddtofilm><input onclick="addtofilm();" value="Add to Animated Film" type="button" title="Make an Animation"></input></div>').replace('<input type="text" id="mycolour"','<input type="color" id="myrcolour" value="blue" onchange="if (this.value.toLowerCase().indexOf(' + "'" + 'transparent' + "'" + ') == -1) { obeforetransparent=this.value; } document.getElementById(' + "'" + 'mycolour' + "'" + ').value=this.value;"></input> <input onblur="if (this.value.toLowerCase().indexOf(' + "'" + 'transparent' + "'" + ') == -1) { obeforetransparent=this.value; }" type="text" id="mycolour"').replace('<input id="mycolour"','<input type="color" id="myrcolour" value="blue" onchange="if (this.value.toLowerCase().indexOf(' + "'" + 'transparent' + "'" + ') == -1) { obeforetransparent=this.value; } document.getElementById(' + "'" + 'mycolour' + "'" + ').value=this.value;"></input> <input onblur="if (this.value.toLowerCase().indexOf(' + "'" + 'transparent' + "'" + ') == -1) { obeforetransparent=this.value; } " id="mycolour"').replace("</form>","<input type=hidden id=canbet value=></input><input type=hidden name=from id=from value=''></input></form>").replace("</form>","<input type=hidden name=cc id=cc value=''></input></form>").replace("</form>","<input type=hidden name=bcc id=bcc value=''></input></form>");

document.getElementById('divannotation').style.top='535px';
document.getElementById('divannotation').style.left='10px';
document.getElementById('divannotation').style.width='98%';
document.getElementById('divannotation').style.border='7px solid yellow';

document.getElementById('divannotation').style.display='block';
document.getElementById('mysubject').value = 'Feedback';
document.getElementById('myisubject').value = 'Feedback';
fixmyemail('Feedback ',1);
document.getElementById('myisubject').style.display = 'inline';
document.getElementById('myiemail').style.display = 'inline';
document.getElementById('from').value=document.getElementById('myfrom').value;


var today = new Date();
var dd = today.getDate();
var mm = today.getMonth()+1; //January is 0!
var yyyy = today.getFullYear();
var hh = today.getHours();
var minm = today.getMinutes(); //January is 0!
var ss = today.getSeconds();
if (document.getElementById('myfname')) document.getElementById('myfname').value = xlworld + "_" + yyyy + "_" + mm + "_" + hh + "_" + minm + "_" + ss + ".png";


if (document.getElementById('myform')) document.getElementById('myform').action = document.getElementById('myform').action.replace('?mode=1', '');
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i) && isxcontact == -1) {
if (document.getElementById('mode')) {
document.getElementById('mode').value = '';
document.getElementById('ismobile').value = 'y';
document.getElementById('myisubject').style.display = 'inline';
document.getElementById('myiemail').style.display = 'inline';
document.getElementById('myform').action = document.getElementById('myform').action.replace('?mode=1', '');
document.getElementById('myform').action = document.getElementById('myform').action.replace('mode=1', 'mode=');
//document.getElementById('myemail').href = '#' + document.getElementById('myemail').href;
}
}


}

function tanimation() {
if (fromfilmslidenumber < tofilmslidenumber) {
document.getElementById('dslideshow').innerHTML='<img style="border:8px dashed lightblue;" src=' + document.getElementById('tablefilmimg' + eval(1 + fromfilmslidenumber)).src + '></img>';
fromfilmslidenumber++;
setTimeout(tanimation, 4000);
//alert(958);
} else {
document.getElementById('dslideshow').innerHTML='';
}
}

function animation() {
fromfilmslidenumber = 0;
tofilmslidenumber = eval(-1 + filmslidenumber);
document.getElementById('dslideshow').innerHTML='<img style="border:8px dashed lightblue;" src=' + document.getElementById('tablefilmimg1').src + '></img>';
location.href='#dslideshow';
fromfilmslidenumber++;
setTimeout(tanimation, 4000);
//alert(98);
}

function addtofilm() {
//alert(2);
var ptoh=inlinecheck(elem.toDataURL('image/png',0));
//alert(22);
if (filmslidenumber == 1) {
//alert(222);
if (document.getElementById('eimg').innerHTML == '') {
if (document.getElementById('divannotation')) {
if (('' + document.getElementById('divannotation').style.top).indexOf('525') != -1) {
document.getElementById('divannotation').style.top=eval(eval(('' + document.getElementById('divannotation').style.top).replace('px','')) + 240) + 'px';
}
}
}
document.getElementById('slideshow').value=' src="' + ptoh + '" ';
document.getElementById('iimg').innerHTML='';
document.getElementById('eimg').innerHTML='<table id=tablefilm><tr id=tablefilmtr><td id=tablefilmcell1><img id=tablefilmimg1 style="border:8px dashed lightgreen;" src=' + ptoh + '></img></td></tr><tr id=tablefilmfooter><td id=tablefilmfooter1><a href=#tablefilmfooter1>Slide</a> 1 of ...</td></tr></table>';
//alert(2222);
location.href='#feedbuttontwo';
} else {
//alert(3);
document.getElementById('iimg').innerHTML='';
document.getElementById('slideshow').value+=' src="' + ptoh + '" ';
document.getElementById('tablefilmtr').innerHTML+='<td id=tablefilmcell' + filmslidenumber + '><img id=tablefilmimg' + filmslidenumber + ' style="border:8px dashed lightgreen;" src=' + ptoh + '></img></td>';
document.getElementById('tablefilmfooter').innerHTML=document.getElementById('tablefilmfooter').innerHTML.replace(' ...',' <a href=#tablefilmfooter' + filmslidenumber + '>...</a>') + '<td id=tablefilmfooter' + filmslidenumber + '><a href=#tablefilmfooter1>Slide</a> ' + filmslidenumber + ' of ...</td>';
//alert(33);
}
//alert(4);
if (filmslidenumber == 2) {
document.getElementById('daddtofilm').innerHTML+=' <input style=display:inline-block; type=button onclick=animation(); value="Play Animation" id=banimation></input>';
}
filmslidenumber++;
}

function dcup() {
if (parent.document.getElementById('dcanvasfields')) {
var xomyimgdata=inlinecheck(document.getElementById('canvaselement').toDataURL('image/png',0));
if (parent.document.getElementById('subject')) {
parent.document.getElementById('subject').title=xomyimgdata;
} else if (parent.document.getElementById('dcanvasimage')) {
parent.document.getElementById('dcanvasimage').src=xomyimgdata;
} else {
parent.document.getElementById('dcanvasfields').innerHTML='<img src=' + xomyimgdata + ' id=dcanvasimage></img>';
}
}
}

function lssave() {
if (window.localStorage) {
if (document.getElementById('myto').value.indexOf('@') != -1) {
var ccis=document.getElementById('mycc').value;
var bccis=document.getElementById('mybcc').value;
var fbis=document.getElementById('feedback').value.replace(/\ /g, '~');
if (ccis == '') { ccis='@'; }
if (bccis == '') { bccis='@'; }
if (fbis == '') { fbis='~'; }
if (mapext == '.gif' && agdu != '') {
localStorage.setItem('lf_img', encodeURIComponent(document.getElementById('tdto').value + ' ' + ccis + ' ' + bccis + ' ' + fbis + ' ' + agdu));
mapext='';
agdu='';
} else {
localStorage.setItem('lf_img', encodeURIComponent(document.getElementById('tdto').value + ' ' + ccis + ' ' + bccis + ' ' + fbis + ' ' + elem.toDataURL("image/png",0)));
}
if (document.getElementById('dilhe').innerHTML.indexOf('"checkbox"') == -1) {
document.getElementById('dilhe').innerHTML+=' <span id=rcbx>Recall Last? <input type="checkbox" onchange="loadimgd();"></input></span>';
}
}
}
}

function loadimgd() {
var ditems=dval.split(' ');
if (ditems.length >= 5) {
imgd = new Image();

imgd.onload = function() {
context.drawImage(imgd, 0, 0);
};

if (ditems[4].indexOf('image/gif;') != -1) {
var rectis=document.getElementById("feedbutton").getBoundingClientRect()
if (document.getElementById('slhe')) {
if (document.getElementById('slhe').innerHTML == '') {
document.getElementById('slhe').innerHTML=' ... or ...<br>Animated GIF(s): ';
}
document.getElementById('slhe').innerHTML+=" <img title=\"Double click image to Inline HTML Email as image feedback\" style=" + ("" + rectis.width).replace("px","").split(".")[0] + 'px;z-index:54;height:' + ("" + rectis.height).replace("px","").split(".")[0] + "px;display:inline-block; onclick=\"mapext='.gif'; agdu=this.src; document.getElementById('feedbuttonthree').click();\" src=\"" + ditems[4] + "\"><img>";
}
imgd.src = ditems[4];
} else {
imgd.src = ditems[4];
}
document.getElementById('myto').value = ditems[0];
fixto(document.getElementById('myto').value);
document.getElementById('tdto').value = ditems[0];
if (ditems[1].replace("@","").trim() != "") { document.getElementById('mycc').value = ditems[1]; document.getElementById('tdcc').value = ditems[1]; }
if (ditems[2].replace("@","").trim() != "") { document.getElementById('mybcc').value = ditems[2]; document.getElementById('tdbcc').value = ditems[2]; }
if (ditems[3].replace(/\~/g," ").trim() != "") { document.getElementById('feedback').value = ditems[3].replace(/\~/g,' '); document.getElementById('tdsubj').value = ditems[3].replace(/\~/g,' '); }
if (document.getElementById('rcbx')) {
document.getElementById('rcbx').innerHTML="";
}
}
}

function lookmapext() {
if (mapext && agdu) { //if (document.getElementById('mapext0')) {
if (mapext == ".gif") { //if (document.getElementById('mapext0').value.trim() != "") {
if (agdu != "") {
mapext="";
var rectis=document.getElementById("canvaselement").getBoundingClientRect()
//var wwo=window.open("","_blank","top=" + ("" + rectis.top).replace("px","").split(".")[0] + ",left=" + ("" + rectis.left).replace("px","").split(".")[0] + ",width=" + ("" + rectis.width).replace("px","").split(".")[0] + ",height=" + ("" + rectis.height).replace("px","").split(".")[0]);
//wwo.document.write('<body style="width:' + ("" + rectis.width).replace("px","").split(".")[0] + 'px;height:' + ("" + rectis.height).replace("px","").split(".")[0] + 'px;background:URL(' + agdu + ');background-size:contain;background-repeat:no-repeat;"></body>');
if (document.getElementById('slhe')) {
if (document.getElementById('slhe').innerHTML == '') {
document.getElementById('slhe').innerHTML=' ... or ...<br>Animated GIF(s): ';
}
rectis=document.getElementById("feedbutton").getBoundingClientRect()
document.getElementById('slhe').innerHTML+=" <img title=\"Double click image to Inline HTML Email as image feedback\" style=" + ("" + rectis.width).replace("px","").split(".")[0] + 'px;z-index:54;height:' + ("" + rectis.height).replace("px","").split(".")[0] + "px;display:inline-block; onclick=\"mapext='.gif'; agdu=this.src; document.getElementById('feedbuttonthree').click();\" src=\"" + agdu + "\"><img>";
}
agdu="";
}
}
}
setTimeout(lookmapext,1000);
}

function onloading() {
setTimeout(lookmapext,1000);
if (parent.document) {
if (parent.document.getElementById('dcanvasfields')) {
pdfs=true;
setInterval(dcup, 5000);
}
}

if (window.localStorage) {
for (var iq in window.localStorage) {
var val = localStorage.getItem(iq);
if (val) {
if (iq == 'lf_img') {
dval=decodeURIComponent(val);
if (document.getElementById('dilhe').innerHTML.indexOf('"checkbox"') == -1) {
document.getElementById('dilhe').innerHTML+=' <span id=rcbx title="Recall last Inline HTML Email image into canvas just below">Recall Last? <input type="checkbox" onchange="loadimgd();"></input></span>';
}
}
}
}
}

//if (document.URL.indexOf(basis) != -1) document.getElementById('toptable').style.display='none'; // start with nothing
if (!ideasdone) document.getElementById('ideas').innerHTML=ideasprefix + ' <br>' + ideasmiddle + ideassuffix;
if (document.URL.indexOf(basis) == -1) {
ddmf=document.getElementById('dviai').innerHTML;
ihddmf=ddmf.split('</iframe>')[1]; //.split('>')[eval(-1 + ddmf.split('</textarea>')[0].split('>').length)];
setInterval(cddmf,2900);
setTimeout(andlaterdo,3000);
elem.click();
}

if (document.getElementById('myfeedback')) {
if (document.getElementById('myfeedback').title.indexOf('SMS') == -1) {
document.getElementById('myfeedback').title+=' ... please note highlight text is available and this can contribute to an SMS or Email';
}
}
}

function cddmf() {
if (document.URL.indexOf(basis) == -1) {
var newddmf=document.getElementById('dviai').innerHTML;
if (newddmf != ddmf) {
var newihddmf=newddmf.split('</iframe>')[1]; //.split('>')[eval(-1 + newddmf.split('</textarea>')[0].split('>').length)];
if (ihddmf == '') {
ihddmf=newihddmf;
} else if (ihddmf != newihddmf && newihddmf.indexOf(ihddmf) == 0) {
var huhss=newihddmf.substring(ihddmf.length);
document.getElementById('dviai').innerHTML=document.getElementById('dviai').innerHTML.replace(newihddmf,huhss + ihddmf);
ihddmf=huhss + ihddmf;
} else {
ihddmf=newihddmf;
}
ddmf=document.getElementById('dviai').innerHTML;
}
}
}

function andthen() {
elem.click();
}

function placetext() {
context.font = cf;
var huhs=pseudo_sentence.split(String.fromCharCode(10)), thisy=eval(yyoff + (Math.min(y,lasty) + Math.max(y,lasty)) / 2);
for (var ii=0; ii<huhs.length; ii++) {
//alert(thisy + " via " + yyoff + " " + (Math.min(y,lasty) + Math.max(y,lasty)) / 2);
if (ii == 1 && huhs[ii].indexOf("http") == 0) {
cf = "12px Verdana";
if (isxcontact != -1) cf = "8px Verdana";
}
context.font = cf;
context.strokeText(huhs[ii].replace("ø", "ø"),eval(xxoff + 2 + Math.min(x,lastx)),thisy);
thisy+=20;
}
//gpy = gpy + 50;
}

function fixto(tvs) {
if (tvs != '') {
vstvs=tvs;
if (vstvs.indexOf('[') != -1 && vstvs.indexOf('[') != -1) {
tvs=vstvs.split('[')[1].split(']')[0];
document.getElementById('myto').value=tvs;
}
document.getElementById('myiemail').value=tvs;
document.getElementById('to').value=tvs; fixmyemail(tvs,0);
document.getElementById('mode').value = '';
document.getElementById('ismobile').value = 'y';
if (document.getElementById('tdto')) {
document.getElementById('tdto').value=tvs;
}
}
}

function toggledisplay() {
if (document.getElementById('dilhe') && document.getElementById('feedbuttonthree') && document.getElementById('spcc') && document.getElementById('mycc') && document.getElementById('spfrom') && document.getElementById('myfrom')) {
setTimeout(toggledisplay, 10000);
showbt=!showbt;
if (showbt) {
//document.getElementById('feedbuttonthree').style.border='1px solid red';
document.getElementById('dilhe').style.border='1px solid red';
document.getElementById('spcc').innerHTML='From:';
document.getElementById('spcc').style.border='1px solid red';
document.getElementById('spfrom').style.visibility='hidden';
document.getElementById('myfrom').style.visibility='hidden';
document.getElementById('mycc').placeholder='Helps if Inline HTML Email From: here';
document.getElementById('mycc').title='';
} else {
//document.getElementById('feedbuttonthree').style.border='1px solid transparent';
document.getElementById('dilhe').style.border='1px solid transparent';
document.getElementById('spcc').innerHTML='CC:';
document.getElementById('spcc').style.border='1px solid transparent';
document.getElementById('spfrom').style.visibility='visible';
document.getElementById('myfrom').style.visibility='visible';
document.getElementById('mycc').placeholder='';
document.getElementById('mycc').title='Helps if you will click Inline HTML Email button if you define Email From (ie. your email address) here';
}
}
}
</script>


</head>
<body align="center" onload="setTimeout(toggledisplay,10000); onloading();">
<script type='text/javascript'>

var phight=' ';
var cbackc='';
var cookcnt=0;
var cookblank=' ';
var zoharr=[];

var exs='';
if (document.URL.indexOf('justideas=') != -1) exs='display:none;'; // start with nothing
if (document.URL.indexOf('justideas=maybe') != -1) exs='';
var jscontact=parent.document.URL.indexOf('Contact');
if (jscontact == -1) jscontact=document.URL.indexOf('contact=contact');
pdfs=false;
if (parent.document) {
if (parent.document.getElementById('dcanvasfields')) {
pdfs=true;
}
}
if (jscontact == -1) {
if (!pdfs) {
document.write('<table id=toptable style=width:100%;margin-top:-10px;' + exs + '><tr><td><div id=dslideshow></div><h1 id=myh1 align="center">Feedback</h1></td><td style=width:90%; nowrap><div style=display:inline-block;width:100%;-webkit-overflow-scrolling:touch;overflow-x:scroll; id=dviai><form style=display:none;width:100%;-webkit-overflow-scrolling:touch;overflow-x:scroll; action=fairy_story_assistant.php method=GET target=fsa><input name=emoji id=iemoji value=></input><input type=submit id=isubm value=Submit></input></form><iframe style=display:none;width:100%;-webkit-overflow-scrolling:touch;overflow-x:scroll; id=fsa name=fsa src=></iframe></div></td></tr></table>');
document.write('<h2 align="center" id="score" style="display:none;">Score is <span id=sone>0</span> from <span id=stwo>0</span> goes</h2>');
document.write("<div align='center' style='height:240px;-webkit-overflow-scrolling:touch;overflow:scroll;'><table style='" + exs + "height:180px;' cellpadding=5 cellspacing=5><tr><td style='vertical-align:top;border:4px solid pink;width:25%;'>");
document.write("To: <input onclick=\"document.getElementById('toptable').style.display='block'; basis=basis.replace('justideas','nowayjose');\" style='width:200px; align:right;' type='email' id='myto' onblur=\" fixto(this.value); \" value=''></input><br>");
document.write("<span id=spfrom>From:</span> <input style='width:200px; align:right;' type='email' id='myfrom' onblur=\" document.getElementById('from').value=this.value; \" value='rmetcalfe@rjmprogramming.com.au'></input><br>");
document.write("<span id=spcc>CC:</span> <input style='width:200px; align:right;' type='email' id='mycc' onblur=\" document.getElementById('cc').value=this.value; if (document.getElementById('tdcc')) { document.getElementById('tdcc').value=this.value; } \" value=''></input><br>");
document.write("BCC: <input style='width:200px; align:right;' type='email' id='mybcc' onblur=\" document.getElementById('bcc').value=this.value; if (document.getElementById('tdbcc')) { document.getElementById('tdbcc').value=this.value; } \" value=''></input><br>");
document.write("<input type=button value=Subject onclick=\"document.getElementById('feedback').value+=document.getElementById('myfeedback').value;\" title='Optionally (and judiciously) add emojis to right onto subject line'></input>: <input style='width:200px; align:right;' type='text' id='feedback' onblur=\" document.getElementById('mysubject').value=this.value; document.getElementById('myisubject').value=this.value; fixmyemail(this.value + ' ',1); \" value='Feedback'></input><br><input type='button' id='feedbutton' onclick=\" xcapture(document.getElementById('mydurl'),document.getElementById('bsubmit'),document.getElementById('myemail')); \" value='Send Feedback' style='background-color:yellow; align:center;'></input><br><input type='button' id='feedbuttontwo' onclick=\" si=true; xcapture(document.getElementById('mydurl'),document.getElementById('bsubmit'),document.getElementById('myemail')); si=false; \" value='Send Feedback and Show Body of Email as Image' style='background-color:yellow; align:center;'></input><br><div id=dilhe><input type='button' id='feedbuttonthree' onclick=\" inlinehtml=true; si=true; xcapture(document.getElementById('mydurl'),document.getElementById('bsubmit'),document.getElementById('myemail')); si=false; lssave(); \" value='Send Feedback as Inline HTML Email' style='background-color:yellow; align:center;'></input><span id=slhe></span></div>");
document.write("</td><td style='vertical-align:top;border:4px solid blue;width:25%;'>");
} else {
//document.write("<h1 id=myh1 align='center'>PDF Canvas Design</h1><table style='" + exs + "height:180px;display:none;' cellpadding=5 cellspacing=5><tr><td style='vertical-align:top;border:4px solid pink;width:25%;'>");
document.write('<table id=toptable style=width:100%;margin-top:-10px;' + exs + '><tr><td><div id=dslideshow></div><h1 id=myh1>Design</h1></td><td style=width:90%; nowrap><div style=display:inline-block;width:100%;-webkit-overflow-scrolling:touch;overflow-x:scroll; id=dviai><form style=display:none;width:100%;-webkit-overflow-scrolling:touch;overflow-x:scroll; action=fairy_story_assistant.php method=GET target=fsa><input name=emoji id=iemoji value=></input><input type=submit id=isubm value=Submit></input></form><iframe style=display:none;width:100%;-webkit-overflow-scrolling:touch;overflow-x:scroll; id=fsa name=fsa src=></iframe></div></td></tr></table>');
document.write('<h2 align="center" id="score" style="display:none;">Score is <span id=sone>0</span> from <span id=stwo>0</span> goes</h2>');
document.write("<div align='center' style='height:240px;-webkit-overflow-scrolling:touch;overflow:scroll;'><table style='" + exs + "height:180px;' cellpadding=5 cellspacing=5><tr style='display:none;'><td style='vertical-align:top;border:4px solid pink;width:25%;'>");
document.write("To: <input onclick=\"document.getElementById('toptable').style.display='block'; basis=basis.replace('justideas','nowayjose');\" style='width:200px; align:right;' type='email' id='myto' onblur=\" fixto(this.value); \" value=''></input><br>");
document.write("<span id=spfrom>From:</span> <input style='width:200px; align:right;' type='email' id='myfrom' onblur=\" document.getElementById('from').value=this.value; \" value='rmetcalfe@rjmprogramming.com.au'></input><br>");
document.write("<span id=spcc>CC:</span> <input style='width:200px; align:right;' type='email' id='mycc' onblur=\" document.getElementById('cc').value=this.value; if (document.getElementById('tdcc')) { document.getElementById('tdcc').value=this.value; } \" value=''></input><br>");
document.write("BCC: <input style='width:200px; align:right;' type='email' id='mybcc' onblur=\" document.getElementById('bcc').value=this.value; if (document.getElementById('tdbcc')) { document.getElementById('tdbcc').value=this.value; } \" value=''></input><br>");
document.write("<input type=button value=Subject onclick=\"document.getElementById('feedback').value+=document.getElementById('myfeedback').value;\" title='Optionally (and judiciously) add emojis to right onto subject line'></input>: <input style='width:200px; align:right;' type='text' id='feedback' onblur=\" document.getElementById('mysubject').value=this.value; document.getElementById('myisubject').value=this.value; fixmyemail(this.value + ' ',1); \" value='Feedback'></input><br><input type='button' id='feedbutton' onclick=\" xcapture(document.getElementById('mydurl'),document.getElementById('bsubmit'),document.getElementById('myemail')); \" value='Send Feedback' style='background-color:yellow; align:center;'></input><br><input type='button' id='feedbuttontwo' onclick=\" si=true; xcapture(document.getElementById('mydurl'),document.getElementById('bsubmit'),document.getElementById('myemail')); si=false; \" value='Send Feedback and Show Body of Email as Image' style='background-color:yellow; align:center;'></input><br><div id=dilhe><input type='button' id='feedbuttonthree' onclick=\" inlinehtml=true; si=true; xcapture(document.getElementById('mydurl'),document.getElementById('bsubmit'),document.getElementById('myemail')); si=false; lssave(); \" value='Send Feedback as Inline HTML Email' style='background-color:yellow; align:center;'></input><span id=slhe></span></div>");
document.write("</td><td style='vertical-align:top;border:4px solid blue;width:25%;'>");
}
} else if (navigator.userAgent.match(/Android/i) && isxcontact != -1) {
document.write("<div align='center' style='width:100%;'><table cellpadding=5 cellspacing=5 style='width:100%;height:180px;'><tr><td style='border:4px solid pink;width:210px;'>");
document.write("To: <input onclick=\"document.getElementById('toptable').style.display='block'; basis=basis.replace('justideas','nowayjose');\" style='width:160px; align:right;' type='text' id='myto' onblur=\" fixto(this.value); \" value='rmetcalfe@rjmprogramming.com.au'></input><br>");
document.write("<input style='width:160px; align:right;' type='hidden' id='myfrom' onblur=\" document.getElementById('from').value=this.value; \" value='rmetcalfe@rjmprogramming.com.au'></input>");
document.write("From: <input style='width:160px; align:right;' type='text' id='mycc' onblur=\" document.getElementById('cc').value=this.value; if (document.getElementById('tdcc')) { document.getElementById('tdcc').value=this.value; } \" value=''></input><br>");
document.write("BCC: <input style='width:160px; align:right;' type='text' id='mybcc' onblur=\" document.getElementById('bcc').value=this.value; if (document.getElementById('tdbcc')) { document.getElementById('tdbcc').value=this.value; } \" value=''></input><br>");
document.write("<input type=button value=Subject onclick=\"document.getElementById('feedback').value+=document.getElementById('myfeedback').value;\" title='Optionally (and judiciously) add emojis to right onto subject line'></input>: <input style='width:160px; align:right;' type='text' id='feedback' onblur=\" document.getElementById('mysubject').value=this.value; document.getElementById('myisubject').value=this.value; fixmyemail(this.value + ' ',1); \" value='Feedback'></input><br><input type='button' id='feedbutton' onclick=\" xcapture(null,null,document.getElementById('myemail')); \" value='Send Feedback' style='background-color:yellow; '></input>");
document.write("</td><td style='vertical-align:top;border:4px solid blue;width:210px;float:left;'>");
} else {
document.write("<div align='center' style='width:100%;'><table cellpadding=5 cellspacing=5 style='width:100%;height:180px;'><tr><td style='border:4px solid pink;width:210px;'>");
document.write("To: <input onclick=\"document.getElementById('toptable').style.display='block'; basis=basis.replace('justideas','nowayjose');\" style='width:160px; align:right;' type='email' id='myto' onblur=\" fixto(this.value); \" value='rmetcalfe@rjmprogramming.com.au'></input><br>");
document.write("<input style='width:160px; align:right;' type='hidden' id='myfrom' onblur=\" document.getElementById('from').value=this.value; \" value='rmetcalfe@rjmprogramming.com.au'></input>");
document.write("From: <input style='width:160px; align:right;' type='email' id='mycc' onblur=\" document.getElementById('cc').value=this.value; if (document.getElementById('tdcc')) { document.getElementById('tdcc').value=this.value; } \" value=''></input><br>");
document.write("BCC: <input style='width:160px; align:right;' type='email' id='mybcc' onblur=\" document.getElementById('bcc').value=this.value; if (document.getElementById('tdbcc')) { document.getElementById('tdbcc').value=this.value; } \" value=''></input><br>");
document.write("<input type=button value=Subject onclick=\"document.getElementById('feedback').value+=document.getElementById('myfeedback').value;\" title='Optionally (and judiciously) add emojis to right onto subject line'></input>: <input style='width:160px; align:right;' type='text' id='feedback' onblur=\" document.getElementById('mysubject').value=this.value; document.getElementById('myisubject').value=this.value; fixmyemail(this.value + ' ',1); \" value='Feedback'></input><br><input type='button' id='feedbutton' onclick=\" xcapture(document.getElementById('mydurl'),document.getElementById('bsubmit'),document.getElementById('myemail')); \" value='Send Feedback' style='background-color:yellow; '></input>");
document.write("</td><td style='vertical-align:top;border:4px solid blue;width:210px;float:left;'>");
}
</script>
Feedback (words<br> to augment Annotations, the position<br> of which you can double click below):<br><div style=display:inline; id=ddmyfeedback><textarea style='color=lightgray;width:200px;' rows=6 cols=40 id='myfeedback' title='Feedback' value='' onchange=' pseudo_sentence=this.value; placetext(); ' onblur=' pseudo_sentence=this.value; placetext(); '></textarea><br><input onblur="if (this.value.length > 0) { document.getElementById('myfeedback').value+=this.value; this.value=''; } else if (this.placeholder.length > 0) { document.getElementById('myfeedback').value+=this.placeholder; this.placeholder=''; }" onclick="if (this.placeholder.length > 0) { document.getElementById('myfeedback').value+=this.placeholder; this.placeholder=''; }" type=text style='width:100%;border:1px dotted yellow;' value='' title='Click when you like an emoji to place above' id='iplaceholder' placeholder=''></input></div><br><div style=display:inline; id=dmyfeedback contenteditable=true></div></td>
</td><td id='ideas' style='vertical-align:top;border:4px solid green; width:210px;height:180px;-webkit-overflow-scrolling:touch;overflow:hidden; align: top;'></td>
<td id='emojis' style='vertical-align:top;border:4px solid red; float:left; height:180px; -webkit-overflow-scrolling:touch;overflow:hidden; align: top;'><iframe style='height:240px;' name='emojis' id='emojis' src='//www.rjmprogramming.com.au/PHP/emoticon_keyboard_shortcuts.php#myh3'></iframe></td>
</tr></table></div>
<script type='text/javascript'>
var jjscontact=parent.document.URL.indexOf('Contact');
if (jjscontact == -1) jjscontact=document.URL.indexOf('contact=contact');
if (jjscontact == -1) {
if (!pdfs) {
document.write('<canvas style="' + exs + 'margin-top:-5px;border: 5px solid green; background-color: black; opacity: 0.3;" title="Feedback" id="canvaselement" width="1350" height="200" ></canvas><br><div id=iimg></div><div id=eimg></div>');
} else {
document.write('<canvas style="' + exs + 'margin-top:-240px;border: 5px solid green; background-color: black; opacity: 0.3;" title="Feedback" id="canvaselement" width="1350" height="380" ></canvas><br><div id=iimg></div><div id=eimg></div>');
}
} else {
document.write('<canvas style="' + exs + 'margin-top:-5px;border: 5px solid green; background-color: black; opacity: 0.3;" title="Feedback" id="canvaselement" width="620" height="100" ></canvas><br><div id=iimg></div><div id=eimg></div>');
}
</script>
<script language="JavaScript">

var toggle = 0;

var ead='', mpn='';

var elem = document.getElementById('canvaselement');
var elemLeft = eval(elem.offsetLeft + 680*0);
var elemTop = eval(elem.offsetTop + 124*0);
var context = elem.getContext('2d');
context.globalAlpha = 0.0;
//context.fillStyle = "rgb(255,255,255)";
//context.fillRect(0,0,elem.width,elem.height);
var arr=['0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f'];
var omyimgdata="";
var obeforetransparent="blue";
var omidatax=0;
var omidatay=0;
var omidataw=0;
var omidatah=0;
var allowable=false;

// Add event listener for `click` events.
elem.addEventListener('click', function(event) {
if (first) elem.width = elem.width;
first=false;
elem.style.backgroundImage = "none";
elem.style.opacity = 1.0;


if (x == 0 && y == 0 && lastx == 0 && lasty == 0) {
if (event.pageX || event.pageY) {
x = event.pageX - elemLeft;
y = event.pageY - elemTop;
} else {
x = event.clientX - elemLeft;
y = event.clientY - elemTop;
}
lastx=x;
lasty=y;
//xxoff=0;
//yyoff=0;
} else {
lastx=x;
lasty=y;
if (event.pageX || event.pageY) {
x = event.pageX - elemLeft;
y = event.pageY - elemTop;
} else {
x = event.clientX - elemLeft;
y = event.clientY - elemTop;
}
xxoff=0;
yyoff=0;
if ((document.getElementById('canbet').value == 'transparent' || document.getElementById('mycolour').value == 'Transparent') && !allowable) {
allowable=true;
} else if ((document.getElementById('canbet').value == 'transparent' || document.getElementById('mycolour').value == 'Transparent') && allowable) {
allowable=false;
document.getElementById('canbet').value='';
//alert(obeforetransparent);
if (obeforetransparent != "") {
//omyimgdata=context.getImageData(eval(Math.min(x,lastx)), eval(Math.min(y,lasty)), Math.abs(x - lastx), Math.abs(y - lasty));
omyimgdata=inlinecheck(elem.toDataURL('image/png',0));
//alert(omyimgdata);
document.getElementById('myim').style.width=elem.style.width;
document.getElementById('myim').style.height=elem.style.height;
document.getElementById('myim').src=omyimgdata;
omidatax=eval(Math.min(x,lastx));
omidatay=eval(Math.min(y,lasty));
omidataw=Math.abs(x - lastx);
omidatah=Math.abs(y - lasty);
document.getElementById('mycolour').value=obeforetransparent;
}
} else if (omyimgdata != "") {
//context.putImageData(omyimgdata, x, y); //, omidataw, omidatah);
//alert(',' + omidatax + ',' + omidatay + ',' + omidataw + ',' + omidatah + ',' + x + ',' + y + ',' + omidataw + ',' + omidatah);
context.drawImage(document.getElementById('myim'),omidatax,omidatay,omidataw,omidatah, x, y,omidataw,omidatah); //, omidataw, omidatah);
//alert('' + x + ',' + y + ' paste');
omyimgdata="";
}

}





clickno = clickno + 1;


var r = Math.floor((Math.random()*256)+0);
var g = Math.floor((Math.random()*256)+0);
var b = Math.floor((Math.random()*256)+0);
var thiscol ='#' + arr[(r-(r % 16)) / 16] + arr[r % 16] + arr[(g-(g % 16)) / 16] + arr[g % 16] + arr[(b-(b % 16)) / 16] + arr[b % 16];

elem.style.backgroundColor = thiscol;

}, false);

elem.addEventListener('touchstart', function(event) {
if (first) elem.width = elem.width;
first=false;
elem.style.backgroundImage = "none";
elem.style.opacity = 1.0;


if (x == 0 && y == 0 && lastx == 0 && lasty == 0) {
if (event.pageX || event.pageY) {
x = event.pageX - elemLeft;
y = event.pageY - elemTop;
} else {
x = event.clientX - elemLeft;
y = event.clientY - elemTop;
}
lastx=x;
lasty=y;
//xxoff=0;
//yyoff=0;
} else {
lastx=x;
lasty=y;
if (event.pageX || event.pageY) {
x = event.pageX - elemLeft;
y = event.pageY - elemTop;
} else {
x = event.clientX - elemLeft;
y = event.clientY - elemTop;
}
xxoff=0;
yyoff=0;
if ((document.getElementById('canbet').value == 'transparent' || document.getElementById('mycolour').value == 'Transparent') && !allowable) {
allowable=true;
} else if ((document.getElementById('canbet').value == 'transparent' || document.getElementById('mycolour').value == 'Transparent') && allowable) {
allowable=false;
document.getElementById('canbet').value='';
//alert(obeforetransparent);
if (obeforetransparent != "") {
//omyimgdata=context.getImageData(eval(Math.min(x,lastx)), eval(Math.min(y,lasty)), Math.abs(x - lastx), Math.abs(y - lasty));
omyimgdata=inlinecheck(elem.toDataURL('image/png',0));
//alert(omyimgdata);
document.getElementById('myim').style.width=elem.style.width;
document.getElementById('myim').style.height=elem.style.height;
document.getElementById('myim').src=omyimgdata;
omidatax=eval(Math.min(x,lastx));
omidatay=eval(Math.min(y,lasty));
omidataw=Math.abs(x - lastx);
omidatah=Math.abs(y - lasty);
document.getElementById('mycolour').value=obeforetransparent;
}
} else if (omyimgdata != "") {
//context.putImageData(omyimgdata, x, y); //, omidataw, omidatah);
//alert(',' + omidatax + ',' + omidatay + ',' + omidataw + ',' + omidatah + ',' + x + ',' + y + ',' + omidataw + ',' + omidatah);
context.drawImage(document.getElementById('myim'),omidatax,omidatay,omidataw,omidatah, x, y,omidataw,omidatah); //, omidataw, omidatah);
//alert('' + x + ',' + y + ' paste');
omyimgdata="";
}

}





clickno = clickno + 1;


var r = Math.floor((Math.random()*256)+0);
var g = Math.floor((Math.random()*256)+0);
var b = Math.floor((Math.random()*256)+0);
var thiscol ='#' + arr[(r-(r % 16)) / 16] + arr[r % 16] + arr[(g-(g % 16)) / 16] + arr[g % 16] + arr[(b-(b % 16)) / 16] + arr[b % 16];

elem.style.backgroundColor = thiscol;

}, false);

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 ipf() {
var chac=-1; //Math.floor(Math.random() * 79) + 128512;
var chactwo=[]; //Math.floor(Math.random() * 4) + 127995;

var elist=['128512.128591',
'128640.128767',
'9728.9983',
'🏃🏾‍♀️',
'🏃‍♂️',
'🏃🏾‍♀️','🏃‍♂️','🏃🏻‍♀️','🏃🏿','🏃🏽','🏃🏿','🏃🏾‍♀️','🏃🏻‍♀️',
'🏃🏾‍♀️','🏃‍♂️','🏃🏻‍♀️','🏃🏿','🏃🏽','🏃🏿','🏃🏾‍♀️','🏃🏻‍♀️',
'🚣‍♀️','🚣','🚣','🚣🏼','🚣🏽','🚣🏾','🚣🏻‍♀️','🚣🏽‍♀️','🚣🏾‍♀️','🚣🏼‍♀️','🚣🏻','🚣🏿‍♀️','🚣🏿',
'🚣‍♀️','🚣','🚣','🚣🏼','🚣🏽','🚣🏾','🚣🏻‍♀️','🚣🏽‍♀️','🚣🏾‍♀️','🚣🏼‍♀️','🚣🏻','🚣🏿‍♀️','🚣🏿',
'9984.10175',
'127744.128511',
'129280.129535',
'128512.128591'];

var ehac=Math.floor(Math.random() * elist.length), mul='', ichac=0;

if (elist[ehac].indexOf('.') != -1) {
chac=Math.floor(Math.random() * eval(eval(elist[ehac].split('.')[1]) - eval(elist[ehac].split('.')[0]))) + eval(elist[ehac].split('.')[0]);
} else {
chactwo=(elist[ehac] + ';').replace(';;','').replace('&#','').split(';&#');
for (ichac=0; ichac<chactwo.length; ichac++) {
mul+=String.fromCodePoint(eval('' + chactwo[ichac]));
}
}

if (document.getElementById('iplaceholder').placeholder.length >= 59) {
if (chac >= 0) {
document.getElementById('iplaceholder').placeholder=String.fromCodePoint(chac);
} else {
document.getElementById('iplaceholder').placeholder=mul;
}
} else {
if (chac >= 0) {
document.getElementById('iplaceholder').placeholder+=String.fromCodePoint(chac);
} else {
document.getElementById('iplaceholder').placeholder+=mul;
}
}
setTimeout(ipf, 2500);
}

function getTextSelection() {
var field = document.getElementById("myfeedback");
var startPos = field.selectionStart;
var endPos = field.selectionEnd;
var field_value = field.value;
var selectedText = field_value.substring(startPos,endPos);
return selectedText;
}


function plookforhighlight() {
var usualdelay=2000;
setTimeout(plookforhighlight, usualdelay);
var xsel=""; //getTextSelection();
if (xsel.length == 0) { xsel=window.getSelection().toString(); }
if (xsel.length == 0) {
try {
xsel=document.selection.createRange().htmlText;
while (xsel.indexOf(String.fromCharCode(10)) != -1) {
xsel=xsel.replace(String.fromCharCode(10), '<br>');
//alert('xsel=' + xsel);
}
//xsel=xsel.replace(String.fromCharCode(10),' ').replace(String.fromCharCode(10),' ').replace(String.fromCharCode(10),' ').replace(String.fromCharCode(10),' ');
//xsel=xsel.replace(String.fromCharCode(13),' ').replace(String.fromCharCode(13),' ').replace(String.fromCharCode(13),' ').replace(String.fromCharCode(13),' ');
} catch(ertw) {
xsel='';
}
} else {
while (xsel.indexOf(String.fromCharCode(10)) != -1) {
xsel=xsel.replace(String.fromCharCode(10), '<br>');
//alert('xsel=' + xsel);
}
//xsel=xsel.replace(String.fromCharCode(10),' ').replace(String.fromCharCode(10),' ').replace(String.fromCharCode(10),' ').replace(String.fromCharCode(10),' ');
//xsel=xsel.replace(String.fromCharCode(13),' ').replace(String.fromCharCode(13),' ').replace(String.fromCharCode(13),' ').replace(String.fromCharCode(13),' ');
}
if (xsel != phight && xsel != '') {
phight=xsel;
var lines=phight.split('<br>');
if (!document.getElementById('phfloater') && document.getElementById('ideas')) {
document.getElementById('ideas').innerHTML+="<br><div id=phfloater style=display:none;></div><br><div style=\"border:1px dotted purple;background-color:#f0f0f0;\" title=\"Click below for Email or SMS\" contenteditable=true id=dcidea></div><br><br><input type=button title=SMS value=SMS onclick=\"if (mpn == '') { mpn=prompt('Enter phone number for SMS (or Cancel to do it at the Messager app', mpn); if (mpn == null) { mpn=''; } } document.getElementById('ashare').href='sms:' + mpn + '&body=' + encodeURIComponent((document.getElementById('dcidea').innerText || document.getElementById('dcidea').contentWindow || document.getElementById('dcidea').contentDocument)); document.getElementById('ashare').click(); \"></input> <input type=button title=Email value=Email onclick=\"if (ead == '') { ead=prompt('Enter email address', ead); if (ead == null) { ead=''; } } document.getElementById('ashare').href='mailto:' + ead + '?subject=My%20Feedback&body=' + encodeURIComponent((document.getElementById('dcidea').innerText || document.getElementById('dcidea').contentWindow || document.getElementById('dcidea').contentDocument)); document.getElementById('ashare').click(); \"></input> <input type=button title=\"Annotated Email\" value=\"Annotated Email\" onclick=\"if (ead == '') { ead=prompt('Enter email address', ead); if (ead == null) { ead=''; } } document.getElementById('ishare').src='//www.rjmprogramming.com.au/HTMLCSS/emailhtml.php?to=' + encodeURIComponent(ead) + '&subject=My%20Feedback&body=' + encodeURIComponent(document.getElementById('dcidea').innerHTML); \"></input>";
//alert(document.getElementById('ideas').innerHTML);
}
document.getElementById('phfloater').innerHTML=phight;
//alert('lines.length=' + lines.length + ' .+. ' + phight + ' ... ' + document.getElementById('phfloater').innerHTML);
for (var ilines=0; ilines<lines.length; ilines++) {
if (eval(1 + ilines) == lines.length) {
document.getElementById('phfloater').innerHTML=document.getElementById('phfloater').innerHTML.replace(lines[ilines] + '', '<mark>' + lines[ilines] + '</mark>');
} else {
document.getElementById('phfloater').innerHTML=document.getElementById('phfloater').innerHTML.replace(lines[ilines] + '<br>', '<mark>' + lines[ilines] + '</mark><br>');
}
}
} else if (xsel == '') {
phight='';
}

//alert(document.getElementById('phfloater').innerHTML);
//document.getElementById('iplaceholder').value+=document.getElementById('phfloater').innerHTML.replace(/\>/g,'>').replace(/\</g,'<').replace(/\<\;br\>\;/g, '<br><br>');
if (document.getElementById('dcidea') && document.getElementById('phfloater')) {
document.getElementById('dcidea').innerHTML+=document.getElementById('phfloater').innerHTML; //.replace(/\>/g,'>').replace(/\</g,'<').replace(/\<\;br\>\;/g, '<br><br>');
document.getElementById('phfloater').innerHTML='';
}
}

plookforhighlight();


setTimeout(ipf, 2500);

</script>
<img src='' title='' alt=''></img>
<script type='text/javascript'>
var exs2='';
if (document.URL.indexOf('justideas=') != -1) exs2=' style=display:none;'; // start with nothing
if (document.URL.indexOf('justideas=maybe') != -1) exs2='';
if (!pdfs) {
document.write('<table><tr><td' + exs2 + '>Your email looks as above</td></tr></table>');
} else {
document.write('<table><tr><td' + exs2 + '>Your PDF body looks as above</td></tr></table>');
}
</script>
<iframe id='ipostings' style='display:none;' src='//www.rjmprogramming.com.au/Welcome.html' onload='checklast(this);'></iframe>
<img id='myim' style='dispay:none;' src='' title='' alt=''></img>
<form target='gifa' style='display:none;' action='//www.rjmprogramming.com.au/PHP/animegif/tutorial_to_animated_gif.php' method='POST'>
<input type=hidden id=slideshow name=slideshow value=''></input>
<input type=hidden id=delay name=delay value='4000'></input>
<input type=hidden id=background-color name=backgroundOLDIDEA-color value='white'></input>
<input type=hidden id=stitle name=stitle value='Animated Feedback'></input>
<input type=hidden id=outfile name=outfilex value='animated_gif_slideshow'></input>
<input id=olbit type=submit value=Submit></input>
</form><br>
<iframe name=gifa id=gifa style='display:none;' src='//www.rjmprogramming.com.au/PHP/animegif/tutorial_to_animated_gif.php'></iframe>
<input type=hidden id=thegifnamegoeshere value=''></input>
<a id=ashare href='#' style='display:none;'>Email or SMS</a>
<iframe id=ishare src='#' style='display:none;'></iframe>
<form id=ifemail target="iemail" style="display:none;" action="//www.rjmprogramming.com.au/HTMLCSS/emailhtml.php" method="POST">
<input type=hidden style=display:none; name=inline value=""></input>
<input type=hidden style=display:none; name=to id=tdto value=""></input>
<input type=hidden style=display:none; name=subj id=tdsubj value="Feedback via RJM Programming"></input>
<textarea name=hcont style=display:none; value="" id=tdhuhta cols=160 rows=4></textarea>
<input type=hidden style=display:none; name=cc id=tdcc value=""></input>
<input type=hidden style=display:none; name=bcc id=tdbcc value=""></input>
<input style=display:none; type=submit id=fsubm value="Email"></input>
</form>
<iframe style=display:none; name=iemail id=iemail src=></iframe>
</body>
</html>