var toScroll_LN=new Array()
var ie_LN=document.all
var dom_LN=document.getElementById
var firstNews_obj_LN;
var secondNews_obj_LN;

function newsScroll_LN(name){
  var c_LN=this; c_LN.name=name; c_LN.mc=0; c_LN.i=2;
  return this;
}

newsScroll_LN.prototype.addItem = function(text,link,font,fontSize,fontStyle){
  var c_LN = this;
  if (link !=''){
    if (font != '')
      toScroll_LN[c_LN.mc]="<a href='"+link+"'><font face='"+font+"' size='"+fontSize+"' Class='"+fontStyle+"'>"+text+"</font></a>";
    else
      toScroll_LN[c_LN.mc]="<a href='"+link+"'><font Class='"+fontStyle+"'>"+text+"</font></a>";
  }
  else { 
    if (font != '')
      toScroll_LN[c_LN.mc]="<font face='"+font+"' size='"+fontSize+"' Class='"+fontStyle+"'>"+text+"</font>";
    else
      toScroll_LN[c_LN.mc]="<font Class='"+fontStyle+"'>"+text+"</font>";
  }
  c_LN.mc++;
}

newsScroll_LN.prototype.construct = function(){
  var c_LN = this; theWidth_LN = c_LN.scrollerwidth; theHeight_LN=c_LN.scrollerheight; thebgColor_LN = c_LN.scrollerbgcolor; theBackground_LN =c_LN.scrollerbackground; theDelay_LN=c_LN.scrollerdelay;
  scroll_obj_LN=eval(c_LN.name);        
  if (ie_LN||dom_LN){
    document.writeln('<div id="main2_LN" style="position:relative;width:'+theWidth_LN+';height:'+theHeight_LN+';overflow:hidden;background-color:'+thebgColor_LN+' ;background-image:url('+theBackground_LN+')">')
    document.writeln('<div style="position:absolute;width:'+theWidth_LN+';height:'+theHeight_LN+';clip:rect(0 '+theWidth_LN+' '+theHeight_LN+' 0);left:0;top:0">')
    document.writeln('<div id="firstNews_LN" style="position:absolute;width:'+theWidth_LN+';left:0;top:1">')
    document.write(toScroll_LN[0])
    document.writeln('</div>')
    document.writeln('<div id="secondNews_LN" style="position:absolute;width:'+theWidth_LN+';left:0;top:0;visibility:hidden">')
    document.write(toScroll_LN[dyndetermine_LN=(toScroll_LN.length==1)? 0 : 1])
    document.writeln('</div>')
    document.writeln('</div>')
    document.writeln('</div>')
  }
}

newsScroll_LN.prototype.move = function(whichdiv){
	var c_LN = this; theDelay_LN = c_LN.scrollerdelay; theHeight_LN = c_LN.scrollerheight; 
	scroll_obj_LN=eval(c_LN.name);
	tdiv_LN=eval(whichdiv)

  if (parseInt(tdiv_LN.style.top)>0&&parseInt(tdiv_LN.style.top)<=5){
    tdiv_LN.style.top=0+"px"
    setTimeout("scroll_obj_LN.move(tdiv_LN)",theDelay_LN)
    setTimeout("scroll_obj_LN.move2(secondNews_obj_LN)",theDelay_LN)
    //document.write('Got Milk?')
  return
  }
  if (parseInt(tdiv_LN.style.top)>=tdiv_LN.offsetHeight*-1){
    tdiv_LN.style.top=parseInt(tdiv_LN.style.top)-5+"px"
    setTimeout("scroll_obj_LN.move(tdiv_LN)",50)
  }
  else {
    tdiv_LN.style.top=parseInt(theHeight_LN)+"px"
    tdiv_LN.innerHTML=toScroll_LN[c_LN.i]
    if (c_LN.i==toScroll.length-1)
      c_LN.i=0
    else
      c_LN.i++
  }
}

newsScroll_LN.prototype.move2 = function(whichdiv){
  var c_LN = this; theDelay_LN = c_LN.scrollerdelay; theHeight_LN= c_LN.scrollerheight;
  scroll_obj_LN=eval(c_LN.name);
  tdiv2_LN=eval(whichdiv)

  if (parseInt(tdiv2_LN.style.top)>0&&parseInt(tdiv2_LN.style.top)<=5){
    tdiv2_LN.style.top=0+"px"
    setTimeout("scroll_obj_LN.move2(tdiv2_LN)",theDelay_LN)
    setTimeout("scroll_obj_LN.move(firstNews_obj_LN)",theDelay_LN)
    return
  }
  if (parseInt(tdiv2_LN.style.top)>=tdiv2_LN.offsetHeight*-1){
    tdiv2_LN.style.top=parseInt(tdiv2_LN.style.top)-5+"px"
    setTimeout("scroll_obj_LN.move2(secondNews_obj_LN)",50)
  }
  else {
    tdiv2_LN.style.top=parseInt(theHeight_LN)+"px"
    tdiv2_LN.innerHTML=toScroll_LN[c_LN.i]
    if (c_LN.i==toScroll_LN.length-1)
      c_LN.i=0
    else
      c_LN.i++
  }
}

newsScroll_LN.prototype.startScroll = function(){
  var c_LN = this;
  scroll_obj_LN=eval(c_LN.name);        
  
  if (toScroll_LN.length >2)
    c_LN.i = 2;
  else
    c_LN.i = 0;
  
  firstNews_obj_LN=ie_LN? firstNews_LN : document.getElementById("firstNews_LN")
  secondNews_obj_LN=ie_LN? secondNews_LN : document.getElementById("secondNews_LN")
  setTimeout("scroll_obj_LN.move(firstNews_obj_LN)",c_LN.scrollerDelay);
  secondNews_obj_LN.style.top=theHeight_LN;
  secondNews_obj_LN.style.visibility='visible'
}

