<html>
<head>
<title>Events in Month - RJM Programming - August, 2023</title>
<style>
.dayb {
color: white;
background-color: red;
padding: 5 5 5 5;
}

.dow {
color: purple;
font-style: bold;
}

.selday {
margin-left: 8px;
background-color: rgba(255,0,0,0.7);
display: inline-block;
width: 50px;
}
</style>
<script type=text/javascript>
var documentURL=document.URL;
documentURL=documentURL.replace('.php', '.htm');
var locationsearch=('?' + documentURL.replace(documentURL.split('?')[0].split('#')[0], '')).replace(/^\?$/g, '');

var boh='', hih='';
var ehtm='events_' + documentURL.split('events_')[1].split('?')[0].split('#')[0];
var phpthere='', lastbut=null;

var nts=1970, wo=null;
var presm=locationsearch.split('caltitle=')[1] ? eval(decodeURIComponent(locationsearch.split('caltitle=')[1].split('&')[0]).split(',')[0].replace('January','1').replace('February','2').replace('March','3').replace('April','4').replace('May','5').replace('June','6').replace('July','7').replace('August','8').replace('September','9').replace('October','10').replace('November','11').replace('December','12')) : -1;
var presy=locationsearch.split('caltitle=')[1] ? eval(decodeURIComponent(locationsearch.split('caltitle=')[1].split('&')[0]).split(',')[1].trim()) : -1970;
var tazo=locationsearch.split('ta01.00=')[1] ? (decodeURIComponent(locationsearch.split('ta01.00=')[1].split('&')[0])) : ' ';
var sm=locationsearch.split('smonth=')[1] ? eval(decodeURIComponent(locationsearch.split('smonth=')[1].split('&')[0])) : Math.abs(presm);
var sy=locationsearch.split('syear=')[1] ? eval(decodeURIComponent(locationsearch.split('syear=')[1].split('&')[0])) : Math.abs(presy);
var im=0;
var adate=null;
var dotw=['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'];
var dinm=[31,29,31,30,31,30,31,31,30,31,30,31];
var trtemplate='';
var iijj=1;
var initialdb='MON';
var remellist=[];
var forceit=false;
var wassel=-1;

function fixitzero(iniis, imin, imax) {
var minustwo=-2;
var premin='0';
if (('' + imin).length == 4) {
minustwo=-4;
premin='';
}
if (iniis.value.length == 1) {
if ((premin + iniis.value) >= (premin + imin).slice(minustwo) && (premin + iniis.value) <= (premin + imax).slice(minustwo)) {
iniis.value=premin + iniis.value;
} else {
iniis.value=(premin + imin).slice(-4);
}
} else if (iniis.value.length == eval(0 - eval('' + minustwo))) {
if (('' + iniis.value) >= (premin + imin).slice(minustwo) && ('' + iniis.value) <= (premin + imax).slice(minustwo)) {
iniis.value='' + iniis.value;
} else {
iniis.value=(premin + imin).slice(-4);
}
} else {
iniis.value=(premin + imin).slice(-4);
}
}

function sepit(ospel) {
var sptbls=('' + ospel.id).replace('sp','');
document.getElementById('i' + sptbls).value='' + ospel.innerHTML;
}

function selit(osel) {
var newtr='', lfor='sel', xinc=0.01, startnum=0.00, zero='0', tbls='', bt='';
var stbls=('' + osel.id).replace('sel','');
tbls=('' + osel.id).replace('sel','').split('.')[0];
if (osel.value == 'Bold') {
bt=prompt('Please optionally enter ' + document.getElementsByTagName('h2')[0].innerHTML.split('&')[0].replace('Events in ', 'Event on ' + document.getElementById('sone' + stbls).innerHTML.replace('SUN', 'Sunday').replace('MON', 'Monday').replace('TUE', 'Tuesday').replace('WED', 'Wednesday').replace('THU', 'Thursday').replace('FRI', 'Friday').replace('SAT', 'Saturday') + ', ' + tbls + ' ') + ' title (shown in bold text).', '');
if (bt == null) { bt=''; }
if (bt.trim() != '') {
document.getElementById('bd' + stbls).innerHTML='<input title="Event title" style=font-style:bold; type=hidden id=' + document.getElementById('bd' + stbls).id.replace('bd','bold') + ' name=' + document.getElementById('bd' + stbls).id.replace('bd','bold') + ' value="' + bt + '"></input>' + bt + '<br>';
}
osel.value='';
} else if (osel.value == 'Clone') {
startnum=('' + osel.id).replace('sel','');
if (('' + osel.id).replace('sel','').substring(0,1) == '0') { zero='0'; startnum=startnum.substring(1); }
startnum=startnum.replace('.00', '.01');
while (document.getElementById('sel' + zero + eval('' + startnum))) {
startnum='' + eval(xinc + eval('' + startnum)).toPrecision(2);
while (startnum.split('.')[1].length < 2) {
startnum+='0';
}
}
newtr=trtemplate.replace(/\.00/g, '.' + startnum.split('.')[1]).replace(/01\./g, tbls + '.');
document.getElementById('tbl' + tbls).innerHTML+=newtr.replace(initialdb, osel.getAttribute('data-dow')).replace(initialdb, osel.getAttribute('data-dow')).replace('>1<', '>' + tbls.replace(/^0/g,'') + '<');
osel.value='';
} else if (osel.value == '') {
document.getElementById('sp' + stbls).innerHTML='';
document.getElementById('i' + stbls).value='';
} else if (osel.value == '...') {
document.getElementById('sp' + stbls).innerHTML='...';
document.getElementById('i' + stbls).value='...';
osel.style.visibility='hidden';
} else if (osel.value == '&...') {
document.getElementById('sp' + stbls).innerHTML='& ';
document.getElementById('i' + stbls).value='&';
osel.style.visibility='hidden';
}
}


function sinit() {
var dec='', ourdata='';
//alert('sinit');
boh=document.body.outerHTML;
hih=document.head.innerHTML;
if (document.getElementById('myform')) { document.getElementById('myform').action='./' + ehtm; }
if (sm != 0) { document.getElementById('smonth').value=('0' + sm).slice(-2); }
if (sy != 1970) { if (sy < 100) { sy+=2000; } document.getElementById('syear').value=(' ' + sy).slice(-4); }
if (documentURL.indexOf('?') != -1) {
if (documentURL.indexOf('?caltitle=') != -1) { ourdata='data-'; }
adate=new Date(sy, eval(-1 + sm), 1, 0, 0, 0, 0);
//alert('' + dotw[adate.getDay()]);
var idow=adate.getDay();
var jdow=idow;
initialdb=dotw[idow].toUpperCase().substring(0,3);
trtemplate='<tr id=tr01.00><td style=width:30%;><span id=sone01.00 class=dow>' + dotw[adate.getDay()].toUpperCase().substring(0,3) + '</span><br><br><span id=stwo01.00 class=dayb>1<span onblur=sepit(this); contenteditable=true id=sp01.00></span><input style=display:inline-block; type=hidden id=i01.00 name=i01.00 value=""></input><select data-dow=' + dotw[adate.getDay()].toUpperCase().substring(0,3) + ' class=selday onchange="selit(this);" id=sel01.00><option id=opt01.00 value=""></option><option title="All such in month (ie. weekly)" value="...">...</option><option title="And ..." value="&...">&</option><option value=Bold>Title</option><option value=Clone>Clone</option></select></span></td><td class=blurb title="What is on?" id=tb01.00><span title="Event title" style="font-style:bold;color:blue;" id=bd01.00></span><textarea name=ta01.00 id=ta01.00 style="width:100%;height=100%;" ' + ourdata + 'placeholder="Blurb ..." class=tablurb></textarea></td></tr>';
if (sm == 2 && eval(sy % 4) != 0) { dinm[1]=28; }
dec='<h2>Events in ' + document.getElementById('smonth').innerHTML.split('"' + ('0' + sm).slice(-2) + '">')[1].split('<')[0] + ', ' + document.getElementById('syear').value + '&nbsp;<input id=remember onclick="lastbut=this;" type=submit value=Remember style=background-color:lightgreen;></input><br><input type=hidden id=caltitle name=caltitle value="' + document.getElementById('smonth').innerHTML.split('"' + ('0' + sm).slice(-2) + '">')[1].split('<')[0] + ', ' + document.getElementById('syear').value + '"></input><table cellpadding=20 cellspacing=20 id=t' + sy + ('0' + sm).slice(-2) + '><table style=width:98%; border=5 data-next="01" id=tbl01>' + trtemplate + '</table></table>';
for (iijj=2; iijj<=dinm[eval(-1 + sm)]; iijj++) {
jdow++;
if (jdow >= 7) { jdow=0; }
if (dotw[jdow].toUpperCase().substring(0,3) == 'SUN') { dec+='<table><tr><td><hr></td><td><hr></td></tr></table>'; }
dec+='<table style=width:98%; border=5 id=tbl' + ('0' + iijj).slice(-2) + '>' + trtemplate.replace(/01\.00/g, ('0' + iijj).slice(-2) + '.00').replace(/\>1\</g, '>' + ('' + iijj) + '<').replace(dotw[idow].toUpperCase().substring(0,3), dotw[jdow].toUpperCase().substring(0,3)).replace(dotw[idow].toUpperCase().substring(0,3), dotw[jdow].toUpperCase().substring(0,3)) + '</table></table>';
}
if (tazo != ' ' && 2 == 2) {
document.title='Events in Month ' + (locationsearch.split('caltitle=')[1] ? (decodeURIComponent(locationsearch.split('caltitle=')[1].split('&')[0]).trim()).replace(/\+/g,' ') : '');
document.getElementById('eventcalendar').innerHTML='<form onsubmit="return fanalyze(this);" action=./' + ehtm + ' method=GET><div id=dmore></div>' + dec + '<br><br><input id=remembermoi onclick="lastbut=this;" type=submit value=Remember style=background-color:lightgreen;></input></form><br><br><br><hr><br><br>';
var findeq='.01', aone=1, jk=1, lastchange='';
var thingos=documentURL.split(findeq + '=');
var args=documentURL.split('&');
var thislabel='', thisval='';
while (thingos.length > 1) {
for (jk=1; jk<thingos.length; jk++) {
if (lastchange != 'sel' + thingos[eval(-1 + jk)].slice(-2) + '.00') {
document.getElementById('sel' + thingos[eval(-1 + jk)].slice(-2) + '.00').value='Clone';
selit(document.getElementById('sel' + thingos[eval(-1 + jk)].slice(-2) + '.00'));
lastchange='sel' + thingos[eval(-1 + jk)].slice(-2) + '.00';
}
}
aone++;
findeq='.' + ('0' + aone).slice(-2);
thingos=documentURL.split(findeq + '=');
}
for (jk=1; jk<args.length; jk++) {
thislabel=args[jk].split('=')[0];
thisval=decodeURIComponent(args[jk].split('=')[1]).replace(/\ \;/g,' ').replace(/\&\;/g,'&');
if (thislabel.substring(0,4) == 'bold') {
document.getElementById(thislabel.replace('bold', 'bd')).innerHTML='<input title="Event title" style=font-style:bold; type=hidden id=' + thislabel + ' name=' + thislabel + ' value="' + thisval.replace(/\+/g, ' ').replace(/\ \ \ /g, ' + ') + '"></input>' + thisval.replace(/\+/g, ' ').replace(/\ \ \ /g, ' + ') + '<br>';
} else if (thislabel.substring(0,1) == 'i') {
if (thisval.trim() != '') {
document.getElementById(thislabel.replace('i', 'sel')).style.color='white';
document.getElementById(thislabel.replace('i', 'sel')).style.backgroundColor='red';
}
document.getElementById(thislabel.replace('i', 'opt')).innerText=thisval.replace(/\+/g, ' ').replace(/\ \ \ /g, ' + '); //.replace(/\+$/g, ' ');
document.getElementById(thislabel).value=thisval.replace(/\+$/g, ' ');
} else {
document.getElementById(thislabel).value=thisval.replace(/\+/g, ' ').replace(/\ \ \ /g, ' + ');
}
}
}
}
if (dec != '' && tazo == ' ') {
document.getElementById('eventcalendar').innerHTML='<form onsubmit="return fanalyze(this);" action=./' + ehtm + ' method=GET><div id=dmore></div>' + dec + '<br><br><input id=rememberme onclick="lastbut=this;" type=submit value=Remember style=background-color:lightgreen;></input></form><br><br><br><hr><br><br>';
}
setTimeout(formanalyze, 3000);
}

function formanalyze() {
var fio=document.getElementsByTagName('form')[0];
var delm='?';
var fioih=fio.innerHTML;
var fions=fioih.split(' name="');
var testurl=documentURL.split('?')[0].split('#')[0];
for (var ijk=1; ijk<fions.length; ijk++) {
testurl+=delm + fions[ijk].split('"')[0] + '=' + encodeURIComponent(document.getElementById(fions[ijk].split('"')[0]).value);
delm='&';
}
setTimeout(formanalyze, 3000);
if (eval('' + testurl.length) >= 750) {
if (maybe(document.getElementById('remember'))) { document.getElementById('remember').value='New window'; }
if (maybe(document.getElementById('rememberme'))) { document.getElementById('rememberme').value='New window'; }
if (maybe(document.getElementById('remembermoi'))) { document.getElementById('remembermoi').value='New window'; }
} else {
if (document.getElementById('remember')) { document.getElementById('remember').value=document.getElementById('remember').value.replace(/^Remember$/g, 'Remember via Bookmark'); }
if (document.getElementById('rememberme')) { document.getElementById('rememberme').value=document.getElementById('rememberme').value.replace(/^Remember$/g, 'Remember via Bookmark'); }
if (document.getElementById('remembermoi')) { document.getElementById('remembermoi').value=document.getElementById('remembermoi').value.replace(/^Remember$/g, 'Remember via Bookmark'); }
}
return eval('' + testurl.length);
}

function maybe(remel) {
if (remel) {
if (remel.value.indexOf('Remember') == 0) {
if (remellist.length == 0) {
if (phpthere != '') { setInterval(togglewords, 5000); }
}
remellist.push(remel.id);
return true;
} else {
return false;
}
}
return false;
}

function togglewords() {
for (var iv=0; iv<remellist.length; iv++) {
if (document.getElementById(remellist[iv])) {
if (document.getElementById(remellist[iv]).value == 'New Window') {
document.getElementById(remellist[iv]).value = 'Record to Remember';
} else {
document.getElementById(remellist[iv]).value = 'New Window';
}
}
}
}

function fanalyze(fio) {
if (forceit) { forceit=false; return true; }
var delm='?';
var fioih=fio.innerHTML;
var fions=fioih.split(' name="');
var testurl=documentURL.split('?')[0].split('#')[0];
//alert(fions.length);
for (var ijk=1; ijk<fions.length; ijk++) {
testurl+=delm + fions[ijk].split('"')[0] + '=' + encodeURIComponent(document.getElementById(fions[ijk].split('"')[0]).value);
delm='&';
}
//alert(testurl.length);
if (eval('' + testurl.length) < 750) { return true; }
if (lastbut.value.indexOf('New') == 0) {
wo=window.open('', '_blank', 'top=50,left=50,height=600,width=600');
wo.document.write('<html><head>' + hih.replace("=docum" + "ent.URL", "='" + testurl + "'") + boh + '</html>');
} else if (phpthere != '') {
if (1 == 1) {
postit(fio, false, testurl);
} else {
fio.target='phpif';
fio.method='POST';
fio.action='./events_in_month.php';
if (!document.getElementById('dmore')) {
document.getElementById('ddmore').innerHTML='<input type=hidden id=caltitle name=caltitle value="' + document.getElementById('myoldsel').options[document.getElementById('myoldsel').selectedIndex].innerText + '"></input><input type=hidden id=phpthere name=phpthere value="' + phpthere + '"></input><input type=hidden id=bigurl name=bigurl value="' + testurl + '"></input>';
} else {
document.getElementById('dmore').innerHTML='<input type=hidden id=phpthere name=phpthere value="' + phpthere + '"></input><input type=hidden id=bigurl name=bigurl value="' + testurl + '"></input>';
}
}
return true;
}
return false;
}

function postit(pfio, clickit, ptesturl) {
//alert(phpthere + ' ' + ptesturl);
if (phpthere != '') {
pfio.target='phpif';
pfio.method='POST';
pfio.action='./events_in_month.php?';
if (!document.getElementById('dmore')) {
document.getElementById('ddmore').innerHTML='<input type=hidden id=caltitle name=caltitle value="' + document.getElementById('myoldsel').options[document.getElementById('myoldsel').selectedIndex].innerText + '"></input><input type=hidden id=phpthere name=phpthere value="' + phpthere + '"></input><input type=hidden id=bigurl name=bigurl value="' + ptesturl + '"></input>';
} else {
document.getElementById('dmore').innerHTML='<input type=hidden id=phpthere name=phpthere value="' + phpthere + '"></input><input type=hidden id=bigurl name=bigurl value="' + ptesturl + '"></input>';
}
if (clickit) {
if (!lastbut) {
forceit=true;
pfio.submit();
} else {
alert(1564);
forceit=true;
lastbut.click();
lastbut=null;
}
wassel=document.getElementById('myoldsel').innerHTML.split('</option>').length;
setTimeout(newcheckif, 3000);
}
}
}

function newcheckif() {
if (document.getElementById('myoldsel').innerHTML.split('</option>').length != wassel) {
wo=window.open('', '_blank', 'top=50,left=50,height=600,width=600');
wo.document.write('<html><head>' + hih.replace("=docum" + "ent.URL", "='" + document.getElementById('myoldsel').innerHTML.split(' value="')[eval(-1 + document.getElementById('myoldsel').innerHTML.split(' value="').length)].split('"')[0].replace(/\ \;/g,' ').replace(/\&\;/g,'&') + "'") + boh + '</html>');
}
}

function checkif(iois) {
var aconto = null;
if (iois.src.indexOf('?init=') != -1) {
aconto = (iois.contentWindow || iois.contentDocument);
if (aconto != null) {
if (aconto.document) { aconto = aconto.document; }
if (aconto.body != null) {
phpthere=aconto.body.innerText.replace(/\ \;/g,' ').replace(/\&\;/g,'&');
}
iois.src=iois.src.split('?')[0];
}
} else if (iois.src.indexOf('?') != -1) {
aconto = (iois.contentWindow || iois.contentDocument);
if (aconto != null) {
document.getElementById('dmore').innerHTML='';
documentURL=aconto.body.innerText.replace(/\ \;/g,' ').replace(/\&\;/g,'&');
locationsearch=('?' + documentURL.replace(documentURL.split('?')[0].split('#')[0], '')).replace(/^\?$/g, '');
if (1 == 1) {
wo=window.open('', '_blank', 'top=50,left=50,height=600,width=600');
wo.document.write('<html><head>' + hih.replace("=docum" + "ent.URL", "='" + documentURL.replace(/\ \;/g,' ').replace(/\&\;/g,'&') + "'") + boh + '</html>');
} else {
setTimeout(sinit, 2000);
}
}
}
}

setTimeout(sinit, 2000);

</script>
</head>
<body data-onload=sinit();>
<h1>Events in Month <div style=display:inline-block; id=oldones><select onchange="if (this.value != '') { lastbut=null; postit(document.getElementsByTagName('form')[0], true, this.value); }" id=myoldsel style=display:none;><option value=''>Recorded ones ...</option></select></div></h1>
<h3>RJM Programming - August, 2023</h3>
<div style="text-shadow:-1px 1px 1px #ff2d95;" id=eventcalendar></div>

<form id=myform action=./events_in_month.html method=GET><div id=ddmore></div>
<select style=display:inline-block; id="smonth" name="smonth" title="Month"><option value="01">January</option><option value="02">February</option><option value="03">March</option><option value="04">April</option><option value="05">May</option><option value="06">June</option><option value="07">July</option><option value="08">August</option><option value="09">September</option><option value="10">October</option><option value="11">November</option><option value="12">December</option></select>/<input style=display:inline-block;min-width:55px; onblur=fixitzero(this,this.value,nts); onchange=fixitzero(this,this.value,nts); step=1 min=1970 type="number" id="syear" name="syear" value="1970" title="Year"></input>
<input id=rememberyou onclick="lastbut=this;" type=submit id=mysub value="Ready to Fill in Events ..." style='background-color:yellow;'></input>
</form>
<iframe id=phpif name=phpif src='./events_in_month.php?init=y' style=display:none; onload=checkif(this);></iframe>
</body>
</html>