1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
|
var wdmax = 170;
var hdmax = 145;
var ImAgE = "abe.gif";
var MiRoIr = "poeme-abe.gif";
var wdmin = 0;
var hdmin = 0;
var inc = 5;
var vIt = 50;
var poI = 7000;
var poM = 4000;
var PoE = "PoS";
function InVeRsE() {
"use strict";
if (window.Am) {
setTimeout(function() {
InVeRsE();
}, 1);
return;
}
if (PoE === "PoS") {
var wd = document.getElementById("PE").getAttribute("width");
wd = wd - inc;
document.getElementById("PE").setAttribute("width", wd);
if (wd === wdmin) {
document.getElementById("PE").setAttribute("src", ImAgE);
inc = -inc;
}
if (wd === wdmax) {
PoE = "pOe";
inc = -inc;
setTimeout(function() {
InVeRsE();
}, poI);
} else {
setTimeout(function() {
InVeRsE();
}, vIt);
}
} else {
var hd = document.getElementById("PE").getAttribute("height");
hd = hd - inc;
document.getElementById("PE").setAttribute("height", hd);
if (hd === hdmin) {
document.getElementById("PE").setAttribute("src", MiRoIr);
inc = -inc;
}
if (hd === hdmax) {
PoE = "PoS";
inc = -inc;
setTimeout(function() {
InVeRsE();
}, poM);
} else {
setTimeout(function() {
InVeRsE();
}, vIt);
}
}
}
window.onload = setTimeout(function() {
"use strict";
InVeRsE();
}, 3000); |