var newsTickers = null; var isIE5, isIE55, isIE6; var isNN6, isNN7; var isOpera; ua = navigator.userAgent; if( ua.indexOf( "Opera" ) != -1 ){ isOpera = true; } else if( ua.indexOf( "MSIE" ) != -1 ){ vers = ua.substring( ua.indexOf( "MSIE" ) + 5, ua.indexOf( ";", ua.indexOf( "MSIE" ) ) ); if( vers == "6.0" ){ isIE6 = true; } else if( vers == "5.5" ){ isIE55 = true; } else if( vers == "5.0" ){ isIE5 = true; } } else if( ua.indexOf( "Netscape" ) != -1 ){ vers = ua.substring( ua.lastIndexOf( "/" ) + 1, ua.lastIndexOf( "/" ) + 4 ); if( ( vers == "7.0" ) || ( vers == "7.1" ) ){ isNN7 = true; } else if( ( vers == "6.0" ) || ( vers == "6.1" ) || ( vers == "6.2" ) ){ isNN6 = true; } } else if( ua.indexOf( "Mozilla" ) != -1 ){ vers = ua.substring( ua.indexOf( "rv:" ) + 3, ua.indexOf( "rv:" ) + 5 ); if( vers == "1." ){ isNN7 = true; } else if( ( vers == "0." ) ){ isNN6 = true; } else if( ua.indexOf( "Safari" ) ) isNN7 = true; } //--------------------------------------------------------------------------------------------------------- // newsName : unique name // newsWidth : width in pixels // newsHeight : height in pixels // newsPause : amount of time a single item is displayed in milliseconds // newStep : pixels to move the text while scrolling // newsSpeed : how fast the news is scrolled in milliseconds // initialPause : additional pause before the first scroll // imgsrc : the URL of the bullet to insert into text // // newsBackgroundPanel : to define the color of the background panel of the news, define a // style named .newsBackgroundPanel // newsItemPanel : to define the style of the panel in which the news is displayed in // ( background, text color, font, padding, etc ), define a style named .newsItemPanel // // newsImageClass : to define the style of the arrow in news is displayed in // ( background, text color, font, padding, etc ), define a style named .newsImageClass //--------------------------------------------------------------------------------------------------------- function newsTicker( newsName, newsWidth, newsHeight, newsPause, newsStep, newsSpeed, initialPause, imgsrc ){ this.name = newsName; this.width = newsWidth; this.height = newsHeight; this.pause = newsPause; this.step = newsStep; this.newsLength = 0; this.currentNews = 0; this.newsObjs = new Array(); this.imgsrc = imgsrc; this.divOffset = 0; this.scrollSpeed = newsSpeed; this.needToScroll = false; this.mouseOver = false; this.timeoutID = null; this.initPause = initialPause; // methods this.addNewsItem = addNewsItem; this.closeNewsItems = closeNewsItems; // register news ticker if( newsTickers == null ){ newsTickers = new Array(); } newsTickers[ newsTickers.length ] = this; this.tickerIndex = newsTickers.length - 1; document.writeln( "