var textIndex = -1;
var textsCollection;
var textTimer;
function carouselClick(i)
{
 i = parseInt(i);
 window.clearTimeout(textTimer);
 displayText(i);
 textTimer = window.setTimeout(advanceText, 13000);
}
function displayText(i)
{
 textsCollection.hide();
 jQuery('#text'+i).fadeIn(100);
 textIndex = i;
}  
var timer_delay = 13000;
function advanceText()
{
 if ((textIndex+1) == textsCollection.length)
 {
  textIndex = -1;
 }
 displayText(textIndex+1);
 textTimer = window.setTimeout(advanceText, timer_delay);
 if (timer_delay != 10000) timer_delay = 10000;
}
if (AC_FL_RunContent == 0)
{
 alert("This page requires AC_RunActiveContent.js.");
}
else
{
 AC_FL_RunContent(
  'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0',
  'width', '550',
  'height', '370',
  'src', 'carousel',
  'quality', 'high',
  'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
  'align', 'middle',
  'play', 'true',
  'loop', 'true',
  'scale', 'noScale',
  'wmode', 'transparent',
  'devicefont', 'false',
  'class', 'classCarousel',
  'menu', 'true',
  'allowFullScreen', 'false',
  'allowScriptAccess','sameDomain',
  'movie', 'carousel',
  'salign', ''
 );
}