var marqueewidth=180;
var marqueeheight=250;
var speed=2;
var dir="up";
var marqueecontents="
Neuerscheinung!
Das ultimative Buch zum Anbau und Kulturverfahren von Speisepilzen ist verfügbar. |
Sonderposten loser Pilzpulver von Reishi, Shii-take, Chinesische Morchel und Brasil Egerling verfügbar. Pro kg 73,03 €. Solange der Vorrat reicht!
Bestellungen bitte über info@gamu.de.
|
";
// daten importieren
sSpeed = speed;
sWidth = marqueewidth;
sHeight = marqueeheight;
sDir = dir;
sContent = marqueecontents;
// interne variablen
sInit = 0;
sAutoWidth = 'auto';
sAutoHeight = 'auto';
sAutoPosTop = '0';
sAutoPosLeft = '0';
// scrollerbreite und -höhe angeben, je nach scrollrichtung
if(sDir == 'up' || sDir == 'down') {
sAutoWidth = '100%';
sAutoPosTop = sHeight;
sAutoWhiteSpace = '';
}
else {
sAutoHeight = '100%';
sAutoWidth = '100%';
sAutoPosLeft = sWidth;
sAutoWhiteSpace = 'nowrap';
};
// den scroller einfügen
document.write('');
// objekte
ObjxScrollerContainer = document.getElementById('xScrollerContainer');
ObjxScroller = document.getElementById('xScroller');
// initialisierung des scrollvorgangs
window.setInterval("doScroll()",100);
// scrollvorgang
function doScroll() {
if(sDir == 'up') {
if(sInit == 0) { a = sHeight; sInit = 1; };
a = a-sSpeed;
if(a < -ObjxScroller.offsetHeight) { a = sHeight; }
ObjxScroller.style.top = a+'px';
}
if(sDir == 'down') {
if(sInit == 0) { a = -ObjxScroller.offsetHeight; sInit = 1; };
a = a+sSpeed;
if(a > sHeight) { a = -ObjxScroller.offsetHeight; }
ObjxScroller.style.top = a+'px';
}
if(sDir == 'left') {
if(sInit == 0) { a = sWidth; sInit = 1; };
a = a-sSpeed;
if(a < -ObjxScroller.offsetWidth) { a = sWidth; }
ObjxScroller.style.left = a+'px';
}
if(sDir == 'right') {
if(sInit == 0) { a = -ObjxScroller.offsetWidth; sInit = 1; };
a = a+sSpeed;
if(a > sWidth) { a = -ObjxScroller.offsetWidth; }
ObjxScroller.style.left = a+'px';
}
};