// Browser detection
var nn4 = (document.layers)? true:false;	  //NS 4
var ie4 = (document.all)? true:false;	  //IE 4
var dom = (document.getElementById)? true:false;	  //DOM
var ancres = new Array;
var current = false;
var scrollTimeOutId = setTimeout("scrollNext();",2000);

function scrollNext() {
 var found=false; var ok=false;
 var toScroll = false;
 var first = false;
 for (var i = 0; !ok && i < document.anchors.length; i++) {
  var anAnchor = document.anchors[i];
// window.alert(anAnchor.name.substr(0, 16));
 if(anAnchor.name.substr(0, 16) == 'newsscrollanchor')
  {
	 if(!first.name)
	 {
		 first = anAnchor;
	 }
     if(found)
     {
      toScroll=anAnchor;
      ok = true;
     }
     if(anAnchor == current) 
     {
      found=true;
     }
  }
 }
 //window.alert('first:'+first.name+'-current:'+current.name+'-toScroll:'+toScroll.name);
 if (!toScroll.name)
 {
	 toScroll = first;
 }
 current=toScroll;
 //window.alert(toScroll.name);
 scrollToAnchor(toScroll.name);
 clearTimeout(scrollTimeOutId);
 scrollTimeOutId = setTimeout("scrollNext();",9000);
}

function scrollToAnchor (anchorName) {
var y=0;
  if (ie4) {
    var anchor = document.all[anchorName];
    y= anchor.offsetTop -5;
    document.all['newsscroll'].style.posTop = -y ;
  } else if(dom) {
    var anchor = document.getElementById(anchorName);
	y = anchor.offsetTop +1;
	document.getElementById("newsscroll").style.top = -y +'px';
  } else if(nn4) {
   var anchor = document.anchors[Name_Anchor];
   y=anchor.y +5;
   document.contentClip.document.newsscroll.top = -y;
  }
}