// JavaScript Document


/***********************************************
* 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 = 5000; //set delay between message change (in miliseconds)
var maxsteps=30; // number of steps to take to change from start color to endcolor
var stepdelay=40; // time in miliseconds of a single step
//**Note: maxsteps*stepdelay will be total time in miliseconds of fading effect
var startcolor= new Array(255,153,0); // start color (red, green, blue)
var endcolor=new Array(0,0,0); // end color (red, green, blue)

var fcontent=new Array();
begintag='<div style="font: bold 11px Arial; text-align:center; height:40px;">'; //set opening tag, such as font declarations
fcontent[0]="&#8220;The 4 days were far more than I could have ever hoped for, I loved all of it. But discovering who I really am, the power I have within me now was amazing. In short - a thunderbolt hit me! &#8221; SHARON McGLINCHEY";
fcontent[1]="Flow Ryan, purchased the Homestudy at the end of December 2006, and is implementing the Andrew Dimitri Strategy. In her first month of trading she made $1500, and in her 2nd month she made $7500.";
fcontent[2]="I attended the March Gold Coast 2006 seminar. It was mind blowing. I got equity from my home and with using trading strategies created $80,000 plus in the first two months and continuing to grow!";
fcontent[3]="22 year old attended Mark Rolton's Property Options Seminar with 21CA last Nov 2006 and decided to take advantage of joint venture opportunities offered to all students and brought a deal to the Mark 4 months later that has transpired into a $1.1 Million personal profit to the 22 year old student with zero capital outlay.";
fcontent[4]="&#8220;I've more than replaced both mine and my wife's incomes using these strategies. I'm spending most of my time learning how to trade better and on the look out for other income streams, as well as helping others where I can.&#8221; ONLINE MONEY MAKERS";
fcontent[5]="&#8220;Hi Michael here, I just did my second trade I sold XXX @ $14.00 and received $0.45c, I did 2 contracts (1 leveraged) and received $820.00 after fees, that's approx 3.5%, same as last month. EASY MONEY! That's one month's home loans repayments for nothing, I love it.&#8221;";
fcontent[6]="&#8220;Jamie opened up our minds to things we didn't think were possible, and we have taken his teachings and created our own investment Strategies for both the Stock Market &amp; Property Investments, which have propelled us to wealth and a lifestyle we only dreamed of before!&#8221; ANDREW DIMITRI";
fcontent[7]="&#8220;I watched the free DVD that this site handed out. I found it very helpful and made $15,000 on a property in only 2 months.This is a truly inspirational DVD and I recommended it to all.&#8221;  Thanks. CHARLIE";
fcontent[8]="&quot;Thank you for giving me this opportunity and helping me to grow and learn as a person. Words don't quite explain the gratitude I feel for what you have done. I hope one day I will be able to show you my appreciation&quot;.";
fcontent[9]="&#8220;I am over 60 years and have been taken to places I didn't know. This has helped me to have the confidence to take the first step to help me to retire. Thank you Jamie and 21st Century Academy.&#8221;  W.G FITZGERALD";
fcontent[10]="Thierry started investing with $10K and over the past four months has successfully traded his way to currently having $17K in his trading bank. He has two kids and he lives in Gosford. THIERRY COMARMOND";
closetag='</div>';

var fwidth='720px'; //set scroller width
var fheight='35px'; //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 changecontent(){
  if (index>=fcontent.length)
    index=0
  if (DOM2){
    document.getElementById("fscroller").style.color="rgb("+startcolor[0]+", "+startcolor[1]+", "+startcolor[2]+")"
    document.getElementById("fscroller").innerHTML=begintag+fcontent[index]+closetag
    if (fadelinks)
      linkcolorchange(1);
    colorfade(1, 15);
  }
  else if (ie4)
    document.all.fscroller.innerHTML=begintag+fcontent[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("changecontent()", 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="width:'+fwidth+';height:'+fheight+'"></div>');

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