function moveScrollPos(x,y){
	if(!x && !y) return;
	var cur_scroll=getScrollPos();
	var tx=cur_scroll['x']-x;
	var ty=cur_scroll['y']-y;
	window.scrollTo(tx,ty);
	if(tx>0) tx=0;
	var h;
	/*if(window.scrollParentPos && (tx<0 || ty<0 || ty>(h=getWindowHeight()))){
		tx=Math.max(-tx,0);
		if(ty<0) ty=Math.max(-ty,0);
		else if(h) ty=h-ty;
		window.scrollParentPos(tx,ty);
		if(debug) debug.innerHTML+=' H:'+h;
	}*/
}

function getWindowHeight(){
	var h;
	if(window.innerHeight)
		h=window.innerHeight;
	else if(document.documentElement&&document.documentElement.clientHeight)
		h=_25f.document.documentElement.clientHeight;
	else if(document.body)
		h=document.body.clientHeight;
	return h;
}

function getScrollPos(){
	var x,y;
	if (window.pageYOffset){
        y=window.pageYOffset;
    }else if (document.documentElement && document.documentElement.scrollTop){
        y=document.documentElement.scrollTop;
    }else if (document.body){
        y=document.body.scrollTop;
    }    
    if (window.pageXOffset){
        x=window.pageXOffset;
    }else if (document.documentElement && document.documentElement.scrollLeft){
        x=document.documentElement.scrollLeft;
    }else if (document.body){
        x=document.body.scrollLeft;
	}
	return {'x':x,'y':y};
}

window.msp=moveScrollPos;