If I call the function "Top" before "Bottom", "Bottom" doesn't work (when applied to the same div). The div is placed absolute bottom on page load. "Bottom" is supposed to return the div to its original position.
function getElement(id) {
if (typeof document.all != 'undefined') return document.all(id);
if (typeof document.getElementById != 'undefined') return document.getElementById(id);
if (typeof document.layers != 'undefined') return document.layers[id];
return null;
}
function Top() {
for (var a=0; a<arguments.length; ++a) {
var el = getElement(arguments[a]);
if (!el) return;
if (typeof el.style != 'undefined') el.style.top = '364px';
else if (typeof el.top != 'undefined') el.top = '364px';
}
}
function Bottom() {
for (var a=0; a<arguments.length; ++a) {
var el = getElement(arguments[a]);
if (!el) return;
if (typeof el.style != 'undefined') el.style.bottom = '10px';
else if (typeof el.bottom != 'undefined') el.bottom = '10px';
}
}
function getElement(id) {
if (typeof document.all != 'undefined') return document.all(id);
if (typeof document.getElementById != 'undefined') return document.getElementById(id);
if (typeof document.layers != 'undefined') return document.layers[id];
return null;
}
function Top() {
for (var a=0; a<arguments.length; ++a) {
var el = getElement(arguments[a]);
if (!el) return;
if (typeof el.style != 'undefined') el.style.top = '364px';
else if (typeof el.top != 'undefined') el.top = '364px';
}
}
function Bottom() {
for (var a=0; a<arguments.length; ++a) {
var el = getElement(arguments[a]);
if (!el) return;
if (typeof el.style != 'undefined') el.style.bottom = '10px';
else if (typeof el.bottom != 'undefined') el.bottom = '10px';
}
}
Comment