if (document.all || document.getElementById){ //if IE4 or NS6+
   document.write('<style type="text/css">\n')
   document.write('.dyncontent{display:none; width:120px; height:220px; font-family:Times New Roman;}\n')
   document.write('</style>')
}

var curcontentindex=0
var messages=new Array()

function getElementByClass(classname){

   var inc=0
   var alltags=document.all? document.all : document.getElementsByTagName("*")

   for (i=0; i<alltags.length; i++){
      if (alltags[i].className==classname)
      messages[inc++]=alltags[i]
   }

}

function rotatecontent(){

   //get current message index (to show it):
   curcontentindex=(curcontentindex<messages.length-1)? curcontentindex+1 : 0

   //get previous message index (to hide it):
   prevcontentindex=(curcontentindex==0)? messages.length-1 : curcontentindex-1

   messages[prevcontentindex].style.display="none" //hide previous message
   messages[curcontentindex].style.display="block" //show current message

   messages[prevcontentindex].id=""     // reset fader id
   messages[curcontentindex].id="fader" // set fader id
   fadetext()

}


function rotatetestimonials(){

   if (document.all || document.getElementById){
      getElementByClass("dyncontent")
      setInterval("rotatecontent()", 10000)
      fadetext()
   }

}


// Fades text with the "fader" id

hex=255 // Initial color value.

function fadetext(){
   if(hex>0) { //If color is not black yet
      hex-=11; // increase color darkness
      document.getElementById("fader").style.color="rgb("+hex+","+hex+","+hex+")";
      setTimeout("fadetext()",100);
   }
   else
      hex=255 //reset hex value
}

