function beginSliding(val){
	var cpos = new CurPoint();
	startpoint = cpos.x;
	endpoint = val;
	slidestep=0;
	sliding();
}
function sliding(){
	slidestep++;
	var x = endpoint - Math.pow(0.9,slidestep) * (endpoint - startpoint);
	window.scrollTo(x, 0);
	if(slidestep<100){
		tid=setTimeout("sliding()",10);
	}else{
		window.scrollTo(endpoint, 0);
	}
}
if (document.all) {
        if (document.compatMode == "CSS1Compat") {
                CurPoint = function () {
                        this.x = document.documentElement.scrollLeft;
                        this.y = document.documentElement.scrollTop;
                };
        } else {
                CurPoint = function () {
                        this.x = document.body.scrollLeft;
                        this.y = document.body.scrollTop;
                };
        }
} else if (window.pageXOffset !== undefined) {
        CurPoint = function () {
                this.x = window.pageXOffset;
                this.y = window.pageYOffset;
        };
} else {
        CurPoint = function () {
                this.x = window.scrollX;
                this.y = window.scrollY;
        };
}