var Nieuws_toScroll=new Array()
var ie=document.all
var dom=document.getElementById
var Nieuws_firstNews_obj;
var Nieuws_secondNews_obj;
function NieuwsScroll(name){
var Nieuws_c=this; Nieuws_c.name=name; Nieuws_c.mc=0; Nieuws_c.i=2;
return this;
}
NieuwsScroll.prototype.addItem = function(text,link,font,fontSize,fontStyle){
var Nieuws_c = this;
if (link !=''){
if (font != '')
Nieuws_toScroll[Nieuws_c.mc]=""+text+"";
else
Nieuws_toScroll[Nieuws_c.mc]=""+text+"";
}
else {
if (font != '')
Nieuws_toScroll[Nieuws_c.mc]=""+text+"";
else
Nieuws_toScroll[Nieuws_c.mc]=""+text+"";
}
Nieuws_c.mc++;
}
NieuwsScroll.prototype.construct = function(){
var Nieuws_c = this; theWidth = Nieuws_c.scrollerwidth; theHeight=Nieuws_c.scrollerheight; thebgColor = Nieuws_c.scrollerbgcolor; theBackground =Nieuws_c.scrollerbackground; theDelay=Nieuws_c.scrollerdelay;
Nieuws_scroll_obj=eval(Nieuws_c.name);
if (ie||dom){
document.writeln('
')
document.writeln('
')
document.writeln('
')
document.write(Nieuws_toScroll[0])
document.writeln('
')
document.writeln('
')
document.write(Nieuws_toScroll[dyndetermine=(Nieuws_toScroll.length==1)? 0 : 1])
document.writeln('
')
document.writeln('
')
document.writeln('
')
}
}
NieuwsScroll.prototype.move = function(whichdiv){
var Nieuws_c = this; theDelay = Nieuws_c.scrollerdelay; theHeight = Nieuws_c.scrollerheight;
Nieuws_scroll_obj=eval(Nieuws_c.name);
Nieuws_tdiv=eval(whichdiv)
if (parseInt(Nieuws_tdiv.style.top)>0&&parseInt(Nieuws_tdiv.style.top)<=5){
Nieuws_tdiv.style.top=0+"px"
setTimeout("Nieuws_scroll_obj.move(Nieuws_tdiv)",theDelay)
setTimeout("Nieuws_scroll_obj.move2(Nieuws_secondNews_obj)",theDelay)
//document.write('Got Milk?')
return
}
if (parseInt(Nieuws_tdiv.style.top)>=Nieuws_tdiv.offsetHeight*-1){
Nieuws_tdiv.style.top=parseInt(Nieuws_tdiv.style.top)-5+"px"
setTimeout("Nieuws_scroll_obj.move(Nieuws_tdiv)",50)
}
else {
Nieuws_tdiv.style.top=parseInt(theHeight)+"px"
Nieuws_tdiv.innerHTML=Nieuws_toScroll[Nieuws_c.i]
if (Nieuws_c.i==Nieuws_toScroll.length-1)
Nieuws_c.i=0
else
Nieuws_c.i++
}
}
NieuwsScroll.prototype.move2 = function(whichdiv){
var Nieuws_c = this; theDelay = Nieuws_c.scrollerdelay; theHeight= Nieuws_c.scrollerheight;
Nieuws_scroll_obj=eval(Nieuws_c.name);
Nieuws_tdiv2=eval(whichdiv)
if (parseInt(Nieuws_tdiv2.style.top)>0&&parseInt(Nieuws_tdiv2.style.top)<=5){
Nieuws_tdiv2.style.top=0+"px"
setTimeout("Nieuws_scroll_obj.move2(Nieuws_tdiv2)",theDelay)
setTimeout("Nieuws_scroll_obj.move(Nieuws_firstNews_obj)",theDelay)
return
}
if (parseInt(Nieuws_tdiv2.style.top)>=Nieuws_tdiv2.offsetHeight*-1){
Nieuws_tdiv2.style.top=parseInt(Nieuws_tdiv2.style.top)-5+"px"
setTimeout("Nieuws_scroll_obj.move2(Nieuws_secondNews_obj)",50)
}
else {
Nieuws_tdiv2.style.top=parseInt(theHeight)+"px"
Nieuws_tdiv2.innerHTML=Nieuws_toScroll[Nieuws_c.i]
if (Nieuws_c.i==Nieuws_toScroll.length-1)
Nieuws_c.i=0
else
Nieuws_c.i++
}
}
NieuwsScroll.prototype.startScroll = function(){
var Nieuws_c = this;
Nieuws_scroll_obj=eval(Nieuws_c.name);
if (Nieuws_toScroll.length >2)
Nieuws_c.i = 2;
else
Nieuws_c.i = 0;
Nieuws_firstNews_obj=ie? Nieuws_firstNews : document.getElementById("Nieuws_firstNews")
Nieuws_secondNews_obj=ie? Nieuws_secondNews : document.getElementById("Nieuws_secondNews")
setTimeout("Nieuws_scroll_obj.move(Nieuws_firstNews_obj)",Nieuws_c.scrollerDelay);
Nieuws_secondNews_obj.style.top=theHeight+"px";
Nieuws_secondNews_obj.style.visibility='visible'
}