
var current = 0; //Current Panel
var direction = 'forward';

function start(){
	var spc = portfolio.getContentPanelsCount();

	if(current == spc){
		direction='backward';
	}
	else if (current==1){
		direction='forward';
	}
	
	if (direction == 'backward') {
		current = current-1;
	} else if (direction == 'forward'){
		current = current+1;
	}
	
		portfolio.showPanel(current);
	t=setTimeout(function(){start()},5000); // 5000 beein the amount of milisec till it switches panel

	
/*			current = current-1;*/


}

function stop(){

	if(typeof(t) == 'number')clearTimeout(t);

}
