/***********************************************
* Fading Scroller- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/

var delay = 3000; //set delay between message change (in miliseconds)
var maxsteps=60; // number of steps to take to change from start color to endcolor
var stepdelay=50; // time in miliseconds of a single step
//**Note: maxsteps*stepdelay will be total time in miliseconds of fading effect
var startcolor= new Array(0,0,0); // start color (red, green, blue)
var endcolor=new Array(0,0,0); // end color (red, green, blue)

var testimonial1=new Array();
begintag='<div>'; //set opening tag, such as font declarations
testimonial1[0]="<i>SPREE was the most successful show we have done to date. The attendees were our perfect target audience and came ready to buy.</i><br />Dawn Spisak, Name in the Frame";
testimonial1[1]="<i>The SPREE show is a MUST for anyone that wants to showcase their product to the Specialty Retail Professionals!</i><br />Mike Broker, BeeLean Extreme";
testimonial1[2]="<i>Best avenue open to us in Specialty Retail.</i><br />Michael Portelance, Allagazyke Imports Canada";
testimonial1[3]="<i>The SPREE show is a MUST for anyone that wants to showcase their product to the Specialty Retail Professionals!</i><br />Mike Broker , BeeLean Extreme";
testimonial1[4]="<i>This is THE show if you are in the Specialty Retail business - every year we make connections and meet new customers.</i><br />Steven Malkin, Fun Feet/Relaxus";
testimonial1[5]="<i>I have always been able to obtain at least holiday tenants from SPREE. This has been a great experience and the ability to network with other developers, entrepreneurs and merchants helps us to understand issues and concerns from all angles. </i><br />Arna Bobo, Steadfast Commercial Management Company";
testimonial1[6]="<i>SPREE offers an opportunity for the seasoned retail entrepreneur and the novice learning the industry. Very educational and fun experience.</i><br />Brian Tessitore";
testimonial1[7]="<i>With specialty retail growing as fast as it is, we need more shows and easier information. SPREE did just that. Other specialty retail organizations have given up on such a great revenue producing business, it is great to see SPREE has filled the gap. Thank You.</i><br />Linda Rienzo, Fremont Street Experience";
testimonial1[8]="<i>I really enjoyed attending. This was my first time and the options and opportunities were very good.</i><br />Karla Nieto, Body Expressions";
testimonial1[9]="<i>The SPREE show represents one of the few venues that is specific for our industry. It is great for startup companies and entrepreneurs who want to join the specialty retail industry</i><br />Sal Babbino, NYS Collection";
testimonial1[10]="<i>This was the first SPREE event that we ever exhibited at and I feel the results were fantastic. We even sold our kiosk right off the floor.</i><br />Mark Klockner, WOW Smile";
testimonial1[11]="<i>Participating in SPREE 2011 allowed See's Candies to get a great head-start on our holiday leasing.Ê We met a lot of new people and found great opportunities that will assist with our growth plans.Ê We are already booked to attend in 2012. </i><br />Kathleen A. Pelzman, Real Estate Manager, See's Candies";
testimonial1[12]="<i>My wife and I found a retail concept that we purchased. It ended up being our highest grossing product ever... in more than 25 years in the industry.</i><br />Gary Garabedian, Aah la Cart";
testimonial1[13]="<i>At SPREE 2011 we received instant sales, instant contacts, instant commitments, and instant success!</i><br />Carl Kennedy, Cellband.com";
testimonial1[14]="<i>We feel that the SPREE show creates a great opportunity for current or potential cart and kiosk operators to get one-on-one time to talk with the owners of wholesale companies.</i><br />Jonathan Hall & Kurt Brock, Roboelectronics";
testimonial1[15]="<i>The show was an effective way to meet and work with multiple developers in one venue! I look forward to next year!</i><br />Jen Millard, EVP Channels Zoom Systems";

closetag='</div>';

var fwidth='1000'; //set scroller width
var fheight='30px'; //set scroller height

var fadelinks=1;  //should links inside scroller content also fade like text? 0 for no, 1 for yes.

///No need to edit below this line/////////////////


var ie4=document.all&&!document.getElementById;
var DOM2=document.getElementById;
var faderdelay=0;
var index=0;


/*Rafael Raposo edited function*/
//function to change content
function changecontent3(){
  if (index>=testimonial1.length)
    index=0
  if (DOM2){
    document.getElementById("fscroller").style.color="rgb("+startcolor[0]+", "+startcolor[1]+", "+startcolor[2]+")"
    document.getElementById("fscroller").innerHTML=begintag+testimonial1[index]+closetag
    if (fadelinks)
      linkcolorchange(1);
    colorfade(1, 15);
  }
  else if (ie4)
    document.all.fscroller.innerHTML=begintag+testimonial1[index]+closetag;
  index++
}

// colorfade() partially by Marcio Galli for Netscape Communications.  ////////////
// Modified by Dynamicdrive.com

function linkcolorchange(step){
  var obj=document.getElementById("fscroller").getElementsByTagName("A");
  if (obj.length>0){
    for (i=0;i<obj.length;i++)
      obj[i].style.color=getstepcolor(step);
  }
}

/*Rafael Raposo edited function*/
var fadecounter;
function colorfade(step) {
  if(step<=maxsteps) {	
    document.getElementById("fscroller").style.color=getstepcolor(step);
    if (fadelinks)
      linkcolorchange(step);
    step++;
    fadecounter=setTimeout("colorfade("+step+")",stepdelay);
  }else{
    clearTimeout(fadecounter);
    document.getElementById("fscroller").style.color="rgb("+endcolor[0]+", "+endcolor[1]+", "+endcolor[2]+")";
    setTimeout("changecontent3()", delay);
	
  }   
}

/*Rafael Raposo's new function*/
function getstepcolor(step) {
  var diff
  var newcolor=new Array(3);
  for(var i=0;i<3;i++) {
    diff = (startcolor[i]-endcolor[i]);
    if(diff > 0) {
      newcolor[i] = startcolor[i]-(Math.round((diff/maxsteps))*step);
    } else {
      newcolor[i] = startcolor[i]+(Math.round((Math.abs(diff)/maxsteps))*step);
    }
  }
  return ("rgb(" + newcolor[0] + ", " + newcolor[1] + ", " + newcolor[2] + ")");
}

if (ie4||DOM2)
  document.write('<div id="fscroller" style="border:0px solid black;width:'+fwidth+';height:'+fheight+'"></div>');

if (window.addEventListener)
window.addEventListener("load", changecontent3, false)
else if (window.attachEvent)
window.attachEvent("onload", changecontent3)
else if (document.getElementById)
window.onload=changecontent3

