<!doctype html>
<html>
<head>
<title>Cockpit Feel - RJM Programming - December, 2015</title>
<link href='//www.rjmprogramming.com.au/PHP/emboss_h1.css' rel='stylesheet' type='text/css'>
<script type="text/javascript">
var userip="127.0.0.1";
</script>
<script type='text/javascript'>
var goodname='';
var goodurl='';
var goodmodeofshowofurl='';
var firstgo=true;
var prefix="Regarding our Cockpit Choice of up to 9 URL web applications ... append by #form for form entry ... ";
var nomore='';
var computedStyle=null; // = getComputedStyle(document.body, null)
var bh=800; //computedStyle.height;
var bw=900; //computedStyle.width;
var hsuff="%";
var wsuff="%";
var hp="25";
var wp="33";
var urls=['','','','','','','','',''];
var mapping=['11', '12', '13', '21', '22', '23', '31', '32', '33'];
var oktogo=true;
function setCookie(thisg, tn) { // thanks to JavaScript and Ajax by Tom Negrino and Dori Smith
if (nomore != 'y') {
var expireDate = new Date();
expireDate.setMonth(expireDate.getMonth()+6);
var huh='';
if (urls[eval(-1 + tn)] != "#nomore") {
//alert("urls[" + eval(-1 + tn) + "]=" + urls[eval(-1 + tn)]);
if (prefix != '') {
huh=prompt(prefix + "What is your URL (" + tn + " of up to 9) of interest ... append by #iframe if you want it to be tried in an iframe ... append by #nomore if you want this one to be last considered of up to 9 ... use Cancel for no more now", urls[eval(-1 + tn)]);
} else {
huh=prompt(prefix + "What is your URL (" + tn + " of up to 9) of interest ... append by #iframe if you want it to be tried in an iframe ... append by #nomore if you want this one to be last considered of up to 9 ... use Cancel for no more now", urls[eval(-1 + tn)]);
}
} else {
//alert("Urls[" + eval(-1 + tn) + "]=" + urls[eval(-1 + tn)]);
huh='#nomore';
}
prefix="";
if (huh == null) {
huh='';
nomore='y';
} else {
if (huh.indexOf("#iframe") != -1) {
goodmodeofshowofurl="iframe";
} else {
goodmodeofshowofurl="";
}
if (huh.indexOf("#form") != -1 && urls[0] != '') {
location.href='./cockpit_feel.html?form=y';
return;
}
document.cookie = thisg + "=" + huh.replace("#form","") + ";expires=" + expireDate.toGMTString();
if (huh.indexOf("#nomore") != -1) {
nomore='y';
fixstuff(tn);
}
if (huh.indexOf("#form") != -1) {
location.href='./cockpit_feel.html?form=y';
}
}
}
}
function cookieVal(cName) {
if (document.cookie != '') {
var tCookie=document.cookie.split("; ");
for (var j=0; j<tCookie.length; j++) {
if (cName == tCookie[j].split("=")[0]) {
return decodeURIComponent(tCookie[j].split("=")[1]);
}
}
}
return '';
}
function checkif(iois, numcell, gurl) {
var allok=false;
try {
if (iois != null) {
var aconto = (iois.contentWindow || iois.contentDocument);
if (aconto != null) {
if (aconto.document) { aconto = aconto.document; }
if (aconto.body != null) {
if (aconto.body.innerHTML.indexOf('>Not Found<') == -1) allok=true;
}
}
}
} catch (eeee) { }
if (!allok) {
if (gurl.indexOf('#nomore') != -1) {
var otn=eval(numcell % 10) + eval(eval(eval((numcell - eval(numcell % 10)) / 10) * 3) - 3);
fixstuff(otn);
}
//alert('window.open("' + iois.src.replace('#iframe','').replace('#nomore','') + '", "CockPitFeel' + numcell + '", "top=' + eval(eval(eval((numcell - eval(numcell % 10)) / 10) - 0) * hp) + hsuff + ',left=' + eval(eval(eval(numcell % 10) - 1) * wp) + wsuff + ',width=' + wp + wsuff + ',height=' + hp + hsuff + '");');
eval('window.open("' + iois.src.replace('#iframe','').replace('#nomore','') + '", "CockPitFeel' + numcell + '", "top=' + eval(eval(eval((numcell - eval(numcell % 10)) / 10) - 0) * hp) + hsuff + ',left=' + eval(eval(eval(numcell % 10) - 1) * wp) + wsuff + ',width=' + wp + wsuff + ',height=' + hp + hsuff + '");');
}
}
function getme(thiscell) {
if (document.URL.indexOf("?clear=") != -1 && firstgo) {
firstgo=false;
deleteAllCookies();
}
if (computedStyle == null) {
computedStyle = getComputedStyle(document.body, null)
bh=computedStyle.height;
bw=computedStyle.width;
//alert(bw + ' ... ' + bh);
hsuff="%";
wsuff="%";
hp="25";
wp="33";
if (bw.indexOf(":") == -1 && bw.indexOf("px") != -1) {
wsuff="";
wp=eval(bw.replace("px","") / 3);
//alert("width=" + wp);
}
if (bh.indexOf(":") == -1 && bh.indexOf("px") != -1 && 1 == 2) {
hsuff="";
hp=eval(bh.replace("px","") / 4);
//alert("height=" + hp);
} else {
bh="800";
hsuff="";
hp=eval(bh.replace("px","") / 4);
}
}
var numcell=thiscell.replace('td','');
var oldidea='td' + numcell + '_' + userip + '.html';
goodname = 'cell' + numcell + "_" + userip;
goodurl = ("" + cookieVal(goodname));
//alert(document.cookie + ' ... ' + goodname + ' --- ' + goodurl);
var otn=eval(numcell % 10) + eval(eval(eval((numcell - eval(numcell % 10)) / 10) * 3) - 3);
if (goodurl.indexOf("/") == -1) {
setCookie(goodname, otn);
goodurl = ("" + cookieVal(goodname));
}
if (numcell == 33) setTimeout(andthen, 3000);
if (goodurl.indexOf("#nomore") != -1) {
nomore='y';
fixstuff(otn);
}
//alert("goodurl=" + goodurl);
if (goodurl.indexOf("/") == -1) {
return '';
} else if (goodurl.indexOf("#iframe") != -1) {
return '<div title="Open in new window" style="border:1px solid black;overflow:scroll;width:100%;height:100%" onclick=" window.open(' + "'" + goodurl.replace("#form","").replace("#iframe","").replace("#nomore","") + "','_blank'" + '); "><iframe style="overflow:scroll;width:97%;height:97%" id="if' + numcell + '" onload="checkif(this,' + numcell + ',' + "'" + goodurl + "'" + ');" src="' + goodurl.replace("#form","").replace("#iframe","").replace("#nomore","") + '"></iframe><a href=# style=text_decoration:none title=New>⤴</a></div>';
}
//alert('window.open("' + goodurl + '", "CockPitFeel' + numcell + '", "top=' + eval(eval(eval((numcell - eval(numcell % 10)) / 10) - 0) * hp) + hsuff + ',left=' + eval(eval(eval(numcell % 10) - 1) * wp) + wsuff + ',width=' + wp + wsuff + ',height=' + hp + hsuff + '");');
eval('window.open("' + goodurl + '", "CockPitFeel' + numcell + '", "top=' + eval(eval(eval((numcell - eval(numcell % 10)) / 10) - 0) * hp) + hsuff + ',left=' + eval(eval(eval(numcell % 10) - 1) * wp) + wsuff + ',width=' + wp + wsuff + ',height=' + hp + hsuff + '");');
//window.open(goodurl, "CockPitFeel" + numcell, "top=" + eval(eval(eval((numcell - eval(numcell % 10)) / 10) - 0) * hp) + hsuff + ",left=" + eval(eval(eval(numcell % 10) - 1) * wp) + wsuff + ",width=" + wp + wsuff + ",height=" + hp + hsuff);
return '';
}
function fixstuff(ot) {
if (eval(ot) == 1) {
bh=eval(("" + bh).replace("px","") * 3);
bw=eval(("" + bw).replace("px","") * 3);
document.getElementById('td11').style.width='100%';
document.getElementById('td11').style.height='800px';
wsuff="";
wp=eval(("" + bw).replace("px","") / 3);
bh="800";
hsuff="";
hp=eval(("" + bh).replace("px","") / 4);
} else if (eval(ot) == 2) {
bh=eval(("" + bh).replace("px","") * 3);
bw=eval(("" + bw).replace("px","") * 2);
document.getElementById('td11').style.width='50%';
document.getElementById('td11').style.height='800px';
document.getElementById('td12').style.width='50%';
document.getElementById('td12').style.height='800px';
wsuff="";
wp=eval(("" + bw).replace("px","") / 3);
bh="800";
hsuff="";
hp=eval(("" + bh).replace("px","") / 4);
} else if (eval(ot) == 3) {
bh=eval(("" + bh).replace("px","") * 3);
bw=eval(("" + bw).replace("px","") * 1);
document.getElementById('td11').style.width='33%';
document.getElementById('td11').style.height='800px';
document.getElementById('td12').style.width='33%';
document.getElementById('td12').style.height='800px';
document.getElementById('td13').style.width='33%';
document.getElementById('td13').style.height='800px';
wsuff="";
wp=eval(("" + bw).replace("px","") / 3);
bh="800";
hsuff="";
hp=eval(("" + bh).replace("px","") / 4);
}
}
function deleteAllCookies() {
var expireDate = new Date();
expireDate.setDate(expireDate.getDate()-1);
var numcell;
for (numcell=11; numcell<=33; numcell++) {
goodname = 'cell' + numcell + "_" + userip;
if (eval(numcell % 10) >= 1 && eval(numcell % 10) <= 3) {
if (("" + cookieVal(goodname)).indexOf("/") != -1) {
document.cookie = goodname + "=;expires=" + expireDate.toGMTString();
//alert("delete " + goodname + "=;expires=");
}
}
}
}
function andthen() {
document.getElementById('myh1').innerHTML+=" ... <a title=Reask onclick=\" location.href='./cockpit_feel.html?clear=y'; \" href='#'>Reask</a>";
document.getElementById('aatend').innerHTML="<a title=Reask onclick=\" location.href='./cockpit_feel.html?clear=y'; \" href='#'>Clear</a>";
}
function checkget() {
var i;
var expireDate = new Date();
expireDate.setMonth(expireDate.getMonth()+6);
for (i=1; i<=9; i++) {
//alert(98);
goodname = 'cell' + mapping[eval(-1 + i)] + "_" + userip;
//alert(goodname);
goodurl = ("" + cookieVal(goodname));
urls[eval(-1 + i)]=location.search.split('url' + i + '=')[1] ? decodeURIComponent(location.search.split('url' + i + '=')[1].split('&')[0]) : goodurl;
//alert(urls[eval(-1 + i)]);
}
if (document.URL.indexOf("url1=") != -1) {
deleteAllCookies();
for (i=1; i<=9; i++) {
goodname = 'cell' + mapping[eval(-1 + i)] + "_" + userip;
if (urls[eval(-1 + i)] == "") {
document.cookie = goodname + "=#nomore;expires=" + expireDate.toGMTString();
if (urls[0] != "") urls[eval(-1 + i)] = "#nomore";
} else {
document.cookie = goodname + "=" + encodeURIComponent(urls[eval(-1 + i)]) + ";expires=" + expireDate.toGMTString();
}
//alert("new " + goodname + "=" + urls[eval(-1 + i)] + ";expires=");
}
}
if (document.URL.indexOf("?form=") != -1) {
var dbits="<h1 id='myh1' align='center'>Cockpit Feel of up to 9 Web Applications ... <a title=Reask onclick=\" location.href='./cockpit_feel.html?clear=y'; \" href='#'>Reask</a></h1><br><br>";
dbits+="<form method='GET' action='./cockpit_feel.html'>";
for (i=1; i<=9; i++) {
if (urls[eval(-1 + i)] == "#nomore") {
dbits+="Url " + i + ": <input type='url' style='width:380px;' name=url" + i + " value=''></input><br><br>";
} else {
dbits+="Url " + i + ": <input type='url' style='width:380px;' name=url" + i + " value='" + urls[eval(-1 + i)] + "'></input><br><br>";
}
}
dbits+="<input type=submit value='Run'></input></form><br><br>";
document.getElementById('maindiv').innerHTML=dbits;
oktogo = false;
return false;
}
return true;
}
</script>
</head>
<body style='background-color: yellow;'>
<div align='center' style='width:100%;height:800px;' id='maindiv'>
<h1 id='myh1' align='center'>Cockpit Feel of up to 9 Web Applications ... <a title=Form onclick=" location.href='./cockpit_feel.html?form=y'; " href='#'>Form</a></h1>
<table style='background-color: white;'>
<tbody>
<tr>
<td id='td11'><script> if (checkget()) { document.write(getme('td11')); } </script></td><td id='td12'><script> if (oktogo) { document.write(getme('td12')); } </script></td><td id='td13'><script> if (oktogo) { document.write(getme('td13')); } </script></td>
</tr>
<tr>
<td id='td21'><script> if (oktogo) { document.write(getme('td21')); } </script></td><td id='td22'><script> if (oktogo) { document.write(getme('td22')); } </script></td><td id='td23'><script> if (oktogo) { document.write(getme('td23')); } </script></td>
</tr>
<tr>
<td id='td31'><script> if (oktogo) { document.write(getme('td31')); } </script></td><td id='td32'><script> if (oktogo) { document.write(getme('td32')); } </script></td><td id='td33'><script> if (oktogo) { document.write(getme('td33')); } </script></td>
</tr>
</tbody>
</table>
<br><br>
<div id='aatend'></div>
</div>
</body>
</html>