	var div = 10;
	
	var sliderEnabled = true;
	function scrFol()
	{
		var ad = document.getElementById( 'slider' );
		var dPos = ( document.all ) ? document.body.scrollTop : window.pageYOffset;

		if ( ( dPos == 0 ) && ( document.all ) )
			dPos = document.documentElement.scrollTop;

		dPos += 50;
		var cPos = parseInt( ad.style.top );
		if ( cPos == 0 )
			cPos = dPos-1000;

		var posDif = dPos-cPos;

		if ( ( ad.style.display == 'none' ) && ( sliderEnabled ) )
			ad.style.display = 'block';

		if ( posDif > 0 )
			ad.style.top = (cPos+Math.ceil(posDif/div))+'px';
		else if ( posDif < 0 )
			ad.style.top = (cPos+Math.floor(posDif/div))+'px';

		if ( sliderEnabled )
			setTimeout( 'scrFol()', 20 );
			
		ad.style.left = (pageWidth()/2-200);
	
	}
	function closeFollowSlider()
	{
		sliderEnabled = false;
		document.getElementById( 'slider' ).style.display = 'none';
	}


	setTimeout('scrFol()', 1000);

	

function pageWidth() {
return window.innerWidth != null? window.innerWidth : document.documentElement && document.documentElement.clientWidth ?       document.documentElement.clientWidth : document.body != null ? document.body.clientWidth : null;} 


