var timerTextID, textOpac

var ie4=document.all

var dom=document.getElementById&&navigator.userAgent.indexOf("Opera")==-1

var curTestimonial



var testimonials = new Array();

testimonials[0]=["<div class='headerTextTitle'>Distributed Pumps</div>In addition to our manufactured pumps, Albany has established a long history with many Pump Manufacturers. We can offer off the shelf or customized products to meet the specific needs of the Industry. We pride ourselves on our commitment to quality, tradition and innovation and choose only the finest quality manufacturers to distribute. Learn more about all of our Distributed Pumps by <a href='distributedPumps.php'>clicking here</a>.<br/><br/><a href='distributedPumps.php'><img src='images/btn_learnMore.gif' style='border:none;' /></a>"]; 

testimonials[1]=["<div class='headerTextTitle'>Manufactured Pumps</div>Albany Pump has been manufacturing high-quality, dependable pumps for over 100 years. We manufacture helical gear pumps, rotary gear pumps, hand operated piston pumps, as well as Fabricated Pump & Tank Assemblies for Condensate Return & Boiler Feed. Learn more about all of our Manufactured Pumps by <a href='manufacturedPumps.php'>clicking here</a>.<br/><br/><a href='manufacturedPumps.php'><img src='images/btn_learnMore.gif' style='border:none;' /></a>"]; 

testimonials[2]=["<div class='headerTextTitle'>Parts & Accessories</div>In addition to our manufactured and distributed pumps, Albany stocks and sells a large inventory of pump parts and accessories, ranging from Pump Controllers, Tanks, Relief Valves, Ball Valves, Solenoid Valves, and a Full Range of Flow and Level Controls. Learn more about all of our Parts & Accessories by <a href='partsAndAccessories.php'>clicking here</a>.<br/><br/><a href='partsAndAccessories.php'><img src='images/btn_learnMore.gif' style='border:none;' /></a>"];  

testimonials[3]=["<div class='headerTextTitle'>Fuel Oil Pump Packages</div>Albany Pump is one of the most recognized and trusted names in the industry for Fuel Oil Pumps and Fuel Oil Pump Sets. We are experts in Fuel Oil Pump solutions including the application, design and fabrication of Fuel Oil Pumps, Light Fuel Oil Pump Sets, Heavy Fuel Oil Pump and Heater Sets and Fuel Oil handling accessories. Learn more about all of our Fuel Oil Pump Packages by <a href='fuelOilPumpPackages.php'>clicking here</a>.<br/><br/><a href='fuelOilPumpPackages.php'><img src='images/btn_learnMore.gif' style='border:none;' /></a>"];

testimonials[4]=["<div class='headerTextTitle'>Fuel Oil Filtration</div>Albany Pump AF Series Fuel Oil Filtration and Polishing Systems are self-contained, pre-packaged and pre-wired units specifically designed to purify and filter stored diesel fuel. Preserving the integrity of the diesel fuel helps ensure trouble-free generator starts and reduces annual maintenance, contaminated fuel disposal and annual reservoir cleaning costs. Learn more about all of our Fuel Oil Filtration Products by <a href='fuelOilFiltration.php'>clicking here</a>.<br/><br/><a href='fuelOilFiltration.php'><img src='images/btn_learnMore.gif' style='border:none;' /></a>"];




function getRandomTestimonial(){

	var randomTestimonial = Math.floor(Math.random()*testimonials.length);

	curTestimonial = randomTestimonial;

	return testimonials[randomTestimonial];

}



function loadTestimonial(divId, curIndex){

	textOpac = 0;

	//document.getElementById("testimonialCallout").innerHTML=getRandomTestimonial();

	document.getElementById(divId).innerHTML=testimonials[curIndex];

	timerTextID = setInterval("fadeInText('"+divId+"')", 60); 
	for(i=0;i<testimonials.length;i++){
		document.getElementById('testimonialNavItem_'+i).className = 'testimonialNavItem';	
	}
	document.getElementById('testimonialNavItem_'+curIndex).className = 'testimonialNavItemOver';
	

	return true;

}







function fadeInText(divId){

	curQuote = document.getElementById(divId);

	if(textOpac <= 100){

		if (ie4||dom){			

			textOpac = textOpac + 10;

			/*if(curQuote.filters.alpha.opacity){

				curQuote.filters.alpha.opacity=textOpac;			

			}else if (curQuote.style.MozOpacity){

				curQuote.style.MozOpacity=textOpac*0.01;

			}	*/

			if (curQuote.filters&&curQuote.filters[0]){

				if (typeof curQuote.filters[0].opacity=="number") //if IE6+

					curQuote.filters[0].opacity=textOpac

				else //else if IE5.5-

					curQuote.style.filter="alpha(opacity="+textOpac+")"

			}else if (curQuote.style.MozOpacity)

					curQuote.style.MozOpacity=textOpac/101

				else if (curQuote.style.KhtmlOpacity)

					curQuote.style.KhtmlOpacity=textOpac/100

				else if (curQuote.style.opacity&&!curQuote.filters)

					curQuote.style.opacity=textOpac/101

			

		}

	}else{

		clearInterval(timerTextID)

	}  

}



function highlightTestimonial(textId){

	testimonialID=document.getElementById(textId+'Container');

	if(testimonialID){

		testimonialID.style.backgroundColor = '#EEEEEE';	

	}

}
