/***********************************************
* 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 = 10000; //set delay between message change (in miliseconds)
var maxsteps=50; // 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,255,255); // 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: normal 11px verdana; padding:7px 0px;">'; //set opening tag, such as font declarations
fcontent[0]='\"I wanted to let you know that it was a pleasure working with Karen (Schulte) Daubs.   Karen brings the term professional to the next level.  She was very considerate of my time, always punctual, and in control of every situation.  On top of all of that she is very sincere and genuine.  Working with Karen is like having a partner in your corner.   My interview experience was very successful and Karen (Schulte) Daubs was a major factor to that success.  I would not hesitate to recommend Karen and Management Recruiters of Cedar Rapids at Cedar Rapids.\"<br />- <strong><em>Financial Services Professional</em></strong>';
fcontent[1]='\"I just wanted to thank you for your exceptional service and positive attitude.  Working with you was the best experience I\'ve had in dealing with a recruiting firm.\"<br />- <strong><em>Financial Services Professional</em></strong>';
fcontent[2]='\"Just wanted to thank you for putting me in touch with our new wholesaler. As you know, he is on his way to Boston right now for new hire training.  How about that...one-for-one!! Thanks a lot.  I look forward to working with you more in the future.\"<br />- <strong><em>Divisional Sales Manager</em></strong>';
fcontent[3]='\"Thanks for all of the work you have done for me and your great ideas and considerations.  You have been the best recruiter with whom I have had the pleasure to work.\"';
fcontent[4]='\"Karen,<br />I can\'t thank you enough for all you\'ve done.  If it weren\'t for your efforts, this would not have happened.  Thank you for paving the way and most importantly for believing in me.  You have no idea how positively this will impact my life and what a world of difference it makes.  You have definitely found your calling and am very blessed to have had you in my corner.\"<br />- <strong><em>Financial Services Professional</em></strong>';
fcontent[5]='\"It has been such a pleasure working with you thus far.  You seem like such a wonderful person and someone I feel proud to associate with.  Your genuine nature and friendly professionalism exude in your personality and I am so glad my colleague sent me your information!\"<br />- <strong><em>Financial Services Professional</em></strong>';
fcontent[6]='\"Karen Daubs is a sharp lady with a skill set not found in most recruiters.  She has a stronger business sense than industry peers, and that means she\'s a more formidable ally in the search process.  We had some problems with the target company\'s point person, but Karen stayed on top of things and got the job done and produced the offer.\"<br />- <strong><em>Financial Services Professional</em></strong>';
fcontent[7]='\"Throughout the entire process Karen kept me up to date on an almost daily basis without me prompting the call, she prepared me for each interview, and made herself available (literally) day or night.  Because of Karen\'s hard work she helped me get an opportunity of a lifetime.  It is not often that you get to work with someone who is far superior to others in their field, someone who makes a stressful and relatively unpleasant even, (i.e. Finding a new job) enjoyable and exciting.  In working with Karen, that is exactly what she did.\"<br />- <strong><em>Financial Services Professional</em></strong>';
fcontent[8]='\"It has been such a pleasure working with you thus far.  You seem like such a wonderful person and someone I feel proud to associate with.  Your genuine nature and friendly professionalism exude in your personality and I am so glad my colleague sent me your information!\"<br />- <strong><em>Financial Services Professional</em></strong>';
fcontent[9]='\"It has been such a pleasure working with you thus far.  You seem like such a wonderful person and someone I feel proud to associate with.  Your genuine nature and friendly professionalism exude in your personality!\"<br />- <strong><em>Regional Vice President</em></strong>';
fcontent[10]='\"Thanks Karen, You are awesome at your job! I appreciate how much you keep in contact and update me every step of the way. You are The BEST!\"<br />- <strong><em>Marketing Executive</em></strong>';
fcontent[11]='\"I am sending you a quick note to thank you for getting me together with my new job and for your support and guidance.  This has been a great experience, and really the best experience I have had with a search firm.  When this is all over, I am going to take you to lunch.\"<br />- <strong><em>Insurance Sales and Marketing Professional</em></strong>';
fcontent[12]='\"Thank you!  You are making a difficult time seem enjoyable.  You are the most professional and personable recruiter I am working with.\"<br />- <strong><em>Insurance Sales and Marketing Professional</em></strong>';
fcontent[13]='\"We\'ve been impressed with how quickly you have embraced our firm\'s needs.  From all levels I have rec\'d very positive feedback about you.  I look forward to working with our new Director of Marketing, Fee Based Programs.  Take care.\"<br />- <strong><em>President and Chief Operating Officer, Top-tier Independent Broker/Dealer specializing in fee-based advisory solutions</em></strong>';
fcontent[14]='\"Karen introduced herself to our firm just a few short months ago.  We had two senior level positions to fill and Karen went to work on them right away.  She started by collecting detailed information about the positions and what the hiring managers were looking for.<br><br>She nailed one of those positions already, presenting quality, viable candidates for us to interview.  We are pleased that one of those candidates was recently offered that position and will be starting with us in the very near future.<br><br>Karen\'s positive and professional approach is evidence that your company values quality service.  I always welcome Karen\'s input because of the finesse she uses when communicating with me- she is top shelf!<br><br>We look forward to continuing our business relationship with MRI Network as we continue to grow!\"<br />- <strong><em>Assistant VP, Human Resources<br>Top-tier Independent Broker/Dealer specializing in fee-based advisory solutions</em></strong>';
closetag='</div>';
fcontent[15]='\"Karen Daubs of MRINetwork created a unique partnership level experience in serving the recruiting needs of NFP Securities. Her tireless approach to understanding every nuance of our senior level staffing needs truly separated her from the pack. In addition to introducing us to qualified leads, Karen was focused on making sure candidates would be a good cultural fit for our organization. We appreciate her approach, her process and the results that she created.\"<br />- <strong><em>James L. Poer<br>President, NFP Securities, Inc.</em></strong>';
closetag='</div>';

var fwidth='400px'; //set scroller width

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;


function getIndex() {
	var range = fcontent.length;
	var ph = Math.floor(Math.random() * range);
	return ph;
}

/*Rafael Raposo edited function*/
//function to change content
function changecontent(){
	
  index=getIndex();

  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);
  }
  else if (ie4) {
    document.all.fscroller.innerHTML=begintag+fcontent[index]+closetag;
  }

  /*
  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);
  }
  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("colorfadeout(maxsteps)", delay);
	
  }   
}

var fadecounter2;
function colorfadeout(step) {
  if(step>=0) {	
    document.getElementById("fscroller").style.color=getstepcolor(step);
    if (fadelinks)
      linkcolorchange(step);
    step--;
    fadecounter2=setTimeout("colorfadeout("+step+")",stepdelay);
  }else{
    clearTimeout(fadecounter2);
    document.getElementById("fscroller").style.color="rgb("+endcolor[0]+", "+endcolor[1]+", "+endcolor[2]+")";
	changecontent();
    //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] + ")");
}

function fadeText() {
	if (ie4||DOM2)
	  document.write('<div id="fscroller"></div>');

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