function addLoadEvent(func) {
	var oldonload = window.onload;
	if (typeof window.onload != 'function') {
		window.onload = func;
	} else {
		window.onload = function() {
			oldonload();
			func();
		}
 	}
}

function noDoubleClick(what) {
	what.parentNode.style.display = "none";
	var process = document.getElementById("processing");
	process.style.display = "block";
}


$(document).ready(function() {
	$('#movePrevious').addClass('off');
	var x = 0;
	$('#moveNext').click(function() {
		if(x>-5100) {
			x -= 576;
			$('#movePrevious').removeClass('off');
		}
		
		if(x<-5100){
			$(this).addClass('off');	
		}
		
		$('#timelineSlide').animate({left: x}, "fast");
	});
	
	$('#movePrevious').click(function() {
		if(x<0) {
			x += 576;
			$('#moveNext').removeClass('off');
		}
		
		if(x>-600) {
			$(this).addClass('off');	
		}
		$('#timelineSlide').animate({left: x}, "fast");
	});
	
	$("#timelineDates a").click(function() {
		x = parseInt(this.title)*(-1);
		$('#timelineSlide').animate({left: x}, "fast");													 
	});
});



