<!doctype html>
<html>
<head>
<title>Background Layer Wording - RJM Programming - June, 2019 ... 1</title>
<style>
margin: 0 0 0 0;
padding: 0 0 0 0;
</style>
<script type='text/javascript'>
var aconto=null;
var cis=-4;
var allow=true;
var se='startsas=';
var pb='';
var tap='', tai='';
var documentURL=document.URL;
function addtota(tv, tvo) {
if (documentURL.indexOf('startsas=') != -1) { // is original background layer
//alert('In background');
parent.document.getElementById('tais').value+=String.fromCharCode(10) + tv;
} else {
//alert('In foreground');
aconto.getElementById('tais').value+=String.fromCharCode(10) + tv;
}
tvo.value='';
}
function swapthem() {
var wt=0;
top.document.getElementById('extradiv').innerHTML='' + eval(1 + eval(top.document.getElementById('extradiv').innerHTML));
if (documentURL.indexOf(se) != -1) { // is original background layer
if (1 == 1) {
pb=top.pb;
tap=parent.document.getElementById('tais').value;
while (tap.indexOf(String.fromCharCode(10)) != -1) {
tap=tap.replace(String.fromCharCode(10),'<br>');
}
tai=document.getElementById('tais').value;
document.getElementById('tais').value='';
parent.document.getElementById('tais').value='';
//document.getElementById('tais').style.border='1px solid transparent';
//parent.document.getElementById('tais').style.border='1px solid transparent';
//se='add_background_layer.htm'; //'startXsas=';
documentURL=documentURL.split('?')[0];
//while (tai.indexOf(String.fromCharCode(10)) != -1) {
// tai=tai.replace(String.fromCharCode(10),'<br>');
//}
//alert('tap=' + tap);
//alert('tai=' + tai);
//alert(parent.pb.split('<ifra')[1]);
document.body.innerHTML=top.pb.replace('?s' + 'tartsas=', '?s' + 'tartsas=x');
onl();
} else {
//alert(parent.se + ' in background tais zIndex=' + '' + eval(-1 + eval('' + parent.document.getElementById('tais').style.zIndex)));
//document.getElementById('tais').style.zIndex='' + eval(-1 + eval('' + parent.document.getElementById('tais').style.zIndex));
//parent.document.getElementById('tais').style.zIndex='' + eval(1 + eval('' + parent.document.getElementById('tais').style.zIndex));
//document.getElementById('xbod').style.zIndex='-1';
//parent.document.getElementById('xbod').style.zIndex='1';
allow=false;
se='startXsas=';
wt=eval(top.document.title.split(' ... ')[1]);
wt++;
document.getElementById('myiframe').style.zIndex='' + wt;
wt--;
top.document.title='Background Layer Wording - RJM Programming - June, 2019 ... ' + wt;
parent.document.getElementById('tais').style.visibility='hidden';
document.getElementById('myiframe').style.visibility='visible';
document.getElementById('tais').style.border='1px solid blue';
document.getElementById('tais').style.color='blue'
//document.getElementById('myiframe').srcdoc='<!doctype html><html><head>' + parent.document.head.innerHTML +'</head>' + parent.document.getElementById('xbod').outerHTML + '</body></html>';
//aconto.document.getElementById('tais').innerHTML=parent.document.getElementById('tais').innerHTML;
}
} else {
//alert('in foreground');
document.getElementById('myh1').style.visibility='hidden';
document.getElementById('myh3').style.visibility='hidden';
document.getElementById('myiframe').style.zIndex='' + eval(top.document.title.split(' ... ')[1]);
if (se != 'startXsas=') {
try {
document.getElementById('tais').style.zIndex='' + eval(-1 + eval('' + aconto.getElementById('tais').style.zIndex));
} catch (err) {
}
} else if (parent.document.getElementById('tais')) {
document.getElementById('tais').style.zIndex='' + eval(-1 + eval('' + parent.document.getElementById('tais').style.zIndex));
}
}
}
function seti() {
if (allow) { aconto.getElementById('tais').value=parent.document.getElementById('tais').value; }
setTimeout(seti, 1000);
}
function check_id(iois) {
if (iois != null) {
aconto = (iois.contentWindow || iois.contentDocument);
if (aconto != null) {
if (aconto.document) { aconto = aconto.document; }
//if (documentURL.indexOf(se) != -1) { // is original background layer
// setTimeout(seti, 1000); //aconto.document.getElementById('tais').innerHTML=parent.document.getElementById('tais').innerHTML;
//alert('at seti');
//}
if (tap != "") {
//alert('ionload');
aconto.getElementById('tais').style.border='0px solid red';
aconto.getElementById('tais').value=tap.replace(/\<br\>/g, String.fromCharCode(10));
tap="";
document.getElementById('ibut').click();
}
if (eval(top.document.getElementById('extradiv').innerHTML) >= 4) {
aconto.getElementById('ibut').style.visibility='hidden';
}
//if (eval(top.document.getElementById('extradiv').innerHTML) >= 4) {
// document.getElementById('ibut').click();
//}
}
}
}
function onl() {
if (documentURL.indexOf(se) != -1) { // is original background layer
document.getElementById('myiframe').style.visibility='hidden';
document.getElementById('tais').style.zIndex='' + eval(-1 + eval('' + parent.document.getElementById('tais').style.zIndex));
//alert(se);
document.getElementById('tais').style.border='1px solid red'; //'1px solid red';
document.getElementById('tais').style.backgroundColor='rgba(250,250,250,0.2)';
} else {
document.getElementById('tais').style.backgroundColor='rgba(220,220,220,0.2)';
//document.getElementById('myiframe').src="add_background_layer.html?startsas=background";
document.getElementById('tais').style.border='1px solid blue'; //'1px solid blue';
document.getElementById('tais').style.color='blue';
if (tap != '') {
document.getElementById('tais').style.border='0px solid blue';
document.getElementById('tais').style.color='blue';
document.getElementById('helper').style.border='1px solid blue';
document.getElementById('ibut').style.border='1px solid blue';
pb=parent.pb;
se='startXsas=';
document.getElementById('tais').innerHTML=tai;
tai='';
} else {
pb=document.body.innerHTML;
}
}
//document.getElementById('myh1').innerHTML+=top.document.getElementById('extradiv').innerHTML;
if (eval(top.document.getElementById('extradiv').innerHTML) >= 4) {
top.document.getElementById('ibut').style.visibility='hidden';
parent.document.getElementById('ibut').style.visibility='hidden';
document.getElementById('ibut').style.visibility='hidden';
}
}
</script>
</head>
<body id=xbod onload="onl();">
<h1 id=myh1>Background Layer Wording</h1>
<h3 id=myh3>RJM Programming - June, 2019</h3>
<table>
<tr><td>
<textarea style="z-index:400;opacity:0.5;background-color:transparent;" id=tais rows=40 cols=80 value=""></textarea>
</td>
<td> <input style="width:350px;" placeholder="Add to other layer textarea ... ~ adds extra line feeds" onblur="addtota(this.value.replace(/~/g,String.fromCharCode(10)), this);" type=text id=helper title="Word(s) to add in other layer" value=""></input><br><br> <input id=ibut style="background-color:yellow;" onclick="swapthem();" type=button title="Swap layers back to front and front to back" value="Swap Layers"></input><br><div id=extradiv style='visibility:hidden;'>0</div>
</td></tr></table>
<iframe onload=check_id(this); style=z-index:-1;display:block;position:absolute;left:0px;top:0px;width:100%;height:100%; id=myiframe src='add_background_layer.html?startsas=background'></iframe>
<!--script type='text/javascript'>
if (documentURL.indexOf('startsas=') != -1) { // is original background layer
document.write("<iframe onload=check_id(this); style=z-index:-1;display:block;position:absolute;left:0px;top:0px;width:100%;height:100%; id=myiframe src='add_background_layer.html?startsas=background'></iframe>");
} else {
document.write("<iframe onload=check_id(this); style=z-index:-1;display:block;position:absolute;left:0px;top:0px;width:100%;height:100%; id=myiframe srcdoc=''></iframe>");
}
</script-->
</body>
</html>