
var quotesArray = new Array(
"When I saw the appCompass software, I immediately understood it was the tool we had been looking for.  " +
 "<br/><br/>" +
 "There was so much more to this tool, in terms of flexibility and because it makes it easy to add new data sources.<br/><br/>" +
 "Klaus Bank Andersen<br/>" +
 "CRM Project Leader<br/>" +
 "Nordea<br />" +
 "Capital Markets IT<br/><br/>",

"appCompass workflow Designer allows to create a direct workflow and to extend its functions for complex projects. " +
 "<br/><br/>" +
"The standard functions offered are comprehensive and extensible. <br/><br/>" +
"During the past two years appStrategy reacted very quickly to develop missing functions and corrected existing ones.<br/><br/>" +
"Vincent Buob<br/>" +
 "xRM Project Manager<br/>" +
 "Federal IT of the Swiss Confederation &ndash; FOITT<br/><br/>",


							
 "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/>",

 
 
 "As Microsoft Dynamics 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 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",
 
 
 "appRadius\' seamless integration of CRM domain-specific functionality into Visual Studio 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/>",
 
 "appStrategy's approach of encapsulating CRM intelligence into easy-to-use controls for Visual Studio delivers an attractive solution " +
 "for developers. Integration with Visual Studio 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 + ")";
	}
}