// Path of the Master database:
var DBNameHTML = "/clients/Isolectra/isolectrawebsite.nsf";
// Path of the current database:
var DBNameHTML_C = "";
var sPathName = document.location.pathname;
var iNSFPos = sPathName.toUpperCase().indexOf( ".NSF" );
if( iNSFPos == -1 ){
var iSlashPos = sPathName.indexOf( "/", 1 );
DBNameHTML_C = sPathName.substring( 0, iSlashPos );
} else {
DBNameHTML_C = sPathName.substring( 0, iNSFPos + 4 );
}
function startTicker(notfirst)
{
var ticker = document.getElementById("news-ticker");
var childs = ticker.getElementsByTagName("span");
if (!notfirst)
{
for (var i=0; i < childs.length; i++)
{
childs[i].style.display = "none";
}
childs[0].style.display = "inline";
childs[1].style.display = "inline";
}
else
{
childs[0].style.display = "none";
childs[1].style.display = "none";
ticker.appendChild(childs[0]);
ticker.appendChild(childs[0]);
childs[0].style.display = "inline";
childs[1].style.display = "inline";
}
setTimeout("startTicker(true)", 4000);
}
function size_ticker()
{
var windowWidth = getWindow("width");
document.getElementById("news-ticker").style.width = getWindow("width") - 295;
if (navigator.userAgent.indexOf("MSIE")!=-1 && navigator.userAgent.indexOf("Opera")==-1)
{
document.getElementById("news-ticker").style.width = getWindow("width") - 278;
}
}
window.onresize = size_ticker;
size_ticker();
startTicker();