// Button & Menu Options ---------------------------------//

// Use animation menus
// Requires scriptaculous
	var anim_menus = 1;

//Auto link buttons to overview pages
	var use_overview_pages = 1;

//Show sub-menus for current section( 0=no, 1=yes)
	var section_subs = 1;

//Other button definitions
//"btn_name,menu_name(|menu_direction),section_id,img_src,img_src_on"
//Ex. "ql_btn,ql_menu,0,uploaded/images/ql_btn.gif,uploaded/images/ql_btn.gif"
var otherBtns = new Array( );

// List other images that need to be pre-loaded
var otherImages = new Array();

//other JS functions to run onLoad
function loadJS(){
	
if(pageid==1){
	        createTabs(),createStories();
		$j('#rightArrow').click(function(){ carousel('right') });
		$j('#leftArrow').click(function(){ carousel('left') });

}
}


function carousel(dir){
	var containerWidth = Number($j('#scrollContainer').css('width').replace(/[^0-9]/g,'')); //container width
	var contentWidth = Number($j('#scrollContent').css('width').replace(/[^0-9]/g,'')); //content width
	var currentPos = Number($j('#scrollContent').css('left').replace(/[^0-9-]/g,''));

	if(dir=="right"){
		var newPos = currentPos - containerWidth;
		if(newPos > -(contentWidth)){ $j('#scrollContent').animate({'left':newPos+'px'},1500); }
	}
	
	if(dir=='left'){
		var newPos = currentPos + containerWidth;
		if(newPos < 1){ $j('#scrollContent').animate({'left':newPos+'px'},1500);}
	}
	
}

