// Fade array and fade functions
var duration = 500; /* fade duration in millisecond */
var hidtime = 1000; /* time to stay hidden */
var showtime = 8000; /* time to stay visible */

var quoteArray = ['', 
				'<i>The Cooperative Bank Pool provided the real customer numbers and true channel penetrations. We gained immediate momentum from it because it helped us understand the online customer.</i><br/><span class="float_right">Glenn King<br/>Executive General Manager Shared Services, National Australia Bank</span>',
				'<i>The only way to understand what is happening in the housing loan market is to use the figures prepared by Market Intelligence Strategy Centre.</i><br/><span class="float_right">Robert Gottliebson<br/>The Australian</span>',
				'<i>No industry measurement of new mortgage flow statistics are available before MISC. With the MISC 21-Day Monitor we get an indicative feel of where the market is going which is very valuable especially with their MISC final quarterly results.</i><br/><span class="float_right">Dean Gillespie<br/>Head of Mortgage Products, Bankwest</span>',
				'<i>The MISC report also indicated that in 2001 Mortgage Choice had a 15% share of the broker industry with 60% share of franchisees.</i><br/><span class="float_right">Warren O\'Rourke<br/>National Manager - Corporate Affairs, Mortgage Choice</span>',
				'<i>We could see our own customer data and were asking why can\'t we see accurate data for the industry. An industry sharing system for online banking was the solution, which MISC provided ... It provided more rich data in terms of active users and showed what people were really doing. No other source could do.</i><br/><span class="float_right">Harry Wendt<br/>Head of E-Strategy, Westpac Bank</span>',
				'<i>As brokering business grows both in size and complexity, the need to understand key business drivers becomes imperative. Any tool that allows the managers of those businesses to focus more effectively is to be encouraged.</i><span class="float_right">Damian Percy<br/>General Manager Third Party Mortgages, Bendigo & Adelaide Bank</span>',
				'<i>The ATM monitor provides a holistic view of the changing ATM world and its impact on competitive banking i.e. branch and agent. We have been a retail subscriber to this single source for more than 8 years.</i><br/><span class="float_right">Terry Stephens<br/>GM Financial Services, Australia Post</span>',
				'<i>The MISC Broker Pool represents an industry wide commitment to ensuring industry transparency and statistical independence and the decision to join represents National and HomeSide\'s commitment to this industry.</i><br/><span class="float_right">Mike Lawrence<br/>Head of Origination, HomeSide</span>'];

/*
				'<i>As well as providing the only independent accurate measure of our group\'s channel share, the MISC Performance Seal lets us measure our real performance alongside our true aggregator competitors. Its six performance measures provide us with best practice goals that we can monitor as we strive to be better.</i><span class="float_right">Ray Hair<br/>Chief Executive, Plan Australia/Challenger Mortgage Management</span>',
*/
//begin with a random number between
var z = Math.floor(Math.random()*quoteArray.length);


function SetOpa(Opa) {
  element.style.opacity = Opa;
  element.style.MozOpacity = Opa;
  element.style.KhtmlOpacity = Opa;
  element.style.filter = 'alpha(opacity=' + (Opa * 100) + ');';
//  containerbg.style.opacity = Opa/alphaConstant;
//  containerbg.style.MozOpacity = Opa/alphaConstant;
//  containerbg.style.KhtmlOpacity = Opa/alphaConstant;
//  containerbg.style.filter = 'alpha(opacity=' + (Opa * 100 / alphaConstant) + ');';

}

function fadeOut() {
  for (i = 0; i <= 1; i += 0.01) {
    setTimeout("SetOpa(" + (1 - i) +")", i * duration);
  }
	setTimeout("fadeIn()", (duration + hidtime));
}

function fadeIn() {
  for (i = 0; i <= 1; i += 0.01) {
    setTimeout("SetOpa(" + i +")", i * duration);
  }
   if (z < quoteArray.length-1) {
   z++;
   changeQuote(z);
   setTimeout("fadeOut()", (duration + showtime));
   } else {
   z = 1;
   changeQuote(z);
   setTimeout("fadeOut()", (duration + showtime));
   }
}

function changeQuote(z) {
	var textbox = document.getElementById("newquote");
	textbox.innerHTML = quoteArray[z];
}
