//script
var n = (document.layers) ? 1:0
var ie = (document.all) ? 1:0
var range = "";
var styleObj = "";
var mutex = 0;

var yplace = 0;
var ymax = 0;
var ymin = 0;
var xplace = 0;
var speed = 5;                         //scroll speed
var newsHeight = 265;                  //height clipping div
var newsId = "news";                   //define news name
var newsClipId = "newsClipping";       //define news clipping div

if (ie) {
	range = "all.";
	styleObj = ".style";
}

if (n) newsId = newsClipId + ".document." + newsId;

function redraw() { //modified Assembler.org 15-03-2000 - modified CGLC 15-08-2000
  if (document.GL.redraw.winWidth != window.innerWidth  || document.GL.redraw.winHeight != window.innerHeight) {
    document.location = document.location;
  }
}

function redrawInit() { //modified Assembler.org 15-03-2000 - modified CGLC 15-08-2000
  if (n) {
   document.GL = new Object;
   document.GL.redraw = new Object;
   document.GL.redraw.winWidth = window.innerWidth;
   document.GL.redraw.winHeight = window.innerHeight;
   window.onresize = redraw();
  }
}

function shiftTo(obj, x, y) {
	if (n) {
		obj.moveTo(x,y);
	} 
	else {
		obj.pixelLeft = x;
		obj.pixelTop = y;
	}
}

function getObject(obj) {
	var theObj = eval("document." + range + obj + styleObj);
	return theObj;
} 

function scrollUp() {
if (mutex == 1){
  var theObj = getObject(newsId);
  if (yplace < ymax) {
      yplace = yplace + speed;
      if (yplace > ymax) yplace = ymax;
	  shiftTo(theObj, xplace, yplace);
    setTimeout("scrollUp()",25);
  }
}
}
  
function scrollDown() {
if (mutex == 1){
  var theObj = getObject(newsId);
  if (yplace > ymin) {
      yplace = yplace - speed;
      if (yplace < ymin) yplace = ymin;
	  shiftTo(theObj, xplace, yplace);
    setTimeout("scrollDown()",25);
  }
}
}

function init() {
redrawInit();
theObj = getObject(newsId);
if (n) ymin = (theObj.clip.height - newsHeight) * -1;
else {
    styleObj = "";
    theObj = getObject(newsId);
    ymin = (theObj.offsetHeight - newsHeight) * -1;
    styleObj = ".style";
}
}

// End -->

