////////////////////////////////////////////////
// FLASH SCROLL
function setHeight(num)
{
	num = Math.ceil(num);
	var div = MM_findObj('flashContent');
	var h = num + 'px';
	div.style.height = h;
	//-------------------
	var div2 = MM_findObj('htmlLayer');
	div2.style.top = num + 'px';
}

var endPos=0;
var scrollInt;
//
function backtotop()
{
	scrollY(0);
}

function scrollY(yp)
{
	//window.document.body.scrollTop = yp;
	//
	clearInterval(scrollInt);
	endPos = yp;
	scrollInt = setInterval(doScrollY,30);
}

function getScrollPos()
{
	var topPos = Math.max(window.document.body.scrollTop,window.document.documentElement.scrollTop);
	//
	return topPos;
}

function setScrollPos(pos)
{
	window.document.body.scrollTop = pos;
	window.document.documentElement.scrollTop = pos;
}

function doScrollY()
{
	var lastTop = getScrollPos();
	var ds = endPos - getScrollPos();
	setScrollPos(getScrollPos() + Math.round(ds/3));
	ds = endPos - getScrollPos();
	if(Math.abs(ds) < 3 || lastTop==getScrollPos())
	{
		setScrollPos(endPos);
		clearInterval(scrollInt);
	}
}
