<!doctype html>
<html>
<head>
<title>Agenda Items - RJM Programming - December, 2019</title>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1">
<script type='text/javascript'>

var lastchecka='';
var curai=1;
var templatetr='';
var prevh3='';
var saveawayv='';
var lastformih='';
var dive='';
var dval='';
var myh3suffix='';
var defbits=[""];
var deftitle=[""];
var defcontent=[""];
var defprompt=[""];
var thischoice=0;
var selbit='';
var selneeded=false;
var isize=0;
var collaboration=false;
var toarr=[], ccazrr=[], bccarr=[];
var toarrnn=[], ccazrrnn=[], bccarrnn=[];
var aisuff='';
var aos=[];
var froms=[' onfocus="checka(this);" style="cursor: pointer; z-index: 9;"></'];
var tos=[' onfocus="checka(this);" style="cursor: pointer; z-index: 9;"></'];

// Inline HTML Form Email collaboration variables
var cv_textarea_rows=" rows=1 ";

Date.prototype.toDateInputValue = (function() { // thanks to https://stackoverflow.com/questions/6982692/how-to-set-input-type-dates-default-value-to-today
var local = new Date(this);
local.setMinutes(this.getMinutes() - this.getTimezoneOffset());
return local.toJSON().split('.')[0].replace('T',' '); //.slice(0,10);
});

function lfi(finalone,inv) {
var outv=inv;
if (tos.length > 1) {
for (var ito=1; ito<tos.length; ito++) {
outv=outv.replace(froms[ito], tos[ito]);
}
}
if (outv.indexOf('?subject=') != -1) {
var xssd;
var ssd=outv.split('?subject=');
for (var issd=1; issd<ssd.length; issd++) {
xssd=ssd[issd].split(' target=')[0].split('"');
// bad is ?subject=hhgd" hgdf="" target=
if (xssd.length > 2) {
outv=outv.replace('?subject=' + ssd[issd].split(' target=')[0], '?subject=' + encodeURIComponent(ssd[issd].split(' target=')[0].replace(/\"/g,'').replace(/\=/g,'')) + '"');
}
}
}
if (finalone || collaboration) {
var shortis='';
var asd=document.getElementsByTagName('a');
for (var iasd=0; iasd<asd.length; iasd++) {
if (('' + asd[iasd].id).indexOf('adiv') != -1) {
if (finalone) {
shortis=asd[iasd].outerHTML.replace(' id="' + asd[iasd].id + '"', ' ');
var xssdv;
var ssdv=shortis.split('?subject=');
for (var issdv=1; issdv<ssdv.length; issdv++) {
xssdv=ssdv[issdv].split(' target=')[0].split('"');
// bad is ?subject=hhgd" hgdf="" target=
if (xssdv.length > 2) {
shortis=shortis.replace('?subject=' + ssdv[issdv].split(' target=')[0], '?subject=' + encodeURIComponent(ssdv[issdv].split(' target=')[0].replace(/\"/g,'').replace(/\=/g,'')) + '"');
document.getElementById('dmt').innerHTML=document.getElementById('dmt').innerHTML.replace('?subject=' + ssdv[issdv].split(' target=')[0], '?subject=' + encodeURIComponent(ssdv[issdv].split(' target=')[0].replace(/\"/g,'').replace(/\=/g,'')) + '"');
}
}
} else {
shortis=asd[iasd].innerHTML;
}
document.getElementById(asd[iasd].id.replace('a','')).innerHTML=shortis;
}
}
}
return outv;
}

function saveaway(ino) {
saveawayv=ino.value;
if (!document.getElementById('ab' + ino.id)) {
document.getElementById('hidden').innerHTML+='<input type=hidden name=' + ino.id + ' id=ab' + ino.id + ' value="' + ino.value + '"></input>';
} else {
document.getElementById('ab' + ino.id).value=ino.value;
}
}

function prepopit() {
document.getElementById('selpast').size=document.getElementById('selpast').getAttribute('data-size');
document.getElementById('selpast').style.visibility='visible';
document.getElementById('selpast').click();
}

function popit(tv) {
// ?organization=mjfgh jhg &aidatetime=2019-12-11 17:03:43&divagendaitem2_1=jhgf mgnf&divagendaitem3_1=jhgf hgjdf&divagendaitem2_2=hjgf nhfg&divagendaitem3_2=hjgf jhgf&divagendaitem2_3=|rmetcalfe15@gmail.com
var dmcont=defcontent[eval(0 + eval(tv.split('|')[0]))];
var beq='', aeq='';
var rv=0;
if (dmcont.indexOf('organization=') != -1) {
document.getElementById('organization').innerHTML=dmcont.split('organization=')[1].split('&')[0];
assess(document.getElementById('organization'));
}
if (dmcont.indexOf('aidatetime=') != -1) {
document.getElementById('aidatetime').value=dmcont.split('aidatetime=')[1].split('&')[0];
saveaway(document.getElementById('aidatetime'));
}
var maxrows=eval(dmcont.split('3_')[eval(-1 + dmcont.split('3_').length)].split("'")[0].split('"')[0].split('=')[0]);
if (maxrows > 1) {
for (jm=2; jm<=maxrows; jm++) {
document.getElementById('mytbody').innerHTML+=templatetr.replace(/\_1/g, '_' + jm).replace(/1\)/g, '' + jm + ')');
document.getElementById('aidatetime').value = saveawayv;
curai++;
}
}
var dms=dmcont.split('&divagenda');
for (var ii=1; ii<dms.length; ii++) {
beq=dms[ii].split('=')[0];
aeq=dms[ii].substring(eval(1 + eval('' + beq.length))).split('&')[0];
if (aeq != '') {
if (document.getElementById('divagenda' + beq)) {
//alert(aeq);
document.getElementById('divagenda' + beq).innerHTML=aeq;
rv=assess(document.getElementById('divagenda' + beq));
if (document.getElementById('divagenda' + beq).innerHTML.indexOf('mailto:') != -1 || document.getElementById('divagenda' + beq).innerHTML.indexOf('sms:') != -1) {
//alert(1);
if (document.getElementById('divagenda' + beq).getAttribute('contenteditable')) {
document.getElementById('dmt').innerHTML+=document.getElementById('divagenda' + beq).innerHTML.replace('a href','a id=adivagenda' + beq + ' href').replace('a title','a id=adivagenda' + beq + ' title');
froms.push(froms[0]);
tos.push(froms[0].replace('></', '>' + (document.getElementById('divagenda' + beq).innerText || document.getElementById('divagenda' + beq).contentWindow || document.getElementById('divagenda' + beq).contentDocument) + '</')); // document.getElementById('divagenda' + beq).
aos.push(document.getElementById('adivagenda' + beq));
//alert(2);
document.getElementById('divagenda' + beq).style.cursor='pointer';
//alert(3);
document.getElementById('divagenda' + beq).style.zIndex='9';
//document.getElementById('divagenda' + beq).addEventListener('mousedown', function () {
// document.getElementById('a' + this.id).click();
//});
// .onfocus=function(event) { document.getElementById('a' + event.target.id).click(); };
//alert(4);
lastformih=lfi(false,document.getElementById('mytable').outerHTML); //lfi(false,document.getElementById('myform').innerHTML); //document.getElementById('mytable').outerHTML; //document.getElementById('myform').innerHTML;
//alert('yes');
}
}
} //else {
//alert('oops! ' + beq);
//}
}
}
}

function argcheck(val) {
var bits, postbits, ibits=0, dpi=0;
var toz='', ccz='', bccz='';
if (document.URL.indexOf('&justification=') != -1) {
aisuff=' - ' + decodeURIComponent(document.URL.split('&justification=')[1].split('&')[0]).replace(/\+/g,' ');
if (aisuff == ' - ') {
aisuff='';
}
}
if (val.indexOf('&to=') != -1) {
toz=val.split('&to=')[1].split('&')[0];
val=val.replace('&to=' + toz, '');
toz=decodeURIComponent(toz);
}
if (val.indexOf('&cc=') != -1) {
ccz=val.split('&cc=')[1].split('&')[0];
val=val.replace('&cc=' + ccz, '');
ccz=decodeURIComponent(ccz);
}
if (val.indexOf('&bcc=') != -1) {
bccz=val.split('&bcc=')[1].split('&')[0];
val=val.replace('&bcc=' + bccz, '');
bccz=decodeURIComponent(bccz);
}
dval=decodeURIComponent(val).replace(/\+/g,' ');
if (dval != '') {
if ((toz + ccz + bccz) != '') {
if (toz != '') {
if (toz == (toz + ccz + bccz)) {
defprompt[0]=toz.replace(/\,/g,';') + '';
} else {
defprompt[0]=toz.replace(/\,/g,';') + ',';
}
} else {
defprompt[0]=','
}
if (ccz != '') {
if ((toz + ccz) == (toz + ccz + bccz)) {
defprompt[0]+=ccz.replace(/\,/g,';') + '';
} else {
defprompt[0]+=ccz.replace(/\,/g,';') + ',';
}
} else {
defprompt[0]+=','
}
if (bccz != '') {
defprompt[0]+=bccz.replace(/\,/g,';') + '';
} else {
defprompt[0]+=''
}
}
bits=dval.split('#');
for (ibits=0; ibits<bits.length; ibits++) {
postbits=bits[ibits].split('|');
if (!selneeded) {
isize=1;
selbit='<select id=selpast style="visibility:hidden;display:inline-block;" onchange=" if (this.value.trim().length != 0) { thischoice=eval(this.value); popit(this.value); } else if (this.value.length != 0) { localStorage.removeItem(' + "'" + 'ai_items' + "'" + '); document.getElementById(' + "'" + 'myh3' + "'" + ').innerHTML=prevh3; } "><option id=myopt value="">Optionally load previous agenda ...</option></select>';
}
selneeded=true;
if (dpi == 0) {
defbits[0]=bits[0];
//alert(bits[0]);
if (bits[ibits].indexOf('aidatetime=') == -1) {
if (saveawayv == "") {
var sv=new Date().toDateInputValue();
deftitle[0]='Agenda Items for ' + bits[ibits].split('organization=')[1].split('&')[0] + ' Meeting on ' + sv + aisuff;
} else {
deftitle[0]='Agenda Items for ' + bits[ibits].split('organization=')[1].split('&')[0] + ' Meeting on ' + saveawayv + aisuff;
}
} else {
deftitle[0]='Agenda Items for ' + bits[ibits].split('organization=')[1].split('&')[0] + ' Meeting on ' + bits[ibits].split('aidatetime=')[1].split('&')[0] + aisuff;
}
defcontent[0]=decodeURIComponent(postbits[0]);
if (postbits.length > 1 && (toz + ccz + bccz) == '') {
defprompt[0]=decodeURIComponent(postbits[1]);
}
isize++;
//selbit=selbit.replace('</select>', '<option value="' + ibits + '">' + deftitle[ibits] + '</option></select>');
selbit=selbit.replace('...</option>', '...</option><option value="' + ibits + '">' + deftitle[ibits] + '</option>');
} else {
defbits.push(bits[ibits]);
if (bits[ibits].indexOf('aidatetime=') == -1) {
if (saveawayv == "") {
var svx=new Date().toDateInputValue();
deftitle.push('Agenda Items for ' + bits[ibits].split('organization=')[1].split('&')[0] + ' Meeting on ' + svx + aisuff);
} else {
deftitle.push('Agenda Items for ' + bits[ibits].split('organization=')[1].split('&')[0] + ' Meeting on ' + saveawayv + aisuff);
}
} else {
deftitle.push('Agenda Items for ' + bits[ibits].split('organization=')[1].split('&')[0] + ' Meeting on ' + bits[ibits].split('aidatetime=')[1].split('&')[0] + aisuff);
}
defcontent.push(decodeURIComponent(postbits[0]));
if (postbits.length > 1 && (toz + ccz + bccz) == '') {
defprompt.push(decodeURIComponent(postbits[1]));
} else {
defprompt.push("");
}
isize++;
//selbit=selbit.replace('</select>', '<option value="' + ibits + '">' + deftitle[ibits] + '</option></select>');
selbit=selbit.replace('...</option>', '...</option><option value="' + ibits + '">' + deftitle[ibits] + '</option>');
}
}
}
//if (selbit != '') {
// isize++;
// document.getElementById('myh3').innerHTML+=' ... <input style="display:inline-block;background-color:orange;" type=button value="Load Previous" onclick=prepopit();></input> ' + selbit.replace('<select ','<select size=' + isize + ' ').replace('</select>','<option value=" ">Clear These</option></select>');
//}
if (selbit != '') {
lscheck();
document.getElementById('lp').click();
document.getElementById('myopt').innerHTML=decodeURIComponent(document.URL.split('&justification=')[1].split('&')[0]).replace(/\+/g,' ');
document.getElementById('selpast').value='0';
thischoice=0;
popit('0');
collaboration=true;
antiewoit();
ewoit(true);
//alert(defcontent[0]);
} else {
lscheck();
}

}

function lscheck() {
var bits, postbits, ibits=0, dpi=0, ioff=0, zero=0, bisuff='';
if (selbit != '') { selneeded=true; ioff=1; zero=1; dpi=1; }
if (window.localStorage) {
for (var iq in window.localStorage) {
var val = localStorage.getItem(iq);
if (val) {
if (iq == 'ai_items') {
dval=decodeURIComponent(val);
if (dval != '') {
bits=dval.split('#');
for (ibits=0; ibits<bits.length; ibits++) {
postbits=bits[ibits].split('|');
bisuff='';
if (postbits[0].indexOf('&aisuff=') != -1) {
bisuff=' - ' + decodeURIComponent(postbits[0].split('&aisuff=')[1].split('&')[0]).replace(/\+/g,' ');
if (bisuff == ' - ') { bisuff=''; }
}
if (!selneeded) {
isize=1;
selbit='<select id=selpast style="visibility:hidden;display:inline-block;" onchange=" if (this.value.trim().length != 0) { thischoice=eval(this.value); popit(this.value); } else if (this.value.length != 0) { localStorage.removeItem(' + "'" + 'ai_items' + "'" + '); document.getElementById(' + "'" + 'myh3' + "'" + ').innerHTML=prevh3; } "><option id=myopt value="">Optionally load previous agenda ...</option></select>';
}
selneeded=true;
if (dpi == 0) {
defbits[0]=bits[0];
//alert(bits[0]);
if (bits[ibits].indexOf('aidatetime=') == -1) {
if (saveawayv == "") {
var sv=new Date().toDateInputValue();
deftitle[0]='Agenda Items for ' + bits[ibits].split('organization=')[1].split('&')[0] + ' Meeting on ' + sv + bisuff;
} else {
deftitle[0]='Agenda Items for ' + bits[ibits].split('organization=')[1].split('&')[0] + ' Meeting on ' + saveawayv + bisuff;
}
} else {
deftitle[0]='Agenda Items for ' + bits[ibits].split('organization=')[1].split('&')[0] + ' Meeting on ' + bits[ibits].split('aidatetime=')[1].split('&')[0] + bisuff;
}
defcontent[0]=decodeURIComponent(postbits[0]);
if (postbits.length > 1) {
defprompt[0]=decodeURIComponent(postbits[1]);
}
dpi++;
isize++;
//selbit=selbit.replace('</select>', '<option value="' + eval(ioff + eval(ibits)) + '">' + deftitle[eval(ioff + eval(ibits))] + '</option></select>');
selbit=selbit.replace('...</option>', '...</option><option value="' + eval(ioff + eval(ibits)) + '">' + deftitle[eval(ioff + eval(ibits))] + '</option>');
} else {
defbits.push(bits[ibits]);
if (bits[ibits].indexOf('aidatetime=') == -1) {
if (saveawayv == "") {
var svx=new Date().toDateInputValue();
deftitle.push('Agenda Items for ' + bits[ibits].split('organization=')[1].split('&')[0] + ' Meeting on ' + svx + bisuff);
} else {
deftitle.push('Agenda Items for ' + bits[ibits].split('organization=')[1].split('&')[0] + ' Meeting on ' + saveawayv + bisuff);
}
} else {
deftitle.push('Agenda Items for ' + bits[ibits].split('organization=')[1].split('&')[0] + ' Meeting on ' + bits[ibits].split('aidatetime=')[1].split('&')[0] + bisuff);
}
defcontent.push(decodeURIComponent(postbits[0]));
if (postbits.length > 1) {
defprompt.push(decodeURIComponent(postbits[1]));
} else {
defprompt.push("");
}
isize++;
//selbit=selbit.replace('</select>', '<option value="' + eval(ioff + eval(ibits)) + '">' + deftitle[eval(ioff + eval(ibits))] + '</option></select>');
selbit=selbit.replace('...</option>', '...</option><option value="' + eval(ioff + eval(ibits)) + '">' + deftitle[eval(ioff + eval(ibits))] + '</option>');
}
}
}
}
}
}
if (selbit != '') {
isize++;
document.getElementById('myh3').innerHTML+=' ... <input id=lp style="display:inline-block;background-color:orange;" type=button value="Load Previous" onclick=prepopit();></input> ' + selbit.replace('<select ','<select size=1 data-size=' + isize + ' ').replace('</select>','<option value=" ">Clear These</option></select>');
}
}
}

function assess(divo) {
var sv='', proposed='';
if (divo.id != 'aidatetime') {
if (divo.id.indexOf('3_') != -1) {
var vsstr=',' + document.getElementById('tdto').title.replace(/\;/g,',') + ',' + document.getElementById('tdcc').title.replace(/\;/g,',') + ',' + document.getElementById('tdbcc').title.replace(/\;/g,',') + ',';
if (vsstr.replace(/\,/g,'') == '') {
vsstr=',' + defprompt[thischoice].replace(/\;/g,',') + ',';
}
if (divo.innerHTML.indexOf(' ') != -1 && (divo.innerHTML.indexOf('@') == -1 || divo.innerHTML == divo.innerHTML.toUpperCase())) {
//alert(vsstr + ' vs ' + ',' + divo.innerHTML.toLowerCase().split('[')[0].trim() + ' [');
if (vsstr.toLowerCase().indexOf(',' + divo.innerHTML.toLowerCase().trim() + ' [') != -1 || (divo.innerHTML.indexOf('@') != -1 && vsstr.toLowerCase().indexOf(',' + divo.innerHTML.toLowerCase().split('[')[0].trim() + ',') != -1)) {
//alert(33);
sv=divo.innerHTML;
divo.title=sv;
proposed=',' + sv.toLowerCase().trim() + ' [';
if (vsstr.toLowerCase().indexOf(proposed) == -1) {
vsstr=vsstr.toLowerCase().replace(',' + divo.innerHTML.toLowerCase().split('[')[0].trim() + ',', ',' + divo.innerHTML.toLowerCase().split('[')[0].trim() + ' [' + divo.innerHTML.toLowerCase().split('[')[1].split(']')[0] + '],');
proposed=',' + sv.toLowerCase().split('[')[0].trim() + ' [';
}
if (divo.innerHTML == divo.innerHTML.toUpperCase()) {
divo.innerHTML='<a title=SMS href=sms:' + (encodeURIComponent(vsstr.toLowerCase().split(proposed)[1].split(']')[0])) + '?subject=' + (encodeURIComponent(document.getElementById(divo.id.replace('3_','2_')).innerHTML.replace(/\ /g,'%20'))) + ' target=_top>' + sv + '</a>';
} else {
divo.innerHTML='<a title=Email href=mailto:' + (encodeURIComponent(vsstr.toLowerCase().split(proposed)[1].split(']')[0])) + '?subject=' + (encodeURIComponent(document.getElementById(divo.id.replace('3_','2_')).innerHTML.replace(/\ /g,'%20'))) + ' target=_top>' + sv + '</a>';
}
divo.setAttribute('contenteditable', false);
}
} else if (divo.innerHTML.indexOf('[') != -1 && divo.innerHTML.indexOf(']') != -1 && divo.innerHTML.indexOf('@') != -1) {
if (vsstr.toLowerCase().indexOf(',' + divo.innerHTML.toLowerCase() + ',') != -1) {
sv=divo.innerHTML;
divo.title=sv;
if (divo.innerHTML == divo.innerHTML.toUpperCase()) {
divo.innerHTML='<a title=SMS href=sms:' + (encodeURIComponent(vsstr.split('[')[1].split(']')[0])) + '?subject=' + (encodeURIComponent(document.getElementById(divo.id.replace('3_','2_')).innerHTML.replace(/\ /g,'%20'))) + ' target=_top>' + sv + '</a>';
} else {
divo.innerHTML='<a title=Email href=mailto:' + (encodeURIComponent(vsstr.split('[')[1].split(']')[0])) + '?subject=' + (encodeURIComponent(document.getElementById(divo.id.replace('3_','2_')).innerHTML.replace(/\ /g,'%20'))) + ' target=_top>' + sv + '</a>';
}
divo.setAttribute('contenteditable', false);
}
} else if (divo.innerHTML.indexOf('@') != -1) {
if (vsstr.toLowerCase().indexOf(',' + divo.innerHTML.toLowerCase() + ',') != -1) {
sv=divo.innerHTML;
divo.title=sv;
if (divo.innerHTML == divo.innerHTML.toUpperCase()) {
divo.innerHTML='<a title=SMS href=sms:' + (encodeURIComponent(sv)) + '?subject=' + (encodeURIComponent(document.getElementById(divo.id.replace('3_','2_')).innerHTML.replace(/\ /g,'%20'))) + ' target=_top>' + sv + '</a>';
} else {
divo.innerHTML='<a title=Email href=mailto:' + (encodeURIComponent(sv)) + '?subject=' + (encodeURIComponent(document.getElementById(divo.id.replace('3_','2_')).innerHTML.replace(/\ /g,'%20'))) + ' target=_top>' + sv + '</a>';
}
divo.setAttribute('contenteditable', false);
}
}
lastformih=lfi(false,document.getElementById('mytable').outerHTML); //lfi(false,document.getElementById('myform').innerHTML); //document.getElementById('mytable').outerHTML; //document.getElementById('myform').innerHTML;
curai++;
document.getElementById('mytbody').innerHTML+=templatetr.replace(/\_1/g, '_' + curai).replace(/1\)/g, '' + curai + ')');
document.getElementById('aidatetime').value = saveawayv;
if (document.getElementById('divagendaitem2_' + curai)) {
document.getElementById('divagendaitem2_' + curai).focus();
}
if (!document.getElementById('ab' + divo.id)) {
if (divo.innerHTML.indexOf('<') == 0) {
document.getElementById('hidden').innerHTML+='<textarea title="' + divo.title + '" style="display:none;" name=' + divo.id + ' id=ab' + divo.id + ' value="' + divo.innerHTML.replace(/\"/g,"") + '"></textarea>';
} else {
document.getElementById('hidden').innerHTML+='<input type=hidden name=' + divo.id + ' id=ab' + divo.id + ' value="' + divo.innerHTML + '"></input>';
}
} else {
document.getElementById('ab' + divo.id).value=divo.innerHTML;
}
} else if (!document.getElementById('ab' + divo.id)) {
if (divo.innerHTML.indexOf('<') == 0) {
document.getElementById('hidden').innerHTML+='<textarea title="' + divo.title + '" style="display:none;" name=' + divo.id + ' id=ab' + divo.id + ' value="' + divo.innerHTML.replace(/\"/g,"") + '"></textarea>';
} else {
document.getElementById('hidden').innerHTML+='<input type=hidden name=' + divo.id + ' id=ab' + divo.id + ' value="' + divo.innerHTML + '"></input>';
}
} else {
document.getElementById('ab' + divo.id).value=divo.innerHTML;
}
}
return 0;
}

function antidive() {
document.getElementById('divemail').innerHTML=dive;
}

function trsave() {
var els, iels, rect;
templatetr=document.getElementById('agendaitem_1').outerHTML;
prevh3=document.getElementById('myh3').innerHTML;
if (document.URL.indexOf('&justification=') != -1) {
argcheck('?' + document.URL.split('?')[1].split('#')[0]);
} else {
lscheck();
}
els=document.getElementsByTagName('table');
for (iels=0; iels<els.length; iels++) {
rect=els[iels].getBoundingClientRect();
els[iels].setAttribute('data-width',eval(('' + rect.width).split('.')[0]) / 3);
}
els=document.getElementsByTagName('th');
for (iels=0; iels<els.length; iels++) {
rect=els[iels].getBoundingClientRect();
els[iels].setAttribute('data-width',eval(('' + rect.width).split('.')[0]) / 3);
}
els=document.getElementsByTagName('td');
for (iels=0; iels<els.length; iels++) {
rect=els[iels].getBoundingClientRect();
els[iels].setAttribute('data-width',eval(('' + rect.width).split('.')[0]) / 3);
}
dive=document.getElementById('divemail').innerHTML;
//document.getElementById('divagendaitem2_1').placeholder='Welcome and apologies';
document.getElementById('haidatetime').value = new Date().toDateInputValue();
document.getElementById('aidatetime').value = document.getElementById('haidatetime').value;
saveawayv=document.getElementById('aidatetime').value;
lastformih=lfi(false,document.getElementById('mytable').outerHTML); //lfi(false,document.getElementById('myform').innerHTML); //document.getElementById('mytable').outerHTML; //document.getElementById('myform').innerHTML;
document.getElementById('organization').focus();
}

function antiewoit() {
var itas=0;
var tas=document.getElementsByTagName('textarea');
for (itas=0; itas<tas.length; itas++) {
if (tas[itas].value.indexOf('<a ') == 0) {
tas[itas].value=tas[itas].title; //value.split('</a>')[0].split('>')[eval(-1 + tas[itas].value.split('</a>')[0].split('>').length)];
} else if (tas[itas].innerHTML.indexOf('<a ') == 0) {
tas[itas].innerHTML=tas[itas].title; //.innerHTML.split('</a>')[0].split('>')[eval(-1 + tas[itas].innerHTML.split('</a>')[0].split('>').length)];
} else if (tas[itas].innerHTML.indexOf('mailto:') != -1) {
tas[itas].value=tas[itas].title; //.innerHTML.split('</a>')[0].split('>')[eval(-1 + tas[itas].innerHTML.split('</a>')[0].split('>').length)];
} else if (tas[itas].value.indexOf('mailto:') != -1) {
tas[itas].value=tas[itas].title; //.innerHTML.split('</a>')[0].split('>')[eval(-1 + tas[itas].innerHTML.split('</a>')[0].split('>').length)];
} else if (tas[itas].innerHTML.indexOf('sms:') != -1) {
tas[itas].value=tas[itas].title; //.innerHTML.split('</a>')[0].split('>')[eval(-1 + tas[itas].innerHTML.split('</a>')[0].split('>').length)];
} else if (tas[itas].value.indexOf('sms:') != -1) {
tas[itas].value=tas[itas].title; //.innerHTML.split('</a>')[0].split('>')[eval(-1 + tas[itas].innerHTML.split('</a>')[0].split('>').length)];
}
}
tas=document.getElementsByTagName('div');
for (itas=0; itas<tas.length; itas++) {
if (tas[itas].innerHTML.indexOf('<a ') == 0) {
tas[itas].innerHTML=tas[itas].title; //.innerHTML.split('</a>')[0].split('>')[eval(-1 + tas[itas].innerHTML.split('</a>')[0].split('>').length)];
tas[itas].setAttribute('contenteditable', true);
} else if (tas[itas].innerHTML.indexOf('<a ') == 0) {
tas[itas].innerHTML=tas[itas].title; //.innerHTML.split('</a>')[0].split('>')[eval(-1 + tas[itas].innerHTML.split('</a>')[0].split('>').length)];
tas[itas].setAttribute('contenteditable', true);
}
}
lastformih=lfi(false,document.getElementById('mytable').outerHTML); //lfi(false,document.getElementById('myform').innerHTML); //document.getElementById('mytable').outerHTML; //document.getElementById('myform').innerHTML;
}

function ewoit(collaborate) {
var esuff='to',etos, preetos, ij, iij, etox='', etoy='', exw='', tdep='', tdes='';
var newth = 'Agenda Items for ' + document.getElementById('organization').innerHTML + ' Meeting on ' + saveawayv;
if (collaborate) {
newth=document.getElementById('agendatitle').innerHTML.replace(' value=""', ' value="' + saveawayv + '"').replace(/\<div\ onblur\=\"assess\(this\)\;\"\ contenteditable\=\"true\"\ /g, '<textarea' + cv_textarea_rows + ' ').replace(/\<div\ onblur\=\"assess\(this\)\;\"\ contenteditable\=\"false\"\ /g, '<textarea' + cv_textarea_rows + ' ').replace(/\<\/div\>/g, '</textarea>').replace(/\ data\-/g,' ').replace(/\<\/div\>/g, '</textarea>').replace(/\ data\-/g,' ').replace(/\<\/textarea\>\<div\>/g, '<br>').replace(/\<\/textarea\>\<\/textarea\>/g, '</textarea>').replace(/\>\<div\>/g, '>').replace(/\ \;/g, ' ').replace(/\<div\>/g,String.fromCharCode(10));
}
var eto='';
if (collaboration) {
eto=defprompt[thischoice];
} else {
eto=prompt('Who do I email it to? Enter their email address like rmetcalfe15@gmail.com or (of the form) Robert Metcalfe [rmetcalfe15@gmail.com] and comma separate for to(;list), cc(;list), bcc(;list)', defprompt[thischoice]);
}
if (eto == null) { eto=''; }
if (eto.indexOf('@') != -1) {
etox=',' + eto + ';';
etoy=';' + eto + ';';
preetos=eto.split(',');
for (iij=0; iij<preetos.length; iij++) {
exw=preetos[iij];
etos=preetos[iij].split(';');
for (ij=0; ij<etos.length; ij++) {
if (etos[ij].indexOf('[') != -1) {
if (('' + document.getElementById('td' + esuff).title) == '') {
document.getElementById('td' + esuff).title=etos[ij];
} else {
document.getElementById('td' + esuff).title+=',' + etos[ij];
}
if (ij == 0 && newth.indexOf('Attn:') == -1) { newth='Attn: ' + etos[ij].split('[')[0] + ' ... ' + newth; }
etos[ij]=etos[ij].split('[')[1].split(']')[0];
} else {
if (('' + document.getElementById('td' + esuff).title) == '') {
document.getElementById('td' + esuff).title=etos[ij];
} else {
document.getElementById('td' + esuff).title+=',' + etos[ij];
}
}
//}
if (document.getElementById('td' + esuff).value == '') {
document.getElementById('td' + esuff).value=etos[ij];
} else {
document.getElementById('td' + esuff).value+=',' + etos[ij];
}
if (esuff == 'to' && etox.indexOf('' + exw + ';') == -1 && etoy.indexOf('' + exw + ';') == -1) {
esuff='cc';
} else if (etox.indexOf('' + exw + ';') == -1 && etoy.indexOf('' + exw + ';') == -1) {
esuff='bcc';
}
}
}
var extras='';
if (document.getElementById('myopt')) {
if (document.getElementById('myopt').innerHTML.trim() != 'Optionally load previous agenda ...') {
extras=' - ' + document.getElementById('myopt').innerHTML + ' ';
}
}
if (collaborate) {
document.getElementById('tdsubj').value=(document.getElementById('agendatitle').innerText || document.getElementById('agendatitle').contentWindow || document.getElementById('agendatitle').contentDocument) + saveawayv + extras + ' - RJM Programming';
} else {
document.getElementById('tdsubj').value=newth + extras + ' - RJM Programming';
}
var prefix=lastformih.split('</th>')[0];
var suffix=lastformih.replace(prefix, '');
while (prefix.indexOf(String.fromCharCode(10)) != -1) {
prefix=prefix.replace(String.fromCharCode(10), '<br>');
}
while (suffix.indexOf(String.fromCharCode(10)) != -1) {
suffix=suffix.replace(String.fromCharCode(10), '<br>');
}
//alert(suffix);
if (collaborate) {
tdep='<h4 style="margin-top:20px;display:inline-block;">';
tdes=' <br> <span title="Can comma separate list below" style="margin:top:60px;vertical-align:bottom;">To:</span> ' + document.getElementById('tdto').outerHTML.replace('hidden', 'text').replace(/none\;/g,'block;width:400px;') + '<br> <span title="Can comma separate list below">CC:</span> ' + document.getElementById('tdcc').outerHTML.replace('hidden', 'text').replace(/none\;/g,'block;width:400px;') + '<br> <span title="Can comma separate list below">BCC:</span> ' + document.getElementById('tdbcc').outerHTML.replace('hidden', 'text').replace(/none\;/g,'block;width:400px;') + '</h4>';
if (collaboration) {
document.getElementById('tdhuhta').value=('<form action="' + document.URL.split('?')[0].split('#')[0] + '" method="GET">' + (prefix.split('Agenda ')[0] + newth.replace('Agenda Items ','<a target=_blank href=' + document.URL.split('#')[0].split('?')[0] + '>Agenda Items</a> ') + suffix + '<br> <br> Justification: <textarea title="Reason for changes and/or feedback, and ideally mention who you are." style="margin-top:20px;background-color:#f0f0f0;" name=justification id=justification cols=80 rows=5>' + decodeURIComponent(document.URL.split('&justification=')[1].split('&')[0]).replace(/\+/g,' ') + '</textarea> ' + tdep + '<input style="display:inline-block;vertical-align:top;background-color:pink;margin-top:20px;margin-bottom:20px;" type=submit value="Feedback and/or Changes"></input>' + tdes + '<input type=hidden name=emaillist value="|' + eto + '"></input></form>').replace(/\>\<br\>/g,'>')).replace(/\<div\ onblur\=\"assess\(this\)\;\"\ contenteditable\=\"true\"\ data\-/g, '<textarea' + cv_textarea_rows + ' ').replace(/\<div\ onblur\=\"assess\(this\)\;\"\ contenteditable\=\"false\"\ data\-/g, '<textarea' + cv_textarea_rows + ' ').replace(/\<\/div\>/g, '</textarea>').replace(/\ data\-/g,' ').replace(/\<br\>/g,String.fromCharCode(10)).replace(/1\ \ name\=\"divagendaitem/g, '5 style=width:96%;margin-left:2%; name="divagendaitem').replace(/\<\/textarea\>\<div\>/g, String.fromCharCode(10)).replace(/\<\/textarea\>\<\/textarea\>/g, '</textarea>').replace(/\>\<div\>/g, '>').replace(/\<div\>/g,String.fromCharCode(10));
} else {
document.getElementById('tdhuhta').value=('<form action="' + document.URL.split('?')[0].split('#')[0] + '" method="GET">' + (prefix.split('Agenda ')[0] + newth.replace('Agenda Items ','<a target=_blank href=' + document.URL.split('#')[0].split('?')[0] + '>Agenda Items</a> ') + suffix + '<br> <br> Justification: <textarea title="Reason for changes and/or feedback, and ideally mention who you are." style="margin-top:20px;background-color:#f0f0f0;" name=justification id=justification cols=80 rows=5></textarea> ' + tdep + '<input style="display:inline-block;vertical-align:top;background-color:pink;margin-top:20px;margin-bottom:20px;" type=submit value="Feedback and/or Changes"></input>' + tdes + '<input type=hidden name=emaillist value="|' + eto + '"></input></form>').replace(/\>\<br\>/g,'>')).replace(/\<div\ onblur\=\"assess\(this\)\;\"\ contenteditable\=\"true\"\ data\-/g, '<textarea' + cv_textarea_rows + ' ').replace(/\<div\ onblur\=\"assess\(this\)\;\"\ contenteditable\=\"false\"\ data\-/g, '<textarea' + cv_textarea_rows + ' ').replace(/\<\/div\>/g, '</textarea>').replace(/\ data\-/g,' ').replace(/\<br\>/g,String.fromCharCode(10)).replace(/1\ \ name\=\"divagendaitem/g, '5 style=width:96%;margin-left:2%; name="divagendaitem').replace(/\<\/textarea\>\<div\>/g, String.fromCharCode(10)).replace(/\<\/textarea\>\<\/textarea\>/g, '</textarea>').replace(/\>\<div\>/g, '>').replace(/\<div\>/g,String.fromCharCode(10));
}
} else {
document.getElementById('tdhuhta').value=(prefix.split('Agenda ')[0] + newth.replace('Agenda Items ','<a target=_blank href=' + document.URL.split('#')[0].split('?')[0] + '>Agenda Items</a> ') + suffix).replace(/\>\<br\>/g,'>');
}
document.getElementById('fsubm').click();
var thisls='?', idh, ais=aisuff;
var dh=document.getElementById('hidden').innerHTML;
var dhns=dh.split(' name="');
var dhvs=dh.split(' value="');
for (idh=1; idh<dhns.length; idh++) {
if (idh == 1) {
thisls+=dhns[idh].split('"')[0] + '=';
thisls+=encodeURIComponent(dhvs[idh].split('"')[0]);
if (ais != '') {
thisls+='&aisuff=';
thisls+=encodeURIComponent(' - ' + ais);
ais='';
}
} else {
thisls+='&' + dhns[idh].split('"')[0] + '=';
thisls+=encodeURIComponent(dhvs[idh].split('"')[0]);
}
}
if (thisls != '') {
thisls+='|' + encodeURIComponent(eto);
var addthis=true;
for (idh=0; idh<defbits.length; idh++) {
if (defbits[idh] == thisls) { addthis=false; }
}
if (addthis) {
if (dval != '') {
//localStorage.removeItem('ai_items');
//localStorage.setItem('ai_items', thisls);
localStorage.setItem('ai_items', dval + '#' + thisls);
} else {
localStorage.setItem('ai_items', thisls);
}
}
}
setTimeout(antidive, 2000);
}
lastformih=lfi(true,document.getElementById('mytable').outerHTML); //lfi(true,document.getElementById('myform').innerHTML); //document.getElementById('mytable').outerHTML; //document.getElementById('myform').innerHTML;
}

function pdfit() {
var prefix=lastformih.split('</th>')[0];
var suffix=lastformih.replace(prefix, '');
while (prefix.indexOf(String.fromCharCode(10)) != -1) {
prefix=prefix.replace(String.fromCharCode(10), '<br>');
}
while (suffix.indexOf(String.fromCharCode(10)) != -1) {
suffix=suffix.replace(String.fromCharCode(10), '<br>');
}
var newth = 'Agenda Items for ' + document.getElementById('organization').innerHTML + ' Meeting on ' + saveawayv;
var dgfi=(prefix.split('Agenda ')[0] + newth.replace('Agenda Items ','<a target=_blank href=' + document.URL.split('#')[0].split('?')[0] + '>Agenda Items</a> ') + suffix.replace(/\ data\-width\=/g,' width=')).replace(/\>\<br\>/g,'>');
var divsare=document.getElementsByTagName('div');
var rwith='';
for (var idivsare=0; idivsare<divsare.length; idivsare++) {
if (('' + divsare[idivsare].id).indexOf('div') == 0) {
rwith=divsare[idivsare].outerHTML.substring(0, eval(-6 + divsare[idivsare].outerHTML.length)).replace(divsare[idivsare].outerHTML.split('>')[0] + '>', '');
if (divsare[idivsare].outerHTML.indexOf('mailto:') == -1 && divsare[idivsare].outerHTML.indexOf('sms:') == -1) {
if (rwith == '') {
//alert(rwith + '.++ ' + divsare[idivsare].outerHTML);
dgfi=dgfi.replace(divsare[idivsare].outerHTML, rwith);
} else {
if (dgfi.indexOf(rwith) == -1) {
if (dgfi.indexOf(divsare[idivsare].outerHTML.replace(rwith,'')) != -1) {
//alert(rwith + '.+. ' + divsare[idivsare].outerHTML.replace(rwith,''));
dgfi=dgfi.replace(divsare[idivsare].outerHTML.replace(rwith,''), rwith);
} else {
if (1 == 7) { alert('oops ... ' + rwith + '... ' + divsare[idivsare].outerHTML + ' ... ' + dgfi); }
}
} else {
//alert(rwith + '... ' + divsare[idivsare].outerHTML);
dgfi=dgfi.replace(divsare[idivsare].outerHTML, rwith);
}
}
}
}
}
document.getElementById('formtable').innerHTML=dgfi;
document.getElementById('bsubmit').click();
}

function woit() {
var prefix=lastformih.split('</th>')[0];
var suffix=lastformih.replace(prefix, '');
while (prefix.indexOf(String.fromCharCode(10)) != -1) {
prefix=prefix.replace(String.fromCharCode(10), '<br>');
}
while (suffix.indexOf(String.fromCharCode(10)) != -1) {
suffix=suffix.replace(String.fromCharCode(10), '<br>');
}
var newth = 'Agenda Items for ' + document.getElementById('organization').innerHTML + ' Meeting on ' + saveawayv;
var wo=window.open('','_blank','top=50,left=50,width=800,height=800');
wo.document.write(prefix.split('Agenda ')[0] + newth + suffix); //(document.getElementById('myform').innerHTML);
}

function checka(dob) {
if (document.getElementById('a' + dob.id)) {
if (lastchecka != document.getElementById('a' + dob.id).href) {
document.getElementById('a' + dob.id).click();
lastchecka=document.getElementById('a' + dob.id).href;
}
}
}

</script>
</head>
<body onload="trsave();">
<h1>Meeting Agenda Items</h1>
<h3 id=myh3>RJM Programming - December, 2019</h3>
<h4><input style='display:inline-block;width:20%;' type=datetime id=haidatetime value='' readonly></input></h4>
<form id=myform target=_blank action=./agenda_items.html method=GET>
<table border="10" style="width:90%;margin-left:5%;" id="mytable">
<tbody id=mytbody>
<tr><th colspan=3 id=agendatitle>Agenda Items for <div onblur=assess(this); contenteditable=true data-name=organization id=organization style='display:inline-block;border:1px solid red;' title='Organization Name could go here'> </div> Meeting on <input onblur=saveaway(this); style='display:inline-block;width:30%;' type=datetime id=aidatetime name=aidatetime value=''></input></th></tr>
<tr><td style='width:10%;text-align:right;'>#</td><td bgcolor='#ffff00;'>Description</td><td style='width:20%;' title="Can enter their email address like rmetcalfe15@gmail.com or (of the form) Robert Metcalfe [rmetcalfe15@gmail.com] or all uppercase for SMS like RMETCALFE@RJMPROGRAMMING.COM.AU or (of the form) ROBERT METCALFE [RMETCALFE@RJMPROGRAMMING.COM.AU] or (of the form) ROBERT METCALFE [7777777777] or (of the form) ROBERT@RJMPROGRAMMING.COM.AU [7777777777] (the latter two texting the number 7777777777 if previous Emailing of the HTTP Cookies matches the criteria before the [) that will try to be matched with any previous Email web browser saves of that knowledge, to try to create links for you below.">Moderator</td></tr>
<tr id=agendaitem_1><td id=agendaitem1_1 style='text-align:right;'>1)</td><td id=agendaitem2_1 style='text-align:left;' bgcolor='#ffff00;'><div onblur=assess(this); contenteditable=true data-name=divagendaitem2_1 id=divagendaitem2_1></div></td><td id=agendaitem3_1 style='text-align:left;'><div onblur=assess(this); contenteditable=true data-name=divagendaitem3_1 id=divagendaitem3_1 onfocus=checka(this);></div></td></tr>
</tbody>
</table>
<br><input onclick="woit();" style='background-color:yellow;margin-left:5%;' type=button name=print id=print value=Print></input> <input onclick="ewoit(false);" style='background-color:orange;' type=button name=email id=email value=Email></input> <input onclick="antiewoit(); ewoit(true);" style='background-color:olive;' type=button name=collaboration id=collaboration value=Collaboration></input> <input onclick="pdfit();" style='background-color:pink;' type=button name=pdf id=pdf value=PDF></input>
<div id=hidden>
</div>
</form>
<div id=divemail>
<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="Agenda Items - 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>
</div>
<iframe style=display:none; name=iemail id=iemail src=></iframe>
<form target='_blank' method=POST action=../PHP/form_creator.php><textarea style="background-color:pink;width:90%;display:none;" name=formtable id=formtable rows=20></textarea><input id=bsubmit style="background-color:yellow;display:none;" value="HTML Above to PDF" type=submit></input><input id=bbsubmit style="background-color:orange;display:none;" value="HTML Above to PDF and Canvas" name=both type=submit></input></form>
<input type=text style='position:absolute;left:-200px;top:-200px;' value=''></input>
<span id=dmt style='display:none;'></span>
</body>
</html>