var slide_timer;
var slide_sp=5;
function slide_speedup() {
	slide_sp=10;
}
function slide_speeddown() {
	slide_sp=5;
}
function stop_slide() {
	clearInterval(slide_timer);
	slide_speeddown();
}
function start_slide_r(q) {
	stop_slide();
	slide_timer=setInterval(slide_r,20,q);
  }
function start_slide_l(q) {
	stop_slide();
	slide_timer=setInterval(slide_l,20,q);
}
function start_scroll_d(q) {
	stop_slide();
	slide_timer=setInterval(scroll_d,20,q);
  }
function start_scroll_u(q) {
	stop_slide();
	slide_timer=setInterval(scroll_u,20,q);
}
function slide_r(q) {
	var o=document.getElementById(q);
	var ma=(0-parseInt(o.offsetWidth))+parseInt(document.getElementById(q+"c").offsetWidth);
	if(parseInt(o.style.left)<=ma) { return; }
	if((parseInt(o.style.left)-slide_sp)<ma) { o.style.left=ma+"px";return; }
	o.style.left=(parseInt(o.style.left)-slide_sp)+"px";
}
function slide_l(q) {
	var o=document.getElementById(q);
	if(parseInt(o.style.left)>=0) { return; }
	if((parseInt(o.style.left)+slide_sp)>0) { o.style.left="0px";return; }
	o.style.left=(parseInt(o.style.left)+slide_sp)+"px";
}
function scroll_d(q) {
	var o=document.getElementById(q);
	var ma=(0-parseInt(o.offsetHeight))+parseInt(document.getElementById(q+"c").offsetHeight);
	if(parseInt(o.style.top)<=ma) { return; }
	if((parseInt(o.style.top)-slide_sp)<ma) { o.style.top=ma+"px";return; }
	o.style.top=(parseInt(o.style.top)-slide_sp)+"px";
}
function scroll_u(q) {
	var o=document.getElementById(q);
	if(parseInt(o.style.top)>=0) { return; }
	if((parseInt(o.style.top)+slide_sp)>0) { o.style.top="0px";return; }
	o.style.top=(parseInt(o.style.top)+slide_sp)+"px";
}

/*@cc_on
(function(f){
 window.setTimeout =f(window.setTimeout);
 window.setInterval =f(window.setInterval);
})(function(f){return function(c,t){var a=[].slice.call(arguments,2);return f(function(){c.apply(this,a)},t)}});
@*/