var animationInterval;
var animationCounter = 0;
var animationPauseCounter = 0;
var animationPhotoCounter = 0;
var tblLogopictures;

YAHOO.util.Event.onDOMReady(
	function() {
		animationInterval = setInterval(animate, 10);

		function animate() {
			if (animationPauseCounter <= 500) {
				animationPauseCounter++;
				return;
			}
			tblLogopictures = YAHOO.util.Dom.get('tbl_logopictures');
			var tblLogopicturesMarginLeft = parseInt(YAHOO.util.Dom.getStyle(tblLogopictures, 'margin-left'));
			YAHOO.util.Dom.setStyle(tblLogopictures, 'margin-left', tblLogopicturesMarginLeft - 3 + 'px');
			animationCounter += 1;
			if (animationCounter == 157) {
				YAHOO.util.Dom.setStyle(tblLogopictures, 'margin-left', tblLogopicturesMarginLeft - 4 + 'px');
				animationPauseCounter = 0;
				animationCounter = 0;
				animationPhotoCounter++;
				if (animationPhotoCounter == 11) {
					YAHOO.util.Dom.setStyle(tblLogopictures, 'margin-left', '-408px');
					animationPhotoCounter = 0;
				}
				//clearInterval(animationInterval);
			}
		}
	}
);

