<!doctype html>
<html>
<head>
<title>Star Proteins Versus Superbugs Game - RJM Programming - September, 2016 - Inspired by http://www.smh.com.au/technology/sci-tech/beyond-antibiotics-starshaped-protein-kills-feared-superbugs-20160912-grehpx.html</title>
<link href='//www.rjmprogramming.com.au/PHP/emboss_h1.css' rel='stylesheet' type='text/css'>
<style>
hr { /* thanks to http://www.w3schools.com/css/css3_gradients.asp */
border: 7px dashed purple;
background: red; /* For browsers that do not support gradients */
background: -webkit-linear-gradient(yellow, red); /* For Safari 5.1 to 6.0 */
background: -o-linear-gradient(yellow, red); /* For Opera 11.1 to 12.0 */
background: -moz-linear-gradient(yellow, red); /* For Firefox 3.6 to 15 */
background: linear-gradient(yellow, red); /* Standard syntax */
}
img.enemy { /* thanks to https://css-tricks.com/examples/GradientBorder/ */
border-width: 0px;
border-style: solid;
-webkit-border-image:
-webkit-gradient(linear, 0 0, 0 100%, from(yellow), to(red)) 1 100%;
-webkit-border-image: -webkit-linear-gradient(yellow, red) 1 100%;
-moz-border-image: -moz-linear-gradient(yellow, red) 1 100%;
-o-border-image: -o-linear-gradient(yellow, red) 1 100%;
border-image: linear-gradient(to bottom, yellow, red) 1 100%;
}
</style>
<script type='text/javascript'>
'use strict';

var firstnot=true;
var iuprefix=location.search.split('imagepath=')[1] ? decodeURIComponent(location.search.split('imagepath=')[1].split('&')[0]) : '';

function irrelevant() {
document.getElementById('myh2').style.display='none';
}

function notthis(tthat, wthat) {
var that=tthat.replace(' ','_').replace(' ','_').replace(' ','_').replace(' ','_').replace(' ','_').replace('.','_');
if (wthat != '') {
that=wthat.replace(' ','_').replace(' ','_').replace(' ','_').replace(' ','_').replace(' ','_').replace('.','_');
}
var thatis=tthat;
var xthatis=tthat;
//if (tthat.indexOf('jpg') != -1) alert(that);
if (document.URL.indexOf('not' + that + '=') != -1 || document.URL.indexOf('not' + that.toLowerCase() + '=') != -1 || document.URL.indexOf('not' + that.toUpperCase() + '=') != -1 || document.URL.indexOf('not' + that.substring(0,1).toUpperCase() + that.substring(1).toLowerCase() + '=') != -1) {
//if (tthat.indexOf('jpg') != -1) alert("(location.search.split('not" + that + "=')[1] ? decodeURIComponent(location.search.split('not" + that + "=')[1].split('&')[0]) : '" + tthat + "')");
thatis=eval("(location.search.split('not" + that + "=')[1] ? decodeURIComponent(location.search.split('not" + that + "=')[1].split('&')[0]).replace('+',' ').replace('+',' ').replace('+',' ').replace('+',' ').replace('+',' ').replace('+',' ') : '" + tthat + "')");
//if (firstnot) alert(thatis + ' : ' + tthat);
if (that.toLowerCase() == that) {
xthatis=eval("(location.search.split('not" + that.substring(0,1).toUpperCase() + that.substring(1).toLowerCase() + "=')[1] ? decodeURIComponent(location.search.split('not" + that.substring(0,1).toUpperCase() + that.substring(1).toLowerCase() + "=')[1].split('&')[0]).replace('+',' ').replace('+',' ').replace('+',' ').replace('+',' ').replace('+',' ').replace('+',' ') : '" + tthat.substring(0,1).toUpperCase() + tthat.substring(1).toLowerCase() + "')");
//if (firstnot) alert(thatis + ' = ' + tthat);
} else if (that.toUpperCase() == that) {
xthatis=eval("(location.search.split('not" + that.substring(0,1).toUpperCase() + that.substring(1).toLowerCase() + "=')[1] ? decodeURIComponent(location.search.split('not" + that.substring(0,1).toUpperCase() + that.substring(1).toLowerCase() + "=')[1].split('&')[0]).replace('+',' ').replace('+',' ').replace('+',' ').replace('+',' ').replace('+',' ').replace('+',' ') : '" + tthat.substring(0,1).toUpperCase() + tthat.substring(1).toLowerCase() + "')");
//if (firstnot) alert(thatis + ' _ ' + tthat);
} else if (tthat.indexOf(' ') == -1) {
xthatis=eval("(location.search.split('not" + that.toLowerCase() + "=')[1] ? decodeURIComponent(location.search.split('not" + that.toLowerCase() + "=')[1].split('&')[0]).replace('+',' ').replace('+',' ').replace('+',' ').replace('+',' ').replace('+',' ').replace('+',' ') : '" + tthat + "')");
if (xthatis == tthat) xthatis=eval("(location.search.split('not" + that.toUpperCase() + "=')[1] ? decodeURIComponent(location.search.split('not" + that.toUpperCase() + "=')[1].split('&')[0]).replace('+',' ').replace('+',' ').replace('+',' ').replace('+',' ').replace('+',' ').replace('+',' ') : '" + tthat + "')");
//if (firstnot) alert(thatis + ' == ' + tthat);
}
} //else {
//alert('tthat=' + tthat + ' and wthat=' + wthat + ' and thatis=' + thatis);
//}
// if (firstnot) alert(thatis + ' ' + tthat);
if (firstnot && (thatis != tthat || xthatis != tthat)) setTimeout(irrelevant, 2000);
firstnot=false;
return thatis;
}

var anothergame='Another game with number of ' + notthis('brick','') + 's in wall, below?';
var thingswedo=" createStars(-1); startBorderizing(); createBricks(-1); createSuperbugs(-1); setTimeout(counter,1000); ";
var soundfile1=notthis('http://www.rjmprogramming.com.au/Games/Battleshipsandcruisers/sounds/Wind-SoundBible.com-950807958.wav','soundfile1');
var soundfile2=notthis('http://www.rjmprogramming.com.au/Games/Battleshipsandcruisers/sounds/Thunder-Mike_Koenig-315681025.wav','soundfile2');
var formis=document.URL.indexOf('showform=');

var formstr="<br><div id=fdivorm style='width:100%;text-align:center;background-color:yellow;'><form action='" + document.URL.split('?')[0].split('#')[0] + "' method='GET'><br><br></form></div><br>";

formstr=formstr.replace('</form>', 'Game Title: <input name=notStar_Proteins_Versus_Superbugs_Game value="' + notthis('Star Proteins Versus Superbugs Game','') + '" type="text" style=width:20%;></input><br></form>');
formstr=formstr.replace('</form>', 'Game ' + notthis('Star','') + ' Title: <input name=notStar_Proteins value="' + notthis('Star Proteins','') + '" type="text"></input><br><br></form>');

formstr=formstr.replace('</form>', notthis('Star','') + ' (left hand firing object): <input name=notStar value="' + notthis('Star','') + '" type="text"></input><br></form>');
formstr=formstr.replace('</form>', notthis('Brick','') + ' (middle Wall component enemy friend object) : <input name=notBrick value="' + notthis('Brick','') + '" type="text"></input><br></form>');
formstr=formstr.replace('</form>', notthis('Superbug','') + ' (right enemy object): <input name=notSuperbug value="' + notthis('Superbug','') + '" type="text"></input><br><br></form>');

formstr=formstr.replace('</form>', 'Image Path: <input name=imagepath type="text" style=width:30%; value="' + iuprefix + '"></input><br><br></form>');

formstr=formstr.replace('</form>', notthis('Star','') + ' Image File 1 of 7: <input name=notonestar_jpg value=' + notthis('onestar.jpg','') + ' type="text" style=width:20%;></input><br></form>');
formstr=formstr.replace('</form>', notthis('Star','') + ' Image File 2 of 7: <input name=nottwostar_jpg value=' + notthis('twostar.jpg','') + ' type="text" style=width:20%;></input><br></form>');
formstr=formstr.replace('</form>', notthis('Star','') + ' Image File 3 of 7: <input name=notthreestar_jpg value=' + notthis('threestar.jpg','') + ' type="text" style=width:20%;></input><br></form>');
formstr=formstr.replace('</form>', notthis('Star','') + ' Image File 4 of 7: <input name=notfourstar_jpg value=' + notthis('fourstar.jpg','') + ' type="text" style=width:20%;></input><br></form>');
formstr=formstr.replace('</form>', notthis('Star','') + ' Image File 5 of 7: <input name=notfivestar_jpg value=' + notthis('fivestar.jpg','') + ' type="text" style=width:20%;></input><br></form>');
formstr=formstr.replace('</form>', notthis('Star','') + ' Image File 6 of 7: <input name=notsixstar_jpg value=' + notthis('sixstar.jpg','') + ' type="text" style=width:20%;></input><br></form>');
formstr=formstr.replace('</form>', notthis('Star','') + ' Image File 7 of 7: <input name=notsevenstar_jpg value=' + notthis('sevenstar.jpg','') + ' type="text" style=width:20%;></input><input type=hidden name=form value=></input><br><br></form>');


formstr=formstr.replace('</form>', notthis('Brick','') + ' Image File: <input name=notbrick_jpg value=' + notthis('brick.jpg','') + ' type="text" style=width:20%;></input><br></form>');
formstr=formstr.replace('</form>', notthis('Superbug','') + ' Image File: <input name=notsuperbug_jpg value=' + notthis('superbug.jpg','') + ' type="text" style=width:20%;></input><br><br></form>');
formstr=formstr.replace('</form>', notthis('Brick','') + ' Sound File: <input name=notsoundfile1 value=' + soundfile1 + ' type="text" style=width:50%;></input><br></form>');
formstr=formstr.replace('</form>', notthis('Superbug','') + ' Sound File: <input name=notsoundfile2 value=' + soundfile2 + ' type="text" style=width:50%;></input><br><br>Show this Form? <input type=checkbox name=showform checked></input>  <input type=submit value=Play style=background-color:orange;></input><br><br></form>');

var bodyih="<h1 style='width:100%;text-align:center;' id='myh1'>" + notthis('Star Proteins Versus Superbugs Game','') + "</h1>"
+ "<h2 style='width:100%;text-align:center;' id='myhtwo'>RJM Programming <a target=_blank style='text-decoration:underline;' title='Another game' onclick=' ask(anothergame); '>-</a> September<a href='#fdivorm' style='text-decoration:underline;' title='Add form' onclick=' document.getElementById(\"formdiv\").innerHTML=formstr; '>,</a> 2016</h2>"
+ "<h2 style='width:100%;text-align:center;' id='myh2'>Inspired by <a target=_blank title='Brilliance of Shu Lam' href='http://www.smh.com.au/technology/sci-tech/beyond-antibiotics-starshaped-protein-kills-feared-superbugs-20160912-grehpx.html'>This Breakthrough</a> and thanks to this <a target=_blank title='Clipart Website ... thanks' href='http://www.clipartkid.com'>Clipart Website</a></h2>"
+ "<h4 style='width:100%;text-align:center;' id='myh4'>As " + notthis('Star Proteins','') + " Go Yellow Click to Break Down Wall and " + notthis('Superbug','') + " Protection</h4>"
+ "<table style='background-color: #f0f0f0;'>"
+ "<tr><td id='stars'><div style='-webkit-overflow-scrolling:touch;overflow:scroll;'></div></td>"
+ "<td id='bricks' style='width:20%;valign:top;border-left:1px gray dotted;'></td><td id='superbugs' style='width:50%;'></td></table><div id='formdiv'></div>";

if (formis != -1) bodyih=bodyih + formstr;

var numBricks=location.search.split('numbricks=')[1] ? eval(location.search.split('numbricks=')[1].split('&')[0]) : 40;
var numStars=7;
var numSuperbugs=7;
var thisone=-1;
var nextBrickToGo=1;
var seconds=0;
var pubu='';
var starfire_methods=" style_display(sd) {"
+ " this.domo.style.display=sd;"
+ " }";


var starone=null, brickone=null, superbugone=null, hone=null;

// Arrays of objects (either DOM or DOM accompanied by Class) below
var staro=[], bricko=[], superbugo=[];
var starfireo=[]; // no longer needed if Class "extends" keyword ideas are applied, via ideas of https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes/extends


// Class code below does not work everywhere
var Star=null, Brick=null, Superbug=null;
var Starfire=null;

try {
starfire_methods=""; // no longer needed if Class "extends" keyword ideas are applied, via ideas of https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes/extends
eval(" "
+ "Starfire = class Starfire {"
+ " constructor(id, domo) {"
+ " this.id = id;"
+ " this.domo = domo;"
+ " }"
+ ""
+ " display_via_style(onsb) {"
+ " document.getElementById(this.id.replace('s','h')).style.display=onsb;"
+ " }"
+ ""
+ starfire_methods
+ "}; "
);
} catch(estarfire) {
}

try {
eval(" "
+ "Star = class Star extends Starfire {"
+ " constructor(id, domo) {"
+ " super(id.replace('s','h'), document.getElementById(id.replace('s','h')));"
+ " this.id = id;"
+ " this.domo = domo;"
+ " }"
+ ""
+ " style_display(onsb) {"
+ " document.getElementById(this.id.replace('s','h')).style.display=onsb;"
+ " }"
+ ""
+ " display_style(onsb) {"
+ " super.display_via_style(onsb);"
+ " }"
+ ""
+ " style_border(onsb) {"
+ " this.domo.style.border=onsb;"
+ " }"
+ "}; "
);
} catch(estar) {
}

try {
eval(" "
+ "Brick = class Brick {"
+ " constructor(id, domo) {"
+ " this.id = id;"
+ " this.domo = domo;"
+ " this.opacity = 1.0;"
+ " }"
+ ""
+ " getid() {"
+ " return this.id;"
+ " }"
+ ""
+ " getopacity() {"
+ " return this.opacity;"
+ " }"
+ ""
+ " setopacity(thisop) {"
+ " this.opacity=thisop;"
+ " this.domo.style.opacity=thisop;"
+ " this.domo.className='enemy';"
+ " this.domo.style.borderWidth=eval(10 - eval(thisop * 10)) + 'px';"
+ " }"
+ ""
+ " style_width(sw) {"
+ " if (sw == '1px') { if (brickone) { bricko[eval(-1 + eval(brickone.getid().replace('b','')))].style_width('01px'); } brickone=this; setTimeout(fadeout,1000); } else { this.domo.style.border=''; this.domo.style.width=sw; }"
+ " }"
+ "}; "
);
} catch(ebrick) {
}

try {
eval(" "
+ "Superbug = class Superbug {"
+ " constructor(id, domo) {"
+ " this.id = id;"
+ " this.domo = domo;"
+ " this.opacity = 1.0;"
+ " this.count = 0;"
+ " }"
+ ""
+ " getid() {"
+ " return this.id;"
+ " }"
+ ""
+ " getopacity() {"
+ " return this.opacity;"
+ " }"
+ ""
+ " tremble(firsttime) {"
+ " if (firsttime) {"
+ " setTimeout(quiver, 1000);"
+ " } else if (this.count == 0) {"
+ " this.count=1;"
+ " this.domo.style.opacity=0.5;"
+ " this.domo.style.width=eval(-15 + eval(this.domo.style.width.replace('px',''))) + 'px';"
+ " this.domo.style.height=eval(-15 + eval(this.domo.style.height.replace('px',''))) + 'px';"
+ " } else {"
+ " this.count=0;"
+ " this.domo.style.opacity=1.0;"
+ " this.domo.style.width=eval(15 + eval(this.domo.style.width.replace('px',''))) + 'px';"
+ " this.domo.style.height=eval(15 + eval(this.domo.style.height.replace('px',''))) + 'px';"
+ " }"
+ " }"
+ ""
+ " setopacity(thisop) {"
+ " this.opacity=thisop;"
+ " this.domo.style.opacity=thisop;"
+ " this.domo.className='enemy';"
+ " this.domo.style.borderWidth=eval(10 - eval(thisop * 10)) + 'px';"
+ " }"
+ ""
+ " style_width(sw) {"
+ " if (sw == '1px') { if (superbugone) { superbugo[eval(-1 + eval(superbugone.getid().replace('sb','')))].style_width('01px'); } superbugone=this; setTimeout(fadeout,1000); } else { this.domo.style.border=''; this.domo.style.width=sw; }"
+ " }"
+ "}; "
);
} catch(esuperbug) {
}


function quiver() {
superbugo[eval(-1 + nextBrickToGo - numBricks)].tremble(false);
setTimeout(quiver, 100);
}

function createStars(numtodo) {
var isiPad = navigator.userAgent.match(/iPad/i) != null;
var isiPhone = navigator.userAgent.match(/iPhone/i) != null;
//if ((isiPad || isiPhone) && document.URL.indexOf('.html') == -1 && document.URL.indexOf('.htm') != -1) location.href=document.URL.replace('.htm','.html');
var i, sih='';
var starlist=[iuprefix + notthis('onestar.jpg',''),iuprefix + notthis('twostar.jpg',''),iuprefix + notthis('threestar.jpg',''),iuprefix + notthis('fourstar.jpg',''),iuprefix + notthis('fivestar.jpg',''),iuprefix + notthis('sixstar.jpg',''),iuprefix + notthis('sevenstar.jpg','')];
if (numtodo == 0) {
numStars=numtodo;
document.getElementById('stars').innerHTML='';
} else if (numtodo > 0) {
numStars=numtodo;
document.getElementById('stars').innerHTML='';
}
if (Brick) document.getElementById('myh4').innerHTML+=' ... Please note that Sound Effects could occur with this game.';
for (i=1; i<=numStars; i++) {
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
sih+="<img style='margin-top:-70px; display:inline; -ms-transform: scale(0.5, 0.5); -webkit-transform: scale(0.5, 0.5); transform: scale(0.5, 0.5); ' id='s" + i + "' src='" + starlist[eval(-1 + i)] + "' ontouchstart='doesBrickGo(" + eval(-1 + i) + ");' onclick='doesBrickGo(" + eval(-1 + i) + ");' title='Another Protein Star " + i + " against the wall'></img><hr id='h" + i + "' style='color:red;background-color:red;height:20px;margin-top:-40px;display:none;'>";
} else {
sih+="<img id='s" + i + "' src='" + starlist[eval(-1 + i)] + "' ontouchstart='doesBrickGo(" + eval(-1 + i) + ");' onclick='doesBrickGo(" + eval(-1 + i) + ");' title='Another Protein Star " + i + " against the wall'></img><hr id='h" + i + "' style='color:red;background-color:red;height:20px;margin-top:-40px;display:none;'>";
if (Math.floor(Math.random() * 2) == 0) sih+='<br><br>';
}
}
document.getElementById('stars').innerHTML=sih;
for (i=1; i<=numStars; i++) {
if (!Star) { // no "class" keyword exists
staro.push(document.getElementById('s' + i));
} else if ('pre_extends_idea' != 'pre_extends_idea') { // old approach of an independent Starfire object
starfireo.push(new Starfire('h' + i, document.getElementById('h' + i)));
staro.push(new Star('s' + i, document.getElementById('s' + i), starfireo[eval(-1 + starfireo.length)]));
} else { // new approach of a Starfire object as part of a Star object, using Class "extends" keyword ideas via https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes/extends
staro.push(new Star('s' + i, document.getElementById('s' + i))); //, document.getElementById('h' + i)));
}
}
}

function createBricks(numtodo) {
var i, bih='';
if (numtodo == 0) {
numBricks=numtodo;
document.getElementById('bricks').innerHTML='';
} else if (numtodo > 0) {
numBricks=numtodo;
document.getElementById('bricks').innerHTML='';
}
for (i=1; i<=numBricks; i++) {
bih+="<img id='b" + i + "' src='" + iuprefix + notthis('brick.jpg','') + "' title='Another brick " + i + " in the wall'></img>";
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
if (eval(i % 3) == 0) bih+="   ";
} else {
if (eval(i % 2) == 0) bih+="   ";
}
}
document.getElementById('bricks').innerHTML=bih;
for (i=1; i<=numBricks; i++) {
if (Brick) {
bricko.push(new Brick('b' + i, document.getElementById('b' + i)));
}
}
}

function createSuperbugs(numtodo) {
var i, sih='', suffix='';
if (numtodo == 0) {
numSuperbugs=numtodo;
document.getElementById('superbugs').innerHTML='';
} else if (numtodo > 0) {
numSuperbugs=numtodo;
document.getElementById('superbugs').innerHTML='';
}
for (i=1; i<=numSuperbugs; i++) {
sih+="<img style='display:inline;' id='sb" + i + "' src='" + iuprefix + notthis('superbug.jpg','') + "' title='Another Superbug " + i + " protected by the wall'></img>" + suffix;
if (suffix == '') {
suffix='<br>';
} else {
suffix='';
}
}
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
document.getElementById('superbugs').style.width='35%';
document.getElementById('bricks').style.width='45%'; //'50%';
document.getElementById('superbugs').innerHTML=sih;
} else if (0 == 0) {
document.getElementById('superbugs').style.width='35%';
document.getElementById('bricks').style.width='35%';
document.getElementById('superbugs').innerHTML=sih;
} else {
document.getElementById('superbugs').innerHTML='<table><tr>' + sih.replace(/<br>/g,'').replace(/\/img>/g, '/img></td>').replace(/<img/g, '<td><img') + '</tr></table>';
}
for (i=1; i<=numSuperbugs; i++) {
if (Superbug) {
superbugo.push(new Superbug('sb' + i, document.getElementById('sb' + i)));
}
}
}

function fadeout() { // can only happen if Class functionality works on this web browser
var opis=1.0, newopis;
if (brickone) {
opis=bricko[eval(-1 + eval(brickone.getid().replace('b','')))].getopacity();
newopis=eval(-0.1 + opis);
bricko[eval(-1 + eval(brickone.getid().replace('b','')))].setopacity(newopis);
if (eval(newopis) <= 0.0) {
bricko[eval(-1 + eval(brickone.getid().replace('b','')))].style_width('01px');
brickone=null;
} else {
var snd=eval("new Audio('" + notthis('http://www.rjmprogramming.com.au/Games/Battleshipsandcruisers/sounds/Wind-SoundBible.com-950807958.wav','soundfile1') + "')");
snd.play();
}
}
if (superbugone) {
opis=superbugo[eval(-1 + eval(superbugone.getid().replace('sb','')))].getopacity();
newopis=eval(-0.1 + opis);
superbugo[eval(-1 + eval(superbugone.getid().replace('sb','')))].setopacity(newopis);
if (eval(newopis) <= 0.0) {
superbugo[eval(-1 + eval(superbugone.getid().replace('sb','')))].style_width('01px');
superbugone=null;
} else {
var snd=eval("new Audio('" + notthis('http://www.rjmprogramming.com.au/Games/Battleshipsandcruisers/sounds/Thunder-Mike_Koenig-315681025.wav','soundfile2') + "')");
snd.play();
}
}
if (brickone || superbugone) setTimeout(fadeout, 1000);
}

function andu() {
location.href=pubu;
}

function ask(nb) {
var xnb=prompt(nb,numBricks);
if (xnb) {
if (xnb != '') {
pubu=document.URL.split('?')[0].split('#')[0] + '?numbricks=' + xnb;
} else {
pubu=document.URL.split('?')[0].split('#')[0]; // './star_proteins_vs_superbugs.htm';
}
setTimeout(andu, 2000);
}
}

function doesBrickGo(tone) {
if (eval(tone) == eval(thisone)) {
if (nextBrickToGo <= numBricks) {
if (Brick) {
bricko[eval(-1 + nextBrickToGo)].style_width('1px');
} else {
document.getElementById('b' + nextBrickToGo).style.width='1px';
}
if (nextBrickToGo == numBricks) {
document.getElementById('bricks').innerHTML='';
document.getElementById('bricks').style.width='1px';
if (Superbug) superbugo[0].tremble(true);
}
} else {
if (Superbug) {
superbugo[eval(-1 + nextBrickToGo - numBricks)].style_width('1px');
} else {
document.getElementById('sb' + eval(nextBrickToGo - numBricks)).style.width='1px';
}
}
if (Starfire) {
if ('oldway_was_independent_way' != 'oldway_was_independent_way') {
hone=starfireo[eval(tone)];
hone.style_display('block');
} else if ('thiswouldwork_without_extends_bit' != 'thiswouldwork_without_extends_bit') { // newer way ... but there's more ... where a Starfire object can be thought of as part of a Star object
//hone=staro[eval(tone)].fireo;
hone=staro[eval(tone)]; //.fireo;
hone.display_style('block');
} else { // new way where a Starfire object is superceeded by a Star object
hone=staro[eval(tone)]; //.fireo;
hone.style_display('block');
}
} else {
hone=document.getElementById('h' + eval(1 + tone));
hone.style.display='block';
}
nextBrickToGo++;
if (nextBrickToGo > eval(numBricks + numSuperbugs)) {
document.getElementById('superbugs').innerHTML='';
ask('Congratulations! That took you ' + seconds + ' seconds (ie. ' + eval((0.0 + seconds) / eval(eval(numBricks) + eval(numSuperbugs))) + ' seconds per brick and superbug). Another game with number of bricks in wall, below?');
}
}
}

function andthen() {
if (hone != null) {
if (Starfire) {
hone.style_display('none');
} else {
hone.style.display='none';
}
hone=null;
}
}

function startBorderizing() {
var i;
for (i=0; i<staro.length; i++) {
if (!Star) {
staro[i].style.border='';
} else {
staro[i].style_border('');
}
}
if (hone != null) {
setTimeout(andthen, 500); //1500
}
thisone=Math.floor(Math.random() * eval(0 + staro.length)) + 0;
if (!Star) {
staro[thisone].style.border='15px solid yellow';
} else {
staro[thisone].style_border('15px solid yellow');
}
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
setTimeout(startBorderizing, 800);
} else {
setTimeout(startBorderizing, 1200);
}
}

function counter() {
seconds++;
setTimeout(counter,1000);
}


function wbody() {
document.write(bodyih);
eval(thingswedo);
}

</script>

</head>
<body onload='if (1 == 10) { wbody(); } else { document.body.innerHTML=bodyih; createStars(-1); startBorderizing(); createBricks(-1); createSuperbugs(-1); setTimeout(counter,1000); }'>
</body>
</html>