
	var sw_aricle_top = 0;
	var sw_aricle_speed = 0;
	var sw_aricle_max_speed = 20;
	var sw_aricle_timer = 0;
	var sw_aricle_obj = null;
	

	$(document).ready(function(){
		//replace div
		var rep_div_txt=$("#main_content").find(".article_text");
		rep_div_txt = rep_div_txt.html();
		
      $("#main_content > .article_text").replaceWith("<div class='article_text'><div id='aricle_txt'><p>" + rep_div_txt + "</p></div></div>");
    	//get height-outherheight	
		//article_txt_min=Math.round((29-rep_div_txt.length/40)*17);
		var oh = $('#aricle_txt').outerHeight();
		article_txt_min = 450 - oh;
		
		if(article_txt_min<-16){
			
		$(".go_top").css({
				"display": "block"
			});
		$(".go_bottom").css({
				"display": "block"
			});
		}
	});

	function sw_move_aricle_txt() {
		if (sw_aricle_top<=0 && sw_aricle_top>=article_txt_min)
		{
			if ( Math.abs( sw_aricle_speed ) < sw_aricle_max_speed) {
			sw_aricle_speed *= 1.5;
			}
		
		sw_aricle_top += sw_aricle_speed;
		sw_aricle_obj.style.top=sw_aricle_top+'px';
		}
		else if(sw_aricle_top<article_txt_min && sw_aricle_speed==1)
		{
		sw_aricle_top=article_txt_min;
		sw_move_aricle_txt();
		}
		else if(sw_aricle_top>0 && sw_aricle_speed==-1)
		{
		sw_aricle_top=0;
		sw_move_aricle_txt();
		}
	}
	
	function sw_aricle_txt_start( speed ) {
		sw_aricle_speed = speed;
		sw_aricle_obj = document.getElementById('aricle_txt');
		sw_aricle_timer = setInterval( sw_move_aricle_txt, 33 );
	}

	function sw_aricle_txt_stop() {
		sw_aricle_speed = 0;
		clearInterval( sw_aricle_timer );
	}
	

