
var quotesArray = new Array(
 "appCompass fits strategically with what we are doing for our mid-size and enterprise customers.  " +
 "Every project today involves a significant amount of integration and appCompass gives us a system for " +
 "managing these projects successfully.  Having a solution that is based on Microsoft Windows Foundation " +
 "gives customers an easy-to-use package.<br/><br/>" +
 "Glen Ansell<br/>" +
 "Managing Director<br/>" +
 "i5 Group<br/>" +
 "Microsoft Partner of the Year<br/>" +
 "2007(ISV Solutions)",
 
 "La plateforme appRadius nous a permis de r&eacute;pondre efficacement &agrave; des besoins pointus de customisations " +
 "m&eacute;tiers du standard Microsoft Dynamics CRM, en ayant la s&eacute;curit&eacute; de travailler avec un environnement 100% compatible.  " +
 "La nouvelle offre appCompass en compl&eacute;ment d\'appRadius nous procure une capacit&eacute; suppl&eacute;mentaire de migration de " +
 "donn&eacute;es et d\'int&eacute;gration multi-plateformes des versions 3 et 4 de Dynamics CRM.<br/><br/>" +
 "Christian Brigode<br/>" +
 "CEO<br/>" +
 "Cmobile SAS<br/>",
 
 "As Microsoft CRM continues to grow in popularity, our partners are releasing complimentary tools and solutions that further drive " +
 "adoption.  appRadius for Microsoft CRM builds on the solid foundation of Microsoft CRM to give Visual Studio .NET developers a powerful " +
 "option for customizations and for developing vertical market CRM solutions.<br/><br/>" +
 "David Thacher<br/>" +
 "General Manager CRM<br/>" +
 "Microsoft Business Solutions",
 
 "We've grown our business through our 100 percent focus on Microsoft CRM implementation and customization work.  " +
 "appRadius delivers unmatched speed and flexibility for tackling Microsoft Dynamics CRM customizations and we look  " +
 "forward to leveraging the new version to take our clients to the next level.<br/><br/>" +
 "Scott Millwood<br/>" +
 "President<br/>" +
 "Customer Effective Inc.",
 
 "appRadius\' seamless integration of CRM domain-specific functionality into Visual Studio .NET gives developers a very powerful tool.  " +
 "Abstracting at such a high level allows the developer to concentrate on delivering the right solutions for the end-user.<br/><br/>" +
 "Ari Bixhorn<br/>" +
 "Lead Product Manager<br/>" +
 "Platform Evangelism Division<br/>" +
 "Microsoft Corp.",
 
 "appStrategy's approach of encapsulating CRM intelligence into easy-to-use controls for Visual Studio .NET delivers an attractive solution " +
 "for developers. Integration with Visual Studio .NET exposes powerful vertical market CRM functionality without requiring complex programming.<br/><br/>" +
 "Susanne Peterson<br/>" +
 "Director<br/>" +
 "Platform Evangelism Division<br/>" +
 "Microsoft Corp.<br/>"
 
 );
 
 var arrayIndex = 0;
 var inFadeMode = false;
 
 function rotateQuote(direction)
 {
 	// Direction should be passed as either 'Forward' or 'Backward' (case-sensitive)
 	
 	// Disables onclick for images during fades so that people can't double-click it and get weird behavior  
 	if (!inFadeMode)
 	{
 		inFadeMode = true;
 		opacityQuotes('quoteContainer', 100, 0, 500, 1, direction);
 	}
 	else
 		return;
 }
 		
 		

function rotateForward()
{

	if ((arrayIndex + 1) >= quotesArray.length) 
	{
		arrayIndex = 0;
		document.getElementById("quoteContainer").innerHTML = quotesArray[arrayIndex];
	}
	else
	{
		document.getElementById("quoteContainer").innerHTML = quotesArray[++arrayIndex];
	}
		
		
	opacityQuotes('quoteContainer', 0, 100, 500, 0, 'Forward');
}
function rotateBackward()
{
	if (arrayIndex == 0) 
	{
		arrayIndex = (quotesArray.length - 1);	
		document.getElementById("quoteContainer").innerHTML = quotesArray[arrayIndex];
	}
	else
		document.getElementById("quoteContainer").innerHTML = quotesArray[--arrayIndex];
	
	opacityQuotes('quoteContainer', 0, 100, 500, 0, 'Backward');
}


function opacityQuotes(id, opacStart, opacEnd, millisec, start, rotationType) {
    //speed for each frame
    var speed = Math.round(millisec / 100);
    var timer = 0;

    //determine the direction for the blending, if start and end are the same nothing happens
    if(opacStart > opacEnd) {
        for(i = opacStart; i >= opacEnd; i--) {
            setTimeout("changeOpacQuotes(" + i + ",'" + id + "')",(timer * speed));
            timer++;
        }
        if (start == 1)
        {
        	
			setTimeout("rotate" + rotationType + "()", (timer * speed) + 10);
		}
		
			
    } else if(opacStart < opacEnd) {
        for(i = opacStart; i <= opacEnd; i++)
        {
            setTimeout("changeOpacQuotes(" + i + ",'" + id + "')",(timer * speed));
            timer++;
        }
        if (start == 1)
			setTimeout("rotate" + rotationType + "()", (timer * speed) + 10);
		else
		{
			// Re-enable click
			inFadeMode = false;
		}
    }
}

//change the opacity for different browsers
function changeOpacQuotes(opacity, id) {
    var object = document.getElementById(id).style;
    object.opacity = (opacity / 100);
    object.MozOpacity = (opacity / 100);
    object.KhtmlOpacity = (opacity / 100);
    object.filter = "alpha(opacity=" + opacity + ")";
    // For stupid-assed IE
    if (BO.ie)
    {
		var object = document.getElementById('quoteContainer').style;
		object.opacity = (opacity / 100);
		object.MozOpacity = (opacity / 100);
		object.KhtmlOpacity = (opacity / 100);
		object.filter = "alpha(opacity=" + opacity + ")";
	}
}