﻿
/***********************************************
* OO Fading Scroller- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Modified in http://www.dynamicdrive.com/forums for multiple use OO scripting
* by John Davenport Scheuer username:jscheuer1
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for TOS source code
***********************************************/

var fcontent=new Array();
fcontent.begintag=''; //set opening tag, such as font declarations
fcontent[0]="Welcome to SPREE 2012! The only FREE show for specialty retail entrepreneurs in the world!";
fcontent[1]="ברוכים הבאים לתערוכת ספרי 2012! הכנס החינמי היחיד במינו עבור תעשיית הדוכנים בעולם";
fcontent[2]="欢迎来到 SPREE 2012! 世界唯一为专业零售企业家的免费展览!";
fcontent[3]="Bienvenue à la Spree 2012! Le spectacle gratuit seulement pour les entrepreneurs spécialisés de vente au détail dans le monde!";
fcontent[4]="Bienvenido a SPREE 2012! La exhibición gratuita sólo para los empresarios minoristas de especialidad en el mundo!";
fcontent[5]="Welkom op de Spree 2012! De enige gratis spektakel voor ondernemers gespecialiseerde kleinhandel in de wereld!";
fcontent[6]="مرحبا بكم في فورة 2012! عرض مجانية فقط لرجال الأعمال تخصص تجارة التجزئة في العالم! العالم!";
fcontent.closetag='';
fcontent.delay = 2500; //set delay between message change (in miliseconds)
fcontent.maxsteps=60; // number of steps to take to change from start color to endcolor
fcontent.stepdelay=40; // time in miliseconds of a single step
//**Note: maxsteps*stepdelay will be total time in miliseconds of fading effect
fcontent.startcolor= new Array(0,0,0); // start color (red, green, blue)
fcontent.endcolor=new Array(204,51,51); // end color (red, green, blue)
fcontent.fwidth='377px'; //set scroller width
fcontent.fheight='20px'; //set scroller height
fcontent.fadelinks=1;  //should links inside scroller content also fade like text? 0 for no, 1 for yes.
fcontent.pause=1;  //should scroller pause onmouseover? 0 for no, 1 for yes.
fcontent.border='0' //set border if desired (defaults to 1px solid black)



var fcontent2=new Array();
fcontent2.begintag=''; //set opening tag, such as font declarations
fcontent2[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<p><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";
fcontent2[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<p><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";
fcontent2[2]="<i>Best avenue open to us in Specialty Retail.</i><br />Michael Portelance, Allagazyke Imports Canada<p><i>I strongly recommend that if you are a retailer, wholesaler or shopping center representative that you participate in this event.</i><br />Robert Meirovich, Seacret Spa";
fcontent2[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<p><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";
fcontent2[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<p><i>The SPREE shows have provided a great opportunity for us to network with current and prospective clients. We have obtained several large accounts through the SPREE networking events. </i><br />Randy Jumper, Arizona Central Insurance";
fcontent2[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<p><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";
fcontent2[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<p><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";
fcontent2[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<p><i>I really enjoyed attending. This was my first time and the options and opportunities were very good.</i><br />Karla Nieto, Body Expressions";
fcontent2.closetag='';
fcontent2.delay = 3000; //set delay between message change (in miliseconds)
fcontent2.maxsteps=60; // number of steps to take to change from start color to endcolor
fcontent2.stepdelay=50; // time in miliseconds of a single step
//**Note: maxsteps*stepdelay will be total time in miliseconds of fading effect
fcontent2.startcolor= new Array(0,0,0); // start color (red, green, blue)
fcontent2.endcolor=new Array(0,0,0); // end color (red, green, blue)
fcontent2.fwidth=''; //set scroller width
fcontent2.fheight=''; //set scroller height
fcontent2.fadelinks=0;  //should links inside scroller content also fade like text? 0 for no, 1 for yes.
fcontent2.pause=0;  //should scroller pause onmouseover? 0 for no, 1 for yes.
fcontent2.border='0'; //set border if desired (defaults to 1px solid black)
fcontent2.pausebetween=1000;  //optional added delay (shows blank space) between messages (in milliseconds)
fcontent2.delay_before_start=10000  //optional added delay (shows first message) before start (in milliseconds)

///////////////////// Stop Editing /////////////////////

function fade_scroller(content){
if(!document.getElementById)
return;
if(!fade_scroller.ar)
fade_scroller.ar=[];
fade_scroller.ar[this.fsid=fade_scroller.ar.length]=this;
this.content=content;
this.index=0;
  document.write('<div id="fscroller'+this.fsid+'" style="color:rgb('+content.endcolor.join(',')+');border:'+(content.border? content.border : '1px solid black')+';width:'+content.fwidth+';height:'+content.fheight+'">'+content.begintag+content[0]+content.closetag+'</div>');
  if(this.content.pause){
  var sdiv=document.getElementById('fscroller'+this.fsid);
  var cacheobj=this;
  sdiv.onmouseover=function(){cacheobj.pausing=1;};
  sdiv.onmouseout=function(){cacheobj.pausing=0;};
  }
if(content.delay_before_start){
this.index=1;
this.playing=true;
var cacheobj=this;
setTimeout(function(){cacheobj.changecontent();}, content.delay_before_start);
}
else
this.changecontent();
}

/*Rafael Raposo edited function*/
//function to change content
fade_scroller.prototype.changecontent=function (){
var cachobj=this;
if(this.pausing){
setTimeout(function(){cachobj.changecontent();}, 300);
return;
}
  if (this.index>=this.content.length)
    this.index=0
    document.getElementById('fscroller'+this.fsid).style.color="rgb("+this.content.startcolor[0]+", "+this.content.startcolor[1]+", "+this.content.startcolor[2]+")"
    document.getElementById('fscroller'+this.fsid).innerHTML=this.content.begintag+this.content[this.index]+this.content.closetag
    if (this.content.fadelinks)
      this.linkcolorchange(1);
    else if(this.playing&&this.content.pausebetween)
      this.linkhide('hidden');
setTimeout(function(){cachobj.colorfade(1);}, this.playing&&this.content.pausebetween? this.content.pausebetween : 0);
this.playing=true;
  this.index++
}

fade_scroller.prototype.linkhide=function(state){
  this.obj=document.getElementById('fscroller'+this.fsid).getElementsByTagName('a');
    if (this.obj.length>0)
    for (var i=0;i<this.obj.length;i++)
      this.obj[i].style.visibility=state;
}
// colorfade() partially by Marcio Galli for Netscape Communications.  ////////////
// Modified by Dynamicdrive.com

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

/*Rafael Raposo edited function*/

fade_scroller.prototype.colorfade=function (step) {
if(!this.content.fadelinks&&this.playing&&this.content.pausebetween)
this.linkhide('');
    var cacheobj=this
  if(step<=this.content.maxsteps) {
    document.getElementById('fscroller'+this.fsid).style.color=this.getstepcolor(step);
    if (this.content.fadelinks)
      this.linkcolorchange(step);
    this.step=step+1;
    this.fadecounter=setTimeout(function(){cacheobj.colorfade(cacheobj.step);},this.content.stepdelay);
  }else{
    clearTimeout(this.fadecounter);
    document.getElementById('fscroller'+this.fsid).style.color="rgb("+this.content.endcolor[0]+", "+this.content.endcolor[1]+", "+this.content.endcolor[2]+")";
    setTimeout(function(){cacheobj.changecontent();}, this.content.delay);
	
  }   
}

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

