<!doctype html>
<html>
<head>
<title>Client Browsing - RJM Programming - June, 2019</title>
<script type=text/javascript src=../web_share_api_test.js?populate=as_necessary98476 defer></script>
<style>
.pcanvas {
display: none;
}

.pvideo {
opacity: 0;
width: 0;
height: 0;
}

</style>
<script type='text/javascript'>
var middlerestcont='';
var middlerestname='';

var evt=null;
var isag=-1, isagname='';
var fromst='@keyframes fade';
var tost='@-webkit-keyframes fade';
var ctimode=false, ctiname='', nuancec='', lastsrc='', prad=200, preihf='', iusuff='';
var eighteen='18';
var pdubit='', tdhi='', tdbi='', huherr;
if (window.parent) {
try {
pdubit=('' + parent.document.URL);
} catch(huherr) { pdubit=''; }
}
if (window.top) {
try {
tdhi=('' + top.document.head.innerHTML);
} catch(huherr) { tdhi=''; }
try {
tdbi=('' + top.document.body.innerHTML);
} catch(huherr) { tdbi=''; }
}
var bighuhcb=('' + pdubit + '&' + document.URL + '&' + tdhi + tdbi);
var ourcbi='cbi', isdone=false;
var wdingandon=location.search.split('wor' + 'ding=')[1] ? decodeURIComponent(location.search.split('wor' + 'ding=')[1].split('&')[0]) : "";
var wdingthere=(bighuhcb.indexOf('&word' + 'ing=') != -1 ? decodeURIComponent(bighuhcb.split('&word' + 'ing=')[1].split('&')[0].split('"')[0].split("'")[0]) : '');

var ansis='';

var mtypes = ["audio/x-aiff","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 mexts = [".aiff",".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 documentURL=document.URL;
var lastis='';
var noinitialstwo=false;
var tconto=null;
var wponeokay=true;
var rawdataurl='', gourij=0;
var x=0, y=0, lastx=0, lasty=0;
var elemLeft=0, elemTop=0;
var fs=[], filn='', file, lasttype='';
var ourwois=null;
var elem=null, context;
var lastiw=0, lastih=0;
var sofar=" ";
var files=[], start, stop, reader=[];
var kij=0, imgo=[], kkij=0, blob=[];
var wo=null, wp1='', wp2='_blank';
var wid='', wis=0, his=0, wx=0, wy=0;
var ipre='<div style="display:block;" id=predivgb></div><div style="display:inline-block;" id=divgb><img style="display:inline-block;" id=gb src="', isuf='"></img></div>';
var apre='  <div style="display:block;" id=predivab></div><div style="display:inline-block;" id=divab><audio style="display:inline-block;" id=ab controls type="', amid='" src="', asuf='"></audio></div>';
var vpre='  <div style="display:block;" id=predivvb></div><div style="display:inline-block;" id=divvb><video style="display:inline-block;" id=vb controls type="', vmid='" src="', vsuf='"></video></div>';
var opre='  <iframe style="display:inline-block;" id=ib width="90%" height="90%" src="', osuf='"></iframe>';
var deviceWidth = window.orientation == 0 ? window.screen.height: window.screen.width;
var deviceHeight = window.orientation == 0 ? window.screen.width : window.screen.height;
var tnsize=64, mfiletype='image/jpeg', mfilename='';
var xx=[], yy=[], ixy=0, awis=[], ahis=[], awx=[], awy=[], awid=[], ten=10;
var xstocheck=[];
var xstoset=[];
var xstohash=[];

var thecanvas = null;
var thecontext = null;
var thevideo = null;

var isIE = (navigator.appName == 'Microsoft Internet Explorer' || (navigator.appName == "Netscape" && navigator.appVersion.indexOf('Edge') > -1));
var dsplus="Image";
var dsprefix="<details open><summary>"; // + dsplus
var dsmid="</summary>";
var dssuffix="<hr></details>";
var hin=0, ihin=0;
var iinum=0, jjnum=0;
var burlstr='', turlstr='';

var gifslides=[];
var tbins=[];

if (isIE) {
dsprefix="<div style=vertical-align:top; id=divsummarytotalsimage style='display:inline-block;vertical-align:top;' onclick=\"document.getElementById('xx').style.display=document.getElementById(tdownright('xx')).style.display.replace('inline-block','no~ne').replace('none','inline-bl~ock').replace('~','');\"><span style='display:iNlInE-bLoCk;' id=rightimage>▶</span><span style='display:NoNe;' id=downimage>🔻</span> <DIV id=divshtimage style='display:inline-block;vertical-align:top;'><span id=summarytotalsimage>"; // + dsplus
dsmid="</span>";
dssuffix="</DIV><hr></div>";
}

var ingif='', ingifstyle='filter: none;', ingifint=0, ingifchosen=false;

function prefetch(whatgifmaybe) { // thanks to https://stackoverflow.com/questions/69564118/how-to-get-duration-of-gif-image-in-javascript#:~:text=Mainly%20use%20parseGIF()%20%2C%20then,duration%20of%20a%20GIF%20image.
if (window.top) {
if (window.self != window.top) {
if (top.document.URL.indexOf('/extract_ag_slide_huh_of.htm') != -1) {
top.setgurl(whatgifmaybe);
}
}
}
if ((whatgifmaybe.toLowerCase().trim().split('#')[0] + '?').indexOf('.gif?') != -1 || whatgifmaybe.indexOf('data:image/gif') == 0) {
ingif=whatgifmaybe;
document.body.style.cursor='progress';
fetch(whatgifmaybe)
.then(res => res.arrayBuffer())
.then(ab => isGifAnimated(new Uint8Array(ab)))
.then(console.log);
}
}

function clooktv(intv) {
var finds=[];
if (intv.indexOf('filter:') == 0) {
document.getElementById('imgag').title=intv;
if (ingifchosen) {
finds=document.getElementById('simgag').outerHTML.split('>' + intv + '</option>');
if (eval('' + finds.length) > 1) {
document.getElementById('simgag').innerHTML=document.getElementById('simgag').innerHTML.replace(' selected',' data-selected').replace('>' + ingifstyle + '</option>', ' selected>' + ingifstyle + '</option>');
}
}
document.body.innerHTML+='<style> #imgag { ' + intv + ' } </style>';
} else {
setTimeout(callresell, 1000);
}
return intv;
}

function changelook() {
var finds=[];
if (ingifint > 0) {
setTimeout(changelook, ingifint);
if (ingifchosen) {
ingifchosen=false;
} else {
finds=document.getElementById('simgag').outerHTML.split('>' + ingifstyle + '</option>');
if (eval('' + finds.length) > 1) {
if (finds[1].indexOf('</select>') == 0) {
ingifstyle='filter: none;';
document.getElementById('simgag').innerHTML=document.getElementById('simgag').innerHTML.replace(' selected',' data-selected').replace('>' + ingifstyle + '</option>', ' selected>' + ingifstyle + '</option>');
} else {
ingifstyle=finds[1].split('>')[1].split('<')[0];
if (ingifstyle.indexOf('filter:') != 0) { ingifstyle='filter: none;'; }
document.getElementById('simgag').innerHTML=document.getElementById('simgag').innerHTML.replace(' selected',' data-selected').replace('>' + ingifstyle + '</option>', ' selected>' + ingifstyle + '</option>');
}
document.getElementById('simgag').value=clooktv(ingifstyle);
}
}
}
}

/** @param {Uint8Array} uint8 */
function isGifAnimated (uint8) { // thanks to https://stackoverflow.com/questions/69564118/how-to-get-duration-of-gif-image-in-javascript#:~:text=Mainly%20use%20parseGIF()%20%2C%20then,duration%20of%20a%20GIF%20image.
let duration = 0;
for (let i = 0, len = uint8.length; i < len; i++) {
if (uint8[i] == 0x21
&& uint8[i + 1] == 0xF9
&& uint8[i + 2] == 0x04
&& uint8[i + 7] == 0x00)
{
const delay = (uint8[i + 5] << 8) | (uint8[i + 4] & 0xFF);
duration += delay < 2 ? 10 : delay;
}
}
//alert('' + eval(duration / 100));
if (eval(duration / 100) > 0.11 || document.URL.indexOf('Allimages') != -1) {
//alert('' + duration);
var damore='', wpthere=false;
if (document.getElementById('aside')) {
if (document.getElementById('aside').outerHTML.toLowerCase().indexOf('<div') == 0) {
damore=' showing <select data-oncontextmenu=resell(event,this); data-ontouchmove=resell(event,this); onchange=\"ingifchosen=true; ingifstyle=clooktv(this.value);\" id=simgag size=14><option contenteditable=true value=\"filter: none;\" selected>filter: none;</option><option contenteditable=true value=\"filter: blur(5px);\">filter: blur(5px);</option><option contenteditable=true value=\"filter: brightness(0.4);\">filter: brightness(0.4);</option><option contenteditable=true value=\"filter: contrast(200%);\">filter: contrast(200%);</option><option contenteditable=true value=\"filter: drop-shadow(16px 16px 20px blue);\">filter: drop-shadow(16px 16px 20px blue);</option><option contenteditable=true value=\"filter: grayscale(50%);\">filter: grayscale(50%);</option><option contenteditable=true value=\"filter: hue-rotate(90deg);\">filter: hue-rotate(90deg);</option><option contenteditable=true value=\"filter: invert(75%);\">filter: invert(75%);</option><option contenteditable=true value=\"filter: opacity(25%);\">filter: opacity(25%);</option><option contenteditable=true value=\"filter: saturate(30%);\">filter: saturate(30%);</option><option contenteditable=true value=\"filter: sepia(60%);\">filter: sepia(60%);</option><option contenteditable=true value=\"filter: contrast(175%) brightness(33%);\">filter: contrast(175%) brightness(33%);</option><option contenteditable=true value=\"filter: drop-shadow(3px 3px red) sepia(100%) drop-shadow(-3px -3px blue);\">filter: drop-shadow(3px 3px red) sepia(100%) drop-shadow(-3px -3px blue);</option><option contenteditable=true value=\"Change\">Change</option></select><br><br><img onload=\"if (ingifint == 0) { ingifint=' + eval(duration * 10) + '; setTimeout(changelook, eval(800 + Math.abs(ingifint))); }\" title=\"filter: none;\" src=\"' + ingif + '\" id=imgag></img><br>';
//ingifint=eval(duration * 10);
//setTimeout(changelook, eval(duration * 10));
if (window.parent) {
if (('' + top.document.URL).indexOf('/splice_audio.') != -1) {
//alert(parent.document.URL);
var qsug=1;
while (top.document.getElementById('audio' + qsug) && top.document.getElementById('audio' + qsug).value != '') {
qsug++;
}
if (!top.document.getElementById('audio' + qsug)) { qsug--; }
if (eval(duration / 100) > 0.11) {
//alert(parent.document.URL + ' ... ' + qsug + ' ... ' + eval(duration / 100));
if (qsug > 1) {
if (('' + top.document.getElementById('end' + eval(-1 + qsug)).value) == '-1' && top.document.getElementById('audio' + eval(-1 + qsug)).value.toLowerCase().replace('.gif','/gif').indexOf('/gif') != -1) {
qsug--;
//setTimeout(function(){ top.document.getElementById('audio' + eval(1 + qsug)).value=''; }, 1000);
}
//alert('why?' + top.document.getElementById('audio' + eval(-1 + qsug)).value);
}
top.document.getElementById('end' + qsug).value='' + eval(duration / 100);
top.doinput(top.document.getElementById('audio' + qsug));
setTimeout(function(){ location.href=document.URL; }, 5000);
}
}
if (window.self !== window.parent && parent.document.getElementById('aside')) {
wpthere=true;
parent.document.getElementById('aside').style.display='block';
if (eval(duration / 100) > 0.11) {
parent.document.getElementById('aside').innerHTML='Animated GIF ' + isagname + ' duration is ' + eval(duration / 100) + ' seconds ' + damore;
} else {
parent.document.getElementById('aside').innerHTML='Image ' + isagname + ' duration is ' + eval(duration / 100) + ' seconds ' + damore;
}
parent.document.getElementById('aside').scrollIntoView();
parent.document.getElementById('image').style.opacity='0.5';
parent.document.getElementById('image').style.width='5%';
parent.document.getElementById('isub').style.opacity='0.5';
} else {
document.getElementById('aside').style.display='block';
if (eval(duration / 100) > 0.11) {
document.getElementById('aside').innerHTML='Animated GIF ' + isagname + ' duration is ' + eval(duration / 100) + ' seconds ' + damore;
} else {
document.getElementById('aside').innerHTML='Image ' + isagname + ' duration is ' + eval(duration / 100) + ' seconds ' + damore;
}
}
} else {
document.getElementById('aside').style.display='block';
if (eval(duration / 100) > 0.11) {
document.getElementById('aside').innerHTML='Animated GIF ' + isagname + ' duration is ' + eval(duration / 100) + ' seconds ' + damore;
} else {
document.getElementById('aside').innerHTML='Image ' + isagname + ' duration is ' + eval(duration / 100) + ' seconds ' + damore;
}
}
if (!wpthere) { document.getElementById('aside').scrollIntoView(); }
} else if (eval(duration / 100) > 0.11) {
document.getElementById('aside').innerHTML=' ( image ' + isagname + ' duration is ' + eval(duration / 100) + ' seconds)' + damore;
} else {
document.getElementById('aside').innerHTML=' ( animated GIF ' + isagname + ' duration is ' + eval(duration / 100) + ' seconds)' + damore;
}
}
//} else {
//alert('duration=' + duration);
}
document.body.style.cursor='pointer';
return duration / 100; // if 0.1 is not an animated GIF
}

function callresell() {
var oselo=document.getElementById('simgag');
var svalis='';
var sc=';';
var changefound=false;
if (document.getElementById('imgag')) {
oselo.value=document.getElementById('imgag').title;
}
var reselit=prompt('Please change the semicolon separated options list. Optionally hash # separate a CSS filter refresh interval in seconds (currently ' + eval(Math.abs(ingifint) / 1000.000) + ' seconds).', oselo.innerText);
if (reselit != null) {
if (reselit.indexOf('#') != -1) {
if (ingifint < 0) {
ingifint=Math.round(eval(-1000.0 * eval('' + reselit.split('#')[1].split(';')[0])));
} else {
ingifint=Math.round(eval(1000.0 * eval('' + reselit.split('#')[1].split(';')[0])));
}
reselit=reselit.replace('#' + reselit.split('#')[1].split(';')[0], '');
}
}
if (reselit == null) {
return '';
} else if (reselit != oselo.innerText) {
var sih=oselo.innerHTML;
var vsl=reselit.split(';');
var shi=sih.split('</option>');
var ssize='' + oselo.size;
var vssize=0;
var newih='';
for (var ihi=0; ihi<vsl.length; ihi++) {
if (vsl[ihi].trim() != '') {
if (vsl[ihi].trim() == 'Change') { changefound=true; sc=''; } else { sc=';'; }
if (eval('' + shi.length) > ihi) {
if (eval('' + (shi[ihi] + '</option>').split(vsl[ihi].trim() + sc).length) == 3) {
newih+=shi[ihi] + '</option>';
vssize++;
} else {
svalis=shi[ihi].split(' value="')[1].split('"')[0];
newih+=shi[ihi].split('>')[0].replace(svalis, vsl[ihi].trim() + sc) + '>' + vsl[ihi].trim() + sc + '</option>';
vssize++;
}
} else if (vsl[ihi].trim().indexOf('filter:') == 0) {
newih+='<option contenteditable=true value="' + vsl[ihi].trim() + sc + '">' + vsl[ihi].trim() + sc + '</option>';
vssize++;
} else {
newih+='<option contenteditable=true value="' + vsl[ihi].trim() + '">' + vsl[ihi].trim() + '' + '</option>';
vssize++;
}
}
}
if (!changefound) {
newih+='<option contenteditable=true value="Change">Change</option>';
vssize++;
}
oselo.innerHTML=newih;
if (eval('' + ssize) != eval('' + vssize)) {
oselo.size='' + eval('' + vssize);
}
}
return '';
}

function resell(evt,oselo) {
evt.preventDefault();
evt.stopPropagation();
//var reselit=prompt('Please change the comma separated options list', oselo.innerText);
}

function dtlvize() {
document.getElementById('dtlv').scrollIntoView();
}

function postagc(invx) {
var sofarform='<form style=display:none; target=posttid method=POST action=';
if (eval('' + invx.length) > 800) {
var actions=invx.split('?');
if (actions.length >= 2) {
sofarform+=actions[0] + '><input type=submit id=igo value=Go style=display:none;></input></form>';
//alert(sofarform);
var argsare=actions[1].split('&');
for (var iargsare=0; iargsare<argsare.length; iargsare++) {
//alert(argsare[iargsare]);
if (decodeURIComponent(argsare[iargsare].split('=')[1]).indexOf('data:') == 0 && 1 == 2) {
sofarform=sofarform.replace('><input ', '> <input style=display:none; name=' + argsare[iargsare].split('=')[0] + ' value="' + decodeURIComponent(argsare[iargsare].split('=')[1]).split('#')[0] + '"></input><input ');
} else {
sofarform=sofarform.replace('><input ', '> <input style=display:none; name=' + argsare[iargsare].split('=')[0] + ' value="' + decodeURIComponent(argsare[iargsare].split('=')[1]) + '"></input><input ');
}
//if (argsare[iargsare].split('=')[0] == 'slideshow') { alert(gifslides[0].slice(-70) + ' vs ' + decodeURIComponent(argsare[iargsare].split('=')[1]).slice(-270)); }
}
document.getElementById('dform').innerHTML=sofarform;
//if (top.document.getElementById('result')) { alert(' ' + document.getElementById('dform').innerHTML); }
document.getElementById('igo').click();
return '#';
}
}
return invx;
}

function vaprefix(insr) {
return insr;
}


function listenforx() {
var alloneblank=true;
if (xstocheck.length == 0) { alloneblank=false; }
for (var ik=0; ik<xstocheck.length; ik++) {
if (xstocheck[ik] != '' && xstocheck[ik] != ' ') {
if (xstohash[ik] != '') {
parent.document.getElementById(xstoset[ik]).value=xstocheck[ik] + ('#' + xstohash[ik]).replace('#undefined','');
} else {
parent.document.getElementById(xstoset[ik]).value=xstocheck[ik];
}
xstocheck[ik]=' ';
} else if (xstocheck[ik] == '') {
if (document.getElementById('x' + xstoset[ik])) {
if (document.getElementById('x' + xstoset[ik]).value != '') {
xstocheck[ik]=document.getElementById('x' + xstoset[ik]).value;
}
}
alloneblank=false;
}
}
if (!alloneblank) { setTimeout(listenforx,1000); } else { xstocheck=[]; xstoset=[]; document.getElementById('lhcs').innerHTML=''; }
}

function postturl() {
if (turlstr != '') {
if (turlstr.substring(0,1) == ',') {
document.getElementById('lhcs').innerHTML+=turlstr.substring(1).split(',')[0];
turlstr=turlstr.replace('+' + turlstr.substring(1).split(',')[0],'');
} else {
document.getElementById('lhcs').innerHTML+=turlstr;
turlstr='';
}
}
}

function postburl() {
if (burlstr != '') {
if (burlstr.substring(0,1) == ',') {
document.getElementById('lhcs').innerHTML+=burlstr.substring(1).split(',')[0];
burlstr=burlstr.replace('+' + burlstr.substring(1).split(',')[0],'');
} else {
document.getElementById('lhcs').innerHTML+=burlstr;
burlstr='';
}
}
}

function textlocalhostmap(ina, inb, ptbid, oj) {
if (document.URL.indexOf('//localhost') != -1) {
console.log('textlocalhostmap: ' + ina + ',' + inb + ',' + ptbid + ',' + oj);
if (oj == 0) { gourij=0; if (1 == 1) { parent.document.getElementById('thewords').title=''; parent.document.getElementById('aurl').title=''; } }
if (eval(oj % 2) == 0 || 1 == 1) {
parent.document.getElementById('thewords').title+='|' + ina.trim() + inb;
}
//top.document.title=parent.document.getElementById('vurl').title + parent.document.getElementById('aurl').title;
if (parent.document.getElementById('resultav')) {
turlstr+=',<iframe src="../macos_ffmpeg_convert.php?vsfs=' + ina.trim() + '&oj=' + oj + '&turl=y&vsfn=' + encodeURIComponent(inb) + '&vsfi=' + encodeURIComponent('x' + ptbid) + '&vsfu=' + encodeURIComponent(document.URL) + '"></input>';
} else if (document.URL.indexOf('=csv') == -1) {
turlstr+=',<iframe src="../macos_textutil_convert.php?vsfs=' + ina.trim() + '&oj=' + oj + '&turl=y&vsfn=' + encodeURIComponent(inb) + '&vsfi=' + encodeURIComponent('x' + ptbid) + '&vsfu=' + encodeURIComponent(document.URL) + '"></input>';
}
setTimeout(postturl, eval(3000 + oj * 2000));
}
return ina;
}

function burllocalhostmap(ina, inb, ptbid, oj) {
if (document.URL.indexOf('//localhost') != -1) {
console.log('burllocalhostmap: ' + ina + ',' + inb + ',' + ptbid + ',' + oj);
if (oj == 0) { gourij=0; if (1 == 1) { parent.document.getElementById('vurl').title=''; parent.document.getElementById('aurl').title=''; } }
if (eval(oj % 2) == 0 || 1 == 1) {
parent.document.getElementById('vurl').title+='|' + ina.trim() + inb;
} else {
parent.document.getElementById('aurl').title+='|' + ina.trim() + inb;
}
//top.document.title=parent.document.getElementById('vurl').title + parent.document.getElementById('aurl').title;
burlstr+=',<iframe src="../macos_say_record.php?vsfs=' + ina.trim() + '&oj=' + oj + '&burl=y&vsfn=' + encodeURIComponent(inb) + '&vsfi=' + encodeURIComponent('x' + ptbid) + '&vsfu=' + encodeURIComponent(document.URL) + '"></input>';
setTimeout(postburl, eval(3000 + oj * 2000));
}
return ina;
}

function localhostmap(ina, inb, ptbid) {
var exifj='';
if (document.URL.indexOf('//localhost') != -1) {
console.log('localhostmap: ' + ina + ',' + inb + ',' + ptbid);
if (xstocheck.length == 0) { setTimeout(listenforx,2000); }
//if (inb.indexOf("eptune") != -1) { alert(inb + ' ' + ptbid + ' ' + ina); }
xstoset.push(ptbid);
xstocheck.push("");
if (eval('' + document.getElementById('lhsh').innerHTML.split('#').length) >= eval('' + hin)) {
xstohash.push(document.getElementById('lhsh').innerHTML.split('#')[eval('' + hin)]);
} else {
xstohash.push("");
}
if (ptbid == '') { exifj='exif=y&'; }
document.getElementById('lhcs').innerHTML+='<input type=hidden id=x' + ptbid + ' value=""></input>';
document.getElementById('lhcs').innerHTML+='<iframe src="../macos_say_record.php?' + exifj + 'vsfs=' + ina.trim() + '&vsfn=' + encodeURIComponent(inb) + '&vsfi=' + encodeURIComponent('x' + ptbid) + '&vsfu=' + encodeURIComponent(document.URL) + '"></input>';
hin++;
}
return ina;
}

function tdownright(inid) {
if (inid.substring(0,1) == 'g') {
document.getElementById('rightimage').style.display=document.getElementById('rightimage').style.display.toLowerCase().replace('inline-block','no~ne').replace('none','inline-bl~ock').replace('~',''); //'inline-block';
document.getElementById('downimage').style.display=document.getElementById('downimage').style.display.toLowerCase().replace('inline-block','no~ne').replace('none','inline-bl~ock').replace('~','');
} else if (inid.substring(0,1) == 'a') {
document.getElementById('rightaudio').style.display=document.getElementById('rightaudio').style.display.toLowerCase().replace('inline-block','no~ne').replace('none','inline-bl~ock').replace('~','');
document.getElementById('downaudio').style.display=document.getElementById('downaudio').style.display.toLowerCase().replace('inline-block','no~ne').replace('none','inline-bl~ock').replace('~','');
} else if (inid.substring(0,1) == 'v') {
document.getElementById('rightvideo').style.display=document.getElementById('rightvideo').style.display.toLowerCase().replace('inline-block','no~ne').replace('none','inline-bl~ock').replace('~','');
document.getElementById('downvideo').style.display=document.getElementById('downvideo').style.display.toLowerCase().replace('inline-block','no~ne').replace('none','inline-bl~ock').replace('~','');
} else if (inid.substring(0,1) == 'i') {
document.getElementById('rightother').style.display=document.getElementById('rightother').style.display.toLowerCase().replace('inline-block','no~ne').replace('none','inline-bl~ock').replace('~','');
document.getElementById('downother').style.display=document.getElementById('downother').style.display.toLowerCase().replace('inline-block','no~ne').replace('none','inline-bl~ock').replace('~','');
}
return inid;
}

function downright(inid) {
if (inid.substring(0,1) == 'g') {
document.getElementById('rightimage').style.display='inline-block';
document.getElementById('downimage').style.display='none';
} else if (inid.substring(0,1) == 'a') {
document.getElementById('rightaudio').style.display='inline-block';
document.getElementById('downaudio').style.display='none';
} else if (inid.substring(0,1) == 'v') {
document.getElementById('rightvideo').style.display='inline-block';
document.getElementById('downvideo').style.display='none';
} else if (inid.substring(0,1) == 'i') {
document.getElementById('rightother').style.display='inline-block';
document.getElementById('downother').style.display='none';
}
return inid;
}

function ourencodeURIComponent(inx) {
return inx;
}

function gifslidesit() {
if (1 == 2) {
var xzhr = new XMLHttpRequest();
var xform=new FormData();
var sss='';
xform.append('stitle', 'slideshow');
xform.append('delay', '400');
xform.append('gfn', '');
xform.append('numslides', '' + gifslides.length);
for (var iip=1; iip<=gifslides.length; iip++) {
xform.append('slideshow' + sss, gifslides[eval(-1 + iip)]);
sss='' + eval(1 + iip);
alert(document.getElementById('tid').src + ' next is ' + sss + ' ... ' + gifslides[eval(-1 + iip)]);
}
xzhr.open('post', document.getElementById('tid').src, true);
xzhr.send(xform);
}

var prefix='?stitle=' + encodeURIComponent('My Media Mix') + '&gfn=y&tiurl=&fsize=8px&fleft=5' + encodeURIComponent('%') + '&ftop=5' + encodeURIComponent('%') + '&delay=400&fontname=Arial';
var suffix='', delim='&', nextnum=1, sofar='';
for (var ilines=0; ilines<gifslides.length; ilines++) {
//suffix+=delim + encodeURIComponent(gifslides[ilines]);
//sofar+=encodeURIComponent(gifslides[ilines]); // + ourencodeURIComponent('~')
suffix+=('&slideshow' + nextnum + '=').replace('&slideshow1=','&slideshow=') + encodeURIComponent(gifslides[ilines]); //sofar;
nextnum++;
}
//suffix=suffix.replace(/\=/g, '=' + encodeURIComponent(document.getElementById('burl').value + '#')); //.replace(/\`/g, '=');
//alert('http://localhost:8888/Htdocs/PHP/animegif/tutorial_to_animated_gif.php' + prefix + suffix);
//alert(prefix.replace(fromsub,tosub));
document.getElementById('tid').src=postagc(document.getElementById('tid').src.split('#')[0].split('?')[0] + vaprefix(prefix) + suffix);

}

function pfillit() {
var tryi=2;
if (window.parent) {
if (parent.document.getElementById('slideshow')) {
if (parent.document.getElementById('ispec') && parent.document.getElementById('outext')) {
if (('' + parent.document.getElementById('ispec').getAttribute('data-dgize')).replace(/^undefined/g,'').replace(/^null/g,'') == '') {
parent.document.getElementById('slideshow').value=lastis;
} else {
while (('' + parent.document.getElementById('slideshow').getAttribute('data-slide' + tryi)).replace(/^undefined/g,'').replace(/^null/g,'').trim() != '') {
tryi++;
}
if (('' + parent.document.getElementById('slideshow').getAttribute('data-slide' + tryi)).replace(/^undefined/g,'').replace(/^null/g,'') == '') {
tryi--;
}
if (('' + parent.document.getElementById('slideshow').getAttribute('data-slide' + Math.max(tryi,2))).replace(/^undefined/g,'').replace(/^null/g,'') != '') {
parent.document.getElementById('slideshow').removeAttribute('data-slide' + Math.max(tryi,2));
}
parent.document.getElementById('slideshow').setAttribute('data-slide' + Math.max(tryi,2), lastis);
}
} else {
parent.document.getElementById('slideshow').value=lastis;
}

}
}
}

function urlmassage(inul) {
if (inul.indexOf('&chl=') != -1 && inul.indexOf('chart.googleapis.com') != -1) {
return decodeURIComponent(inul.split('&chl=')[1].split('&')[0].split('#')[0].split('"')[0].split("'")[0]);
} else if (inul.indexOf('?chl=') != -1 && inul.indexOf('chart.googleapis.com') != -1) {
return decodeURIComponent(inul.split('?chl=')[1].split('&')[0].split('#')[0].split('"')[0].split("'")[0]);
}
return inul;
}

function readBlob(opt_startByte, opt_stopByte) {
var hsf="", ourij=0, myform='';
var blks=' ', variiuy=0, xssuffix='0', xnsuffix='2';
var defto='html';
var midw='_this_';

isag=-1;

files = document.getElementById('files').files;
xx=[];
yy=[];
ten=500;
ixy=0;
awis=[];
ahis=[];
awx=[];
awy=[];
awid=[];
reader=[];
blob=[];
//imgo=[];
var ij=0;
kij=0;
kkij=0;
lastiw=0;
lastih=0;
if (!files.length) {
alert('Please select a file!');
return;
}
iinum=files.length;
if (window.parent && eval('' + iinum) > 0) {
if (parent.document.getElementById('inum')) {
parent.document.getElementById('inum').value='' + iinum;
}
}
jjnum=0;
var aneg='-';
var vneg='-';
var isnworry=false;
var typeshavetobe=(location.search.split('typehastobe=')[1] ? ('' + (decodeURIComponent(location.search.split('typehastobe=')[1].split('&')[0]))) : ' ');
var isn=(location.search.split('numhastobe=')[1] ? eval('' + (decodeURIComponent(location.search.split('numhastobe=')[1].split('&')[0]))) : 0);
if (isn > 0) {
isnworry=(location.search.split('numhastobe=')[1] ? (iinum != eval('' + (decodeURIComponent(location.search.split('numhastobe=')[1].split('&')[0])))) : false);
}
if (isnworry) {
if (typeshavetobe.trim() != '') {
alert('Have to select ' + isn + ' files that are ' + typeshavetobe.replace(/video/g, ' video ').replace(/pdf/g, ' pdf ').replace(/document/g, ' document ').replace(/audio/g, ' audio ').replace(/image/g, ' image ').replace(/text/g, ' text ').replace(/application/g, ' application ') + ' type files.');
} else {
alert('Have to select ' + isn + ' files.');
}
return '';
}
if (typeshavetobe != '') {
wastypeshavetobe=typeshavetobe;
for (ij=0; ij<files.length; ij++) {
typeshavetobe=typeshavetobe.replace(('' + files[ij].type), '');
typeshavetobe=typeshavetobe.replace(('' + files[ij].type).split('/')[0], '');
if (files[ij].type.indexOf('/') != -1) {
typeshavetobe=typeshavetobe.replace(('' + files[ij].type).split('/')[1], '');
}
}
if (typeshavetobe.replace(/\//g,'').replace(/\*\./g,'').replace(/\,/g,'').trim() != '') {
alert('Have to select ' + wastypeshavetobe.replace(/video/g, ' video ').replace(/audio/g, ' audio ').replace(/pdf/g, ' pdf ').replace(/document/g, ' document ').replace(/image/g, ' image ').replace(/text/g, ' text ').replace(/application/g, ' application ') + ' type files.');
return '';
}
}
for (ij=0; ij<files.length; ij++) {
if ((files[ij].name.toLowerCase().trim().split('#')[0] + '?').indexOf('.gif?') != -1 || document.URL.indexOf('Allimages') != -1) {
isag=0; //prefetch(files[if].name);
isagname=files[ij].name;
}
//alert(807);
if (window.parent) { // && (files[ij].type.indexOf('image/') == 0 || ('' + files[ij].type.indexOf('audio/')) == (aneg + '0') || ('' + files[ij].type.indexOf('video/')) == (vneg + '0'))) {
//alert(8807);
if (parent.document.getElementById('yourvsource') && parent.document.getElementById('yourvideo') && files[ij].type.indexOf('video') == 0) {
parent.document.getElementById('yourvideo').type='' + files[ij].type;
parent.document.getElementById('yourvsource').type='' + files[ij].type;
//parent.document.getElementById('yourvsource').src='' + evt.target.result.replace('application/octet-stream', files[ij].type);
//return '';
} else if (parent.document.getElementById('yourasource') && parent.document.getElementById('youraudio') && files[ij].type.indexOf('audio') == 0) {
parent.document.getElementById('youraudio').type='' + files[ij].type;
parent.document.getElementById('yourasource').type='' + files[ij].type;
//parent.document.getElementById('yourasource').src='' + evt.target.result.replace('application/octet-stream', files[ij].type);
//return '';
} else if (parent.document.getElementById('yourvsource') && parent.document.getElementById('yourvideo')) {
isag=isag;
} else if (parent.document.getElementById('slideshow')) {
//alert(28807);
if (files[ij].type.indexOf('pdf') != -1) {
//pdffind='pdf';
if (('' + typeof parent.yesthreethree) == 'function') {
if (evt) {
parent.yesthreethree(evt.target.result.replace('application/octet-stream', tomt).replace('application/octet-stream', tomt).replace('data:;', 'data:' + mfile.type + ';').replace('data:application/octet-stream;', 'data:' + tomt + ';'));
}
} else if (('' + typeof parent.maybemore) == 'function') {
//alert(876);
parent.maybemore('' + files[ij].name + '', 'slideshow1#' + files[ij].size, parent.document.getElementById('slideshow'));
return '';
}
}
} else if (ij == eval(-1 + eval('' + files.length)) && parent.document.getElementById('voiceoveraskfor') && parent.document.getElementById('voiceoveraskfortwo')) {
//alert(228807);
//alert(parent.document.getElementById('voiceoveraskfor').src.split('?')[0].split('#')[0] + '?filename=' + encodeURIComponent(files[ij].name) + '&filesize=' + files[ij].size);
if (document.URL.indexOf('concat=') != -1) {
//alert(98);
parent.organizefilenamesize(files[ij].name, files[ij].size);
} else if (document.URL.indexOf('right=') != -1) {
parent.document.getElementById('voiceoveraskfortwo').src=('' + parent.document.getElementById('voiceoveraskfortwo').src).split('?')[0].split('#')[0] + '?filename=' + encodeURIComponent(files[ij].name) + '&filesize=' + files[ij].size + '&right=y';
} else {
parent.document.getElementById('voiceoveraskfor').src=('' + parent.document.getElementById('voiceoveraskfor').src).split('?')[0].split('#')[0] + '?filename=' + encodeURIComponent(files[ij].name) + '&filesize=' + files[ij].size + '&left=y';
}
return '';
} else if (document.URL.indexOf('concat=') != -1 && parent.document.getElementById('voiceoveraskfor') && parent.document.getElementById('voiceoveraskfortwo')) {
//alert(498);
parent.organizefilenamesize(files[ij].name, files[ij].size);
}
}
if (ctimode) { ctiname='' + files[ij].name; }
if (window.parent) {
if (wdingandon.indexOf('/PHP/animegif') != 0) {
if (('' + files[ij].name.toLowerCase() + '~~').indexOf('.pdf~~') != -1) {
if (window.parent) {
if (parent.document.getElementById('slideshow')) {
if (parent.document.getElementById('slideshow').value.trim() == '') {
//alert('' + files[ij].name);
if (('' + typeof parent.yesthreethree) == 'function') {
if (evt) {
parent.yesthreethree(evt.target.result.replace('application/octet-stream', tomt).replace('application/octet-stream', tomt).replace('data:;', 'data:' + mfile.type + ';').replace('data:application/octet-stream;', 'data:' + tomt + ';'));
}
} else if (('' + typeof parent.maybemore) == 'function') {

parent.maybemore('' + files[ij].name, 'slideshow1#' + files[ij].size, parent.document.getElementById('slideshow'));
}
}
}
}
}
}
if (wdingandon.indexOf('Pdfimages') == 0 && ourcbi == 'cbix') {
var idrs=0, drs=document.getElementsByTagName('h1');
for (idrs=0; idrs<drs.length; idrs++) {
drs[idrs].style.visibility='hidden';
}
drs=document.getElementsByTagName('h3');
for (idrs=0; idrs<drs.length; idrs++) {
drs[idrs].style.visibility='hidden';
}
}
if (document.getElementById('share') && document.getElementById('files')) {
if (parent.document.getElementById(ourcbi)) {
if (('' + parent.document.getElementById(ourcbi).style.height) == '228px') {
var huhrectx=document.getElementById('files').getBoundingClientRect();
if (!isdone) {
document.getElementById('share').style.position='absolute';
document.getElementById('share').style.top='' + eval(-1.0 + eval('' + huhrectx.bottom)) + 'px';
document.getElementById('share').style.left='' + huhrectx.left + 'px';
document.getElementById('share').title='Share your media or documents or link!';
document.getElementById('files').disable=false;
if (('' + parent.document.getElementById(ourcbi).style.height) == '228px') {
parent.document.getElementById(ourcbi).style.marginTop='-201px';
if (('' + parent.document.URL + + top.document.URL).replace('/macos_','/animegif').indexOf('/animegif') == -1) {
parent.document.getElementById(ourcbi).style.height='238px';
} else {
parent.document.getElementById(ourcbi).style.height='248px';
}
}
}
//document.getElementById('share').style.top='' + eval(0 + eval('' + huhrectx.top)) + 'px';
//document.getElementById('share').style.left='' + eval(eval(eval('' + huhrectx.width) / 2) + eval('' + huhrectx.left)) + 'px';
//var huhrectxwidth=240;
//alert('' + eval(eval(eval('' + huhrectxwidth) / 2) + eval('' + huhrectx.left)) + 'px ' + huhrectx.left);
//document.getElementById('share').style.left='' + eval(eval(eval('' + huhrectxwidth) / 2) + eval('' + huhrectx.left)) + 'px';

//if (('' + document.getElementById('files').outerHTML).split('>')[0].indexOf('image/*,video/*,audio/*,application/*,text/*') == -1) {
if (('' + parent.document.URL + + top.document.URL).replace('/macos_','/animegif').indexOf('/animegif') == -1) {
document.getElementById('share').style.backgroundColor='transparent';
document.getElementById('share').style.backgroundImage='linear-gradient(to bottom, rgba(255,0,0,0), rgba(255,0,0,0), rgba(127,127,127,1))';
document.getElementById('share').style.textAlign='left';
document.getElementById('share').style.verticalAlign='top';
document.getElementById('share').style.color='blue';
document.getElementById('share').style.borderTopColor='transparent';
document.getElementById('files').style.zIndex='90';
document.getElementById('share').style.zIndex='9';
//document.getElementById('share').style.fontSize='6px';
} else {
document.getElementById('share').style.textAlign='left';
document.getElementById('share').style.verticalAlign='top';
// Debatable
if (('' + parent.document.getElementById(ourcbi).style.height) == '228px') {
parent.document.getElementById(ourcbi).style.marginTop='-201px';
parent.document.getElementById(ourcbi).style.height='238px';
}

}

if (('' + parent.document.URL + + top.document.URL).replace('/macos_','/animegif').indexOf('/animegif') != -1) {
parent.document.getElementById(ourcbi).style.height='262px';
parent.document.getElementById(ourcbi).style.marginTop='-208px';
} else {
//document.getElementById('files').style.marginTop='-15px';
parent.document.getElementById(ourcbi).style.height='252px';
if (wdingandon.indexOf('Pdfimages') != 0 && document.getElementById('share')) {
//alert('1:' + document.getElementById('share').outerHTML);
parent.document.getElementById(ourcbi).style.marginTop='-200px';
}
}
}
}
}
if (parent.document.URL.indexOf('allowaudio=') != -1) { aneg=''; }
if (parent.document.URL.indexOf('allowvideo=') != -1) { vneg=''; }
if (ij == 0 && parent.document.getElementById('justputpdffilename') && parent.document.getElementById('justputpdffilesize') && parent.document.getElementById('justputpdfpath')) {
//alert(56);
if (ourcbi == 'cbi') {
parent.document.getElementById('justputpdfpath').title='';
parent.document.getElementById('justputpdffilename').innerHTML='' + files[ij].name;
if (document.getElementById('share')) {
parent.document.getElementById('justputpdffilesize').innerHTML=' ' + files[ij].size;
} else {
parent.document.getElementById('justputpdffilesize').innerHTML='' + files[ij].size;
}
}
if (document.getElementById('share') && document.getElementById('files')) {
var huhrect=document.getElementById('files').getBoundingClientRect();
if (!isdone) {
document.getElementById('share').style.position='absolute';
document.getElementById('share').style.top='' + huhrect.bottom + 'px';
document.getElementById('share').style.left='' + huhrect.left + 'px';
document.getElementById('share').style.textAlign='left';
document.getElementById('share').style.verticalAlign='top';
document.getElementById('share').style.borderTopColor='transparent';
document.getElementById('files').style.zIndex='90';
document.getElementById('share').style.zIndex='9';
document.getElementById('files').disable=false;
}
}
if (document.URL.replace('straight_text','straighttext').indexOf('straighttext=') == -1) { return ''; }
}
}
if (window.parent && (files[ij].type.indexOf('image/') == 0 || ('' + files[ij].type.indexOf('audio/')) == (aneg + '0') || ('' + files[ij].type.indexOf('video/')) == (vneg + '0'))) {
//alert(8807);
if (parent.document.getElementById('slideshow')) {
// if (top.document.URL.indexOf('/splice_audio.') != -1) { alert('Here now'); }
if (parent.document.getElementById('ispec') && parent.document.getElementById('outext')) {
if (parent.document.getElementById('ispec').outerHTML.indexOf(' data-dgize=') != -1) {
noinitialstwo=true;
}
}
if ((!parent.document.getElementById('slideshow2') || noinitialstwo) && parent.document.getElementById('slideshow')) {
console.log('yes ' + ij);
if (parent.document.getElementById('ispec') && parent.document.getElementById('outext')) {
if (parent.document.getElementById('ispec').outerHTML.indexOf(' data-dgize=') == -1) {
parent.document.getElementById('ispec').setAttribute('data-dgize', 'y');
noinitialstwo=true;
//alert(evt.target.result);
}
}
} else {
if (('' + parent.document.getElementById('slideshow' + xssuffix.replace(/^0/g,'')).value).replace(/^undefined$/g,'').replace(/^null$/g,'') != '') {
console.log(('' + parent.document.getElementById('slideshow' + xssuffix.replace(/^0/g,'')).value));
while (('' + parent.document.getElementById('slideshow' + xssuffix.replace(/^0/g,'')).value).replace(/^undefined$/g,'').replace(/^null$/g,'') != '') {
xssuffix='' + eval(0 + eval('' + xnsuffix));
xnsuffix='' + eval(1 + eval('' + xnsuffix));
}
}
hsf="";
if (eval('' + document.getElementById('lhsh').innerHTML.split('#').length) >= eval('' + ihin)) {
if (document.getElementById('lhsh').innerHTML.split('#')[eval('' + ihin)] != '') {
hsf=('#' + document.getElementById('lhsh').innerHTML.split('#')[eval('' + ihin)]).replace('#undefined','');
}
}
ihin++;
//if (!parent.document.getElementById('slideshow2') && parent.document.getElementById('slideshow')) {
// alert('huh');
//}
if (parent.document.getElementById('ispec') && parent.document.getElementById('outext')) { // && xssuffix != '0'
if (('' + parent.document.getElementById('ispec').getAttribute('data-dgize')).replace(/^undefined/g,'').replace(/^null/g,'') == '') {
parent.document.getElementById('slideshow' + xssuffix.replace(/^0/g,'')).value=localhostmap('' + files[ij].size + ' ', files[ij].name, 'slideshow' + xssuffix.replace(/^0/g,''));
} else {
if (xssuffix == '0') {
parent.document.getElementById('slideshow').value='';
// alert('hsf');
hsf=evt.target.result.replace('application/octet-stream', tomt).replace('application/octet-stream', tomt).replace('data:;', 'data:' + mfile.type + ';').replace('data:application/octet-stream;', 'data:' + tomt + ';');
// alert(hsf);
} else {
parent.document.getElementById('slideshow').setAttribute('data-slide' + xssuffix, localhostmap('' + files[ij].size + ' ', files[ij].name, 'slideshow' + xssuffix.replace(/^0/g,'')));
}
}
} else {
parent.document.getElementById('slideshow' + xssuffix.replace(/^0/g,'')).value=localhostmap('' + files[ij].size + ' ', files[ij].name, 'slideshow' + xssuffix.replace(/^0/g,''));
}

if (('' + typeof parent.yes_three_three) == 'function') {
if (evt) {
parent.yes_three_three(evt.target.result.replace('application/octet-stream', tomt).replace('application/octet-stream', tomt).replace('data:;', 'data:' + mfile.type + ';').replace('data:application/octet-stream;', 'data:' + tomt + ';'), middlerestcont, mfile.name);
}
} else if (('' + typeof parent.yesthreethree) == 'function') {
if (evt) {
parent.yesthreethree(evt.target.result.replace('application/octet-stream', tomt).replace('application/octet-stream', tomt).replace('data:;', 'data:' + mfile.type + ';').replace('data:application/octet-stream;', 'data:' + tomt + ';'));
}
} else if (('' + typeof parent.maybemore) == 'function') {

parent.maybemore('' + files[ij].size + ' ', 'slideshow' + xnsuffix, parent.document.getElementById('slideshow' + xssuffix.replace(/^0/g,'')));
}
if (hsf != '') {
if (parent.document.getElementById('ispec') && parent.document.getElementById('outext')) { // && xssuffix != '0') {
if (('' + parent.document.getElementById('ispec').getAttribute('data-dgize')).replace(/^undefined/g,'').replace(/^null/g,'') == '') {
parent.document.getElementById('slideshow' + xssuffix.replace(/^0/g,'')).value+=hsf;
} else {
if (xssuffix == '0') {
// alert('hSf');
parent.document.getElementById('slideshow').value=hsf;
} else {
parent.document.getElementById('slideshow').setAttribute('data-slide' + xssuffix, hsf);
}
}
} else {
parent.document.getElementById('slideshow' + xssuffix.replace(/^0/g,'')).value+=hsf;
}
}
}
//alert('parent.maybemore("' + '' + files[ij].size + ' ' + ", 'slideshow' + xnsuffix + '" + ", 'slideshow" + xnsuffix + ', parent.document.getElementById("' + 'slideshow' + xssuffix.replace(/^0/g,'') + '"))');
} else if (parent.document.getElementById('result')) {
wponeokay=false;
parent.document.getElementById('result').style.cursor='progress';
//parent.document.getElementById('result').innerHTML='' + files[ij].size + ' ';

if (tconto && files[ij].type.indexOf('image/') == 0 && files.length > 1) {
hsf="";
if (eval('' + document.getElementById('lhsh').innerHTML.split('#').length) >= eval('' + ihin)) {
if (document.getElementById('lhsh').innerHTML.split('#')[eval('' + ihin)] != '') {
hsf=('#' + document.getElementById('lhsh').innerHTML.split('#')[eval('' + ihin)]).replace('#undefined','');
}
}
ihin++;
gifslides.push('' + files[ij].size + ' ' + hsf);
jjnum++;
}
} else if (parent.document.getElementById('aurl') && parent.document.getElementById('vurl')) {
wponeokay=false;
//parent.document.getElementById('aurl').style.cursor='progress';
//parent.document.getElementById('vurl').style.cursor='progress';
if (files[ij].type.indexOf('image/') == 0) {
burllocalhostmap('' + files[ij].size + ' ', files[ij].name, 'burl', ourij);
ourij++;
}
} else if (parent.document.getElementById('resultav')) {
defto='m4v';
midw='_audiovideo_';
if (files[ij].type.indexOf('video/') != -1) {
parent.document.getElementById('videoag').innerHTML=parent.document.getElementById('videoag').innerHTML.replace('Image gif','Image Animated gif');
}
console.log(defto + ' ... ' + midw);
wponeokay=false;
textlocalhostmap('' + files[ij].size + ' ', files[ij].name, '');
console.log('5');
if (parent.document.getElementById('thewords').value == '') {
console.log('6');
parent.document.getElementById('thewords').value=files[ij].name;
if (parent.document.getElementById('resultrestout')) {
if (('' + parent.document.getElementById('outputname').value + '.').substring(0,1) == '.') {
parent.document.getElementById('outputname').value=files[ij].name.split('.')[0] + '.html';
}
}
} else if (middlerestcont == '' && !parent.document.getElementById('resultrestout')) {
console.log('7');
parent.document.getElementById('thewords').value+=',' + files[ij].name;
}
console.log('8');
if (parent.document.getElementById('outputname').value == '') {
console.log(parent.document.getElementById('cto').value.replace('*',defto));
if (parent.document.getElementById('txtsrtout')) {
parent.document.getElementById('outputname').value=files[ij].name; //.split('.')[0] + '.' + parent.document.getElementById('cto').value.replace('*',defto);
} else if (parent.document.getElementById('txtresultout')) {
parent.document.getElementById('outputname').value=files[ij].name; //.split('.')[0] + '.' + parent.document.getElementById('cto').value.replace('*',defto);
} else {
parent.document.getElementById('outputname').value=files[ij].name.split('.')[0] + '.' + parent.document.getElementById('cto').value.replace('*',defto);
}
} else if (!parent.document.getElementById('resultrestout')) {
console.log('2:' + parent.document.getElementById('cto').value.replace('*',defto));
if (parent.document.getElementById('txtsrtout')) {
parent.document.getElementById('outputname').value+=',' + files[ij].name; //.split('.')[0] + '.' + parent.document.getElementById('cto').value.replace('*',defto);
} else if (parent.document.getElementById('txtresultout')) {
parent.document.getElementById('outputname').value+=',' + files[ij].name; //.split('.')[0] + '.' + parent.document.getElementById('cto').value.replace('*',defto);
} else {
parent.document.getElementById('outputname').value+=',' + files[ij].name.split('.')[0] + '.' + parent.document.getElementById('cto').value.replace('*',defto);
}
}
console.log('9');
if (parent.document.getElementById('dforms')) {
if (document.URL.toLowerCase().indexOf('totype=') != -1) {
myform='<div style=display:none; id=mydiv' + ij + '><form style=display:none; method=POST action=' + parent.document.URL.split('#')[0].split('?')[0] + ' target=myframe' + ij + '>';
myform+='<input type=hidden name=to id=to' + ij + ' value=""></input>';
myform+='<input type=hidden name=subject id=subject' + ij + ' value="' + (files[ij].name + ' downloadable ready for your inhouse .' + files[ij].name.split('.')[1] + ' to .' + decodeURIComponent(document.URL.toLowerCase().split('totype=')[1].split('&')[0].split('#')[0]).replace('*','m4v') + ' conversions, sent to you (for you to download) as convert' + midw + 'please_' + decodeURIComponent(document.URL.toLowerCase().split('totype=')[1].split('&')[0].split('#')[0]).replace('*','m4v') + '_' + files[ij].name.split('/')[eval(-1 + files[ij].name.split('/').length)] + '"></input>').replace('*','m4v').replace('*','m4v');
myform+='<input type=hidden name=body id=body' + ij + ' value="' + files[ij].name + files[ij].size + '"></input>';
if (document.URL.indexOf('localhost') == -1) {
myform+='<input type=hidden name=content id=content' + ij + ' value="resultav"></input>';
}
myform+='<input id=bsub' + ij + ' type=submit style=display:none; value="Email"></input></form><iframe name=myframe' + ij + ' style=display:none; src=></iframe></div>';
//alert(myform);
parent.document.getElementById('dforms').innerHTML+=myform;
tbins.push(files[ij].name + files[ij].size);
}
}
}
} else if (window.parent) {
//alert(307);
if (parent.document.getElementById('result' + middlerestcont + 'out') || parent.document.getElementById('resultav')) {
//alert(3307);
var rw='html';
if (parent.document.getElementById('resultav')) {
rw='m4v';
defto='m4v';
midw='_audiovideo_';
if (files[ij].type.indexOf('video/') != -1) {
parent.document.getElementById('videoag').innerHTML=parent.document.getElementById('videoag').innerHTML.replace('Image gif','Image Animated gif');
}
}
console.log(defto + ' ... ' + midw);
wponeokay=false;
textlocalhostmap('' + files[ij].size + ' ', files[ij].name, '');
console.log('5');
if (parent.document.getElementById('thewords').value == '') {
console.log('6');
parent.document.getElementById('thewords').value=files[ij].name;
if (parent.document.getElementById('resultrestout')) {
if (('' + parent.document.getElementById('outputname').value + '.').substring(0,1) == '.') {
parent.document.getElementById('outputname').value=files[ij].name.split('.')[0] + '.html';
}
}
} else if (middlerestcont == '' && !parent.document.getElementById('resultrestout')) {
console.log('7');
parent.document.getElementById('thewords').value+=',' + files[ij].name;
}
console.log('8');
if (parent.document.getElementById('outputname').value == '') {
console.log(parent.document.getElementById('cto').value.replace('*',defto));
if (parent.document.getElementById('txtsrtout')) {
parent.document.getElementById('outputname').value=files[ij].name; //.split('.')[0] + '.' + parent.document.getElementById('cto').value.replace('*',defto);
} else if (parent.document.getElementById('txtresultout')) {
parent.document.getElementById('outputname').value=files[ij].name; //.split('.')[0] + '.' + parent.document.getElementById('cto').value.replace('*',defto);
} else {
parent.document.getElementById('outputname').value=files[ij].name.split('.')[0] + '.' + parent.document.getElementById('cto').value.replace('*',defto);
}
} else if (!parent.document.getElementById('resultrestout')) {
console.log('2:' + parent.document.getElementById('cto').value.replace('*',defto));
if (parent.document.getElementById('txtsrtout')) {
parent.document.getElementById('outputname').value+=',' + files[ij].name; //.split('.')[0] + '.' + parent.document.getElementById('cto').value.replace('*',defto);
} else if (parent.document.getElementById('txtresultout')) {
parent.document.getElementById('outputname').value+=',' + files[ij].name; //.split('.')[0] + '.' + parent.document.getElementById('cto').value.replace('*',defto);
} else {
parent.document.getElementById('outputname').value+=',' + files[ij].name.split('.')[0] + '.' + parent.document.getElementById('cto').value.replace('*',defto);
}
}
console.log('9');
if (parent.document.getElementById('dforms')) {
if (document.URL.toLowerCase().indexOf('totype=') != -1) {
myform='<div style=display:none; id=mydiv' + ij + '><form style=display:none; method=POST action=' + parent.document.URL.split('#')[0].split('?')[0] + ' target=myframe' + ij + '>';
myform+='<input type=hidden name=to id=to' + ij + ' value=""></input>';
myform+='<input type=hidden name=subject id=subject' + ij + ' value="' + (files[ij].name + ' downloadable ready for your inhouse .' + files[ij].name.split('.')[1] + ' to .' + decodeURIComponent(document.URL.toLowerCase().split('totype=')[1].split('&')[0].split('#')[0]).replace('*',rw) + ' conversions, sent to you (for you to download) as convert' + midw + 'please_' + decodeURIComponent(document.URL.toLowerCase().split('totype=')[1].split('&')[0].split('#')[0]).replace('*',rw) + '_' + files[ij].name.split('/')[eval(-1 + files[ij].name.split('/').length)] + '"></input>').replace('*',rw).replace('*',rw);
myform+='<input type=hidden name=body id=body' + ij + ' value="' + files[ij].name + files[ij].size + '"></input>';
if (document.URL.indexOf('localhost') == -1) {
myform+='<input type=hidden name=content id=content' + ij + ' value="resultav"></input>';
}
myform+='<input id=bsub' + ij + ' type=submit style=display:none; value="Email"></input></form><iframe name=myframe' + ij + ' style=display:none; src=></iframe></div>';
//alert(myform);
parent.document.getElementById('dforms').innerHTML+=myform;
tbins.push(files[ij].name + files[ij].size);
}
}
} else if (('' + files[ij].type).indexOf('video/') == 0) {
if (parent.document.getElementById('result')) {
localhostmap('' + files[ij].size + ' ', files[ij].name, '');
}
}
} else if (window.parent && ('' + files[ij].type).indexOf('video/') == 0) {
if (parent.document.getElementById('result')) {
localhostmap('' + files[ij].size + ' ', files[ij].name, '');
}
}
}
var isnworry=false;
var typeshavetobe=(location.search.split('typehastobe=')[1] ? ('' + (decodeURIComponent(location.search.split('typehastobe=')[1].split('&')[0]))) : ' ');
var isn=(location.search.split('numhastobe=')[1] ? eval('' + (decodeURIComponent(location.search.split('numhastobe=')[1].split('&')[0]))) : 0);
if (isn > 0) {
isnworry=(location.search.split('numhastobe=')[1] ? (eval('' + files.length) != eval('' + (decodeURIComponent(location.search.split('numhastobe=')[1].split('&')[0])))) : false);
}
if (isnworry) {
if (typeshavetobe.trim() != '') {
alert('Have to select ' + isn + ' files that are ' + typeshavetobe.replace(/video/g, ' video ').replace(/pdf/g, ' pdf ').replace(/document/g, ' document ').replace(/audio/g, ' audio ').replace(/image/g, ' image ').replace(/text/g, ' text ').replace(/application/g, ' application ') + ' type files.');
} else {
alert('Have to select ' + isn + ' files.');
}
return '';
}
if (typeshavetobe != '') {
wastypeshavetobe=typeshavetobe;
for (ij=0; ij<files.length; ij++) {
typeshavetobe=typeshavetobe.replace(('' + files[ij].type), '');
typeshavetobe=typeshavetobe.replace(('' + files[ij].type).split('/')[0], '');
if (files[ij].type.indexOf('/') != -1) {
typeshavetobe=typeshavetobe.replace(('' + files[ij].type).split('/')[1], '');
}
}
if (typeshavetobe.replace(/\//g,'').replace(/\*\./g,'').replace(/\,/g,'').trim() != '') {
alert('Have to select ' + wastypeshavetobe.replace(/video/g, ' video ').replace(/audio/g, ' audio ').replace(/pdf/g, ' pdf ').replace(/document/g, ' document ').replace(/image/g, ' image ').replace(/text/g, ' text ').replace(/application/g, ' application ') + ' type files.');
return '';
}
}
for (ij=0; ij<files.length; ij++) {
file = files[ij];
filen = file.name;
lasttype = file.type;
//alert(23307);
if (parent.window) {
if (wdingandon.indexOf('Pdfimages') == 0 && ourcbi == 'cbix') {
var idrs=0, drs=document.getElementsByTagName('h1');
for (idrs=0; idrs<drs.length; idrs++) {
drs[idrs].style.visibility='hidden';
}
drs=document.getElementsByTagName('h3');
for (idrs=0; idrs<drs.length; idrs++) {
drs[idrs].style.visibility='hidden';
}
}
if (document.getElementById('share') && document.getElementById('files')) {
if (parent.document.getElementById(ourcbi)) {
//alert(parent.document.getElementById(ourcbi).style.height);
if (('' + parent.document.getElementById(ourcbi).style.height) == '228px') {
var huhrectx=document.getElementById('files').getBoundingClientRect();
if (!isdone) {
document.getElementById('share').style.position='absolute';
document.getElementById('share').style.top='' + eval(-1.0 + eval('' + huhrectx.bottom)) + 'px';
document.getElementById('share').style.left='' + huhrectx.left + 'px';
document.getElementById('share').title='Share your media or documents or link!';
document.getElementById('files').disable=false;
if (('' + parent.document.getElementById(ourcbi).style.height) == '228px') {
parent.document.getElementById(ourcbi).style.marginTop='-201px';
if (('' + parent.document.URL + + top.document.URL).replace('/macos_','/animegif').indexOf('/animegif') == -1) {
parent.document.getElementById(ourcbi).style.height='238px';
} else {
parent.document.getElementById(ourcbi).style.height='248px';
}
}
}
//document.getElementById('share').style.top='' + eval(0 + eval('' + huhrectx.top)) + 'px';
//var huhrectxwidth=240;
//alert('1:' + eval(eval(eval('' + huhrectxwidth) / 2) + eval('' + huhrectx.left)) + 'px');
//document.getElementById('share').style.left='' + eval(eval(eval('' + huhrectxwidth) / 2) + eval('' + huhrectx.left)) + 'px';

//if (('' + document.getElementById('files').outerHTML).split('>')[0].indexOf('image/*,video/*,audio/*,application/*,text/*') == -1) {
if (('' + parent.document.URL + + top.document.URL).replace('/macos_','/animegif').indexOf('/animegif') == -1) {
document.getElementById('share').style.backgroundColor='transparent';
document.getElementById('share').style.backgroundImage='linear-gradient(to bottom, rgba(255,0,0,0), rgba(255,0,0,0), rgba(127,127,127,1))';
document.getElementById('share').style.textAlign='left';
document.getElementById('share').style.verticalAlign='top';
document.getElementById('share').style.color='blue';
document.getElementById('share').style.borderTopColor='transparent';
document.getElementById('files').style.zIndex='90';
document.getElementById('share').style.zIndex='9';
//document.getElementById('share').style.fontSize='6px';
} else {
document.getElementById('share').style.textAlign='left';
document.getElementById('share').style.verticalAlign='top';
// Debatable
if (('' + parent.document.getElementById(ourcbi).style.height) == '228px') {
parent.document.getElementById(ourcbi).style.marginTop='-201px';
parent.document.getElementById(ourcbi).style.height='238px';
}

}


if (('' + parent.document.URL + + top.document.URL).replace('/macos_','/animegif').indexOf('/animegif') != -1) {
parent.document.getElementById(ourcbi).style.height='262px';
parent.document.getElementById(ourcbi).style.marginTop='-208px';
} else {
//document.getElementById('files').style.marginTop='-15px';
parent.document.getElementById(ourcbi).style.height='252px';
if (wdingandon.indexOf('Pdfimages') != 0 && document.getElementById('share')) {
//alert('0:' + document.getElementById('share').outerHTML);
parent.document.getElementById(ourcbi).style.marginTop='-200px';
}
}
}
}
}
if (ij == 0 && parent.document.getElementById('justputpdffilename') && parent.document.getElementById('justputpdffilesize') && parent.document.getElementById('justputpdfpath')) {
//alert(876);
if (ourcbi == 'cbi') {
parent.document.getElementById('justputpdfpath').title='';
parent.document.getElementById('justputpdffilename').innerHTML='' + file.name;
if (document.getElementById('share')) {
parent.document.getElementById('justputpdffilesize').innerHTML=' ' + files[ij].size;
} else {
parent.document.getElementById('justputpdffilesize').innerHTML='' + files[ij].size;
}
}
if (document.getElementById('share') && document.getElementById('files')) {
var huhrect=document.getElementById('files').getBoundingClientRect();
document.getElementById('share').style.position='absolute';
document.getElementById('share').style.top='' + huhrect.bottom + 'px';
document.getElementById('share').style.left='' + huhrect.left + 'px';
document.getElementById('share').style.textAlign='left';
document.getElementById('share').style.verticalAlign='top';
document.getElementById('share').style.borderTopColor='transparent';
document.getElementById('files').style.zIndex='90';
document.getElementById('share').style.zIndex='9';
document.getElementById('files').disable=false;
}
//alert(-23307);
if (document.URL.replace('straight_text','straighttext').indexOf('straighttext=') == -1) { return ''; }
}
}
fs.push(file.name.replace(/\\/g,'/').split('/')[eval(-1 + file.name.replace(/\\/g,'/').split('/').length)]);
start = parseInt(opt_startByte) || 0;
stop = parseInt(opt_stopByte) || file.size - 1;
//if (ij > 1) { alert('OK to continue'); }

reader.push(new FileReader());

// If we use onloadend, we need to check the readyState.
// Thanks to https://stackoverflow.com/questions/12546775/get-filename-after-filereader-asynchronously-loaded-a-file
//alert(223307);
reader[ij].onloadend = (function(mfile) {
return function(evt) {
//alert(document.URL);
var dp='', ds=dssuffix, slideshowparent=false, ssuffix='0', nsuffix='2', blnks=' ', xhsf='', zhsfs=[];
var tomt='video/mp4', thext='', ithext=0;
if (evt.target.readyState == FileReader.DONE) { // DONE == 2

if (window.parent) {
if (document.URL.indexOf('typehastobe=') != -1) {
if (parent.document.getElementById('your' + mfile.type.split('/')[0].substring(0,1) + mfile.type.split('/')[0])) {
parent.document.getElementById('your' + mfile.type.split('/')[0].substring(0,1) + mfile.type.split('/')[0]).value=evt.target.result.replace('application/octet-stream', tomt).replace('application/octet-stream', tomt).replace('data:;', 'data:' + mfile.type + ';').replace('data:application/octet-stream;', 'data:' + tomt + ';');
} else if (parent.document.getElementById('your' + mfile.type.split('/')[0].substring(0,1) + 'source')) {
parent.document.getElementById('your' + mfile.type.split('/')[0].substring(0,1) + + 'source').src=evt.target.result.replace('application/octet-stream', tomt).replace('application/octet-stream', tomt).replace('data:;', 'data:' + mfile.type + ';').replace('data:application/octet-stream;', 'data:' + tomt + ';');
} else if (parent.document.getElementById('your' + mfile.type.split('/')[0].substring(0,1) + mfile.type.split('/')[0])) {
parent.document.getElementById('your' + mfile.type.split('/')[0].substring(0,1) + mfile.type.split('/')[0]).value=evt.target.result.replace('application/octet-stream', tomt).replace('application/octet-stream', tomt).replace('data:;', 'data:' + mfile.type + ';').replace('data:application/octet-stream;', 'data:' + tomt + ';');
} else if (parent.document.getElementById('your' + mfile.type.split('/')[0])) {
parent.document.getElementById('your' + mfile.type.split('/')[0]).src=evt.target.result.replace('application/octet-stream', tomt).replace('application/octet-stream', tomt).replace('data:;', 'data:' + mfile.type + ';').replace('data:application/octet-stream;', 'data:' + tomt + ';');
}
}
}

if (document.URL.replace('straight_text','straighttext').indexOf('straighttext=') != -1) {

if (window.parent) {
if (parent.document.getElementById('result1') && parent.document.getElementById('result2')) {
if (parent.document.getElementById('result1').innerHTML == '') {
parent.document.getElementById('result1').innerHTML=(evt.target.result); // used to use window.atob and .replace('data:application/octet-stream;base64,', '')
if (('' + typeof parent.yesthreethree) == 'function') {
parent.yesthreethree(evt.target.result.replace('application/octet-stream', tomt).replace('application/octet-stream', tomt).replace('data:;', 'data:' + mfile.type + ';').replace('data:application/octet-stream;', 'data:' + tomt + ';'));
}
} else {
parent.document.getElementById('result2').innerHTML=(evt.target.result); // retest earth_scanner.html
if (('' + typeof parent.yesthreethree) == 'function') {
parent.yesthreethree(evt.target.result.replace('application/octet-stream', tomt).replace('application/octet-stream', tomt).replace('data:;', 'data:' + mfile.type + ';').replace('data:application/octet-stream;', 'data:' + tomt + ';'));
}
}
}
}
}
if (isag >= 0) {
//if (('' + top.document.URL).indexOf('/splice_audio.') != -1) {
//alert(evt.target.result);
//}
prefetch(evt.target.result.replace('application/octet-stream','image/gif'));
}
if (mfile.type != 'application/octet-stream') { tomt=mfile.type; }
if (mfile.name.indexOf('.') != -1) { thext='.' + mfile.name.split('.')[eval(-1 + mfile.name.split('.').length)].toLowerCase(); }
if (thext != '') {
for (ithext=0; ithext<mexts.length; ithext++) {
if (mexts[ithext] == thext) {
tomt=mtypes[ithext];
//alert('Tomt=' + tomt);
}
}
}
if ((!parent.document.getElementById('slideshow2') || noinitialstwo) && parent.document.getElementById('slideshow')) {
// if (top.document.URL.indexOf('/splice_audio.') != -1) { alert('Here Now'); }
if (lastis == '') {
lastis=evt.target.result.replace('application/octet-stream', tomt).replace('application/octet-stream', tomt).replace('data:;', 'data:' + mfile.type + ';').replace('data:application/octet-stream;', 'data:' + tomt + ';');
if (eval(1 + ij) != eval('' + files.length)) {
setTimeout(pfillit, 7000);
return '';
}
} else {
console.log(parent.document.getElementById('myform').outerHTML.replace('form ', 'form target=_blank ').replace('justiurl', 'pdfimage').replace('./pdfimageplustext.php', '/pdfimageplustext.php').replace('isub', 'isub' + ij).replace('myform', 'myform' + ij).replace('</form>', '<input type=hidden name=pdfnotready value=y></input><input type=hidden name=pdffile value=y></input></form>'));
if (('' + typeof parent.durip) == 'function') {
parent.durip(evt.target.result.replace('application/octet-stream', tomt).replace('application/octet-stream', tomt).replace('data:;', 'data:' + mfile.type + ';').replace('data:application/octet-stream;', 'data:' + tomt + ';'));
}
//document.getElementById('datend').innerHTML+=parent.document.getElementById('myform').outerHTML.replace('form ', 'form target=_blank ').replace(' value=', ' value="' + evt.target.result.replace('application/octet-stream', tomt).replace('application/octet-stream', tomt).replace('data:;', 'data:' + mfile.type + ';').replace('data:application/octet-stream;', 'data:' + tomt + ';') + '" data-value=').replace('justiurl', 'pdfimage').replace('./pdfimageplustext.php', '/pdfimageplustext.php#myhash').replace('isub', 'isub' + ij).replace('myform', 'myform' + ij).replace('</form>', '<input type=hidden name=pdfnotready value=y></input><input type=hidden name=pdffile value=y></input></form>');
//document.getElementById('myform' + ij).submit();
//console.log('HerE now ' + evt.target.result.replace('application/octet-stream', tomt).replace('application/octet-stream', tomt).replace('data:;', 'data:' + mfile.type + ';').replace('data:application/octet-stream;', 'data:' + tomt + ';'));
}
} //else {
// console.log('HERE now');
//}
//alert('tomt=' + tomt);
slideshowparent=false;
ssuffix='0';
if (window.parent) {
//alert('687 ' + mfile.type);
if (parent.document.getElementById('result' + middlerestcont + 'out') || parent.document.getElementById('resultav')) {
if (parent.document.getElementById('result' + middlerestcont + 'out')) {
if (('' + typeof parent.yes_three_three) == 'function') {
parent.yes_three_three(evt.target.result.replace('application/octet-stream', tomt).replace('application/octet-stream', tomt).replace('data:;', 'data:' + mfile.type + ';').replace('data:application/octet-stream;', 'data:' + tomt + ';'), middlerestcont, mfile.name);
if (middlerestcont == '' && parent.document.getElementById('resultrestout')) {
middlerestcont='rest';
}
} else if (('' + typeof parent.yesthreethree) == 'function') {
parent.yesthreethree(evt.target.result.replace('application/octet-stream', tomt).replace('application/octet-stream', tomt).replace('data:;', 'data:' + mfile.type + ';').replace('data:application/octet-stream;', 'data:' + tomt + ';'));
}
}
if (document.URL.toLowerCase().indexOf('rjmprogramming.com.au') != -1) {
if (parent.document.getElementById('dforms')) {
if (document.URL.toLowerCase().indexOf('totype=') != -1) {
slideshowparent=true;
for (var ikj=0; ikj<tbins.length; ikj++) {
if (tbins[ikj] == (mfile.name + mfile.size)) {
parent.document.getElementById('body' + ikj).value=evt.target.result.replace('application/octet-stream', tomt).replace('application/octet-stream', tomt).replace('data:;', 'data:' + mfile.type + ';').replace('data:application/octet-stream;', 'data:' + tomt + ';');
}
}
}
}
}
}
}
var mftype='' + mfile.type;
if (window.parent) {
if (parent.document.getElementById('yourvsource') && parent.document.getElementById('yourvideo') && mfile.type.indexOf('audio') == -1) {
if (document.URL.indexOf('rjmprogramming.com.au') != -1 && (mfile.type.indexOf('image/') == -1 || mfile.type.indexOf('audio/') == -1 || mfile.type.indexOf('video/') == -1)) {
mftype='image/whatevvvver';
}
}
}
if (window.parent && (mfile.type.indexOf('image/') == 0 || mftype.indexOf('image/') == 0 || mfile.type.indexOf('audio/') == 0 || mfile.type.indexOf('video/') == 0)) {
var fpref='';
//alert(987);
if (parent.document.getElementById('yourvsource') && parent.document.getElementById('yourvideo') && mfile.type.indexOf('audio') == -1) {
//alert(887);
if (mfile.type.indexOf('video') == 0) {
//alert(787);
parent.document.getElementById('yourvsource').src=evt.target.result.replace('application/octet-stream', mfile.type).replace('data:;', 'data:' + mfile.type + ';');
if (parent.document.getElementById('v1name') && parent.document.getElementById('v1cont') && parent.document.getElementById('v1sub')) {
//alert(7872);
parent.document.getElementById('v1name').value='' + mfile.name;
parent.document.getElementById('v1cont').value=evt.target.result.replace('application/octet-stream', mfile.type).replace('data:;', 'data:' + mfile.type + ';');
fpref='/tmp/';
if (parent.document.getElementById('cbt')) { parent.document.getElementById('cbt').innerHTML=fpref; }
}
if (parent.document.getElementById('scbi')) {
//alert(7873);
parent.document.getElementById('scbi').innerHTML=fpref + mfile.name;
parent.document.getElementById('scbi').setAttribute('contenteditable', true);
parent.document.getElementById('scbi').title=evt.target.result.replace('application/octet-stream', mfile.type).replace('data:;', 'data:' + mfile.type + ';');
}
//if (parent.document.getElementById('v1name') && parent.document.getElementById('v1cont') && parent.document.getElementById('v1sub')) {
//parent.document.getElementById('v1sub').click();
//}
} else {
//alert(87);
if (parent.document.getElementById('v1name') && parent.document.getElementById('v1cont') && parent.document.getElementById('v1sub')) {
//alert(187);
parent.document.getElementById('v1name').value='' + mfile.name;
parent.document.getElementById('v1cont').value=evt.target.result.replace('application/octet-stream', mfile.type).replace('data:;', 'data:' + mfile.type + ';');
fpref='/tmp/';
//alert(287);
if (parent.document.getElementById('cbt')) { parent.document.getElementById('cbt').innerHTML=fpref; }
//alert(387);
}
if (parent.document.getElementById('scbi')) {
//alert(487);
parent.document.getElementById('scbi').innerHTML=fpref + mfile.name;
parent.document.getElementById('scbi').setAttribute('contenteditable', true);
parent.document.getElementById('scbi').title=evt.target.result.replace('application/octet-stream', mfile.type).replace('data:;', 'data:' + mfile.type + ';');
//alert(587);
}
//alert(687);

}
return '';
} else if (parent.document.getElementById('yourasource') && parent.document.getElementById('youraudio') && mfile.type.indexOf('audio') == 0) {
parent.document.getElementById('yourasource').src=evt.target.result.replace('application/octet-stream', mfile.type).replace('data:;', 'data:' + mfile.type + ';');
if (parent.document.getElementById('v2name') && parent.document.getElementById('v2cont') && parent.document.getElementById('v2sub')) {
parent.document.getElementById('v2name').value='' + mfile.name;
parent.document.getElementById('v2cont').value=evt.target.result.replace('application/octet-stream', mfile.type).replace('data:;', 'data:' + mfile.type + ';');
fpref='/tmp/';
if (parent.document.getElementById('cbt')) { parent.document.getElementById('cbt').innerHTML=fpref; }
}
if (parent.document.getElementById('scbix')) {
parent.document.getElementById('scbix').innerHTML=fpref + mfile.name;
parent.document.getElementById('scbix').setAttribute('contenteditable', true);
parent.document.getElementById('scbix').title=evt.target.result.replace('application/octet-stream', mfile.type).replace('data:;', 'data:' + mfile.type + ';');
}
//if (parent.document.getElementById('v2name') && parent.document.getElementById('v2cont') && parent.document.getElementById('v2sub')) {
//parent.document.getElementById('v2sub').click();
//}
return '';
} else if (parent.document.getElementById('slideshow')) {
//parent.document.title+=' ' + mfile.size;
// maybemore(this.value, 'slideshow1', this);
if (top.document.URL.indexOf('/splice_audio.') != -1) {
var psug=1;
while (top.document.getElementById('audio' + psug) && top.document.getElementById('audio' + psug).value != '') {
psug++;
}
if (!top.document.getElementById('audio' + psug)) { psug--; }
if (mfile.type.indexOf('image/') == 0) {
top.document.getElementById(('sel' + psug)).value='Image';
} else if (mfile.type.indexOf('audio/') == 0) {
top.document.getElementById(('sel' + psug)).value='Audio';
} else if (mfile.type.indexOf('video/') == 0) {
top.document.getElementById(('sel' + psug)).value='Video';
}
top.document.getElementById('audio' + psug).title='Matched with a slide';
top.document.getElementById('audio' + psug).value=event.target.result.replace('application/octet-stream', tomt).replace('application/octet-stream', tomt).replace('data:;', 'data:' + mfile.type + ';').replace('data:application/octet-stream;', 'data:' + tomt + ';');
}
if (!parent.document.getElementById('slideshow2') && parent.document.getElementById('slideshow')) {
console.log('HerE');
// if (top.document.URL.indexOf('/splice_audio.') != -1) { alert('HerE noW'); }
if (parent.document.getElementById('ispec') && parent.document.getElementById('outext')) {
if (parent.document.getElementById('ispec').outerHTML.indexOf(' data-dgize=') != -1) {
noinitialstwo=true;
}
}
if ((!parent.document.getElementById('slideshow2') || noinitialstwo) && parent.document.getElementById('slideshow')) {
console.log('Yes ' + event.target.result.length);
if (parent.document.getElementById('ispec') && parent.document.getElementById('outext')) {
if (parent.document.getElementById('ispec').outerHTML.indexOf(' data-dgize=') == -1) {
parent.document.getElementById('ispec').setAttribute('data-dgize', 'y');
noinitialstwo=true;
}
//if (parent.document.title.indexOf('durip ') != 0) { parent.document.title='durip ... 2 ... '; }
//console.log(event.target.result.replace('application/octet-stream', tomt).replace('application/octet-stream', tomt).replace('data:;', 'data:' + mfile.type + ';').replace('data:application/octet-stream;', 'data:' + tomt + ';'));
parent.document.getElementById('slideshow').value=event.target.result.replace('application/octet-stream', tomt).replace('application/octet-stream', tomt).replace('data:;', 'data:' + mfile.type + ';').replace('data:application/octet-stream;', 'data:' + tomt + ';');
//alert('True');
//alert(evt.target.result);
//}
}
}
} //else {
// console.log('HERE');
//}
vvb=' ';
while (parent.document.getElementById('slideshow' + ssuffix.replace(/^0/g,'')) && vvb != '') {
if (parent.document.getElementById('slideshow' + ssuffix.replace(/^0/g,'')).value.split('#')[0].replace('' + mfile.size + ' ','') != '') {
vvb=parent.document.getElementById('slideshow' + ssuffix.replace(/^0/g,'')).value.split('#')[0].replace('' + mfile.size + ' ','');
ssuffix='' + eval(0 + eval('' + nsuffix));
nsuffix='' + eval(1 + eval('' + nsuffix));
} else {
vvb='';
}
}
if (!parent.document.getElementById('slideshow2')) {
// if (top.document.URL.indexOf('/splice_audio.') != -1) { alert('HEre noW'); }
console.log('HerE ' + nsuffix);
if (parent.document.getElementById('ispec') && parent.document.getElementById('outext')) {
if (parent.document.getElementById('ispec').outerHTML.indexOf(' data-dgize=') != -1) {
noinitialstwo=true;
}
}
if ((!parent.document.getElementById('slideshow2') || noinitialstwo) && parent.document.getElementById('slideshow')) {
// if (top.document.URL.indexOf('/splice_audio.') != -1) { alert('HeRe noW'); }
console.log('YeS ' + event.target.result.length);
if (parent.document.getElementById('ispec') && parent.document.getElementById('outext')) {
if (parent.document.getElementById('ispec').outerHTML.indexOf(' data-dgize=') == -1) {
parent.document.getElementById('ispec').setAttribute('data-dgize', 'y');
noinitialstwo=true;
}
//if (parent.document.title.indexOf('durip ') != 0) { parent.document.title='durip ... 3 ... '; }
//console.log(event.target.result.replace('application/octet-stream', tomt).replace('application/octet-stream', tomt).replace('data:;', 'data:' + mfile.type + ';').replace('data:application/octet-stream;', 'data:' + tomt + ';'));
parent.document.getElementById('slideshow').value=event.target.result.replace('application/octet-stream', tomt).replace('application/octet-stream', tomt).replace('data:;', 'data:' + mfile.type + ';').replace('data:application/octet-stream;', 'data:' + tomt + ';');
//alert('TruE');
//alert(evt.target.result);
//}
}
}
} //else {
// console.log('HERE ' + nsuffix);
//}
//parent.document.getElementById('slideshow' + ssuffix.replace(/^0/g,'')).value=' ';
//parent.document.title+=':' + ssuffix;
if (('' + evt.target.result).length <= 5) {
parent.document.getElementById('slideshow' + ssuffix.replace(/^0/g,'')).value='';
} else {
if (parent.document.getElementById('slideshow' + ssuffix.replace(/^0/g,''))) {
if ((parent.document.getElementById('slideshow' + ssuffix.replace(/^0/g,'')).value + ' ').substring(0,1) >= '0' && (parent.document.getElementById('slideshow' + ssuffix.replace(/^0/g,'')).value + ' ').substring(0,1) <= '9') {
xhsf='';
zhsfs=parent.document.getElementById('slideshow' + ssuffix.replace(/^0/g,'')).value.split('#');
if (eval('' + zhsfs.length) >= 2) {
if (zhsfs[1] != '') { xhsf='#' + zhsfs[1]; }
}
parent.document.getElementById('slideshow' + ssuffix.replace(/^0/g,'')).value=evt.target.result.replace('application/octet-stream', tomt).replace('application/octet-stream', tomt).replace('data:;', 'data:' + mfile.type + ';').replace('data:application/octet-stream;', 'data:' + tomt + ';') + xhsf;
} //else {
//alert('wow');
//}
if (mfile.type.indexOf('audio/') == 0 || mfile.type.indexOf('video/') == 0) {
//alert(117);
parent.maybemore((evt.target.result + xhsf).replace('data:;', 'data:' + mfile.type + ';').replace('data:application/octet-stream;', 'data:' + tomt + ';'), 'slideshow' + nsuffix, parent.document.getElementById('slideshow' + ssuffix.replace(/^0/g,'')));
}
}
slideshowparent=true;
}
} else if (parent.document.getElementById('result')) {
wponeokay=false;
if (mfile.type.indexOf('audio/') == 0 || mfile.type.indexOf('video/') == 0 || mfile.type.indexOf('image/') == 0) {
if (('' + evt.target.result).length <= 5) {
parent.document.getElementById('result').innerHTML='';
parent.document.getElementById('result').style.cursor='pointer';
} else {
//alert(307);
if (middlerestname != '') {
if (parent.document.getElementById('audio' + middlerestname + 'name').value == '') {
parent.document.getElementById('audio' + middlerestname + 'name').value=mfile.name;
} else {
parent.document.getElementById('audio' + middlerestname + 'name').value+='#' + mfile.name;
}
} else {
parent.document.getElementById('audio' + middlerestname + 'name').value=mfile.name;
}
if (middlerestname == '' && parent.document.getElementById('audiorestname')) {
middlerestname='rest';
}
if (('' + typeof parent.getduresult) == 'function') {
parent.document.getElementById('result').innerHTML=parent.getduresult(evt.target.result.replace('application/octet-stream', tomt).replace('application/octet-stream', tomt).replace('data:;', 'data:' + mfile.type + ';').replace('data:application/octet-stream;', 'data:' + tomt + ';'));
} else {
parent.document.getElementById('result').innerHTML=evt.target.result.replace('application/octet-stream', tomt).replace('application/octet-stream', tomt).replace('data:;', 'data:' + mfile.type + ';').replace('data:application/octet-stream;', 'data:' + tomt + ';');
}
parent.document.getElementById('result').style.cursor='pointer';
if (('' + typeof parent.yesthreethree) == 'function') {
parent.yesthreethree(evt.target.result.replace('application/octet-stream', tomt).replace('application/octet-stream', tomt).replace('data:;', 'data:' + mfile.type + ';').replace('data:application/octet-stream;', 'data:' + tomt + ';'));
}
if (('' + typeof parent.notwotwo) == 'function') {
parent.notwotwo();
}
parent.document.getElementById('saysub').value='Process Media Below';
slideshowparent=true;


if (tconto && mfile.type.indexOf('image/') == 0 && iinum > 1) {
for (var iop=0; iop<gifslides.length; iop++) {
if (('' + gifslides[iop]).indexOf('' + mfile.size + ' ') == 0) {
gifslides[iop]=gifslides[iop].replace('' + mfile.size + ' ', evt.tar; yfactor=eval(Math.abs(eval('' + document.getElementById('hr181').style.top.replace('px','')) - eval('' + document.getElementById('hr233').style.top.replace('px',''))) / oneupy); }
//alert('yint=' + yint + ' and yfactor later=' + yfactor + ' ... pxstuff=' + Math.abs(eval('' + document.getElementById('hr181').style.top.replace('px','')) - eval('' + document.getElementById('hr233').style.top.replace('px',''))) + ' ... via ' + document.getElementById('hr181').style.top.replace('px','') + ' and ' + document.getElementById('hr110').style.top.replace('px',''));

if (document.getElementById('h1column').innerHTML == 'Bar') {
document.getElementById('hr233').title=texttoo(233,'(0.0,0.0)');
document.getElementById('hr234').title=texttoo(234,'(0.0,' + eval(xint * 1) + ')');
document.getElementById('hr245').title=texttoo(245,'(0.0,' + eval(xint * 2) + ')');
document.getElementById('hr246').title=texttoo(246,'(0.0,' + eval(xint * 3) + ')');
document.getElementById('hr256').title=texttoo(256,'(0.0,' + eval(xint * 4) + ')');
document.getElementById('hr257').title=texttoo(257,'(0.0,' + eval(xint * 5) + ')');
document.getElementById('hr267').title=texttoo(267,'(0.0,' + eval(xint * 6) + ')');
document.getElementById('hr268').title=texttoo(268,'(0.0,' + eval(xint * 7) + ')');
document.getElementById('hr278').title=texttoo(278,'(0.0,' + eval(xint * 8) + ')');
document.getElementById('hr279').title=texttoo(279,'(0.0,' + eval(xint * 9) + ')');

document.getElementById('hr181').title=texttoo(181,'(' + eval(yint * 1) + ',0.0)');
document.getElementById('hr177').title=texttoo(177,'(' + eval(yint * 2) + ',0.0)');
document.getElementById('hr125').title=texttoo(125,'(' + eval(yint * 3) + ',0.0)');
document.getElementById('hr121').title=texttoo(121,'(' + eval(yint * 4) + ',0.0)');
document.getElementById('hr69').title=texttoo(69,'(' + eval(yint * 5) + ',0.0)');
document.getElementById('hr65').title=texttoo(65,'(' + eval(yint * 6) + ',0.0)');
document.getElementById('hr68').title=texttoo(68,'(' + eval(yint * 7) + ',0.0)');
document.getElementById('hr4').title=texttoo(4,'(' + eval(yint * 8) + ',0.0)');
document.getElementById('hr7').title=texttoo(7,'(' + eval(yint * 9) + ',0.0)');
} else {
document.getElementById('hr233').title=texttoo(233,'(0,0)');
document.getElementById('hr234').title=texttoo(234,'(' + eval(xint * 1) + ',0)');
document.getElementById('hr245').title=texttoo(245,'(' + eval(xint * 2) + ',0)');
document.getElementById('hr246').title=texttoo(246,'(' + eval(xint * 3) + ',0)');
document.getElementById('hr256').title=texttoo(256,'(' + eval(xint * 4) + ',0)');
document.getElementById('hr257').title=texttoo(257,'(' + eval(xint * 5) + ',0)');
document.getElementById('hr267').title=texttoo(267,'(' + eval(xint * 6) + ',0)');
document.getElementById('hr268').title=texttoo(268,'(' + eval(xint * 7) + ',0)');
document.getElementById('hr278').title=texttoo(278,'(' + eval(xint * 8) + ',0)');
document.getElementById('hr279').title=texttoo(279,'(' + eval(xint * 9) + ',0)');

document.getElementById('hr181').title=texttoo(181,'(0,' + eval(yint * 1) + ')');
document.getElementById('hr177').title=texttoo(177,'(0,' + eval(yint * 2) + ')');
document.getElementById('hr125').title=texttoo(125,'(0,' + eval(yint * 3) + ')');
document.getElementById('hr121').title=texttoo(121,'(0,' + eval(yint * 4) + ')');
document.getElementById('hr69').title=texttoo(69,'(0,' + eval(yint * 5) + ')');
document.getElementById('hr65').title=texttoo(65,'(0,' + eval(yint * 6) + ')');
document.getElementById('hr68').title=texttoo(68,'(0,' + eval(yint * 7) + ')');
document.getElementById('hr4').title=texttoo(4,'(0,' + eval(yint * 8) + ')');
document.getElementById('hr7').title=texttoo(7,'(0,' + eval(yint * 9) + ')');
}

document.getElementById('hr279').click();
document.getElementById('hr233').click();
document.getElementById('hr7').click();
document.getElementById('hr233').click(); // (0,0)
document.getElementById('ashare').style.display='inline-block';
} else if (eval('' + maxx) <= 0 && eval('' + maxy) <= 0) {
zerozerox=eval('' + document.getElementById('hr53').style.left.replace('px',''));
zerozeroy=eval('' + document.getElementById('hr53').style.top.replace('px',''));
xint=eval(-minx / 9);
yint=eval(-maxy / 9);
//alert('' + xint + ',' + yint);
cintx='' + Math.floor(xint);
cinty='' + Math.floor(yint);
oneupx=eval(eval('' + cintx.substring(0,1)) + 1);
oneupy=eval(eval('' + cinty.substring(0,1)) + 1);

for (i=1; i<cintx.length; i++) {
if (cintx.substring(i, eval(1 + i)) != '0') { xisneeded=true; }
if (cinty.substring(i, eval(1 + i)) != '0') { yisneeded=true; }
oneupx*=10;
oneupy*=10;
}

xfactor=eval(Math.abs(eval('' + document.getElementById('hr42').style.left.replace('px','')) - eval('' + document.getElementById('hr41').style.left.replace('px',''))) / xint);
yfactor=eval(Math.abs(eval('' + document.getElementById('hr113').style.top.replace('px','')) - eval('' + document.getElementById('hr110').style.top.replace('px',''))) / yint);
if (xisneeded) { xint=oneupx; xfactor=eval(Math.abs(eval('' + document.getElementById('hr42').style.left.replace('px','')) - eval('' + document.getElementById('hr41').style.left.replace('px',''))) / oneupx); }
if (yisneeded) { yint=oneupy; yfactor=eval(Math.abs(eval('' + document.getElementById('hr113').style.top.replace('px','')) - eval('' + document.getElementById('hr110').style.top.replace('px',''))) / oneupy); }

document.getElementById('hr53').title=texttoo(53,'(0,0)');


document.getElementById('hr42').title=texttoo(42,'(' + eval(-xint * 1) + ',0)');
document.getElementById('hr41').title=texttoo(41,'(' + eval(-xint * 2) + ',0)');
document.getElementById('hr30').title=texttoo(30,'(' + eval(-xint * 3) + ',0)');
document.getElementById('hr29').title=texttoo(29,'(' + eval(-xint * 4) + ',0)');
document.getElementById('hr18').title=texttoo(18,'(' + eval(-xint * 5) + ',0)');
document.getElementById('hr17').title=texttoo(17,'(' + eval(-xint * 6) + ',0)');
document.getElementById('hr5').title=texttoo(5,'(' + eval(-xint * 7) + ',0)');
document.getElementById('hr4').title=texttoo(4,'(' + eval(-xint * 8) + ',0)');
document.getElementById('hr6').title=texttoo(6,'(' + eval(-xint * 9) + ',0)');

document.getElementById('hr113').title=texttoo(113,'(0,' + eval(-yint * 1) + ')');
document.getElementById('hr110').title=texttoo(110,'(0,' + eval(-yint * 2) + ')');
document.getElementById('hr114').title=texttoo(114,'(0,' + eval(-yint * 3) + ')');
document.getElementById('hr166').title=texttoo(166,'(0,' + eval(-yint * 4) + ')');
document.getElementById('hr170').title=texttoo(170,'(0,' + eval(-yint * 5) + ')');
document.getElementById('hr222').title=texttoo(222,'(0,' + eval(-yint * 6) + ')');
document.getElementById('hr226').title=texttoo(226,'(0,' + eval(-yint * 7) + ')');
document.getElementById('hr278').title=texttoo(278,'(0,' + eval(-yint * 8) + ')');
document.getElementById('hr282').title=texttoo(282,'(0,' + eval(-yint * 9) + ')');


document.getElementById('hr282').click();
document.getElementById('hr53').click(); // (0,0)
document.getElementById('hr6').click();
document.getElementById('hr53').click();
document.getElementById('ashare').style.display='inline-block';
} else {
//alert('' + xdiff + ',' + ydiff);
//if (Math.abs(xdiff) < eval(xlen / 10) && Math.abs(ydiff) < eval(ylen / 10)) { // hr144 is (0,0)
zerozerox=eval('' + document.getElementById('hr144').style.left.replace('px',''));
zerozeroy=eval('' + document.getElementById('hr144').style.top.replace('px',''));
xint=Math.max(eval(maxx / 5), eval(-minx / 5));
yint=Math.max(eval(maxy / 5), eval(-miny / 5));
//alert('' + xint + ',' + yint);
cintx='' + Math.floor(xint);
cinty='' + Math.floor(yint);
oneupx=eval(eval('' + cintx.substring(0,1)) + 1);
oneupy=eval(eval('' + cinty.substring(0,1)) + 1);

for (i=1; i<cintx.length; i++) {
if (cintx.substring(i, eval(1 + i)) != '0') { xisneeded=true; }
if (cinty.substring(i, eval(1 + i)) != '0') { yisneeded=true; }
oneupx*=10;
oneupy*=10;
}


xfactor=eval(Math.abs(eval('' + document.getElementById('hr145').style.left.replace('px','')) - eval('' + document.getElementById('hr144').style.left.replace('px',''))) / xint);
yfactor=eval(Math.abs(eval('' + document.getElementById('hr92').style.top.replace('px','')) - eval('' + document.getElementById('hr144').style.top.replace('px',''))) / yint);
if (xisneeded) { xint=oneupx; xfactor=eval(Math.abs(eval('' + document.getElementById('hr145').style.left.replace('px','')) - eval('' + document.getElementById('hr144').style.left.replace('px',''))) / oneupx); }
if (yisneeded) { yint=oneupy; yfactor=eval(Math.abs(eval('' + document.getElementById('hr92').style.top.replace('px','')) - eval('' + document.getElementById('hr144').style.top.replace('px',''))) / oneupy); }

document.getElementById('hr144').title=texttoo(144,'(0,0)');
document.getElementById('hr145').title=texttoo(145,'(' + eval(xint * 1) + ',0)');
document.getElementById('hr155').title=texttoo(155,'(' + eval(xint * 2) + ',0)');
document.getElementById('hr156').title=texttoo(156,'(' + eval(xint * 3) + ',0)');
document.getElementById('hr166').title=texttoo(166,'(' + eval(xint * 4) + ',0)');
document.getElementById('hr167').title=texttoo(167,'(' + eval(xint * 5) + ',0)');
document.getElementById('hr134').title=texttoo(134,'(' + eval(-xint * 1) + ',0)');
document.getElementById('hr133').title=texttoo(133,'(' + eval(-xint * 2) + ',0)');
document.getElementById('hr122').title=texttoo(122,'(' + eval(-xint * 3) + ',0)');
document.getElementById('hr121').title=texttoo(121,'(' + eval(-xint * 4) + ',0)');
document.getElementById('hr123').title=texttoo(123,'(' + eval(-xint * 5) + ',0)');

document.getElementById('hr92').title=texttoo(92,'(0,' + eval(yint * 1) + ')');
document.getElementById('hr88').title=texttoo(88,'(0,' + eval(yint * 2) + ')');
document.getElementById('hr91').title=texttoo(91,'(0,' + eval(yint * 3) + ')');
document.getElementById('hr29').title=texttoo(29,'(0,' + eval(yint * 4) + ')');
document.getElementById('hr32').title=texttoo(32,'(0,' + eval(yint * 5) + ')');
document.getElementById('hr148').title=texttoo(148,'(0,' + eval(-yint * 1) + ')');
document.getElementById('hr200').title=texttoo(200,'(0,' + eval(-yint * 2) + ')');
document.getElementById('hr204').title=texttoo(204,'(0,' + eval(-yint * 3) + ')');
document.getElementById('hr256').title=texttoo(256,'(0,' + eval(-yint * 4) + ')');
document.getElementById('hr260').title=texttoo(260,'(0,' + eval(-yint * 5) + ')');


document.getElementById('hr167').click();
document.getElementById('hr123').click();
document.getElementById('hr32').click();
document.getElementById('hr260').click();
document.getElementById('ashare').style.display='inline-block';
//}
}
}

function toggleplaceholder() {
if (oiois != null) {
if (oiois.value == '') {
if (oiois.placeholder != origph) { //'Line formula y=Gx + O ... G is gradient, O is Y-offset ... please comma separate G,O') {
oiois.placeholder=origph; //'Line formula y=Gx + O ... G is gradient, O is Y-offset ... please comma separate G,O';
} else {
oiois.placeholder=altph; //'Polynomial formula y=A*x*x + B*x + C ... please comma separate A,B,C';
}
setTimeout(toggleplaceholder, 5000);
} else {
oiois=null;
}
}
}

function emailit() {
if (1 == 7 && ('' + location.hash).indexOf('=column') != -1) {
document.getElementById('aemail').href=aem + encodeURIComponent(document.URL.split('?')[0].split('#')[0] + '?blank=' + encodeURIComponent(eqplotsuffix.substring(1)) + '#blank=' + emeq + eqplotsuffix.substring(0,1));
} else {
document.getElementById('aemail').href=aem + encodeURIComponent(document.URL.split('?')[0].split('#')[0] + '#blank=' + emeq + eqplotsuffix);
}
document.getElementById('aemail').click();
}

function preplot(inans) {
return plotthis(document.getElementById('iplot'), inans, inans);
}

function plotthis(iois, ioisval, jans) {
var ifufg=2, divby=1, rest='', bc='';
if (minx == 0 && miny == 0 && maxx == 0 && maxy == 0) {
if (ioisval == '') { ioisval=iois.value; }
var rangeis=ioisval.split(',');
var norangeis=ioisval.replace(/\ /g,',').split(',');
if (('' + location.hash).indexOf('=column') != -1) {
if (rangeis.length >= 4) {
//alert(0);
yoffset=eval('' + rangeis[2]);
xoffset=eval('' + rangeis[2]);
//alert(yoffset);
miny=0;
maxy=eval(eval('' + rangeis[3]) - eval('' + rangeis[2]));
//alert(maxy);
maxx=maxy;
minx=0;
numsets=eval('' + rangeis[1]);
orignumsets=numsets;
graphtitle=rangeis[0];
//document.getElementById('myh1').innerHTML=graphtitle;
if (document.getElementById('h1column')) {
document.getElementById('myh1').innerHTML='<a onclick=emailit(); style=cursor:pointer;display:none;text-decoration:underline; id=ashare>Email </a><span id=h1column style=display:inline-block;>' + document.getElementById('h1column').innerHTML + '</span> Graph ' + graphtitle;
} else {
document.getElementById('myh1').innerHTML='<a onclick=emailit(); style=cursor:pointer;display:none;text-decoration:underline; id=ashare>Email </a><span id=h1column style=display:inline-block;>Column</span> Graph ' + graphtitle;
}
if (jans == '') { if (eqplotsuffix == '') { eqplotsuffix='|'; } eqplotsuffix+=(encodeURIComponent(rangeis[0]) + ',' + rangeis[1] + ',' + rangeis[2] + ',' + rangeis[3] + '|'); }
//alert(99);
plotit(minx, miny, maxx, maxy);
document.getElementById('daxes').innerHTML+='<style> hr.vertex { width:1px; height: 1px; } </style>';
dw=eval(xfactor * eval(eval(eval('' + maxx) / numsets)));
dwl=eval('' + zerozerox);
dwt=eval('' + zerozeroy);
dwt-=dw;
iois.value='';
oiois=iois;
iois.placeholder=origph; //'Line formula y=Gx + O ... G is gradient, O is Y-offset ... please comma separate G,O';
setTimeout(toggleplaceholder, 5000);
}
} else {
if (rangeis.length >= 4) {
if (jans == '') { if (eqplotsuffix == '') { eqplotsuffix='|'; } eqplotsuffix+=(ioisval + '|'); }
plotit(rangeis[0], rangeis[1], rangeis[2], rangeis[3]);
iois.value='';
oiois=iois;
iois.placeholder=origph; //'Line formula y=Gx + O ... G is gradient, O is Y-offset ... please comma separate G,O';
setTimeout(toggleplaceholder, 5000);
} else if (nosrangeis.length >= 4) {
if (jans == '') { if (eqplotsuffix == '') { eqplotsuffix='|'; } eqplotsuffix+=(ioisval.replace(/\ /g,',') + '|'); }
plotit(nosrangeis[0], nosrangeis[1], nosrangeis[2], nosrangeis[3]);
iois.value='';
oiois=iois;
iois.placeholder=origph; //'Line formula y=Gx + O ... G is gradient, O is Y-offset ... please comma separate G,O';
setTimeout(toggleplaceholder, 5000);
} else {
var crangeis=jans;
if (crangeis == '') { crangeis=prompt(firstp,''); }
if (crangeis == null) { crangeis=''; }
rangeis=crangeis.split(',');
if (rangeis.length >= 4) {
if (jans == '') { if (eqplotsuffix == '') { eqplotsuffix='|'; } eqplotsuffix+=(crangeis.replace(/\ /g,',') + '|'); }
plotit(rangeis[0], rangeis[1], rangeis[2], rangeis[3]);
iois.value='';
iois.placeholder=origph; //'Line formula y=Gx + O ... G is gradient, O is Y-offset ... please comma separate G,O';
}
}


// <hr class="vertex" onmouseover="alert(this.outerHTML);" onclick="hrclick(this);" data-title="hr391" id="hr391" title="(2,193)"
// style="position:absolute;top:268.359px;left:274px;">
// <hr class="vertex" onclick="hrclick(this);" data-title="hr144" id="hr144"
// style="position:absolute;top:461.359375px;left:272px;" title="(0,0)">
// <hr class="vertex" onclick="hrclick(this);" data-title="hr92" id="hr92"
// style="position:absolute;top:408.359375px;left:272px;" title="(0,40)">
}

} else if ((ioisval.indexOf(';') != -1 || iois.value.indexOf(';') != -1)) {
if (ioisval == '') { ioisval=iois.value; }
var things=ioisval.split(';');
if (things.length >= 2 && xlabel == '' && ylabel == '') {
if (things.length > 2) {
fufg=things.length;
divby=eval(-1 + fufg);
for (var iii=3; iii<=things.length; iii++) {
sfx.push('' + iii);
sfxa.push(cgcols[Math.floor(Math.random() * cgcols.length)]);
labelsuffix+=" and " + things[eval(-1 + iii)];
}
}
if (fufg != 2 && document.getElementById('h1column').innerHTML == 'Bar') {
dwt=eval('' + zerozeroy);
//alert(dwt);
//alert(divby);
//alert(dw);
dwt-=eval(dw / divby);
//alert('new dwt=' + dwt);
}
xlabel=things[0];
ylabel=things[1] + labelsuffix;
if (xlabel.indexOf('~') != -1) { document.getElementById('sxlabel').style.marginTop='50px'; }

if (document.getElementById('h1column').innerHTML == 'Bar') {
xlabel=things[0] + labelsuffix;
ylabel=things[1];
document.getElementById('sylabel').innerHTML='<br><br><br>' + xlabel.replace(/\~/g,'<br>');
var yl=(ylabel + ' ').substring(0,1);
for (var iyu=1; iyu<ylabel.length; iyu++) {
yl+='<br>' + ylabel.substring(iyu, eval(1 + iyu));
}
document.getElementById('sxlabel').innerHTML=yl;
document.getElementById('sxlabel').style.marginLeft='-57px';
document.getElementById('sxlabel').style.marginTop='-80px';
} else {
document.getElementById('sxlabel').innerHTML=xlabel.replace(/\~/g,'<br>');
var yl=(ylabel + ' ').substring(0,1);
for (var iyu=1; iyu<ylabel.length; iyu++) {
yl+='<br>' + ylabel.substring(iyu, eval(1 + iyu));
}
document.getElementById('sylabel').innerHTML=yl;
}
//alert(0);
if (document.getElementById('h1column').innerHTML == 'Bar') {
if (jans == '') { if (eqplotsuffix == '') { eqplotsuffix='|'; } eqplotsuffix+=(encodeURIComponent(things[1]) + ';' + encodeURIComponent(things[0]) + encodeURIComponent(labelsuffix.replace(/ and /g,';')) + '|'); }
} else {
if (jans == '') { if (eqplotsuffix == '') { eqplotsuffix='|'; } eqplotsuffix+=(encodeURIComponent(things[0]) + ';' + encodeURIComponent(things[1]) + encodeURIComponent(labelsuffix.replace(/ and /g,';')) + '|'); }
}
//alert(10);
iois.value='';
altnextph+=labelsuffix.replace(/ and /g,';');
origph=altnextph;
altph=altnextph;
iois.placeholder=altnextph; //'Line formula y=Gx + O ... G is gradient, O is Y-offset ... please comma separate G,O';
//alert(20);
} else if (things.length >= 2 && numsets > 0) {
//alert(ioisval);
rdw=dw;
divby=eval(-1 + fufg);
if (eval('' + things.length) == 2) {
yvalue=things[eval(-1 + things.length)];
xvalue=ioisval.replace(';' + yvalue, ''); //.replace(/\~/g,'<br>');
} else {
xvalue=things[0];
yvalue=things[1];
for (ifufg=2; ifufg<=fufg; ifufg++) {
if (document.getElementById('h1column').innerHTML == 'Bar') {
xvalue+=" and " + things[ifufg];
} else {
yvalue+=" and " + things[ifufg];
}
}
}
var xl='';
for (ifufg=2; ifufg<=fufg; ifufg++) {
if (ifufg == 2 && document.getElementById('h1column').innerHTML == 'Bar') {
if (jans == '') { if (eqplotsuffix == '') { eqplotsuffix='|'; } eqplotsuffix+=(encodeURIComponent(yvalue.replace(/ and /g,';')) + ';' + xvalue.replace(/ and /g,';') + '|'); }
} else if (ifufg == 2) {
if (jans == '') { if (eqplotsuffix == '') { eqplotsuffix='|'; } eqplotsuffix+=(encodeURIComponent(xvalue.replace(/ and /g,';')) + ';' + yvalue.replace(/ and /g,';') + '|'); }
}
xl='';
if (ifufg == 2) {
xvalue=ioisval.replace(';' + yvalue, '').replace(/\~/g,'<br>');
//alert(zerozerox + ' ... ' + eval(yfactor * eval(eval('' + yvalue))) + ' ... yfactor=' + yfactor + " <div title='' style='background-color:rgba(255,0,0,0.5);z-index:24;position:absolute;top:" + eval(zerozeroy + 8 - eval(eval(yfactor * eval(eval('' + yvalue) - eval('' + yoffset))))) + "px;left:" + dwl + "px;width:" + dw + "px;height:" + eval(yfactor * eval(eval('' + yvalue) - eval('' + yoffset))) + "px;'></div>");
xl=(xvalue + ' ').substring(0,1);
for (var iiyu=1; iiyu<ylabel.length; iiyu++) {
xl+='<br>' + xvalue.substring(iiyu, eval(1 + iiyu));
}
} else {
xl=xvalue;
}
//alert(document.getElementById('h1column').innerHTML);
if (document.getElementById('h1column').innerHTML == 'Line' || document.getElementById('h1column').innerHTML == 'Area') { //xvalue.toLowerCase().indexOf('line') != -1) {
//alert('2:' + document.getElementById('h1column').innerHTML);
document.getElementById('h1column').innerHTML=document.getElementById('h1column').innerHTML; //'Line';
if (document.getElementById('h1col')) { document.getElementById('h1col').innerHTML=document.getElementById('h1column').innerHTML; }
if (ifufg == 2) { hrlgcnt++; }
document.getElementById('daxes').innerHTML+='<hr title="' + ylabel.split(' and ')[eval(-2 + ifufg)] + ': ' + yvalue.split(' and ')[0] + '" class="vertex" onclick="hrclick(this);" ' + tprefix + 'title=hrlg' + sfx[eval(-1 + ifufg)] + hrlgcnt + ' id=hrlg' + sfx[eval(-1 + ifufg)] + hrlgcnt + ' style="position:absolute;top:' + eval(zerozeroy + 14 - eval(eval(yfactor * eval(eval('' + yvalue.split(' and ')[0]) - eval('' + yoffset))))) + 'px;left:' + eval(eval('' + dwl) + eval(eval('' + dw) / 2)) + 'px;"></hr>';
//alert('xvalue=' + xvalue);
if (ifufg == 2) { document.getElementById('daxes').innerHTML+='<b><sub style="margin-top:20px;position:absolute;left:' + eval(eval('' + dwl) + eval(eval('' + dw) / 2)) + 'px;top:' + zerozeroy + 'px;">' + xvalue.split(' and ')[0].split(';')[0] + '</sub></b>'; }
if (fufg != 2) { if (xvalue.indexOf(' and ') != -1 || xvalue.indexOf(';') != -1) { xvalue=xvalue.replace(xvalue.split(' and ')[0] + ' and ','').replace(xvalue.split(';')[0] + ';',''); } if (yvalue.indexOf(' and ') != -1 || yvalue.indexOf(';') != -1) { yvalue=yvalue.replace(yvalue.split(' and ')[0] + ' and ','').replace(yvalue.split(';')[0] + ';',''); } }
if (orignumsets != numsets) {
//alert(connect(document.getElementById('hrlg' + lasthr), document.getElementById('hrlg' + hrlgcnt)));
//document.getElementById('daxes').innerHTML+=connect(document.getElementById('hrlg' + lasthr), document.getElementById('hrlg' + hrlgcnt));
document.getElementById('hrlg' + sfx[eval(-1 + ifufg)] + lasthr).click();
document.getElementById('hrlg' + sfx[eval(-1 + ifufg)] + hrlgcnt).click();

if (document.getElementById('h1column').innerHTML == 'Area') { // thanks to https://stackoverflow.com/questions/41988955/absolute-positioning-of-svg-element-not-working and https://datavizcatalogue.com/methods/area_graph.html
if (fufg != 2) { acol=sfxa[eval(-1 + ifufg)]; }
var mintop=Math.min(eval('' + document.getElementById('hrlg' + sfx[eval(-1 + ifufg)] + lasthr).style.top.replace('px','')), eval('' + document.getElementById('hrlg' + sfx[eval(-1 + ifufg)] + hrlgcnt).style.top.replace('px','')));
var minleft=Math.min(eval('' + document.getElementById('hrlg' + sfx[eval(-1 + ifufg)] + lasthr).style.left.replace('px','')), eval('' + document.getElementById('hrlg' + sfx[eval(-1 + ifufg)] + hrlgcnt).style.left.replace('px','')));
var thisheight=Math.abs(zerozeroy - mintop);
var thiswidth=Math.abs(eval('' + document.getElementById('hrlg' + sfx[eval(-1 + ifufg)] + lasthr).style.left.replace('px','')) - eval('' + document.getElementById('hrlg' + sfx[eval(-1 + ifufg)] + hrlgcnt).style.left.replace('px','')));
var az='<div class="svg-container" style="opacity:0.5;position:absolute;top:' + Math.floor(eval(14 + mintop)) + 'px;left:' + Math.floor(minleft) + 'px;width:' + Math.floor(thiswidth) + 'px;height:' + Math.floor(thisheight) + 'px;"><svg height="100%" width="100%"><polygon points="'; //0,0 ' + Math.floor(eval('' + dwl) + eval(eval('' + dw) / 2)) + ',0 ' + Math.floor(eval('' + dwl) + eval(eval('' + dw) / 2)) + ',' + Math.floor(eval(yfactor * eval(eval('' + yvalue) - eval('' + yoffset)))) + ' ' + Math.floor(eval('' + dwl) + eval(eval('' + dw) / 2)) + ',' + Math.floor(eval(yfactor * eval(eval('' + yvalue) - eval('' + yoffset)))) + '" style="fill:lime;stroke:purple;stroke-width:1" /></svg></div>';
az+='' + Math.floor(eval('' + document.getElementById('hrlg' + sfx[eval(-1 + ifufg)] + lasthr).style.left.replace('px','')) - minleft) + ',';
az+='' + Math.floor(eval('' + document.getElementById('hrlg' + sfx[eval(-1 + ifufg)] + lasthr).style.top.replace('px','')) - mintop) + ' ';
az+='' + Math.floor(eval('' + document.getElementById('hrlg' + sfx[eval(-1 + ifufg)] + hrlgcnt).style.left.replace('px','')) - minleft) + ',';
az+='' + Math.floor(eval('' + document.getElementById('hrlg' + sfx[eval(-1 + ifufg)] + hrlgcnt).style.top.replace('px','')) - mintop) + ' ';
az+='' + Math.floor(eval('' + document.getElementById('hrlg' + sfx[eval(-1 + ifufg)] + hrlgcnt).style.left.replace('px','')) - minleft) + ',';
az+='' + Math.floor(eval(eval(eval('' + zerozeroy)) - mintop)) + ' ';
az+='' + Math.floor(eval('' + document.getElementById('hrlg' + sfx[eval(-1 + ifufg)] + lasthr).style.left.replace('px','')) - minleft) + ',';
az+='' + Math.floor(eval(eval(eval('' + zerozeroy)) - mintop)) + ' ';
az+='" style="fill:' + acol + ';stroke:purple;stroke-width:1" /></svg></div>';
//alert(az);
document.getElementById('daxes').innerHTML+=az;
}


} //else {
//alert(' numsets=' + numsets + ' and orignumsets=' + orignumsets);
//}
if (ifufg == fufg) { lasthr=hrlgcnt; }
} else if (document.getElementById('h1column').innerHTML == 'Bar') { // yvalue.toLowerCase().indexOf('bar') != -1) {
bc=cgcols[Math.floor(Math.random() * cgcols.length)];
if (fufg != 2) {
bc=sfxa[eval(-1 + ifufg)];
//if (document.getElementById('daxes').innerHTML.replace('top: ','top:').indexOf("top:" + dwt + "px;") == -1) {
//alert('ifufg=' + ifufg + ' and xvalue=' + xvalue.split(' and ')[0].split(';')[0] + ' and divby=' + divby + ' width=' + eval(xfactor * eval(eval('' + xvalue.split(' and ')[0].split(';')[0]) - eval('' + xoffset))));
//}
}
document.getElementById('daxes').innerHTML+="<div onclick='alert(this.title);' title='" + xlabel.split(' and ')[eval(-2 + ifufg)] + ": " + xvalue.split(' and ')[0].split(';')[0] + "' style='background-color:" + bc + ";opacity:0.5;z-index:24;position:absolute;top:" + dwt + "px;left:" + eval(zerozerox + 14) + "px;height:" + eval(dw / divby) + "px;width:" + eval(xfactor * eval(eval('' + xvalue.split(' and ')[0].split(';')[0]) - eval('' + xoffset))) + "px;'></div>";
if (ifufg == 2) { document.getElementById('daxes').innerHTML+='<b><sub style="margin-top:20px;margin-left:-50px;position:absolute;top:' + dwt + 'px;left:' + zerozerox + 'px;">' + yvalue.split(' and ')[0].split(';')[0] + rest + '</sub></b>'; }
if (fufg != 2) { if (xvalue.indexOf(' and ') != -1 || xvalue.indexOf(';') != -1) { xvalue=xvalue.replace(xvalue.split(' and ')[0] + ' and ','').replace(xvalue.split(';')[0] + ';',''); } if (yvalue.indexOf(' and ') != -1 || yvalue.indexOf(';') != -1) { yvalue=yvalue.replace(yvalue.split(' and ')[0] + ' and ','').replace(yvalue.split(';')[0] + ';',''); } }
if (divby > 1) {
dwt-=eval(dw / divby); // 2
dwl+=eval(dw / divby); // 2
rdw=0; //eval(dw / divby);
}
} else {
bc=cgcols[Math.floor(Math.random() * cgcols.length)];
if (fufg != 2) { bc=sfxa[eval(-1 + ifufg)]; }
//alert('yvalue=' + yvalue);
document.getElementById('daxes').innerHTML+="<div onclick='alert(this.title);' title='" + ylabel.split(' and ')[eval(-2 + ifufg)] + ": " + yvalue.split(' and ')[0].split(';')[0] + "' style='background-color:" + bc + ";opacity:0.5;z-index:24;position:absolute;top:" + eval(zerozeroy + 14 - eval(eval(yfactor * eval(eval('' + yvalue.split(' and ')[0].split(';')[0]) - eval('' + yoffset))))) + "px;left:" + dwl + "px;width:" + eval(dw / divby) + "px;height:" + eval(yfactor * eval(eval('' + yvalue.split(' and ')[0].split(';')[0]) - eval('' + yoffset))) + "px;'></div>";
if (ifufg == 2) { document.getElementById('daxes').innerHTML+='<b><sub style="margin-top:20px;position:absolute;left:' + dwl + 'px;top:' + zerozeroy + 'px;">' + xvalue.split(' and ')[0].split(';')[0] + rest + '</sub></b>'; }
if (fufg != 2) { if (xvalue.indexOf(' and ') != -1 || xvalue.indexOf(';') != -1) { xvalue=xvalue.replace(xvalue.split(' and ')[0] + ' and ','').replace(xvalue.split(';')[0] + ';',''); } if (yvalue.indexOf(' and ') != -1 || yvalue.indexOf(';') != -1) { yvalue=yvalue.replace(yvalue.split(' and ')[0] + ' and ','').replace(yvalue.split(';')[0] + ';',''); } }
if (divby > 1) {
dwt-=eval(dw / divby); // 2
dwl+=eval(dw / divby); // 2
rdw=0; //eval(dw / divby);
}
}

}

eqplotsuffix=eqplotsuffix.replace(/\;undefined/g,'').replace(/\;\|/g,'|');
numsets--;
if (numsets == 0) { document.getElementById('daxes').innerHTML+='<style> hr.vertex { visibility:hidden; } </style>'; }
dwl+=rdw;
dwt-=rdw;
dwl+=5;
dwt-=5;
iois.value='';
iois.placeholder=altnextph; //'Line formula y=Gx + O ... G is gradient, O is Y-offset ... please comma separate G,O';
}
} else {
var gradient=0.0;
var offset=0.0;
if (ioisval == '') { ioisval=iois.value; }
var things=ioisval.split(',');
//alert(ioisval + ' ... things.length=' + things.length);
if (things.length >= 3) {
if (jans == '') { if (eqplotsuffix == '') { eqplotsuffix='|'; } eqplotsuffix+=(ioisval + '|'); }
var rootsy=[0,0]; // thanks to http://www.biology.arizona.edu/biomath/tutorials/quadratic/roots.html
for (var kkk=minx; kkk<=maxx; kkk+=0.05) {
//alert(eval(eval(eval('' + kkk) * eval('' + kkk) * eval('' + things[0])) + (eval('' + kkk) * eval('' + things[1])) + eval('' + things[2]))));
if (eval(1.0 * eval('' + kkk)) > maxx || eval(1.0 * eval('' + kkk)) < minx) {
hrcnt=hrcnt;
} else if (eval(1.0 * eval(eval('' + kkk) + ',' + eval(eval(eval('' + kkk) * eval('' + kkk) * eval('' + things[0])) + (eval('' + kkk) * eval('' + things[1])) + eval('' + things[2]))) + eval('' + offset)) > maxy || eval(1.0 * eval(eval('' + kkk) + ',' + eval(eval(eval('' + kkk) * eval('' + kkk) * eval('' + things[0])) + (eval('' + kkk) * eval('' + things[1])) + eval('' + things[2]))) + eval('' + offset)) < miny) {
hrcnt=hrcnt;
} else if (eval('' + kkk) != 0 && Math.abs(eval(eval(eval('' + kkk) * eval('' + kkk) * eval('' + things[0])) + (eval('' + kkk) * eval('' + things[1])) + eval('' + things[2]))) > 0.05) {
hrcnt++;
document.getElementById('hrs').innerHTML+='<hr class="vertex" onclick="alert(this.title);" ' + tprefix + 'title=hr' + hrcnt + ' id=hr' + hrcnt + ' title="y=' + things[0] + '*x*x ' + ('+' + things[1]).replace('+-','-').replace('-','- ') + '*x ' + ('+' + things[2]).replace('+-','-').replace('-','- ') + ' plot point (' + eval('' + kkk) + ',' + eval(eval(eval('' + kkk) * eval('' + kkk) * eval('' + things[0])) + (eval('' + kkk) * eval('' + things[1])) + eval('' + things[2])) + ')" style="border-color:orange;position:absolute;top:' + eval(zerozeroy - eval(yfactor * eval(eval('' + kkk) + ',' + eval(eval(eval('' + kkk) * eval('' + kkk) * eval('' + things[0])) + (eval('' + kkk) * eval('' + things[1])) + eval('' + things[2]))) + eval('' + offset))) + 'px;left:' + eval(zerozerox + eval(xfactor * eval('' + kkk))) + 'px;"></hr>';
}
}
if (eval('' + things[0]) != 0) {
//alert(eval(2.0 * eval(eval('' + things[0]))) + ' ... ' + eval(eval(eval('' + things[1]) * eval('' + things[1])) - eval(4.0 * eval('' + things[0]) * eval('' + things[2]))));
if (eval(eval('' + things[1]) * eval('' + things[1]) - eval(4.0 * eval('' + things[0]) * eval('' + things[2]))) >= 0) {
rootsy[0]=eval(eval(eval(('-' + things[1]).replace('--','')) + Math.sqrt(eval(eval(eval('' + things[1])) * eval(eval('' + things[1])) - eval(4.0 * eval(eval('' + things[0])) * eval(eval('' + things[2])))))) / eval(2.0 * eval(eval('' + things[0]))));
rootsy[1]=eval(eval(eval(('-' + things[1]).replace('--','')) - Math.sqrt(eval(eval(eval('' + things[1])) * eval(eval('' + things[1])) - eval(4.0 * eval(eval('' + things[0])) * eval(eval('' + things[2])))))) / eval(2.0 * eval(eval('' + things[0]))));
//alert('' + rootsy[0] + ' ' + rootsy[1]);
}
hrcnt++;
document.getElementById('hrs').innerHTML+='<hr class="vertex" onclick="alert(this.title);" ' + tprefix + 'title=hr' + hrcnt + ' id=hr' + hrcnt + ' title="y=' + things[0] + '*x*x ' + ('+' + things[1]).replace('+-','-').replace('-','- ') + '*x ' + ('+' + things[2]).replace('+-','-').replace('-','- ') + ' plot point (' + eval('' + rootsy[0]) + ',0)" style="z-index:234;border-color:pink;position:absolute;left:' + eval(zerozerox + eval(xfactor * eval(eval('' + rootsy[0])))) + 'px;top:' + eval('' + zerozeroy) + 'px;"></hr>';
hrcnt++;
document.getElementById('hrs').innerHTML+='<hr class="vertex" onclick="alert(this.title);" ' + tprefix + 'title=hr' + hrcnt + ' id=hr' + hrcnt + ' title="y=' + things[0] + '*x*x ' + ('+' + things[1]).replace('+-','-').replace('-','- ') + '*x ' + ('+' + things[2]).replace('+-','-').replace('-','- ') + ' plot point (' + eval('' + rootsy[1]) + ',0)" style="z-index:234;border-color:pink;position:absolute;left:' + eval(zerozerox + eval(xfactor * eval(eval('' + rootsy[1])))) + 'px;top:' + eval('' + zerozeroy) + 'px;"></hr>';
}
hrcnt++;
document.getElementById('hrs').innerHTML+='<hr class="vertex" onclick="alert(this.title);" ' + tprefix + 'title=hr' + hrcnt + ' id=hr' + hrcnt + ' title="y=' + things[0] + '*x*x ' + ('+' + things[1]).replace('+-','-').replace('-','- ') + '*x ' + ('+' + things[2]).replace('+-','-').replace('-','- ') + ' plot point (0,' + eval('' + things[2]) + ')" style="z-index:234;border-color:pink;position:absolute;left:' + eval(zerozerox) + 'px;top:' + eval(zerozeroy - eval(yfactor * eval(eval('' + things[2])))) + 'px;"></hr>';
iois.value='';
iois.placeholder=origph; //'Line formula y=Gx + O ... G is gradient, O is Y-offset ... please comma separate G,O';
oiois=iois;
setTimeout(toggleplaceholder, 5000);


} else if (things.length >= 1) {
if (jans == '') { if (eqplotsuffix == '') { eqplotsuffix='|'; } eqplotsuffix+=(ioisval + '|'); }
gradient=eval('' + things[0]);
offset=eval('' + things[1]);
// y=6x + 12;
if (gradient != 0) {
//alert('' + xfactor + ' ' + yfactor);
hrcnt++;
document.getElementById('hrs').innerHTML+='<hr class="vertex" onclick="alert(this.title);" ' + tprefix + 'title=hr' + hrcnt + ' id=hr' + hrcnt + ' title="y=' + gradient + '*x ' + ('+' + offset).replace('+-','-').replace('-','- ') + ' plot point (' + eval(-offset / eval('' + gradient)) + ',0)" style="z-index:134;border-color:pink;position:absolute;top:' + zerozeroy + 'px;left:' + eval(zerozerox - eval(xfactor * eval(offset / eval('' + gradient)))) + 'px;"></hr>';
hrcnt++;
document.getElementById('hrs').innerHTML+='<hr class="vertex" onclick="alert(this.title);" ' + tprefix + 'title=hr' + hrcnt + ' id=hr' + hrcnt + ' title="y=' + gradient + '*x ' + ('+' + offset).replace('+-','-').replace('-','- ') + ' plot point (0,' + eval('' + offset) + ')" style="z-index:134;border-color:pink;position:absolute;top:' + eval(zerozeroy - eval(yfactor * eval('' + offset))) + 'px;left:' + zerozerox + 'px;"></hr>';

for (var kkk=minx; kkk<=maxx; kkk+=eval(eval('' + xlen) / Math.floor((80 * Math.abs(eval('' + gradient)))) )) {
if (eval(eval(eval('' + kkk) * eval('' + gradient)) + eval('' + offset)) > maxx || eval(eval(eval('' + kkk) * eval('' + gradient)) + eval('' + offset)) < minx) {
hrcnt=hrcnt;
} else if (eval('' + kkk) > maxy || eval('' + kkk) < miny) {
hrcnt=hrcnt;
} else {
hrcnt++;
document.getElementById('hrs').innerHTML+='<hr class="vertex" onclick="alert(this.title);" ' + tprefix + 'title=hr' + hrcnt + ' id=hr' + hrcnt + ' title="y=' + gradient + '*x ' + ('+' + offset).replace('+-','-').replace('-','- ') + ' plot point (' + eval('' + kkk) + ',' + eval(eval(eval('' + kkk) * eval('' + gradient)) + eval('' + offset)) + ')" style="position:absolute;top:' + eval(zerozeroy - eval(yfactor * eval(eval(eval('' + kkk) * eval('' + gradient)) + eval('' + offset)))) + 'px;left:' + eval(zerozerox + eval(xfactor * eval('' + kkk))) + 'px;"></hr>';
}
}
iois.value='';
iois.placeholder=origph; //'Line formula y=Gx + O ... G is gradient, O is Y-offset ... please comma separate G,O';
oiois=iois;
setTimeout(toggleplaceholder, 5000);

}
}
}
return '';
}

function nobuttons() {
jigsaw=true;
//document.getElementById('daxes').innerHTML+='<style> hr.vertex { visibility:hidden; } </style>';
document.getElementById('myh1').innerHTML=document.getElementById('myh1').innerHTML.substring('Image Reveal Game or '.length).replace(" or Timesheet Helper"," <a style=text-decoration:underline;cursor:pointer;font-size:10px; title=Help onclick='alert(timesheet_blurb);'> or Timesheet Helper</a>");
//document.getElementById('button').value="Image Map";
document.getElementById('button').innerHTML="Image Map";
document.getElementById('button').style.backgroundColor='lightblue';
document.getElementById('button').title='Click over image for Image Map area element shape=rect or shape=circle or shape=poly definitions';
document.getElementById('anob').style.backgroundColor='green';
document.getElementById('myh1').style.position='absolute';
document.getElementById('myh1').style.top='0px';
document.getElementById('myh1').style.left='10px';
document.getElementById('myh3').style.position='absolute';
document.getElementById('myh3').style.top='60px';
document.getElementById('myh3').style.left='10px';
//document.getElementById('myh4').style.position='absolute';
document.getElementById('myh4').style.marginTop='120px';
//document.getElementById('myh4').style.left='0px';
var bts=document.getElementsByTagName('button');
for (var ibts=0; ibts<bts.length; ibts++) {
if (bts[ibts].innerHTML.replace(' ','') == '') { bts[ibts].style.display='none'; }
}
ttable=document.getElementById('toptable').getBoundingClientRect();
document.getElementById('jigsaw').style.position='absolute';
document.getElementById('jigsaw').style.top='' + ttable.top + 'px';
document.getElementById('jigsaw').style.left='' + ttable.left + 'px';
document.getElementById('jigsaw').style.width='100%';
document.getElementById('jigsaw').style.height='100vh';
document.getElementById('jigsaw').style.zIndex='100';
document.getElementById('jigsaw').style.backgroundColor='transparent';
//document.getElementById('jigsaw').style.border='2px solid red';
document.getElementById('myh4').innerHTML=document.getElementById('myh4').innerHTML.split(' of Player')[0].replace('Enjoy your two player game of Image Revealing','Welcome to Image Jigsaw Guillotine Mapping');
setTimeout(eh, 1000);
}

function draw_hrs() {
var inqis='';
if (('' + location.hash).indexOf('=column') != -1) {
emeq='column';
document.getElementById('aemail').href=document.getElementById('aemail').href.replace('Plot%20Axes%','Column%20Graph%');
xlabel='';
ylabel='';
firstp='Please enter Title, Number of data sets, Y-axis minimum, Y-axis maximum';
}
if (('' + location.hash).replace(/\%7C/g,'|').indexOf('|Bar|') != -1) {
origph='Enter X-axis Label (numerical); Y-axis Label' + origphsuffix;
altph=origph;
altnextph='Enter X-axis Value; Y-axis Value (~ is line feed)';
firstp='Please enter Title, Number of data sets, X-axis minimum, X-axis maximum';
}
aem=document.getElementById('aemail').href;
wourx=location.search.split('ourx=')[1] ? decodeURIComponent(location.search.split('ourx=')[1].split('&')[0]) : '';
if (('' + location.hash + '~').indexOf('blank') != -1 && ('' + location.hash + '~').indexOf('blank~') == -1) {
wourx=('' + location.hash + '~').split('blank')[1].split('~')[0];
}
lesscourx=wourx;
if (('' + location.hash).indexOf('hangman') != -1 || ('' + location.hash).indexOf('mathsgrid') != -1 || ('' + location.hash).indexOf('reveal') != -1) {
location.hash=location.hash.replace('mathsgrid','hangman').replace('reveal','hangman#hangman');
if (('' + location.hash).indexOf('.') != -1) {
goes=eval(('' + location.hash).split('.')[1]);
score=eval(('' + location.hash).split('.')[0].split('hangman')[1].replace('-',''));
} else if (document.URL.indexOf('?wording=') != -1 && ('' + location.hash).split('angma').length > 3) { // && ('' + location.hash).indexOf('hangman0.0') != -1) { // && ('' + location.hash).indexOf('00.0') != -1) {
sosize(' '); // sosize('word_wrap.jpg');
} else if (document.URL.indexOf('?wording=') != -1 && ('' + location.hash).split('angma').length > 2) { // && ('' + location.hash).indexOf('hangman0.0') != -1) { // && ('' + location.hash).indexOf('00.0') != -1) {
document.getElementById('myh1').innerHTML=' ';
document.getElementById('myh3').innerHTML=' ';
document.getElementById('myh4').innerHTML=' ';
document.getElementById('dhangman').innerHTML+="<iframe name=iback id=iback style='background-color:transparent;z-index:23;position:absolute;top:200px;left:0px;width:580px;height:100vh;' src=//www.rjmprogramming.com.au/HTMLCSS/user_of_signature_signature.html?rand=" + Math.floor(Math.random() * 123456) + "></iframe>";
document.getElementById('dhangman').innerHTML+="<iframe name=ifront id=ifront style='background-color:transparent;z-index:22;position:absolute;top:0px;left:0px;width:100%;height:100vh;' src=//www.rjmprogramming.com.au/HTMLCSS/square_hr_tracing.htm#hangman-0.0></iframe>";
document.getElementById('dhangman').innerHTML+="<div id=dback title='' style='background-color:transparent;z-index:24;position:absolute;top:200px;left:580px;'></div>";
//return;
}
}
if ((' ' + location.hash).split('#').length > 3 || (' ' + location.hash).indexOf('hangman-00.0') != -1) {
document.getElementById('myh1').innerHTML='Image Reveal Game or <a id=anob onclick="nobuttons(); this.style.backgroundColor=' + "'green'" + ';" style=cursor:pointer;background-color:yellow;>' + imtitle + '</a> <div id=xdjigsaw></div>';
var jigsawurl=location.search.split('jigsawurl=')[1] ? decodeURIComponent(location.search.split('jigsawurl=')[1].split('&')[0]) : '';
if (jigsawurl != '') {
jigsaw=true;
document.getElementById('myh4').innerHTML+=' ... image <div id=dpf style=display:NONE;><input style=display:inline-block; id=file type=file name=file></input><span class=readBytesButtons><button style=display:none; data-endbyte=4 data-startbyte=0>1-5</button><button style=display:none; data-endbyte=14 data-startbyte=5>6-15</button><button style=display:none; data-endbyte=7 data-startbyte=6>7-8</button><button name=button id=button value=Process data-endbyte=0 data-startbyte=0>Process</button></span> or URL <input id=vsiurl type=url onblur=readUBlob(this.value,0,0); value="' + jigsawurl + '"></input></div>'; // of Player' + thisplayer + s1 + ' versus <a onclick=myguess(); style=text-decoration:underline;cursor:pointer;>guess</a> of Player' + eval(3 - thisplayer) + s2;
if (!document.getElementById('anob')) {
document.getElementById('myh1').innerHTML='<a id=anob onclick="nobuttons(); this.style.backgroundColor=' + "'green'" + ';" style=cursor:pointer;background-color:yellow;>' + imtitle + '</a> <div id=xdjigsaw></div>';
}
document.getElementById('anob').click(); // nobuttons();
document.getElementById('vsiurl').value=jigsawurl;
readUBlob(jigsawurl,0,0);
document.getElementById('myh4').innerHTML='';
}
} else if ((' ' + location.hash).split('#').length > 2 || (' ' + location.hash).indexOf('hangman-0.0') != -1) {
document.getElementById('myh1').innerHTML='Maths Grid Paper';
}

// if (('' + location.hash).indexOf('blank') == -1 && ('' + location.hash).indexOf('square') == -1 && ('' + location.hash).indexOf('grid') == -1) {

if (document.URL.indexOf('?') == -1 && ('' + location.hash).indexOf('blank') == -1 && ('' + location.hash).indexOf('hangman') == -1 && ('' + location.hash).indexOf('square') == -1 && ('' + location.hash).indexOf('grid') == -1) { pickone(inqis); } else if (document.URL.indexOf('?') == -1 && (('' + location.hash).indexOf('blank') != -1 || ('' + location.hash).indexOf('hangman') != -1 || ('' + location.hash).indexOf('square') != -1 || ('' + location.hash).indexOf('grid') != -1)) { inqis=' '; pickone(inqis); }
wording=location.search.split('wording=')[1] ? decodeURIComponent(location.search.split('wording=')[1].split('&')[0]) : ' ';
if ((' ' + location.hash).split('#').length > 3 || (' ' + location.hash).indexOf('hangman-00.0') != -1) {
document.getElementById('myh1').innerHTML='Image Reveal Game or <a id=anob onclick="nobuttons(); this.style.backgroundColor=' + "'green'" + ';" style=cursor:pointer;background-color:yellow;>' + imtitle + '</a> <div id=xdjigsaw></div>';
var jigsawurlx=location.search.split('jigsawurl=')[1] ? decodeURIComponent(location.search.split('jigsawurl=')[1].split('&')[0]) : '';
if (jigsawurlx != '') {
jigsaw=true;
document.getElementById('myh4').innerHTML+=' ... image <div id=dpf style=display:NONE;><input style=display:inline-block; id=file type=file name=file></input><span class=readBytesButtons><button style=display:none; data-endbyte=4 data-startbyte=0>1-5</button><button style=display:none; data-endbyte=14 data-startbyte=5>6-15</button><button style=display:none; data-endbyte=7 data-startbyte=6>7-8</button><button name=button id=button value=Process data-endbyte=0 data-startbyte=0>Process</button></span> or URL <input id=vsiurl type=url onblur=readUBlob(this.value,0,0); value="' + jigsawurlx + '"></input></div>'; // of Player' + thisplayer + s1 + ' versus <a onclick=myguess(); style=text-decoration:underline;cursor:pointer;>guess</a> of Player' + eval(3 - thisplayer) + s2;
if (!document.getElementById('anob')) {
document.getElementById('myh1').innerHTML='<a id=anob onclick="nobuttons(); this.style.backgroundColor=' + "'green'" + ';" style=cursor:pointer;background-color:yellow;>' + imtitle + '</a> <div id=xdjigsaw></div>';
}
document.getElementById('anob').click(); // nobuttons();
document.getElementById('vsiurl').value=jigsawurlx;
readUBlob(jigsawurlx,0,0);
document.getElementById('myh4').innerHTML='';
}
} else if ((' ' + location.hash).split('#').length > 2 || (' ' + location.hash).indexOf('hangman-0.0') != -1) {
wording='Maths Grid Paper';
}
inanswer=location.search.split('answer=')[1] ? decodeURIComponent(location.search.split('answer=')[1].split('&')[0]) : inqis;
var inquestion=location.search.split('question=')[1] ? ina(decodeURIComponent(location.search.split('question=')[1].split('&')[0])) : '';
var tds=document.getElementsByTagName('td');
var fhr=0, vdval='', thisv='', into='hrs', defvdval='', toff=6, loff=-2;
dval='';
for (var itds=0; itds<tds.length; itds++) {
tds[itds].id='td' + eval(1 + itds);
if (('' + location.hash).indexOf('grid') != -1) { into='td' + eval(1 + itds); }
if (('' + location.hash).indexOf('blank') != -1 || ('' + location.hash).indexOf('hangman') != -1 || ('' + location.hash).indexOf('square') != -1 || ('' + location.hash).indexOf('grid') != -1) {
if (('' + location.hash).indexOf('square') != -1) { if (eval(1 + itds) > 9) { document.getElementById('spout').innerHTML+="<style> #td" + eval(1 + itds) + "::after { content:'\\00003" + Math.floor(eval(eval(1 + itds) / 10)) + "\\0020e3\\00003" + eval(eval(1 + itds) % 10) + "\\0020e3'; } </style>"; } else { document.getElementById('spout').innerHTML+="<style> #td" + eval(1 + itds) + "::after { content:'\\00003" + eval(eval(1 + itds) % 10) + "\\0020e3'; } </style>"; } defvdval="visibility:hidden;"; tds[itds].style.border='1px solid red'; }
if (('' + location.hash).indexOf('grid') != -1) { tds[itds].style.border='1px solid brown'; }
tds[itds].onclick=function(event) { lastsquare=eval(('' + this.id).replace('td','')); goes++; if (lastsquare == sqchoice) { score++; } if (('' + location.hash).indexOf('square') != -1) { picksq(); } else if (('' + location.hash).indexOf('grid') != -1) { gridinfo(' in square number ' + lastsquare); } };
}
thisrect=tds[itds].getBoundingClientRect();
//squares.push(('' + thisrect.left).replace('px','') + "," + ('' + thisrect.top).replace('px','') + ";" + eval(eval(('' + thisrect.left).replace('px','')) + eval(('' + thisrect.width).replace('px',''))) + "," + eval(eval(('' + thisrect.top).replace('px','')) + eval(('' + thisrect.height).replace('px',''))));
//alert(('' + thisrect.left) + ' ' + ('' + thisrect.top) + ' ' + ('' + thisrect.width) + ' ' + ('' + thisrect.height) + ' ' + squares[0]);

fhr=hrcnt;

//vertices.push(('' + thisrect.left).replace('px','') + "," + ('' + thisrect.top).replace('px',''));
vdval=defvdval;
thisv=';' + ourmathround(eval(('' + thisrect.left).replace('px',''))) + "," + ourmathround(eval(('' + thisrect.top).replace('px',''))) + ';';
if (vstr.indexOf(thisv) != -1) { vdval="visibility:hidden;"; } else { vstr+=vplus(thisv.substring(1)); }
document.getElementById(into).innerHTML+='<hr class="vertex' + maybenocont(vdval) + '" onclick="hrclick(this);" ' + tprefix + 'title=hr' + hrcnt + ' id=hr' + hrcnt + ' style="' + vdval + 'position:absolute;top:' + thisrect.top + 'px;left:' + thisrect.left + 'px;"></hr>';
hrcnt++;


//vertices.push(('' + thisrect.left).replace('px','') + "," + eval(eval(('' + thisrect.top).replace('px','')) + eval(('' + thisrect.height).replace('px',''))));
vdval=defvdval;
thisv=';' + ourmathround(('' + thisrect.left).replace('px','')) + "," + ourmathround(eval(eval(('' + thisrect.top).replace('px','')) + eval(('' + thisrect.height).replace('px','')))) + ';';
if (vstr.indexOf(thisv) != -1) { vdval="visibility:hidden;"; } else { vstr+=vplus(thisv.substring(1)); }
document.getElementById(into).innerHTML+='<hr class="vertex' + maybenocont(vdval) + '" onclick="hrclick(this);" ' + tprefix + 'title=hr' + hrcnt + ' id=hr' + hrcnt + ' style="' + vdval + 'position:absolute;top:' + eval(eval(('' + thisrect.top).replace('px','')) + eval(('' + thisrect.height).replace('px',''))) + 'px;left:' + thisrect.left + 'px;"></hr>';
hrcnt++;

//vertices.push(eval(eval(('' + thisrect.left).replace('px','')) + eval(('' + thisrect.width).replace('px',''))) + "," + eval(eval(('' + thisrect.top).replace('px','')) + eval(('' + thisrect.height).replace('px',''))));
vdval=defvdval;
thisv=';' + ourmathround(eval(eval(('' + thisrect.left).replace('px','')) + eval(('' + thisrect.width).replace('px','')))) + "," + ourmathround(eval(eval(('' + thisrect.top).replace('px','')) + eval(('' + thisrect.height).replace('px','')))) + ';';
if (vstr.indexOf(thisv) != -1) { vdval="visibility:hidden;"; } else { vstr+=vplus(thisv.substring(1)); }
document.getElementById(into).innerHTML+='<hr class="vertex' + maybenocont(vdval) + '" onclick="hrclick(this);" ' + tprefix + 'title=hr' + hrcnt + ' id=hr' + hrcnt + ' style="' + vdval + 'position:absolute;top:' + eval(eval(('' + thisrect.top).replace('px','')) + eval(('' + thisrect.height).replace('px',''))) + 'px;left:' + eval(eval(('' + thisrect.left).replace('px','')) + eval(('' + thisrect.width).replace('px',''))) + 'px;"></hr>';
hrcnt++;

//vertices.push(eval(eval(('' + thisrect.left).replace('px','')) + eval(('' + thisrect.width).replace('px',''))) + "," + ('' + thisrect.top).replace('px',''));
vdval=defvdval;
thisv=';' + ourmathround(eval(eval(('' + thisrect.left).replace('px','')) + eval(('' + thisrect.width).replace('px','')))) + "," + ourmathround(('' + thisrect.top).replace('px','')) + ';';
if (vstr.indexOf(thisv) != -1) { vdval="visibility:hidden;"; } else { vstr+=vplus(thisv.substring(1)); }
//if (hrcnt == 134 || hrcnt == 146) { alert(vdval + ' hr' + hrcnt + ': ' + thisv + ' ... ' + vstr); } // ?
document.getElementById(into).innerHTML+='<hr class="vertex' + maybenocont(vdval) + '" onclick="hrclick(this);" ' + tprefix + 'title=hr' + hrcnt + ' id=hr' + hrcnt + ' style="' + vdval + 'position:absolute;top:' + thisrect.top + 'px;left:' + eval(eval(('' + thisrect.left).replace('px','')) + eval(('' + thisrect.width).replace('px',''))) + 'px;"></hr>';
hrcnt++;

//

//vertices.push(eval(eval(('' + thisrect.left).replace('px','')) + eval(('' + thisrect.width).replace('px','')) / 2) + "," + eval(eval(('' + thisrect.top).replace('px','')) + eval(('' + thisrect.height).replace('px','')) / 2));
vdval=defvdval;
thisv=';' + ourmathround(eval(eval(('' + thisrect.left).replace('px','')) + eval(('' + thisrect.width).replace('px','')) / 2)) + "," + ourmathround(eval(eval(('' + thisrect.top).replace('px','')) + eval(('' + thisrect.height).replace('px','')) / 2)) + ';';
if (vstr.indexOf(thisv) != -1) { vdval="visibility:hidden;"; } else { vstr+=vplus(thisv.substring(1)); }
document.getElementById(into).innerHTML+='<hr class="vertex' + maybenocont(vdval) + '" onclick="hrclick(this);" ' + tprefix + 'title=hr' + hrcnt + ' id=hr' + hrcnt + ' style="' + vdval + 'position:absolute;top:' + eval(eval(('' + thisrect.top).replace('px','')) + eval(('' + thisrect.height).replace('px','')) / 2) + 'px;left:' + eval(eval(('' + thisrect.left).replace('px','')) + eval(('' + thisrect.width).replace('px','')) / 2) + 'px;"></hr>';
hrcnt++;


//vertices.push(eval(eval(('' + thisrect.left).replace('px','')) + eval(('' + thisrect.width).replace('px','')) / 1) + "," + eval(eval(('' + thisrect.top).replace('px','')) + eval(('' + thisrect.height).replace('px','')) / 2));
vdval=defvdval;
thisv=';' + ourmathround(eval(eval(('' + thisrect.left).replace('px','')) + eval(('' + thisrect.width).replace('px','')) / 1)) + "," + ourmathround(eval(eval(('' + thisrect.top).replace('px','')) + eval(('' + thisrect.height).replace('px','')) / 2)) + ';';
if (vstr.indexOf(thisv) != -1) { vdval="visibility:hidden;"; } else { vstr+=vplus(thisv.substring(1)); }
document.getElementById(into).innerHTML+='<hr class="vertex' + maybenocont(vdval) + '" onclick="hrclick(this);" ' + tprefix + 'title=hr' + hrcnt + ' id=hr' + hrcnt + ' style="' + vdval + 'position:absolute;top:' + eval(eval(('' + thisrect.top).replace('px','')) + eval(('' + thisrect.height).replace('px','')) / 2) + 'px;left:' + eval(eval(('' + thisrect.left).replace('px','')) + eval(('' + thisrect.width).replace('px','')) / 1) + 'px;"></hr>';
hrcnt++;



//vertices.push(('' + thisrect.left).replace('px','') + "," + eval(eval(('' + thisrect.top).replace('px','')) + eval(('' + thisrect.height).replace('px','')) / 2));
vdval=defvdval;
thisv=';' + ourmathround(('' + thisrect.left).replace('px','')) + "," + ourmathround(eval(eval(('' + thisrect.top).replace('px','')) + eval(('' + thisrect.height).replace('px','')) / 2)) + ';';
if (vstr.indexOf(thisv) != -1) { vdval="visibility:hidden;"; } else { vstr+=vplus(thisv.substring(1)); }
document.getElementById(into).innerHTML+='<hr class="vertex' + maybenocont(vdval) + '" onclick="hrclick(this);" ' + tprefix + 'title=hr' + hrcnt + ' id=hr' + hrcnt + ' style="' + vdval + 'position:absolute;top:' + eval(eval(('' + thisrect.top).replace('px','')) + eval(('' + thisrect.height).replace('px','')) / 2) + 'px;left:' + thisrect.left + 'px;"></hr>';
hrcnt++;



//vertices.push(eval(eval(('' + thisrect.left).replace('px','')) + eval(('' + thisrect.width).replace('px','')) / 2) + "," + ('' + thisrect.top).replace('px',''));
vdval=defvdval;
thisv=';' + ourmathround(eval(eval(('' + thisrect.left).replace('px','')) + eval(('' + thisrect.width).replace('px','')) / 2)) + "," + ourmathround(('' + thisrect.top).replace('px','')) + ';';
if (vstr.indexOf(thisv) != -1) { vdval="visibility:hidden;"; } else { vstr+=vplus(thisv.substring(1)); }
document.getElementById(into).innerHTML+='<hr class="vertex' + maybenocont(vdval) + '" onclick="hrclick(this);" ' + tprefix + 'title=hr' + hrcnt + ' id=hr' + hrcnt + ' style="' + vdval + 'position:absolute;top:' + thisrect.top + 'px;left:' + eval(eval(('' + thisrect.left).replace('px','')) + eval(('' + thisrect.width).replace('px','')) / 2) + 'px;"></hr>';
hrcnt++;


//vertices.push(eval(eval(('' + thisrect.left).replace('px','')) + eval(('' + thisrect.width).replace('px','')) / 2) + "," + eval(eval(('' + thisrect.top).replace('px','')) + eval(('' + thisrect.height).replace('px','')) / 1));
vdval=defvdval;
thisv=';' + ourmathround(eval(eval(('' + thisrect.left).replace('px','')) + eval(('' + thisrect.width).replace('px','')) / 2)) + "," + ourmathround(eval(eval(('' + thisrect.top).replace('px','')) + eval(('' + thisrect.height).replace('px','')) / 1)) + ';';
if (vstr.indexOf(thisv) != -1) { vdval="visibility:hidden;"; } else { vstr+=vplus(thisv.substring(1)); }
document.getElementById(into).innerHTML+='<hr class="vertex' + maybenocont(vdval) + '" onclick="hrclick(this);" ' + tprefix + 'title=hr' + hrcnt + ' id=hr' + hrcnt + ' style="' + vdval + 'position:absolute;top:' + eval(eval(('' + thisrect.top).replace('px','')) + eval(('' + thisrect.height).replace('px','')) / 1) + 'px;left:' + eval(eval(('' + thisrect.left).replace('px','')) + eval(('' + thisrect.width).replace('px','')) / 2) + 'px;"></hr>';
hrcnt++;

if (eval(itds % 5) == 0) {
dval='';
if (inquestion != '') {
if (parent.document != document) {
if (parent.document.getElementById('myh1')) {
dval=dval;
if ((' ' + location.hash).split('#').length > 3 || (' ' + location.hash).indexOf('hangman-00.0') != -1) {
document.getElementById('myh1').innerHTML='Image Reveal Game or <a id=anob onclick="nobuttons(); this.style.backgroundColor=' + "'green'" + ';" style=cursor:pointer;background-color:yellow;>' + imtitle + '</a> <div id=xdjigsaw></div>';
var jigsawurly=location.search.split('jigsawurl=')[1] ? decodeURIComponent(location.search.split('jigsawurl=')[1].split('&')[0]) : '';
if (jigsawurly != '') {
jigsaw=true;
document.getElementById('myh4').innerHTML+=' ... image <div id=dpf style=display:NONE;><input style=display:inline-block; id=file type=file name=file></input><span class=readBytesButtons><button style=display:none; data-endbyte=4 data-startbyte=0>1-5</button><button style=display:none; data-endbyte=14 data-startbyte=5>6-15</button><button style=display:none; data-endbyte=7 data-startbyte=6>7-8</button><button name=button id=button value=Process data-endbyte=0 data-startbyte=0>Process</button></span> or URL <input id=vsiurl type=url onblur=readUBlob(this.value,0,0); value="' + jigsawurly + '"></input></div>'; // of Player' + thisplayer + s1 + ' versus <a onclick=myguess(); style=text-decoration:underline;cursor:pointer;>guess</a> of Player' + eval(3 - thisplayer) + s2;
if (!document.getElementById('anob')) {
document.getElementById('myh1').innerHTML='<a id=anob onclick="nobuttons(); this.style.backgroundColor=' + "'green'" + ';" style=cursor:pointer;background-color:yellow;>' + imtitle + '</a> <div id=xdjigsaw></div>';
}
document.getElementById('anob').click(); // nobuttons();
document.getElementById('vsiurl').value=jigsawurly;
readUBlob(jigsawurly,0,0);
document.getElementById('myh4').innerHTML='';
}
} else if ((' ' + location.hash).split('#').length > 2 || (' ' + location.hash).indexOf('hangman-0.0') != -1) {
document.getElementById('myh1').innerHTML='Maths Grid Paper';
} else {
document.getElementById('myh1').innerHTML='Chinese Brain Twisters Answer';
}
} else {
if (('' + location.hash).indexOf('blank') != -1 || ('' + location.hash).indexOf('hangman') != -1 || ('' + location.hash).indexOf('square') != -1 || ('' + location.hash).indexOf('grid') != -1) {
document.getElementById('myh1').innerHTML=wording.replace('Image Reveal Game','Image Reveal Game or <a id=anob onclick="nobuttons(); this.style.backgroundColor=' + "'green'" + ';" style=cursor:pointer;background-color:yellow;>' + imtitle + '</a>');
var jigsawurlz=location.search.split('jigsawurl=')[1] ? decodeURIComponent(location.search.split('jigsawurl=')[1].split('&')[0]) : '';
if (jigsawurlz != '') {
jigsaw=true;
document.getElementById('myh4').innerHTML+=' ... image <div id=dpf style=display:NONE;><input style=display:inline-block; id=file type=file name=file></input><span class=readBytesButtons><button style=display:none; data-endbyte=4 data-startbyte=0>1-5</button><button style=display:none; data-endbyte=14 data-startbyte=5>6-15</button><button style=display:none; data-endbyte=7 data-startbyte=6>7-8</button><button name=button id=button value=Process data-endbyte=0 data-startbyte=0>Process</button></span> or URL <input id=vsiurl type=url onblur=readUBlob(this.value,0,0); value="' + jigsawurlz + '"></input></div>'; // of Player' + thisplayer + s1 + ' versus <a onclick=myguess(); style=text-decoration:underline;cursor:pointer;>guess</a> of Player' + eval(3 - thisplayer) + s2;
if (!document.getElementById('anob')) {
document.getElementById('myh1').innerHTML='<a id=anob onclick="nobuttons(); this.style.backgroundColor=' + "'green'" + ';" style=cursor:pointer;background-color:yellow;>' + imtitle + '</a> <div id=xdjigsaw></div>';
}
document.getElementById('anob').click(); // nobuttons();
document.getElementById('vsiurl').value=jigsawurlz;
readUBlob(jigsawurlz,0,0);
document.getElementById('myh4').innerHTML='';
}
//wording=' ';
} else {
if (document.getElementById('myh3').innerHTML.indexOf(' ... ') == -1) { document.getElementById('myh3').innerHTML+=' ... Thanks to Chinese Brain Twisters by Baifang ISBN: 0-471-59505-5'; }
document.getElementById('reveal').style.display='block';
document.getElementById('skip').style.display='block';
if ((' ' + location.hash).split('#').length > 3 || (' ' + location.hash).indexOf('hangman-00.0') != -1) {
document.getElementById('myh1').innerHTML='Image Reveal Game or <a id=anob onclick="nobuttons(); this.style.backgroundColor=' + "'green'" + ';" style=cursor:pointer;background-color:yellow;>' + imtitle + '</a> <div id=xdjigsaw></div>';
var jigsawurlw=location.search.split('jigsawurl=')[1] ? decodeURIComponent(location.search.split('jigsawurl=')[1].split('&')[0]) : '';
if (jigsawurlw != '') {
jigsaw=true;
document.getElementById('myh4').innerHTML+=' ... image <div id=dpf style=display:NONE;><input style=display:inline-block; id=file type=file name=file></input><span class=readBytesButtons><button style=display:none; data-endbyte=4 data-startbyte=0>1-5</button><button style=display:none; data-endbyte=14 data-startbyte=5>6-15</button><button style=display:none; data-endbyte=7 data-startbyte=6>7-8</button><button name=button id=button value=Process data-endbyte=0 data-startbyte=0>Process</button></span> or URL <input id=vsiurl type=url onblur=readUBlob(this.value,0,0); value="' + jigsawurlw + '"></input></div>'; // of Player' + thisplayer + s1 + ' versus <a onclick=myguess(); style=text-decoration:underline;cursor:pointer;>guess</a> of Player' + eval(3 - thisplayer) + s2;
if (!document.getElementById('anob')) {
document.getElementById('myh1').innerHTML='<a id=anob onclick="nobuttons(); this.style.backgroundColor=' + "'green'" + ';" style=cursor:pointer;background-color:yellow;>' + imtitle + '</a> <div id=xdjigsaw></div>';
}
document.getElementById('anob').click(); // nobuttons();
document.getElementById('vsiurl').value=jigsawurlw;
readUBlob(jigsawurlw,0,0);
document.getElementById('myh4').innerHTML='';
}
} else if ((' ' + location.hash).split('#').length > 2 || (' ' + location.hash).indexOf('hangman-0.0') != -1) {
document.getElementById('myh1').innerHTML='Maths Grid Paper';
} else {
document.getElementById('myh1').innerHTML='Chinese Brain Twisters Question';
}
}
}
} else {
if (('' + location.hash).indexOf('blank') != -1 || ('' + location.hash).indexOf('hangman') != -1 || ('' + location.hash).indexOf('square') != -1 || ('' + location.hash).indexOf('grid') != -1) {
document.getElementById('myh1').innerHTML=wording.replace('Image Reveal Game','Image Reveal Game or <a id=anob onclick="nobuttons(); this.style.backgroundColor=' + "'green'" + ';" style=cursor:pointer;background-color:yellow;>' + imtitle + '</a>&n