var step1=-300;
var active_l='http://www.pringoo.com/image/homev2/arrow_right_a.gif';
var active_r='http://www.pringoo.com/image/homev2/arrow_left_a.gif';
var disable_l='http://www.pringoo.com/image/homev2/arrow_right.gif';
var disable_r='http://www.pringoo.com/image/homev2/arrow_left.gif';
var opac=0.5;
var move=30;  //step1 value is divided by this value
var selected='';
function slide(){		
	$GESD(selected, 'none');
	var marg=$GE('inner_box').style.marginLeft;		
	marg=parseInt(marg);	
	if(marg <= 0){	
		$GE('inner_box').style.opacity=opac;		
		setTimeout("minus_marg("+marg+")",100);		
	}	
}
function minus_marg(m){
	if(m > step1){
	    m=m-move;	
		if(m == step1){
		  $GE('inner_box').style.marginLeft=m+'px';
		  $GE('inner_box').style.opacity=1.0;		
		  $GE('right').src=disable_r;
		  $GE('left').src=active_l;
		}else{
		  $GE('inner_box').style.marginLeft=m+'px';	
		  setTimeout("minus_marg("+m+")",100);			  
		}
	}else{
		$GE('inner_box').style.marginLeft=m+'px';
		$GE('inner_box').style.opacity=1.0;				
	}
}
function pre_slide(){
	$GESD(selected, 'none');
	var marg=$GE('inner_box').style.marginLeft;	
	marg=parseInt(marg);	
	if(marg >= step1){			
		$GE('inner_box').style.opacity=opac;		     
		setTimeout("plus_marg("+marg+")",100);
	}
}
function plus_marg(m){	
 if(m < 0){
	    m=m+move;	
		if(m == 0){
		  $GE('inner_box').style.marginLeft=m+'px';
		  $GE('inner_box').style.opacity=1.0;	
		  $GE('right').src=active_r;
	      $GE('left').src=disable_l;		  	    	 
		}else{
		  $GE('inner_box').style.marginLeft=m+'px';	
		  setTimeout("plus_marg("+m+")",100);		
		}
	}else{
		$GE('inner_box').style.marginLeft=m+'px';
		$GE('inner_box').style.opacity=1.0;	
		$GE('right').src=active_r;
	    $GE('left').src=disable_l;		
	}			
}
function show(a){	
	$GESD(selected, 'none');
	var x='icon'+a;	
	var y='text_hbox'+a;
	selected = y;
	var i;
	$GESD(y, 'block');
	$GE(y).style.marginTop='-98px';		
	if(a == 12){
		$GE(y).style.marginLeft='1px';
	}	
	if(a == 8 ){
		$GE(y).style.marginLeft='-80px';
	}
	if(a == 9){
		$GE(y).style.marginLeft='-80px';
	}
	if(a == 5){
		$GE(y).style.marginLeft='0px';
	}	
}
function closediv(b){
	var x='icon'+b;
	var y='text_hbox'+b;
	$GESD(y, 'none');
	$GESD(x, 'block');		
}
