<html>
<head>
<title>Haiku Animated GIF Creator - RJM Programming - June, 2020</title>
<meta name="viewport" content="width=device-width, initial-scale=0.8, minimum-scale=0.1, maximum-scale=8, user-scalable=yes" >
<style>

.hrcolbelow:andbelow { background-color: rgba(255,255,0,0.5); }

</style>
<script type='text/javascript'>
var xposdesc=["left top","center bottom","right center","center top","left center","center center","right top","left bottom"]; //,"right bottom"];
var lastaurl='', thisaurl='', lastvurl='', thisvurl='', lastiurl='', thisiurl='';
var lastword=location.search.split('topic=')[1] ? decodeURIComponent(location.search.split('topic=')[1].split('&')[0]) : 'Haiku';
var altsubject='';
var lastdivts='';
var thisdivts='';
var mampok=false;
var mampprefix='';
var attachment='';
var okctab=true;
var wois=null;
var valid=false;
var biurl='', xbiurl='', lastbiurl='';
var inbivalue='';
var ftop='40', fleft='40', ftopp='%', fleftp='%', fangle='0';
var prefix='?stitle=' + encodeURIComponent('My ' + lastword) + '&fsize=24px&fleft=' + fleft + encodeURIComponent(fleftp) + '&ftop=' + ftop + encodeURIComponent(ftopp) + '&fangle=' + fangle + '&fontname=Arial&delay=400';
var prevfontname='Arial';
var prevsize='24px';
var fromsub='&delay=';
var tosub='&delay=';
var prevburl='./white.jpg';
var prevaurl='', ainbivalue='';
var prevvurl='', vinbivalue='';
var types = ["audio/wav","audio/x-wav","audio/x-pn-realaudio","audio/x-mpegurl","audio/x-aiff","audio/mpeg","audio/mid",
"audio/basic","audio/ogg","video/x-sgi-movie","video/x-msvideo","video/quicktime","audio/mp3","video/mp4","video/mpeg",
"video/x-la-asf","video/ogg","video/webm","audio/mp4", "image/jpeg", "image/jpeg", "image/png", "image/gif", "image/bmp", "image/tif"];
var exts = [".wav",".wav",".ram",".m3u",".aiff",".mp3",".rmi",
".snd",".ogg",".movie",".avi",".mov",".mp3",".m4v",".mpeg",
".lsx",".ogv",".webm",".m4a", ".jpg", ".jpeg", ".png", ".gif", ".bmp", ".tif"];
var ourmime="";
var zhr=null, zform=null;
var autitle='', vutitle='';

function postagc(invx) {
var ggourslide=0, hashbitsare=[];
var biurlsare; //=document.getElementById('vurl').title.split(',');
if ((document.getElementById('aurl').value + document.getElementById('vurl').value).indexOf('data:') == 0) {
invx+='&iurl=';
}
var sofarform='<form style=display:none; target=argc method=POST action=';
//var sofarformx='<form style=display:none; target=argc method=POST action=';
if (vutitle != '') { document.getElementById('vurl').title=vutitle; vutitle=''; }
if (autitle != '') { document.getElementById('aurl').title=autitle; autitle=''; }
if ((document.getElementById('vurl').title + document.getElementById('aurl').title).substring(0,1) == '|') {
biurlsare=(document.getElementById('vurl').title + document.getElementById('aurl').title).substring(1).split('|');
} else {
biurlsare=(document.getElementById('vurl').title + document.getElementById('aurl').title).split('|');
}
//if (eval('' + biurlsare.length) > 1) {
// if (document.getElementById('vurl').title.indexOf(document.getElementById('vurl').placeholder) != -1) {
// document.getElementById('vurl').title=document.getElementById('vurl').title.replace(document.getElementById('vurl').placeholder,document.getElementById('burl').value);
// biurlsare=(document.getElementById('vurl').title + document.getElementById('aurl').title).substring(1).split('|');
// }
//}
var secondinvx=invx.split('?')[0] + '?';
var seconddelim='';
if (eval('' + invx.length) > 800 || eval('' + biurlsare.length) > 1) {
var actions=invx.split('?');
if (actions.length >= 2) {
//alert(invx.split('&slideshow2=')[0].slice(-30) + '&slideshow2=' + invx.split('&slideshow2=')[1].substring(0,30));
sofarform+=actions[0] + '><input type=submit id=igo value=Go style=display:none;></input></form>';
//sofarformx+=actions[0] + '><input type=submit id=igo value=Go style=display:none;></input></form>';
var argsare=actions[1].split('&');
for (var iargsare=0; iargsare<argsare.length; iargsare++) {
if (argsare[iargsare].split('=')[0].indexOf('slideshow') == 0 && biurlsare[0] != '' && eval('' + ggourslide) < eval('' + biurlsare.length)) {
//alert(argsare[iargsare].split('=')[1].slice(-30) + ' ... ' + ggourslide + ' ... ' + biurlsare[ggourslide]);
hashbitsare=argsare[iargsare].split('=')[1].split('%23');
secondinvx+=seconddelim + argsare[iargsare].split('=')[0] + '=';
if (hashbitsare.length > 1) {
secondinvx+=biurlsare[ggourslide] + '%23' + hashbitsare[1];
sofarform=sofarform.replace('><input ', '> <input style=display:none; name=' + argsare[iargsare].split('=')[0] + ' value="' + decodeURIComponent(biurlsare[ggourslide] + '%23' + hashbitsare[1]) + '"></input><input ');
} else {
secondinvx+=biurlsare[ggourslide];
sofarform=sofarform.replace('><input ', '> <input style=display:none; name=' + argsare[iargsare].split('=')[0] + ' value="' + decodeURIComponent(biurlsare[ggourslide]) + '"></input><input ');
}
ggourslide++;
} else {
secondinvx+=argsare[iargsare].split('=')[1];
sofarform=sofarform.replace('><input ', '> <input style=display:none; name=' + argsare[iargsare].split('=')[0] + ' value="' + decodeURIComponent(argsare[iargsare].split('=')[1]) + '"></input><input ');
//sofarformx=sofarformx.replace('><input ', '> <input style=display:none; name=' + argsare[iargsare].split('=')[0] + ' value="' + '"></input><input ');
}
seconddelim='&';
}
if (eval('' + secondinvx.length) <= 800 && 1 == 7) {
//alert(secondinvx);
return secondinvx.replace('?&','?');
} else {
document.getElementById('dform').innerHTML=sofarform;
//alert(sofarformx); //document.getElementById('dform').innerHTML);
document.getElementById('igo').click();
//alert('yes ' + eval('' + biurlsare.length) + ' ' + eval('' + invx.length) + ' ' + secondinvx.length + ' ' + document.getElementById('vurl').title.length + ' ' + document.getElementById('vurl').title.substring(0,450));
return '#';
}
}
} //else {
//alert('?' + invx);
//}
return invx;
}

function vaprefix(insr) {
if (1 == 2) {
if (document.getElementById('aurl').value != '' && document.getElementById('vurl').value.trim() != '') {
if (1 == 1 || eval('' + (document.getElementById('aurl').value + document.getElementById('vurl').value).length) < 200) {
return insr.replace('?', '?xfaudio=' + encodeURIComponent(document.getElementById('aurl').value) + '&xfvideo=' + encodeURIComponent(document.getElementById('vurl').value.trim()) + '&');
}
} else if (document.getElementById('aurl').value != '') {
if (1 == 1 || eval('' + (document.getElementById('aurl').value).length) < 200) {
//alert(insr.replace('?', '?faudio=' + encodeURIComponent(document.getElementById('aurl').value) + '&'));
return insr.replace('?', '?xfaudio=' + encodeURIComponent(document.getElementById('aurl').value) + '&');
}
} else if (document.getElementById('vurl').value.trim() != '') {
if (1 == 1 || eval('' + (document.getElementById('vurl').value.trim()).length) < 200) {
return insr.replace('?', '?xfvideo=' + encodeURIComponent(document.getElementById('aurl').value) + '&');
}
}
}
return insr;
}

function hexdec (hexString) { // thanks to https://locutus.io/php/math/hexdec/
// discuss at: https://locutus.io/php/hexdec/
// original by: Philippe Baumann
// example 1: hexdec('that')
// returns 1: 10
// example 2: hexdec('a0')
// returns 2: 160

hexString = (hexString + '').replace(/[^a-f0-9]/gi, '');
return parseInt(hexString, 16);
}

function hex2dec(couleur) { // thanks to http://wikkawiki.org/FpdfIntegration/raw
var dolR = couleur.toLowerCase().replace('#','').substring(0,2);
var dolrouge = hexdec(dolR);
var dolV = couleur.toLowerCase().replace('#','').replace(dolR,'').substring(0,2);
var dolvert = hexdec(dolV);
var dolB = couleur.toLowerCase().replace('#','').replace(dolR,'').replace(dolV,'').substring(0,2);
var dolbleu = hexdec(dolB);
document.getElementById('fred').value='' + dolrouge;
document.getElementById('fgreen').value='' + dolvert;
document.getElementById('fblue').value='' + dolbleu;
tosub='&fred=' + dolrouge + '&fgreen=' + dolvert + '&fblue=' + dolbleu + '&delay=';
document.getElementById('myta').style.color=couleur;
}

function docgetclass(inc, intag) {
if (document.getElementsByClassName) {
return document.getElementsByClassName(inc);
} else {
var ijl;
var anarris=[];
var huhs=document.getElementsByTagName(intag);
for (ijl=0; ijl<huhs.length; ijl++) {
if (huh[ijl].className.indexOf(inc) != -1) {
anarris.push(huhs[ijl]);
}
}
return anarris;
}
}

function titlefix() {
var dgebiswih=document.getElementById('subjectword').innerHTML;
var dgebiswihtwo=dgebiswih;
if (dgebiswihtwo == "") { dgebiswihtwo="-"; }
document.title=document.title.replace(lastword, dgebiswihtwo);
document.getElementById('bag').value=document.getElementById('bag').value.replace(lastword, dgebiswihtwo);
document.getElementById('bemail').value=document.getElementById('bemail').value.replace(lastword, dgebiswihtwo);
document.getElementById('bsms').value=document.getElementById('bsms').value.replace(lastword, dgebiswihtwo);
document.getElementById('aemail').href=document.getElementById('aemail').href.replace(encodeURIComponent(lastword), encodeURIComponent(dgebiswihtwo));
prefix=prefix.replace('stitle=' + encodeURIComponent('My ' + lastword), 'stitle=' + encodeURIComponent(('My ' + dgebiswih + '`').replace('My `','').replace('`','')));
lastword=dgebiswihtwo;
}

function lookforinhousestyle() {
var cssis='', findbasis='', findbs=[null], ifb=0, jfb=0, myrect=null, osuffix='', nsuffix=0, prevsw=document.getElementById('subjectword').innerHTML;
if (document.getElementById('subjectword').innerHTML != lastword) { document.getElementById('subjectword').innerHTML=lastword; titlefix(); }
if (document.URL.indexOf('/localhost') != -1) {
mampprefix="http://localhost" + document.URL.split('/localhost')[1].split('/')[0] + "/";
document.getElementById('dif').innerHTML="<iframe onload='oicheck(this);' style='display:none;' src='http://localhost" + document.URL.split('/localhost')[1].split('/')[0] + "/'></iframe>";
} else {
if (mampok) {
document.getElementById('ts').src=mampprefix + "macos_say_record.php?getts=" + Math.floor(Math.random() * 19876543);
} else {
document.getElementById('ts').src=document.URL.split('//')[0] + "//www.rjmprogramming.com.au/" + "macos_say_record.php?getts=" + Math.floor(Math.random() * 19876543);
}
}
var bits=(document.head.innerHTML + document.body.innerHTML).split(':and' + 'below');
if (bits.length > 1) {
if ((bits[1].trim() + ' ').substring(0,1) == '{') {
cssis=bits[1].trim().substring(1).split('}')[0] + ' z-index:-20; ';
findbasis=bits[0].split(String.fromCharCode(10))[eval(-1 + bits[0].split(String.fromCharCode(10)).length)].split(' ')[eval(-1 + bits[0].split(String.fromCharCode(10))[eval(-1 + bits[0].split(String.fromCharCode(10)).length)].split(' ').length)].trim();
if ((findbasis.trim() + ' ').substring(0,1) == '.') {
findbs=docgetclass(findbasis.trim().substring(1), '*');
} else if ((findbasis + ' ').substring(0,1) == '#') {
findbs[0]=document.getElementById(findbasis);
} else {
findbs=document.getElementsByTagName(findbasis);
}
for (jfb=0; jfb<findbs.length; jfb++) {
if (findbs[jfb]) {
myrect=findbs[jfb].getBoundingClientRect();
if (document.getElementById('bpalette' + osuffix)) {
nsuffix++;
osuffix='' + nsuffix;
while (document.getElementById('bpalette' + osuffix)) {
nsuffix++;
osuffix='' + nsuffix;
}
}
//document.getElementById('myh3').innerHTML+=' ' + ('myrect.top=' + myrect.top + ' vs myrect.y=' + myrect.y);
//document.body.innerHTML+='<div id=bpalette' + osuffix + ' style="' + cssis + ' position: absolute; top: ' + ('' + myrect.top).split('.')[0] + 'px;' + 'width: ' + ('' + myrect.width).split('.')[0] + 'px;' + 'left: ' + ('' + myrect.left).split('.')[0] + 'px;' + 'height: calc(100% - ' + ('' + myrect.top).split('.')[0] + 'px); "></div>';
document.body.innerHTML+='<div id=bpalette' + osuffix + ' style="' + cssis + ' position: absolute; top: ' + ('' + myrect.y).split('.')[0] + 'px;' + 'width: ' + ('' + myrect.width).split('.')[0] + 'px;' + 'left: ' + ('' + myrect.left).split('.')[0] + 'px;' + 'height: calc(100% - ' + ('' + myrect.y).split('.')[0] + 'px); "></div>';
}
}
}
}
}

function waitforalatr() {
if (document.getElementById('iurl').value == '') {
setTimeout(waitforalatr, 2000);
} else {
alatr();
altsubject='My ' + subjectword + ' ...';
var tois='';
attachment='';
if (document.URL.indexOf('/localhost') != -1 || 1 == 1) { // Many email clients do not accept the default Inline HTML Emails here, so to force an HTML Attachment Email that emailee downloads, append space(s) at the end.
tois=prompt('Who do you want to email to? Optionally hashtag (#) separate your own personal subject line to the email (eg. theemail@theemailplace.com#Hello there, it is moi.) Many email clients do not accept the default Inline HTML Emails here, so to force an HTML Attachment Email that emailee downloads, append space(s) at the end.', '');
} else {
tois=prompt('Who do you want to email to? Optionally hashtag (#) separate your own personal subject line to the email (eg. theemail@theemailplace.com#Hello there, it is moi.)', '');
}
if (tois == null) { tois=''; }
if (tois.indexOf('@') != -1) {
if (wois) {
//alert(1);
if (!wois.closed) {
//alert(tois);
document.getElementById('pemail').innerHTML=tois;
wois.document.getElementById('pemail').innerHTML=tois;
setTimeout(elater, 5000); ////wois.emailit();
}
}
if ((tois + '~!$').indexOf(' ~!$') != -1) { attachment='&attachment=true'; tois=tois.trim(); }
var alts=tois.split('#');
if (alts.length > 1) { altsubject=alts[1]; tois=alts[0]; }
//var text=document.getElementById('result').innerHTML;
//document.getElementById('ifem').innerHTML="<iframe onload=checkz(this); src='//www.rjmprogramming.com.au/HTMLCSS/emailhtml.php?to=" + encodeURIComponent(tois) + '&subj=' + thisencodeURIComponent(altsubject) + ' ... ') + '&sliceminusten=' + encodeURIComponent(text.slice(-10)) + "' style=width:500px;height:600px;></iframe>";

zhr = new XMLHttpRequest();
zform=new FormData();
//zform.append('inline', '');
if (attachment == '') {
zform.append('inline', '');
}
zform.append('to', tois);
zform.append('subj', altsubject + ' ... ');
zform.append('tdhuhta', '<html><body>' + document.getElementById('bpalette').innerHTML.replace('<audio ','<audio loop ').replace('<video ','<video loop ').replace('position:absolute;','').replace('left:','margin-left:0.').replace('top:','margin-top:0.') + '</body></html>');
zhr.open('post', '//www.rjmprogramming.com.au/HTMLCSS/emailhtml.php', true);
zhr.send(zform);
document.getElementById('iurl').value='';
alert('Email sent with downloadable HTML attachment.');
}

}
}

function alatr() {
var xrect, it;
var parts=[];
if (document.getElementById('bpalette')) {
//prefix=prefix.replace('bleft=40','bleft=20');
//prefix=prefix.replace('btop=40','btop=20');
//alert(prefix);
xrect=document.getElementById('bpalette').getBoundingClientRect();
if (document.getElementById('vurl').value.trim() != '') {
ourmime="";
if (document.getElementById('vmime').value != '') {
ourmime=document.getElementById('vmime').value;
document.getElementById('vmime').value='';
} else if (document.getElementById('vurl').value.indexOf('data:') == 0) {
ourmime=document.getElementById('vurl').value.split('ata:')[1].split(';')[0];
} else {
parts=document.getElementById('vurl').value.trim().split('#')[0].split("."); // used to be a
for (it=0; it<exts.length; it++) {
if ("." + parts[eval(-1 + parts.length)].toLowerCase() == exts[it].toLowerCase()) { ourmime=types[it]; }
}
}

if (document.getElementById('iurl').value != '') {
//document.getElementById('bpalette').innerHTML='<video style="position:absolute;left:' + xrect.left + 'px;top:' + xrect.top + 'px;width:' + xrect.width + 'px;height:' + xrect.height + 'px;background:transparent url(' + "'" + document.getElementById('iurl').value.replace(/\ /g,'+') + "'" + ') no-repeat 0 0;-webkit-background-size:contain; -moz-background-size:contain; -o-background-size:contain; background-size:contain;" id=myvideo controls autoplay poster="transparent.png"><source src="' + document.getElementById('vurl').value + '" type="' + ourmime + '"></video>';
//document.getElementById('myh3').innerHTML+=' ' + ('xrect.top=' + xrect.top + ' vs xrect.y=' + xrect.y);
//document.getElementById('bpalette').innerHTML='<video style="position:absolute;left:' + xrect.left + 'px;top:' + xrect.y + 'px;width:' + xrect.width + 'px;height:' + xrect.height + 'px;background:transparent url(' + "'" + document.getElementById('iurl').value.replace(/\ /g,'+') + "'" + ') no-repeat 0 0;-webkit-background-size:contain; -moz-background-size:contain; -o-background-size:contain; background-size:contain;" id=myvideo controls autoplay poster="transparent.png"><source src="' + document.getElementById('vurl').value + '" type="' + ourmime + '"></video>';
document.getElementById('bpalette').innerHTML='<video style="display:inline-block;vertical-align:top;width:' + xrect.width + 'px;height:100%;background:transparent url(' + "'" + document.getElementById('iurl').value.replace(/\ /g,'+') + "'" + ') no-repeat 0 0;-webkit-background-size:contain; -moz-background-size:contain; -o-background-size:contain; background-size:contain;" id=myvideo controls autoplay poster="transparent.png"><source src="' + document.getElementById('vurl').value.trim() + '" type="' + ourmime + '"></video>';
} else {
//document.getElementById('bpalette').innerHTML='<video style="position:absolute;left:' + xrect.left + 'px;top:' + xrect.top + 'px;width:' + xrect.width + 'px;height:' + xrect.height + 'px;background:transparent url(' + biurl + '?random=' + Math.floor(Math.random() * 198765436) + ') no-repeat 0 0;-webkit-background-size:contain; -moz-background-size:contain; -o-background-size:contain; background-size:contain;" id=myvideo controls autoplay poster="transparent.png"><source src="' + document.getElementById('vurl').value + '" type="' + ourmime + '"></video>';
//document.getElementById('myh3').innerHTML+=' ' + ('xrect.top=' + xrect.top + ' vs xrect.y=' + xrect.y);
//document.getElementById('bpalette').innerHTML='<video style="position:absolute;left:' + xrect.left + 'px;top:' + xrect.y + 'px;width:' + xrect.width + 'px;height:' + xrect.height + 'px;background:transparent url(' + biurl + '?random=' + Math.floor(Math.random() * 198765436) + ') no-repeat 0 0;-webkit-background-size:contain; -moz-background-size:contain; -o-background-size:contain; background-size:contain;" id=myvideo controls autoplay poster="transparent.png"><source src="' + document.getElementById('vurl').value + '" type="' + ourmime + '"></video>';
if (biurl.indexOf('data:') == 0) {
document.getElementById('bpalette').innerHTML='<video style="display:inline-block;vertical-align:top;width:' + xrect.width + 'px;height:100%;background:transparent url(' + biurl + ') no-repeat 0 0;-webkit-background-size:contain; -moz-background-size:contain; -o-background-size:contain; background-size:contain;" id=myvideo controls autoplay poster="transparent.png"><source src="' + document.getElementById('vurl').value.trim() + '" type="' + ourmime + '"></video>';
} else {
document.getElementById('bpalette').innerHTML='<video style="display:inline-block;vertical-align:top;width:' + xrect.width + 'px;height:100%;background:transparent url(' + biurl + '?random=' + Math.floor(Math.random() * 198765436) + ') no-repeat 0 0;-webkit-background-size:contain; -moz-background-size:contain; -o-background-size:contain; background-size:contain;" id=myvideo controls autoplay poster="transparent.png"><source src="' + document.getElementById('vurl').value.trim() + '" type="' + ourmime + '"></video>';
}
}

} else if (document.getElementById('aurl').value != '') {
ourmime="";
if (document.getElementById('amime').value != '') {
ourmime=document.getElementById('amime').value;
document.getElementById('amime').value='';
//alert('Ourmime=' + ourmime);
} else if (document.getElementById('aurl').value.indexOf('data:') == 0) {
ourmime=document.getElementById('aurl').value.split('ata:')[1].split(';')[0];
//alert('OurMime=' + ourmime);
} else {
parts=document.getElementById('aurl').value.split('#')[0].split("."); // used to be v
for (it=0; it<exts.length; it++) {
if ("." + parts[eval(-1 + parts.length)].toLowerCase() == exts[it].toLowerCase()) { ourmime=types[it]; }
}
//alert('ourmime=' + ourmime);
}
if (document.getElementById('iurl').value != '') {
//document.getElementById('bpalette').innerHTML='<audio style="position:absolute;left:' + xrect.left + 'px;top:' + xrect.top + 'px;width:' + xrect.width + 'px;height:' + xrect.height + 'px;background:transparent url(' + "'" + document.getElementById('iurl').value.replace(/\ /g,'+') + "'" + ') no-repeat 0 0;-webkit-background-size:contain; -moz-background-size:contain; -o-background-size:contain; background-size:contain;" id=myaudio controls autoplay poster="transparent.png"><source src="' + document.getElementById('aurl').value + '" type="' + ourmime + '"></audio>';
//if (document.getElementById('bpalette')) { document.getElementById('myh3').innerHTML+=' ?' + document.getElementById('bpalette').style.height + ' vs ' + xrect.height; }
//document.getElementById('myh3').innerHTML+=' a' + ('xrect.top=' + xrect.top + ' vs xrect.y=' + xrect.y);
//document.getElementById('bpalette').innerHTML='<audio style="position:absolute;left:' + xrect.left + 'px;top:' + xrect.y + 'px;width:' + xrect.width + 'px;height:' + xrect.height + 'px;background:transparent url(' + "'" + document.getElementById('iurl').value.replace(/\ /g,'+') + "'" + ') no-repeat 0 0;-webkit-background-size:contain; -moz-background-size:contain; -o-background-size:contain; background-size:contain;" id=myaudio controls autoplay poster="transparent.png"><source src="' + document.getElementById('aurl').value + '" type="' + ourmime + '"></audio>';
document.getElementById('bpalette').innerHTML='<audio style="display:inline-block;vertical-align:top;width:' + xrect.width + 'px;height:100%;background:transparent url(' + "'" + document.getElementById('iurl').value.replace(/\ /g,'+') + "'" + ') no-repeat 0 0;-webkit-background-size:contain; -moz-background-size:contain; -o-background-size:contain; background-size:contain;" id=myaudio controls autoplay poster="transparent.png"><source src="' + document.getElementById('aurl').value + '" type="' + ourmime + '"></audio>';
} else {
//document.getElementById('bpalette').innerHTML='<audio style="position:absolute;left:' + xrect.left + 'px;top:' + xrect.top + 'px;width:' + xrect.width + 'px;height:' + xrect.height + 'px;background:transparent url(' + biurl + '?random=' + Math.floor(Math.random() * 198765436) + ') no-repeat 0 0;-webkit-background-size:contain; -moz-background-size:contain; -o-background-size:contain; background-size:contain;" id=myaudio controls autoplay poster="transparent.png"><source src="' + document.getElementById('aurl').value + '" type="' + ourmime + '"></audio>';
//if (document.getElementById('bpalette')) { document.getElementById('myh3').innerHTML+=' ?? ' + document.getElementById('bpalette').style.height + ' vs ' + xrect.height; }
//document.getElementById('myh3').innerHTML+=' a' + ('xrect.top=' + xrect.top + ' vs xrect.y=' + xrect.y);
//document.getElementById('bpalette').innerHTML='<audio style="position:absolute;left:' + xrect.left + 'px;top:' + xrect.y + 'px;width:' + xrect.width + 'px;height:' + xrect.height + 'px;background:transparent url(' + biurl + '?random=' + Math.floor(Math.random() * 198765436) + ') no-repeat 0 0;-webkit-background-size:contain; -moz-background-size:contain; -o-background-size:contain; background-size:contain;" id=myaudio controls autoplay poster="transparent.png"><source src="' + document.getElementById('aurl').value + '" type="' + ourmime + '"></audio>';

if (biurl.indexOf('data:') == 0) {
document.getElementById('bpalette').innerHTML='<audio style="display:inline-block;vertical-align:top;width:' + xrect.width + 'px;height:100%;background:transparent url(' + biurl + ') no-repeat 0 0;-webkit-background-size:contain; -moz-background-size:contain; -o-background-size:contain; background-size:contain;" id=myaudio controls autoplay poster="transparent.png"><source src="' + document.getElementById('aurl').value + '" type="' + ourmime + '"></audio>';
} else {
document.getElementById('bpalette').innerHTML='<audio style="display:inline-block;vertical-align:top;width:' + xrect.width + 'px;height:100%;background:transparent url(' + biurl + '?random=' + Math.floor(Math.random() * 198765436) + ') no-repeat 0 0;-webkit-background-size:contain; -moz-background-size:contain; -o-background-size:contain; background-size:contain;" id=myaudio controls autoplay poster="transparent.png"><source src="' + document.getElementById('aurl').value + '" type="' + ourmime + '"></audio>';
}

//document.getElementById('bpalette').innerHTML='<audio style="display:inline-block;vertical-align:top;position:absolute;left:' + xrect.left + 'px;top:' + xrect.y + 'px;width:' + xrect.width + 'px;height:120px;background:transparent url(' + biurl + '?random=' + Math.floor(Math.random() * 198765436) + ') no-repeat 0 0;-webkit-background-size:contain; -moz-background-size:contain; -o-background-size:contain; background-size:contain;" id=myaudio controls autoplay poster="transparent.png"><source src="' + document.getElementById('aurl').value + '" type="' + ourmime + '"></audio>';

try {
if (wois != null && (document.getElementById('vurl').value.trim().indexOf('data:') == 0 || document.getElementById('aurl').value.indexOf('data:') == 0)) {
if (wois.closed) {
wois=null;
} else if (xbiurl != '' && lastbiurl == '') {
wois.focus();
wois.document.getElementById('result').innerHTML=xbiurl;
setTimeout(vlater,3000); //wois.voiceoverit(); // wois.document.getElementById('avideo').click();
lastbiurl=xbiurl;
xbiurl='';
}
}
} catch(eewrt) {
//alert('Email Not Sent as Access was Blocked.');
}

}

} else {
if (biurl.indexOf('data:') == 0) {
document.getElementById('bpalette').style.background="URL('" + biurl + "') no-repeat";
} else {
document.getElementById('bpalette').style.background="URL('" + biurl + '?random=' + Math.floor(Math.random() * 198765436) + "') no-repeat";
}
document.getElementById('bpalette').style.backgroundSize='contain';

try {
if (wois != null && (document.getElementById('vurl').value.trim().indexOf('data:') == 0 || document.getElementById('aurl').value.indexOf('data:') == 0)) {
if (wois.closed) {
wois=null;
} else if (xbiurl != '' && lastbiurl == '') {
wois.focus();
wois.document.getElementById('result').innerHTML=xbiurl;
setTimeout(vlater,3000); //wois.voiceoverit(); // wois.document.getElementById('avideo').click();
lastbiurl=xbiurl;
xbiurl='';
}
}
} catch(eewrt) {
//alert('Email Not Sent as Access was Blocked.');
}

}
} else {
if (biurl.indexOf('data:') == 0) {
document.getElementById('xbody').style.background="URL('" + biurl + "') no-repeat";
} else {
document.getElementById('xbody').style.background="URL('" + biurl + '?random=' + Math.floor(Math.random() * 198765436) + "') no-repeat";
}
document.getElementById('xbody').style.backgroundSize='contain';

try {
if (wois != null && (document.getElementById('vurl').value.trim().indexOf('data:') == 0 || document.getElementById('aurl').value.indexOf('data:') == 0)) {
if (wois.closed) {
wois=null;
} else if (xbiurl != '' && lastbiurl == '') {
wois.focus();
wois.document.getElementById('result').innerHTML=xbiurl;
setTimeout(vlater,3000); //wois.voiceoverit(); // wois.document.getElementById('avideo').click();
lastbiurl=xbiurl;
xbiurl='';
}
}
} catch(eewrt) {
//alert('Email Not Sent as Access was Blocked.');
}

}
//alert(biurl);
//biurl='';
}

function ourencodeURIComponent(inx) {
return inx;
}

function dummyencodeURIComponent(inz) {
return inz;
}

function createbi(tav) {
var suffix='&slideshow=' + ourencodeURIComponent('~~'), delim='', nextnum=2, sofar='';
if (tav.trim() != '') {
if (document.getElementById('subjectword').innerHTML.trim() == '') {
suffix='&slideshow=';
}
valid=true;
var lines=tav.split(String.fromCharCode(10));
//alert(lines.length);
console.log('1');
for (var ilines=0; ilines<lines.length; ilines++) {
suffix+=delim + encodeURIComponent(lines[ilines]);
if (document.getElementById('acc').checked || ilines == 0) {
sofar+=encodeURIComponent(lines[ilines]) + ourencodeURIComponent('~')
delim='&slideshow' + nextnum + '='; // + sofar;
} else {
sofar=encodeURIComponent(lines[ilines]) + ourencodeURIComponent('~')
delim='&slideshow' + nextnum + '='; // + sofar;
}
if (document.getElementById('acc').checked) { delim+=sofar; }
nextnum++;
}
console.log('2');
if (document.getElementById('burl').placeholder.indexOf('data:') == 0) {
suffix=suffix.replace(/\=/g, '=' + encodeURIComponent(document.getElementById('burl').placeholder + '#')); //.replace(/\`/g, '=');
} else if (document.getElementById('vurl').placeholder.indexOf('data:') == 0) {
suffix=suffix.replace(/\=/g, '=' + encodeURIComponent(document.getElementById('vurl').placeholder + '#')); //.replace(/\`/g, '=');
} else {
suffix=suffix.replace(/\=/g, '=' + encodeURIComponent(document.getElementById('burl').value + '#')); //.replace(/\`/g, '=');
}
console.log('3');
var pc='';
//alert('http://localhost:8888/Htdocs/PHP/animegif/tutorial_to_animated_gif.php' + prefix + suffix);
//alert(prefix.replace(fromsub,tosub));
if (document.getElementById('bdelay').value != '') {
console.log('4');

pretryts();
console.log('5');
pc=postagc('./tutorial_to_animated_gif.php' + vaprefix(prefix).replace(fromsub,tosub).split('delay=')[0] + 'delay=' + encodeURIComponent(document.getElementById('bdelay').value) + suffix);
console.log('6');
if (pc != '#') {
document.getElementById('agc').src=pc;
} //else {
//alert(pc);
//}
console.log('7');
document.getElementById('aemail').href='mailto:?subject=My%20' + encodeURIComponent(subjectword) + '%20...%20shared%20with%20you%20...&body=' + encodeURIComponent(document.URL.split('/haiku_')[0] + '/tutorial_to_animated_gif.php' + vaprefix(prefix).replace(fromsub,tosub).replace('fleft=' + fleft,'fleft=20').replace('ftop=' + ftop,'ftop=20').split('delay=')[0] + 'delay=' + encodeURIComponent(document.getElementById('bdelay').value) + suffix + ' and to return the favour use ' + document.URL.split('?')[0].split('#')[0]);
console.log('8');
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
document.getElementById('asms').href='sms:&body=' + dummyencodeURIComponent(encodeURIComponent('My ' + subjectword + ' am sharing with you ... ') + encodeURIComponent(document.URL.split('/haiku_')[0] + '/tutorial_to_animated_gif.php' + vaprefix(prefix).replace(fromsub,tosub).replace('fleft=' + fleft,'fleft=20').replace('ftop=' + ftop,'ftop=20').split('delay=')[0] + 'delay=' + encodeURIComponent(document.getElementById('bdelay').value) + suffix.replace(/\~\~/g,encodeURIComponent('~~')).replace(/\~/g,encodeURIComponent('~'))) + '#' + encodeURIComponent(' and to return the favour use ' + String.fromCharCode(10) + document.URL.split('?')[0].split('#')[0]));
} else {
document.getElementById('asms').href='sms:&body=' + encodeURIComponent(encodeURIComponent('My ' + subjectword + ' am sharing with you ... ') + encodeURIComponent(document.URL.split('/haiku_')[0] + '/tutorial_to_animated_gif.php' + vaprefix(prefix).replace(fromsub,tosub).replace('fleft=' + fleft,'fleft=20').replace('ftop=' + ftop,'ftop=20').split('delay=')[0] + 'delay=' + encodeURIComponent(document.getElementById('bdelay').value) + suffix.replace(/\~\~/g,encodeURIComponent('~~')).replace(/\~/g,encodeURIComponent('~'))) + '#' + encodeURIComponent(' and to return the favour use ' + String.fromCharCode(10) + document.URL.split('?')[0].split('#')[0]));
}
console.log('9');
if (1 == 1 && document.getElementById('thisaudio')) { document.getElementById('thisaudio').muted=true; document.getElementById('thisaudio').play(); }
} else {
console.log('10');

pretryts();
console.log('11');
pc=postagc('./tutorial_to_animated_gif.php' + vaprefix(prefix).replace(fromsub,tosub) + suffix);
console.log('12');
if (pc != '#') {
document.getElementById('agc').src=pc;
} //else {
//alert(pc);
//}
console.log('13');
document.getElementById('aemail').href='mailto:?subject=My%20' + encodeURIComponent(lastword) + '%20...%20shared%20with%20you%20...&body=' + encodeURIComponent(document.URL.split('/haiku_')[0] + '/tutorial_to_animated_gif.php' + vaprefix(prefix).replace(fromsub,tosub).replace('fleft=' + fleft,'fleft=20').replace('ftop=' + ftop,'ftop=20') + suffix + ' and to return the favour use ' + document.URL.split('?')[0].split('#')[0]);
console.log('14');
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
document.getElementById('asms').href='sms:&body=' + dummyencodeURIComponent(encodeURIComponent('My ' + lastword + ' am sharing with you ... ') + encodeURIComponent(document.URL.split('/haiku_')[0] + '/tutorial_to_animated_gif.php' + vaprefix(prefix).replace(fromsub,tosub).replace('fleft=' + fleft,'fleft=20').replace('ftop=' + ftop,'ftop=20') + suffix.replace(/\~\~/g,encodeURIComponent('~~')).replace(/\~/g,encodeURIComponent('~'))) + '#' + encodeURIComponent(' and to return the favour use ' + String.fromCharCode(10) + document.URL.split('?')[0].split('#')[0]));
} else {
document.getElementById('asms').href='sms:&body=' + encodeURIComponent(encodeURIComponent('My ' + lastword + ' am sharing with you ... ') + encodeURIComponent(document.URL.split('/haiku_')[0] + '/tutorial_to_animated_gif.php' + vaprefix(prefix).replace(fromsub,tosub).replace('fleft=' + fleft,'fleft=20').replace('ftop=' + ftop,'ftop=20') + suffix.replace(/\~\~/g,encodeURIComponent('~~')).replace(/\~/g,encodeURIComponent('~'))) + '#' + encodeURIComponent(' and to return the favour use ' + String.fromCharCode(10) + document.URL.split('?')[0].split('#')[0]));
}
console.log('15');
if (1 == 1 && document.getElementById('thisaudio')) { document.getElementById('thisaudio').muted=true; document.getElementById('thisaudio').play(); }
}
//alert(1);
document.getElementById('bemail').style.display='inline-block';
document.getElementById('bsms').style.display='inline-block';
//alert(2);
console.log('16');
}
}

function thegifnamegoesherelistener() {
var xrect, it, eewrt;
var parts=[];
//biurl='';
if (document.getElementById('aurl').value != '') {
if (document.getElementById('aurl').value != lastaurl) {
lastaurl=document.getElementById('aurl').value;
try {
if (wois != null && (document.getElementById('vurl').value.trim().indexOf('data:') == 0 || document.getElementById('aurl').value.indexOf('data:') == 0)) {
if (wois.closed) {
wois=null;
} else {
wois.focus();
if (document.getElementById('aurl').value.indexOf('data:') == 0) {
wois.document.getElementById('result').innerHTML=document.getElementById('aurl').value;
} else if (document.getElementById('vurl').value.trim().indexOf('data:') == 0) {
wois.document.getElementById('result').innerHTML=document.getElementById('vurl').value.trim();
}
setTimeout(vlater,3000); //wois.voiceoverit(); // wois.document.getElementById('avideo').click();
}
}
} catch(eewrt) {
//alert('Email Not Sent as Access was Blocked.');
}
}
} else if (document.getElementById('vurl').value.trim() != '') {
if (document.getElementById('vurl').value.trim() != lastvurl.trim()) {
lastvurl=document.getElementById('vurl').value.trim();
try {
if (wois != null && (document.getElementById('vurl').value.trim().indexOf('data:') == 0 || document.getElementById('aurl').value.indexOf('data:') == 0)) {
if (wois.closed) {
wois=null;
} else {
wois.focus();
if (document.getElementById('vurl').value.trim().indexOf('data:') == 0) {
wois.document.getElementById('result').innerHTML=document.getElementById('vurl').value.trim();
} else if (document.getElementById('aurl').value.indexOf('data:') == 0) {
wois.document.getElementById('result').innerHTML=document.getElementById('aurl').value;
}
setTimeout(vlater,3000); //wois.voiceoverit(); // wois.document.getElementById('avideo').click();
}
}
} catch(eewrt) {
//alert('Email Not Sent as Access was Blocked.');
}
}
}
if (document.getElementById('thegifnamegoeshere').value != '') {
xbiurl=document.getElementById('thegifnamegoeshere').value;
biurl=document.getElementById('thegifnamegoeshere').value.replace('//www.rjmprogramming.com.au/PHP/animegif/','./');
document.getElementById('thegifnamegoeshere').value='';
if (valid) {
if (1 == 1) {
//document.getElementById('pagc').src=biurl.replace('.gif', '_preview.php?random=' + Math.floor(Math.random() * 198765436));
//alert(biurl);
if (document.getElementById('burl').placeholder.indexOf('data:') == 0) {
setTimeout(alatr, 23000);
} else {
setTimeout(alatr, 3000);
}
} else {
if (document.getElementById('bpalette')) {
xrect=document.getElementById('bpalette').getBoundingClientRect();
if (document.getElementById('vurl').value.trim() != '') {
ourmime="";
if (document.getElementById('vmime').value != '') {
ourmime=document.getElementById('vmime').value;
document.getElementById('vmime').value='';
} else {
parts=document.getElementById('aurl').value.split('#')[0].split(".")
for (it=0; it<exts.length; it++) {
if ("." + parts[eval(-1 + parts.length)].toLowerCase() == exts[it].toLowerCase()) { ourmime=types[it]; }
}
}
//document.getElementById('bpalette').innerHTML='<video style="position:absolute;left:' + xrect.left + 'px;top:' + xrect.top + 'px;width:' + xrect.width + 'px;height:' + xrect.height + 'px;background:transparent url(' + biurl + '?random=' + Math.floor(Math.random() * 198765436) + ') no-repeat 0 0;-webkit-background-size:contain; -moz-background-size:contain; -o-background-size:contain; background-size:contain;" id=myvideo controls autoplay poster="transparent.png"><source src="' + document.getElementById('vurl').value + '" type="' + ourmime + '"></video>';
if (burl.indexOf('data:') == 0) {
document.getElementById('bpalette').innerHTML='<video style="position:absolute;left:' + xrect.left + 'px;top:' + xrect.y + 'px;width:' + xrect.width + 'px;height:' + xrect.height + 'px;background:transparent url(' + biurl + ') no-repeat 0 0;-webkit-background-size:contain; -moz-background-size:contain; -o-background-size:contain; background-size:contain;" id=myvideo controls autoplay poster="transparent.png"><source src="' + document.getElementById('vurl').value.trim() + '" type="' + ourmime + '"></video>';
} else {
document.getElementById('bpalette').innerHTML='<video style="position:absolute;left:' + xrect.left + 'px;top:' + xrect.y + 'px;width:' + xrect.width + 'px;height:' + xrect.height + 'px;background:transparent url(' + biurl + '?random=' + Math.floor(Math.random() * 198765436) + ') no-repeat 0 0;-webkit-background-size:contain; -moz-background-size:contain; -o-background-size:contain; background-size:contain;" id=myvideo controls autoplay poster="transparent.png"><source src="' + document.getElementById('vurl').value.trim() + '" type="' + ourmime + '"></video>';
}
} else if (document.getElementById('aurl').value != '') {
ourmime="";
if (document.getElementById('amime').value != '') {
ourmime=document.getElementById('amime').value;
document.getElementById('amime').value='';
} else {
parts=document.getElementById('vurl').value.trim().split('#')[0].split(".")
for (it=0; it<exts.length; it++) {
if ("." + parts[eval(-1 + parts.length)].toLowerCase() == exts[it].toLowerCase()) { ourmime=types[it]; }
}
}
//document.getElementById('bpalette').innerHTML='<audio style="position:absolute;left:' + xrect.left + 'px;top:' + xrect.top + 'px;width:' + xrect.width + 'px;height:' + xrect.height + 'px;background:transparent url(' + biurl + '?random=' + Math.floor(Math.random() * 198765436) + ') no-repeat 0 0;-webkit-background-size:contain; -moz-background-size:contain; -o-background-size:contain; background-size:contain;" id=myaudio controls autoplay poster="transparent.png"><source src="' + document.getElementById('aurl').value + '" type="' + ourmime + '"></audio>';
//document.getElementById('myh3').innerHTML+=' xx' + ('xrect.top=' + xrect.top + ' vs xrect.y=' + xrect.y);
//document.getElementById('bpalette').innerHTML='<audio style="position:absolute;left:' + xrect.left + 'px;top:' + xrect.y + 'px;width:' + xrect.width + 'px;height:' + xrect.height + 'px;background:transparent url(' + biurl + '?random=' + Math.floor(Math.random() * 198765436) + ') no-repeat 0 0;-webkit-background-size:contain; -moz-background-size:contain; -o-background-size:contain; background-size:contain;" id=myaudio controls autoplay poster="transparent.png"><source src="' + document.getElementById('aurl').value + '" type="' + ourmime + '"></audio>';
if (burl.indexOf('data:') == 0) {
document.getElementById('bpalette').innerHTML='<audio style="display:inline-block;vertical-align:top;width:' + xrect.width + 'px;height:100%;background:transparent url(' + biurl + ') no-repeat 0 0;-webkit-background-size:contain; -moz-background-size:contain; -o-background-size:contain; background-size:contain;" id=myaudio controls autoplay poster="transparent.png"><source src="' + document.getElementById('aurl').value + '" type="' + ourmime + '"></audio>';
} else {
document.getElementById('bpalette').innerHTML='<audio style="display:inline-block;vertical-align:top;width:' + xrect.width + 'px;height:100%;background:transparent url(' + biurl + '?random=' + Math.floor(Math.random() * 198765436) + ') no-repeat 0 0;-webkit-background-size:contain; -moz-background-size:contain; -o-background-size:contain; background-size:contain;" id=myaudio controls autoplay poster="transparent.png"><source src="' + document.getElementById('aurl').value + '" type="' + ourmime + '"></audio>';
}
} else {
if (burl.indexOf('data:') == 0) {
document.getElementById('bpalette').style.background="URL('" + biurl + "') no-repeat";
} else {
document.getElementById('bpalette').style.background="URL('" + biurl + '?random=' + Math.floor(Math.random() * 198765436) + "') no-repeat";
}
document.getElementById('bpalette').style.backgroundSize='contain';
}
} else {
if (burl.indexOf('data:') == 0) {
document.getElementById('xbody').style.background="URL('" + biurl + "') no-repeat";
} else {
document.getElementById('xbody').style.background="URL('" + biurl + '?random=' + Math.floor(Math.random() * 198765436) + "') no-repeat";
}
document.getElementById('xbody').style.backgroundSize='contain';
}
}
valid=false;
}
}
if (document.getElementById('vurl').placeholder.indexOf('data:') == 0 || document.getElementById('vurl').title.indexOf('|') != -1) {
//okctab=false;
//top.document.title+=' :' + document.getElementById('vurl').title.length + ';' + document.getElementById('aurl').title.length;
autitle=document.getElementById('aurl').title;
vutitle=document.getElementById('vurl').title;
var fgd=document.getElementById('vurl').placeholder;
document.getElementById('vurl').placeholder='';
document.getElementById('burl').value=fgd;
document.getElementById('burl').title=fgd;
document.getElementById('burl').placeholder=fgd;
prevburl=document.getElementById('burl').value;
inbivalue=prevburl;
//alert(fgd.substring(0,67) + ' ... ' + fgd.slice(-67));
}
setTimeout(thegifnamegoesherelistener,1000);
}

function otherjs(invu) {
// xposdesc
//alert(invu);
var prenorepeats=invu.split(' no-repeat');
var outvu=prenorepeats[0];
for (var iut=1; iut<prenorepeats.length; iut++) {
outvu+=' no-repeat';
outvu+=prenorepeats[iut].replace('left top', xposdesc[eval(iut % eval('' + prenorepeats.length))]);
}
//alert(outvu);
console.log('900 ' + outvu.substring(0,123));
return outvu;
}

function afto() {
// xposdesc
if (thisdivts.trim() == lastdivts.trim()) {
setTimeout(afto, 2000);
} else {
if (inbivalue.indexOf('data:') == 0) {
if (vutitle.indexOf('|') != -1) {
if (vutitle.indexOf('|') == 0) {
console.log('800');
document.getElementById('myta').style.background="URL('" + otherjs(vutitle.substring(1).replace(/\|/g,"') left top no-repeat,URL('")) + "') right bottom no-repeat";
} else {
console.log('801');
document.getElementById('myta').style.background="URL('" + otherjs(vutitle.replace(/\|/g,"') left top no-repeat,URL('")) + "') right bottom no-repeat";
}
} else if (document.getElementById('vurl').title.indexOf('|') != -1) {
if (document.getElementById('vurl').title.indexOf('|') == 0) {
console.log('802');
document.getElementById('myta').style.background="URL('" + otherjs(document.getElementById('vurl').title.substring(1).replace(/\|/g,"') left top no-repeat,URL('")) + "') right bottom no-repeat";
} else {
console.log('803');
document.getElementById('myta').style.background="URL('" +otherjs( document.getElementById('vurl').title.replace(/\|/g,"') left top no-repeat,URL('")) + "') right bottom no-repeat";
}
} else {
console.log('804');
document.getElementById('myta').style.background="URL('" + inbivalue + "') repeat";
}
} else {
if (vutitle.indexOf('|') != -1) {
if (vutitle.indexOf('|') == 0) {
console.log('805');
document.getElementById('myta').style.background="URL('" + otherjs(vutitle.substring(1).replace(/\|/g,"') left top no-repeat,URL('")) + "') right bottom no-repeat";
} else {
console.log('806');
document.getElementById('myta').style.background="URL('" + otherjs(vutitle.replace(/\|/g,"') left top no-repeat,URL('")) + "') right bottom no-repeat";
}
} else if (document.getElementById('vurl').title.indexOf('|') != -1) {
if (document.getElementById('vurl').title.indexOf('|') == 0) {
console.log('807');
document.getElementById('myta').style.background="URL('" + otherjs(document.getElementById('vurl').title.substring(1).replace(/\|/g,"') left top no-repeat,URL('")) + "') right bottom no-repeat";
} else {
console.log('808');
document.getElementById('myta').style.background="URL('" + otherjs(document.getElementById('vurl').title.replace(/\|/g,"') left top no-repeat,URL('")) + "') right bottom no-repeat";
}
} else {
console.log('809');
document.getElementById('myta').style.background="URL('" + inbivalue + '?random=' + Math.floor(Math.random() * 198765436) + "') no-repeat";
}
}
document.getElementById('myta').style.backgroundSize='contain'; // 'cover'
if (thisdivts.trim() == lastdivts.trim()) { setTimeout(afto, 2000); }
}
} // http://localhost:8888/001.jpg,http://localhost:8888/002.jpg,http://localhost:8888/003.jpg,http://localhost:8888/004.jpg

function ctab(inbi) {
console.log('100');
if (inbi.value.replace(/\;base64\,/g,'').indexOf(',') != -1) {
console.log('101');
vutitle=inbi.value.replace(/\;base64\,/g,';base64!').replace(/\,/g,'|').replace(/\;base64\!/g,';base64,');
document.getElementById('vurl').title=vutitle;
document.getElementById('vurl').placeholder=vutitle.split('|')[0];
inbi.value=vutitle.split('|')[0];
}
console.log('102');
if (okctab) {
console.log('103');
if (inbi.value.trim() == '') {
inbi.value='./white.jpg';
console.log('104');
}
if (inbivalue == '' || thisdivts.trim() == lastdivts.trim()) { setTimeout(afto, 2000); }
console.log('105');
inbivalue=inbi.value;
console.log('106');
if (inbi.value.indexOf('data:') == 0) {
console.log('107');

if (vutitle.indexOf('|') != -1) {
if (vutitle.indexOf('|') == 0) {
console.log('700');
document.getElementById('myta').style.background="URL('" + otherjs(vutitle.substring(1).replace(/\|/g,"') left top no-repeat,URL('")) + "') right bottom no-repeat";
} else {
console.log('701');
document.getElementById('myta').style.background="URL('" + otherjs(vutitle.replace(/\|/g,"') left top no-repeat,URL('")) + "') right bottom no-repeat";
}
} else if (document.getElementById('vurl').title.indexOf('|') != -1) {
if (document.getElementById('vurl').title.indexOf('|') == 0) {
console.log('702');
document.getElementById('myta').style.background="URL('" + otherjs(document.getElementById('vurl').title.substring(1).replace(/\|/g,"') left top no-repeat,URL('")) + "') right bottom no-repeat";
} else {
console.log('702');
document.getElementById('myta').style.background="URL('" + otherjs(document.getElementById('vurl').title.replace(/\|/g,"') left top no-repeat,URL('")) + "') right bottom no-repeat";
}
} else {
console.log('703');
document.getElementById('myta').style.background="URL('" + inbi.value + "') repeat";
}
} else {
if (vutitle.indexOf('|') != -1) {
if (vutitle.indexOf('|') == 0) {
console.log('704');
document.getElementById('myta').style.background="URL('" + otherjs(vutitle.substring(1).replace(/\|/g,"') left top no-repeat,URL('")) + "') right bottom no-repeat";
} else {
console.log('705');
document.getElementById('myta').style.background="URL('" + otherjs(vutitle.replace(/\|/g,"') left top no-repeat,URL('")) + "') right bottom no-repeat";
}
} else if (document.getElementById('vurl').title.indexOf('|') != -1) {
if (document.getElementById('vurl').title.indexOf('|') == 0) {
console.log('706');
document.getElementById('myta').style.background="URL('" + otherjs(document.getElementById('vurl').title.substring(1).replace(/\|/g,"') left top no-repeat,URL('")) + "') right bottom no-repeat";
} else {
console.log('707');
document.getElementById('myta').style.background="URL('" + otherjs(document.getElementById('vurl').title.replace(/\|/g,"') left top no-repeat,URL('")) + "') right bottom no-repeat";
}
} else {
console.log('708');
document.getElementById('myta').style.background="URL('" + inbi.value + '?random=' + Math.floor(Math.random() * 198765436) + "') no-repeat";
}
}
document.getElementById('myta').style.backgroundSize='contain'; // 'cover'
if (inbivalue.indexOf('data:') != 0) {
if (inbivalue != '' && inbivalue.toLowerCase().indexOf('http') != 0 && inbivalue.toLowerCase().indexOf('//') != 0 && inbivalue.toLowerCase().indexOf('www.') != 0) {
document.getElementById('pagc').src=inbivalue;
}
} else {
prevburl=inbivalue;
if (1 == 1) {
inbi.value=prevburl;
} else {
document.getElementById('pagc').src=inbivalue;
}
}
}
console.log('108');
}

function atab(inbi) {
//alert(0);
ainbivalue=inbi.value;
if (ainbivalue.indexOf('data:') == 0) {
//alert(10);
document.getElementById('amime').value=ainbivalue.split('ata:')[1].split(';')[0];
//alert(20);
} else {
console.log('300');
document.getElementById('apagc').src=ainbivalue;
}
}

function vtab(inbi) {
vinbivalue=inbi.value;
if (vinbivalue.indexOf('data:') == 0) {
document.getElementById('vmime').value=vinbivalue.split('ata:')[1].split(';')[0];
} else {
console.log('400');
document.getElementById('vpagc').src=vinbivalue;
}
}

function imgthere(iois) {
var ee, eee, isthere=false, str="";
try {
if (iois != null) {
var aconto = (iois.contentWindow || iois.contentDocument);
if (aconto != null) {
if (aconto.document) { aconto = aconto.document; }
if (aconto.body != null) {
try {
str=aconto.body.innerHTML;
if (str.length > 0) {
if (str.toLowerCase().indexOf(">not found<") == -1 && str.toLowerCase().indexOf("data:") == -1 && str.toLowerCase().indexOf("our home page for your perusal") == -1) isthere=true;
}
} catch (ee) { }
}
}
}
} catch (eee) { }
return isthere;
}

function pretryts() {
lastdivts=document.getElementById('divts').innerHTML;
thisdivts=lastdivts;
//document.getElementById('divts').innerHTML='';
tryts();
}

function tryts() {
if (lastdivts == '' && document.getElementById('divts').innerHTML != '') {
if (document.getElementById('divts').innerHTML.trim() == '') {
lastdivts=document.getElementById('divts').innerHTML;
thisdivts=lastdivts;
console.log('500');
if (mampok) {
document.getElementById('ts').src=mampprefix + "macos_say_record.php?getts=" + Math.floor(Math.random() * 19876543);
} else {
document.getElementById('ts').src=document.URL.split('//')[0] + "//www.rjmprogramming.com.au/" + "macos_say_record.php?getts=" + Math.floor(Math.random() * 19876543);
}
setTimeout(tryts, 2000);
}
//document.title+=' :' + document.getElementById('divts').innerHTML;
} else {
lastdivts=thisdivts;
thisdivts=document.getElementById('divts').innerHTML;
if (lastdivts.trim() == thisdivts.trim()) {
//document.title+=' x' + document.getElementById('divts').innerHTML;
console.log('600');
if (mampok) {
document.getElementById('ts').src=mampprefix + "macos_say_record.php?getts=" + Math.floor(Math.random() * 19876543);
} else {
document.getElementById('ts').src=document.URL.split('//')[0] + "//www.rjmprogramming.com.au/" + "macos_say_record.php?getts=" + Math.floor(Math.random() * 19876543);
}
setTimeout(tryts, 2000);
}
}
}

function trymamp() {
var lft="100";
if (('' + screen.width) != '') {
lft=Math.max(0,eval(eval('' + screen.width) - 900));
}
console.log('30');
if (mampok) {
if (wois) { wois.close(); wois=null; }
wois=window.open(mampprefix + "macos_say_record.php?saythis=" + encodeURIComponent(document.getElementById('myta').value),"_blank","top=140,left=" +lft + ",width=900,height=720");
} else if (1 == 1) {
console.log('31 ' + document.URL.split('//')[0] + "//www.rjmprogramming.com.au/" + "macos_say_record.php?saythis=" + encodeURIComponent(document.getElementById('myta').value));
wois=window.open(document.URL.split('//')[0] + "//www.rjmprogramming.com.au/" + "macos_say_record.php?saythis=" + encodeURIComponent(document.getElementById('myta').value),"_blank","top=140,left=" + lft + ",width=900,height=720");
console.log('32');
}
//alert('temporary hold up');
}

function oicheck(iois) {
mampok=false;
if (iois != null) {
var aconto = (iois.contentWindow || iois.contentDocument);
if (aconto != null) {
if (aconto.document) { aconto = aconto.document; }
if (aconto.body != null) {
if (aconto.body.innerHTML.toLowerCase().indexOf('>not found<') == -1 && aconto.body.innerHTML.toLowerCase().indexOf("our home page for your perusal") == -1) {
mampok=true;
}
}
}
}
console.log('700');
if (mampok) {
document.getElementById('ts').src=mampprefix + "macos_say_record.php?getts=" + Math.floor(Math.random() * 19876543);
} else {
document.getElementById('ts').src=document.URL.split('//')[0] + "//www.rjmprogramming.com.au/" + "macos_say_record.php?getts=" + Math.floor(Math.random() * 19876543);
}
}

function showStuff(evt) {
var ewrt;
//document.title+=' ' + zhr.readyState;
if (zhr.readyState == 4) {
//document.title+=':' + zhr.status;
if (zhr.status == 200) {
if (zhr.responseText.trim() == '') { alert('Email sent with downloadable HTML attachment.'); } else { alert(zhr.responseText.split('</')[0].split('>')[eval(-1 + zhr.responseText.split('</')[0].split('>').length)]); }
} else if (zhr.status == 0) {
try {
if (wois != null && (document.getElementById('vurl').value.trim().indexOf('data:') == 0 || document.getElementById('aurl').value.indexOf('data:') == 0)) {
if (wois.closed) {
wois=null;
} else {
wois.focus();
if (document.getElementById('aurl').value.indexOf('data:') == 0 && wois.document.getElementById('result').innerHTML != document.getElementById('aurl').value) {
wois.document.getElementById('result').innerHTML=document.getElementById('aurl').value;
} else if (document.getElementById('vurl').value.trim().indexOf('data:') == 0 && wois.document.getElementById('result').innerHTML != document.getElementById('vurl').value.trim()) {
wois.document.getElementById('result').innerHTML=document.getElementById('vurl').value.trim();
}
setTimeout(vlater,3000); //wois.voiceoverit(); // wois.document.getElementById('avideo').click();
}
} else {
alert('Email not sent as access was blocked.');
}
} catch(ewrt) {
alert('Email Not Sent as Access was Blocked.');
}
}
}
}

function comingsoon() {
//alert(1);
var ezhr;
if (!document.getElementById('bpalette')) {
document.getElementById('dif').innerHTML+='<div id=bpalette style=display:none;></div>';
//alert(11);
}
//alert(111);
if (document.getElementById('iurl').value == '') {
waitforalatr();
} else {
alatr();
//alert(document.getElementById('bpalette').innerHTML);
altsubject='My ' + subjectword + ' ...';
var tois='';
attachment='';
if (document.URL.indexOf('/localhost') != -1 || 1 == 1) { // Many email clients do not accept the default Inline HTML Emails here, so to force an HTML Attachment Email that emailee downloads, append space(s) at the end.
tois=prompt('Who do you want to email to? Optionally hashtag (#) separate your own personal subject line to the email (eg. theemail@theemailplace.com#Hello there, it is moi.) Many email clients do not accept the default Inline HTML Emails here, so to force an HTML Attachment Email that emailee downloads, append space(s) at the end.', '');
} else {
tois=prompt('Who do you want to email to? Optionally hashtag (#) separate your own personal subject line to the email (eg. theemail@theemailplace.com#Hello there, it is moi.)', '');
}
if (tois == null) { tois=''; }
if (tois.indexOf('@') != -1) {
if (wois) {
//alert(11);
if (!wois.closed) {
//alert(tois);
document.getElementById('pemail').innerHTML=tois;
wois.document.getElementById('pemail').innerHTML=tois;
setTimeout(elater, 5000); //wois.emailit();
}
}
if ((tois + '~!$').indexOf(' ~!$') != -1) { attachment='&attachment=true'; tois=tois.trim(); }
var alts=tois.split('#');
if (alts.length > 1) { altsubject=alts[1]; tois=alts[0]; }
//var text=document.getElementById('result').innerHTML;
//document.getElementById('ifem').innerHTML="<iframe onload=checkz(this); src='//www.rjmprogramming.com.au/HTMLCSS/emailhtml.php?to=" + encodeURIComponent(tois) + '&subj=' + thisencodeURIComponent(altsubject) + ' ... ') + '&sliceminusten=' + encodeURIComponent(text.slice(-10)) + "' style=width:500px;height:600px;></iframe>";

zhr = new XMLHttpRequest();
zform=new FormData();
//zform.append('inline', '');
if (attachment == '') {
zform.append('inline', '');
}
zform.append('to', tois);
zform.append('subj', altsubject + ' ... ');
//alert('' + document.getElementById('bpalette').innerHTML.split('#').length + ' (hash count + 1) ' + document.getElementById('bpalette').innerHTML.split('data:').length + ' ... ' + document.getElementById('bpalette').innerHTML.split('data:')[1].substring(0,50) + ' ... ' + document.getElementById('bpalette').innerHTML.split('data:')[2].substring(0,50) + ' ... ' + document.getElementById('bpalette').innerHTML.slice(-350));
zform.append('tdhuhta', '<html><body>' + document.getElementById('bpalette').innerHTML.replace('<audio ','<audio loop ').replace('<video ','<video loop ').replace('position:absolute;','').replace('left:','margin-left:0.').replace('top:','margin-top:0.') + '</body></html>');
zhr.open('post', '//www.rjmprogramming.com.au/HTMLCSS/emailhtml.php', true);
zhr.onreadystatechange = showStuff;
//document.title='';
try {
zhr.send(zform);
} catch(ezhr) {
alert('Email not sent.');
}
document.getElementById('iurl').value='';
//alert('Email sent with downloadable HTML attachment.');
}

}
}

function elater() {
if (1 == 1) { wois.emailit(); }
}

function vlater() {
wois.voiceoverit();
}

function pchange(pois) {
eval('' + pois.id + '=' + pois.value);
var usedtobe=prefix.split('&fleft=')[1].split('&fontname=')[0];
var xangle=fangle;
if (xangle == '') { fangle='0'; }
prefix=prefix.replace('&fleft=' + usedtobe, '&fleft=' + fleft + encodeURIComponent(fleftp) + '&ftop=' + ftop + encodeURIComponent(ftopp) + '&fangle=' + encodeURIComponent(xangle));
}

function fsz(fszo) {
document.getElementById('myta').style.fontSize = '' + fszo.value + 'px';
prefix = prefix.replace(('' + prevsize).replace('px', '') + 'px', encodeURIComponent(fszo.value + 'px'));
prevsize = encodeURIComponent(fszo.value);
}
</script>
</head>
<body onload="if (1 == 1) { lookforinhousestyle(); } setTimeout(thegifnamegoesherelistener,1000); " id=xbody style='width:100%;height:100vh;'>
<h1><div onblur=titlefix(); style="display:inline-block;2px solid transparent;" id=subjectword contenteditable=true title='Can change this'>Haiku</div> Animated GIF Creator</h1>
<h3 id=myh3>RJM Programming - June, 2020</h3>
<table style='width:98%;'><tr><td>
<textarea onblur="if (this.value != '') { trymamp(); }" rows=10 cols=120 id=myta style="width:80%;font-size:24px;color:red;background:URL('./white.jpg');"></textarea></td><td>
Background URL <input onblur='ctab(this);' placeholder='' type='text' id=burl value='./white.jpg' style='inline-block;'></input><br>
Delay <input type='text' id=bdelay placeholder='400,400,400' value='' style='inline-block;'></input><br>
Fontname <input onblur="prefix=prefix.replace(prevfontname,encodeURIComponent(this.value)); prevfontname=encodeURIComponent(this.value);" type='text' id=bfontname value='Arial' style='inline-block;'></input><br>
Font Size <input onblur="fsz(this);" onchange="fsz(this);" type='number' id=bsize value='24' style='inline-block;width:40px;'></input>px  <input type=checkbox checked id=acc>(annotation accumulated lines)</input><br>
Position Left <input min=0 step=1 onblur=pchange(this); onchange=pchange(this); type='number' id=fleft value='40' style='inline-block;width:60px;'></input><select onchange=pchange(this); id=fleftp style='inline-block;'><option value='%'>%</option><option value='px'>px</option></select>  <br>Top  <input min=0 step=1 onblur=pchange(this); onchange=pchange(this); type='number' id=ftop value='40' style='inline-block;width:60px;'></input><select onchange=pchange(this); id=ftopp style='inline-block;'><option value='%'>%</option><option value='px'>px</option></select><br>
Font Angle[.Opacity] <input style=width:90%; type=text onblur=pchange(this); id=fangle value='' placeholder='Eg. 45.6 is 45 a/c text 0.6 opacity'></input></br>
Font Colour <input onchange="if (this.value.replace('#ff0000','red') != '') { hex2dec(this.value); }" onblur="if (this.value.replace('#ff0000','red') != '') { hex2dec(this.value); }" type='color' id=bcolour value='#ff0000' style='inline-block;'></input><br>
... optional ... <div style='display:inline-block;width:96px;height:30px;overflow:hidden;vertical-align:text-bottom;' data-style='border-top:1px solid black;border-bottom:1px solid black;border-left:2px solid yellow;border-right:1px solid yellow;'><iframe frameborder=0 style='border-left:1px solid black;border-right:1px solid black;width:173px;height:228px;margin-top:-194px;' src='../../../HTMLCSS/client_browsing.htm?d=" . rand(0,18765432) . "'></iframe></div><br>
<input type=hidden id=iurl value=''></input>Audio URL <input onblur='atab(this);' type='text' id=aurl value='' title='' style='inline-block;'></input><input type=hidden id=amime value=''></input><br>
Video URL <input onblur='vtab(this);' type='text' id=vurl value='' title='' placeholder='' style='inline-block;'></input><input type=hidden id=vmime value=''></input><br>
<input name=fred id=fred value='255' type=hidden></input><input name=fgreen id=fgreen value='0' type=hidden></input><input name=fblue id=fblue value='0' type=hidden></input>
</td></tr>
</table>
<br>
<!--form-->
<input type=hidden id=thegifnamegoeshere name=thegifnamegoeshere value=''></input>
<input id=bag style='background-color:yellow;' type=button onclick="createbi(document.getElementById('myta').value);" value="Create Haiku Animated GIF"></input> <input style="display:none;background-color:yellow;" id=bemail type=button onclick="if (document.getElementById('thisaudio') || document.getElementById('aurl').value.indexOf('data:') == 0 || document.getElementById('vurl').value.trim().indexOf('data:') == 0) { comingsoon(); } else { document.getElementById('aemail').click(); } " value="Email Link for Last Haiku"></input> <input style="display:none;background-color:yellow;" id=bsms type=button onclick="var smsee=prompt('SMS to?',''); if (smsee != null) { if (smsee != '') { document.getElementById('asms').href=document.getElementById('asms').href.replace(':&',':' + smsee + '&'); document.getElementById('asms').click(); } }" value="SMS Link for Last Haiku"></input> <div id=daudio style=display:inline-block;></div>
<hr class=hrcolbelow><br>
<!--/form-->
<a id=aemail href='mailto:?subject=My%20Haiku%20...%20shared%20with%20you%20...&body=' style='display:none;'>Email</a>
<a id=asms href='sms:&body=' style='display:none;'>SMS</a>
<iframe style='display:none;' src='./tutorial_to_animated_gif.php' id=agc name=argc></iframe>
<iframe style='display:none;' src='./tutorial_to_animated_gif.php' id=ts name=ts></iframe>
<iframe onload="if (imgthere(this)) { prevburl=document.getElementById('burl').value; } else { alert(prevburl.length); document.getElementById('burl').value=prevburl; inbivalue=prevburl; } " onerror="alert('lp:' + prevburl.length); document.getElementById('burl').value=prevburl;" style='display:none;' src='./tutorial_to_animated_gif.php' id=pagc></iframe>
<iframe onload="if (imgthere(this)) { prevaurl=document.getElementById('aurl').value; } else { document.getElementById('aurl').value=prevaurl; ainbivalue=prevaurl; } " onerror="document.getElementById('aurl').value=prevaurl;" style='display:none;' src='./tutorial_to_animated_gif.php' id=apagc></iframe>
<iframe onload="if (imgthere(this)) { prevvurl=document.getElementById('vurl').value; } else { document.getElementById('vurl').value=prevvurl; vinbivalue=prevvurl; } " onerror="document.getElementById('vurl').value=prevvurl;" style='display:none;' src='./tutorial_to_animated_gif.php' id=vpagc></iframe>
<input type=text style='position:absolute;left:-200px;top:-200px;' value=''></input>
<div id=dform></div>
<div id=dif></div>
<div id=pemail style=display:none;></div>
<div id=divts style=display:none;></div>
</body>
</html>