function startnews() {
    new Interval( function() {nextnews()}, function() {firstnews()},4,4 );
}

function nextnews() {
    new Effect.Move('newsslider', { x: -186, y: 0 });
}

function firstnews() {
    /*new Effect.Move('newsslider', { x: 0, y: 0, mode: 'absolute'});*/
    var obj = $('newsslider');
    obj.style.position = "absolute";
    obj.style.left = 0 + "px";
}



/* class Interval */
var Interval = Class.create();
Interval.prototype = {
    /// handler, timeout in seconds || 5, repeat count || 1 (-1:endless)
    initialize: function( handler, handler2, timeout, count ) {
          if( typeof handler == 'function' ) {
          var index = 0;
          var handle = window.setInterval(
              function() {
                  try {
                    handler();
                  }
                  catch( e ){
                  }
                  if( ++index == ( count || 1 ) ) {
                    window.clearInterval( handle );
                    handler2();
                    new Interval( handler, handler2,4,3 );
                  }
              },
              ( timeout || 5 ) * 1000
          )
        };
    }
        

}
/* end class Interval */

