function initQuote(){
	var quoteField = document.getElementById('js-quote');
	var authorField = document.getElementById('js-author');
	
	var quote_arr = [
        'This is the best UI in the GPS industry!',
        'I was very pleased with the work that Areteworks did for us; they are a very talented creative and hardworking organization.',
        'Areteworks delivered a compelling and complete solution, from the product vision to the UI and graphics definition.',
		'Areteworks has been working closely with Magellan Navigation Inc. on our key User Interface programs for past few years. With their extensive knowledge of the field, professionalism, and ability to work closely with our marketing and firmware teams, Arete&#39;s team has been able to provide us with high quality services in creating world class solutions for our Vehicle Navigation and Outdoor products.',
		'Areteworks worked with our engineering staff to develop an understanding of the basic workflows for our new medical product. Then,in conjunction with our clinical and technical teams, worked with our customers to further refine the workflows and gain valuable feedback with regard to user preferences for displays and controls. Areteworks contribution was invaluable to the successful launch of our new products user interface.',
		'Kudos to the graphic designers! Areteworks is a very talented and professional team that helped us with our latest demos.',
		'Areteworks produce work that is unmatched in quality and thoroughness in the UI industry.',
		'Areteworks approach to developing UI is very thorough and impressive.',
		'Steven communicated extremely well at all phases of the project and his approach to developing UI is very thorough.',
		'I have no hesitation whatsoever recommending Areteworks.',
		'The look and feel of the graphics and UI that Areteworks delivered is easily among the best out there.', 
		 'Incredible! Your Designers surpassed our expectations.',
		 'Areteworks team was able to provide high quality service and a state of the art UI solution.',
		 'Your upgraded our product tremendously.',
		 'I am beyond pleased with the work your team did for us.'
		

	];
    var author_arr = [
		'<strong>- Apple Evangelist</strong>',
		'<strong>- Director of Engineering<br />  WaveTec Corp.</strong>',
		'<strong>- Senior Product Manager<br />  Magellan Navigation Inc.</strong>',
		'<strong>- Magellan Navigation Inc.</strong>',
		'<strong>- Medrad</strong>',
		'<strong>- Swell Software</strong>',
		'<strong>- HemisphereGPS</strong>',
		'<strong>- Invensys</strong>',
		'<strong>- MobileStorm</strong>',
		'<strong>- HemisphereGPS</strong>',
		'<strong>- Medrad</strong>',
		'<strong>- Sony</strong>',
		'<strong>- WaveTec</strong>',
		'<strong>- TSC</strong>',
		'<strong>- Panasonic</strong>'

	];
	

        setOpacity(quoteField, 0);
        setOpacity(authorField, 0);
	var quoteRandom = Math.floor( ( quote_arr.length ) * Math.random() );
	if(quoteField && authorField){
          quoteField.innerHTML = quote_arr[quoteRandom];
          authorField.innerHTML = author_arr[quoteRandom];
	};     
	
       unfadeText(quoteField, quote_arr[quoteRandom]);
       unfadeText(authorField, author_arr[quoteRandom]);
       setTimeout("initQuote()",10000);

};
function rotateText(el, textGroup) {
  setOpacity(el, 0);
  var t = rotateText.texts[textGroup];
  var t = t[Math.floor(Math.random() * (t.length - 1))];
  el.innerHTML = t;
  unfadeText(el, textGroup);
}

function setOpacity(el, value) {
  el.style.opacity = value / 100;
  el.style.filter = "alpha(opacity=" + value + ")";
}

function unfadeText(el, tg) {
  var v = el.style.opacity * 100 + 1;
  if(v > 100) {
    setOpacity(el, 100);
    setTimeout(bundleFunction(null, fadeText, [el, tg]), 5000);
    return;
  }
  setOpacity(el, v);
  setTimeout(bundleFunction(null, unfadeText, [el, tg]), 10);
}

function fadeText(el, tg) {
  var v = el.style.opacity * 100 - 1;
  if(v < 0) {
    setOpacity(el, 0);
    rotateText(el, tg);
    //or... setTimeout(bundleFunction(null, rotateText, [el, tg]), NUMBER);
    return;
  }
  setOpacity(el, v);
  setTimeout(bundleFunction(null, fadeText, [el, tg]), 10);
}

function bundleFunction(context, func, args) {
  context = context || null;
  if(typeof func == "string" && context)
    func = context[func];
  if(!args)
    args = [];
  else if(!(args instanceof Array))
    args = [args];
  return function() {
    return func.apply(context, args);
  };
}


