';
}
objScroll += '';
if(Article[x][1].toLowerCase() != "none"){
//If a link is applied (which is always the case by now in Typo3)
objScroll += '' + Article[x][0] + '<\/a>';
}
else{
objScroll += Article[x][0];
}
//End paragraph and table cell
objScroll += ' <\/td>';
if(orientation.toLowerCase() == "vertical"){
//If vertical also close table line
objScroll += '<\/tr>';
}
if(objScrollDivider.toLowerCase() != "none"){
//Insert divider if set in config
objScroll += ' | ' + objScrollDivider + '<\/p><\/td>';
}
} //End For each article
y++
} //End While
objScroll += '<\/tr><\/table><\/div><\/div><\/td><\/tr><\/table>';
} // End is not NS4
document.getElementById("tickerspace").innerHTML = objScroll;
setWidth();
} //End function loadScroller
// Moving is more smooth if width / height (on vertical) is dividable by 2.
function setWidth() {
tableObj = (dmnt_isIE) ? document.all("ticker_table") : document.getElementById("ticker_table");
obj = (dmnt_isIE) ? document.all.div1 : document.getElementById("div1");
objWidth = (orientation.toLowerCase() == "horizontal") ? getOffset(tableObj, "width") : getOffset(tableObj, "height");
HalfWidth = Math.floor(objWidth / 2);
if (orientation.toLowerCase() == "horizontal") {
newWidth = (HalfWidth * 2) + 2;
}
else {
//Bei vertikaler Anordnung nicht durch 2 teilen, damit es an jeder Stelle halten kann.
newWidth = (HalfWidth) + 4;
}
//alert (objWidth);
//alert (newWidth);
obj.style.width = newWidth + "px";
moveObject(obj, newWidth);
}
// Move the layer by one pixel to the left
function moveObject(obj, width) {
maxLeft = (0 - (width / 2) + 2) / 2;
if(orientation.toLowerCase() == "horizontal"){
if (parseInt(obj.style.left) <= maxLeft) {
obj.style.left = "0px";
}
else {
obj.style.left = (parseInt(obj.style.left) - 1) + "px";
}
}
else{
if(obj.style.top == ""){
obj.style.top = 0 + "px";
}
if (parseInt(obj.style.top) < (0 - (width / 2) + 6)){
obj.style.top = 0 + "px";
}
else{
obj.style.top = (parseInt(obj.style.top) - 1) + "px";
}
}
if (obj.style.left == "-1px" || obj.style.top == "-1px") {
//Am Beginn jeder News die definierte Pause
timer = setTimeout ("moveObject(obj, " + width + ");", ticker_pause);
}
else {
//Normaler move ohne große Pause
timer = setTimeout ("moveObject(obj, " + width + ");", 100 - speed);
}
}
// Get width and height of layer
function getOffset(obj, dim) {
if(dim == "width"){
oWidth = obj.offsetWidth;
return oWidth;
}
else if(dim == "height"){
oHeight = obj.offsetHeight;
return oHeight;
}
}
function stopscroller() {
clearTimeout(timer);
}
|