			var tagline = ''; 	// current tagline it's at, required for changing tagline
			var visible = true;	// whether the tagline img is visible, required for changing tagline
			var cycle = 0;
			/**
			 * Method to change the tagline dynamically with a fade transition
			 * 
			 * To change the path to the images, set it in the 'if (visible)' statement only
			 */
			changeTagline = function () {
			
				
				if (cycle >= 4) return;
				
				// find another number other than the current one
				do {
					num = Math.floor(Math.random()*3)+1;			
				
				} while ("http://www.riverdalepartners.com/images/logorotation"+num+".jpg" == tagline);

				tagline = "http://www.riverdalepartners.com/images/logorotation"+num+".jpg";
				
				// Switch between turning the opacity down and up
				if (visible) {
					$("taglineBox").style.backgroundImage = "url(http://www.riverdalepartners.com/images/logorotation"+num+".jpg)";
					$("taglineBox").style.backgroundRepeat = "no-repeat";
					
					// 2.0 = two seconds
					new Effect.Opacity('tagline',{ duration: 2.0, 
														transition: Effect.Transitions.linear, 
														from: 1.0, to: 0.0 });
				} else {
					$("tagline").setAttribute("src", "http://www.riverdalepartners.com/images/logorotation"+num+".jpg");
				
				
					new Effect.Opacity('tagline',{ duration: 2.0, 
      												transition: Effect.Transitions.linear, 
      												from: 0.0, to: 1.0 });				
					
				}
				
				visible = !visible;				
	
				cycle++;
				// 7000 = five seconds
				setTimeout("changeTagline()", 7000);
			}



//Event.observe(window, 'load', changeTagline);		

		



