var pt_curPos=0;
var pt_moveNum=0;
	
function pt_animate(direction,frame,content,maxWidth){
	
	var leftButton = $('leftButton');
	var rightButton = $('rightButton');
			
	var width = $(frame).getWidth();
	var pt_maxWidth=maxWidth;	

	// Set animation
	var p_animate=false;
	
	if(direction=="left"){
	// If direction is left only change current position if less than 0
		if (pt_curPos>0){
			pt_moveNum=width;
        	pt_curPos-=width;
        	animate=true;
		}
	}else{
	// If direction is right only change current position if greater than maxWidth
		if (pt_curPos<pt_maxWidth){
			pt_moveNum=-width;	
        	pt_curPos+=width;	
        	animate=true;		
		}
	}  
	
	// Hide Show Arrow Functions
	if (pt_curPos==0){
		leftButton.addClassName('off');
	}else{
		leftButton.removeClassName('off');	
	}
	
	if (pt_curPos == pt_maxWidth){
		rightButton.addClassName('off');
	}else{
		rightButton.removeClassName('off');		
	}
	
	//animate
	if (animate){
		new Effect.ScrollHorizontal(frame, {to:pt_curPos,duration:.5});
	}	
	
}