var TO = 2400;

function winOnLoad(timeout_)
{
  var lc = xGetElementById('maintext');
//  if (timeout_) {
  	TO = xHeight(lc) * 10;
//	console.log(xHeight(lc))
//  }
if (lc && xDef(lc.style, lc.offsetLeft, lc.offsetTop)) { // downgrade check
	//lc.slideLinear = true; // this feature will be supported in X v3.15.3
	xMoveTo(lc, lc.offsetLeft, lc.offsetTop); // prime the element's inline style properties
	lc.slideTop = lc.offsetTop;
	lc.slideLeft = lc.offsetLeft;

	var e = xGetElementById('nyilfel');
	e.scrlUp = true;
	e.scrlEle = lc;
	e.onmouseover = scrlOnMouseover;
	e.onmouseout = scrlOnMouseout;

	e = xGetElementById('nyille');
	e.scrlEle = lc;
	e.onmouseover = scrlOnMouseover;
	e.onmouseout = scrlOnMouseout;
  }
}
function scrlOnMouseover()
{
  var st, y, minST, maxST;
  if (this.scrlUp) {
	minST = 400;
	maxST = TO;
	y = this.scrlEle.slideTop;
  }
  else {
	minST = TO;
	maxST = 400;
	y = -xHeight(this.scrlEle) + 300;
  }
  
  st = parseInt(xLinearScale(-xTop(this.scrlEle), this.scrlEle.slideTop, xHeight(this.scrlEle), minST, maxST));
  xSlideTo(this.scrlEle, this.scrlEle.slideLeft, y, st);
}
function scrlOnMouseout()
{
  this.scrlEle.stop = true;
}

