var q=0;
var currentquote=1;
var quote=new Array();
var counter=1;

//document.write( document.URL );

var searchStr = /clang=1/;
if( document.URL.search( searchStr ) != -1 )
{
	quote[q++]="Great Performance, everybody loved it! We can highly recommend.";
	quote[q++]="Now we have a problem - how can we top <b>this</b> next year?";
	quote[q++]="Thanks to your fascinating show our product was presented in an easily understandable way.";
	quote[q++]="The LED-Show was decisively involved that ENTEGA Service won the silver medal at the Connect Award!";
	quote[q++]="Prof. Dr. Rita Süßmuth: This was great, thank you very much!";
	quote[q++]="One of a kind, right to the point.";
	quote[q++]="Those guys are innovation in perfection!";
	quote[q++]="The guests loved the event, and the ARTmos act contributed to that.";
	quote[q++]="Thank you for the wonderful performance! That was the icing on the cake!";
	quote[q++]="Your show...amazing!";
	quote[q++]="...Bursting with energy, fast, surprising - a unique show!";
	quote[q++]="Thank you so much for the great cooperation and for the exciting and astounding performances! We enjoyed having guest like ARTmos and shows like the LED-Show!";
	quote[q++]="First I had scruple, but the reaction of the audience brought me around.";
	quote[q++]="You put our ideas into practice perfectly...the show was an excellent transition to our workshops afterwards and our staff was enthusiastic!";
	quote[q++]="You amazed and surprised our staff, even convinced our toughest skeptic.";
	quote[q++]="Thanks to your diversified and entertaining show our event was a full success! Especially the individual elements for Arminia Bielefeld to which the viewers could relate.";
	quote[q++]="Your show was a real highlight and was performed with true talent.";
}
else
{
	quote[q++]="Super Show, es hat allen toll gefallen. Wir können Sie nur weiterempfehlen.";
	quote[q++]="Jetzt haben wir ein Problem - wie sollen wir <b>das</b> nächstes Jahr noch steigern?";
	quote[q++]="Sie haben mit Ihrer faszinierenden Show unsere Produkte einfach, verständlich und klar kommuniziert.";
	quote[q++]="Die LED-Show war maßgeblich daran beteiligt, dass ENTEGA Service die Silbermedaille beim Connect Award gewinnen konnte!";
	quote[q++]="Prof. Dr. Rita Süßmuth: Das war großartig, danke schön!";
	quote[q++]="Einzigartig, auf den Punkt und themenbezogen.";
	quote[q++]="Die Jungs sind Innovation in Perfektion!";
	quote[q++]="Die Veranstaltung ist bei den Gästen super angekommen, wozu der Artmos-Auftritt wesentlich beigetragen hat.";
	quote[q++]="Vielen Dank für Ihren wunderschönen Auftritt. Sie haben damit das berühmte i-Tüpfelchen gesetzt!";
	quote[q++]="Ihre Show... Wahnsinn!";
	quote[q++]="...energiegeladen, schnell, überraschend - eine einmalige Show!";
	quote[q++]="Vielen herzlichen Dank für die gute Zusammenarbeit und für die spannenden und verblüffenden Auftritte. Solche Gäste wie ARTmos und solche Shows wie die LED-Show haben wir gerne präsentiert.";
	quote[q++]="Nach anfänglichen Bedenken bin ich von der Publikumswirkung nun absolut positiv überrascht.";
	quote[q++]="Sie haben unsere Ideen perfekt umgesetzt...Die Show war eine hervorragende Überleitung zu unseren im Anschluss stattfindenden Workshops und unsere Mitarbeiter waren begeistert";
	quote[q++]="Sie haben unsere Mitarbeiter/innen in den Bann gezogen und auch unseren letzten Skeptiker überzeugt.";
	quote[q++]="Mit Ihrer abwechslungsreichen und unterhaltsamen Show haben Sie zum Gelingen unserer Veranstaltung beigetragen. Besonders schön waren die individuell auf Arminia Bielefeld zugeschnittenen Elemente in Ihrer Vorstellung, mit denen der Zuschauer sich sofort identifizieren konnte.";
	quote[q++]="Ihre LED-Show war einer der Höhepunkte des Tages und mit einem wahren Können aufgeführt.";
}

function d2h(dec) { return dec.toString(16);}
function h2d(hex) { return parseInt(hex,16);}
function rgb2h(r,g,b) { return [d2h(r),d2h(g),d2h(b)];}
function h2rgb(h,e,x) {return [h2d(h),h2d(e),h2d(x)];}
function cssColor2rgb(color) {
     if(color.indexOf('rgb')<=-1) {
  return h2rgb(color.substring(1,3),color.substring(3,5),color.substring(5,7));
     }
 var color=color.substring(1,4);
 increase=color.substring(color.length-1);
 return increase.split(',');

}


function animateColor(elm,begin,end, duration, fps) {

  if(!duration) duration = 1000;
  if(!fps) fps = 20;
  duration=parseFloat(duration);
  fps=parseFloat(fps);
  var interval    = Math.ceil(1000/fps);
  var totalframes = Math.ceil(duration/interval);

  for(i=1;i <= totalframes;i++) {
                 (function() {
                   var frame=i;
                   var b = cssColor2rgb(begin);
                   var e  = cssColor2rgb(end);
                   var change0=e[0]-b[0];
                   var change1=e[1]-b[1];
                   var change2=e[2]-b[2];

                  function color() {
                  var increase0=ease(frame, b[0], change0, totalframes);
                  var increase1=ease(frame, b[1], change1, totalframes);
                  var increase2=ease(frame, b[2], change2, totalframes);

    elm.style['color']  = 'rgb('+parseInt(increase0)+','+parseInt(increase1)+','+parseInt(increase2)+')';        
                  }
                  timer = setTimeout(color,interval*frame);
                 })(); 
 }
}

function ease(frame,begin,change,totalframes) {
       return begin+change*(frame/totalframes);
}

var currentInterval = window.setInterval("showquote()",6000);

function showquote() {

	var colbuffer=document.getElementById('Zitatticker');
  animateColor(colbuffer,'#ffffff','#2a2f36',1000,20);

  window.clearInterval( currentInterval );
	currentInterval = window.setInterval("showquote2()",1000);

  
}

function showquote2() {
  
	var colbuffer=document.getElementById('Zitatticker');
  colbuffer.innerHTML=quote[currentquote++];
  if (currentquote>=q) {
    currentquote=0;
  }
  animateColor(colbuffer,'#2a2f36','#ffffff',250,20);

  window.clearInterval( currentInterval );
	currentInterval = window.setInterval("showquote()",5000);

}


