// JavaScript Document

<!-- Paste this code into an external JavaScript file named: marquee.js  -->

/* This script and many more are available free online at
The JavaScript Source :: http://javascript.internet.com
Created by: Mike Hudson :: http://www.afrozeus.com */

function setupFadeLinks() {
	var i = 0;	

	arrFadeQuote[i] = "I just wanted to take this opportunity to thank you for the outstanding job you did on our website.<br />You won on all points.";
	arrFadeAuthor[i++] = "Marilyn & Sid Glover<br />Marilyn's Favorite Things";

	arrFadeQuote[i] = "I love how everything has came out and really excited to get this all going... I think it looks beautiful and I'm very thankful for the hard work you've put into it!";
	arrFadeAuthor[i++] = "Todd Sondgroth<br />You Should Quit";

	arrFadeQuote[i] = "I love my website and logo and business cards!!!";
	arrFadeAuthor[i++] = "Michelle Moyer<br />The Music In Motion";
	
	arrFadeQuote[i] = "Morgan Hill Web Works did a super job building our site. Easy to work with and delivered our web project on time and on budget. I highly recommend Morgan Hill Web Works to anyone needing a new or revised site.";
	arrFadeAuthor[i++] = "Eric Nielsen<br />Sunbelt";

	arrFadeQuote[i] = "You did a  such wonderful job!! It looks great! Thank you much.";
	arrFadeAuthor[i++] = "Christina De Vito<br />Baby Blossomzzz";

	arrFadeQuote[i] = "The website looks amazing.<br />I absolutely<br />love it.<br />You have done a great job.";
	arrFadeAuthor[i++] = "Katie Hogue<br />Le Dolce Day Spa";

	arrFadeQuote[i] = "My first impression was “WOW it’s bright!” but its growing on me.  It is visual! I like the way you used the gold from the logo throughout!";
	arrFadeAuthor[i++] = "Dave Rich<br />MicroAssignments, Inc.";

	arrFadeQuote[i] = "We are so happy to see the website turn out so beautifully.";
	arrFadeAuthor[i++] = "Kelly Alvernaz<br />Acquacures";
	
	arrFadeQuote[i] = "I cannot tell you how happy we are with the website and what a great job you did.";
	arrFadeAuthor[i++] = "Kathy Johnson<br />Jessica Johnson's Website<br />San Jose, CA";
	
	arrFadeQuote[i] = "You do very nice work in a professional manner.";
	arrFadeAuthor[i++] = "Gary Fitch<br />California Stand Offs<br />San Jose, CA";
	
	arrFadeQuote[i] = "I absolutely<br />love it!!<br />The colors, and the layout is awesome!!!";
	arrFadeAuthor[i++] = "Salina Flores<br />Retratos de Mexico Imports";
	
	arrFadeQuote[i] = "I'm loving the way this is turning out!<br />Thank you for all your hard work!";
	arrFadeAuthor[i++] = "Debbie Romero<br />True Make-up Artistry";

}

// You can also play with these variables to control fade speed, fade color, and how fast the colors jump.

var m_FadeOut = 255;
var m_FadeIn=0;
var m_Fade = 0;
var m_FadeStep = 3;
var m_FadeWait = 5000;
var m_bFadeOut = true;

var m_iFadeInterval;

//window.onload = Fadewl;

var arrFadeQuote;
var arrFadeAuthor;
var arrFadeCursor = 0;
var arrFadeMax;

function Fadewl() {
  m_iFadeInterval = setInterval(fade_ontimer, 10);
  arrFadeQuote = new Array();
  arrFadeAuthor = new Array();
  setupFadeLinks();
  arrFadeMax = arrFadeQuote.length-1;
  setFadeLink();
}

function setFadeLink() {
  var ilink = document.getElementById("fade_link");
  ilink.innerHTML = "<span class='q'>&#8220;</span>" + arrFadeQuote[arrFadeCursor] + "<span class='q'>&#8221;</span>" + "<div class='author'>" + arrFadeAuthor[arrFadeCursor] + "</div>";
}

function fade_ontimer() {
  if (m_bFadeOut) {
    m_Fade+=m_FadeStep;
    if (m_Fade>m_FadeOut) {
      arrFadeCursor++;
      if (arrFadeCursor>arrFadeMax)
        arrFadeCursor=0;
      setFadeLink();
      m_bFadeOut = false;
    }
  } else {
    m_Fade-=m_FadeStep;
    if (m_Fade<m_FadeIn) {
      clearInterval(m_iFadeInterval);
      setTimeout(Faderesume, m_FadeWait);
      m_bFadeOut=true;
    }
  }
  var ilink = document.getElementById("fade_link");
  if ((m_Fade<m_FadeOut)&&(m_Fade>m_FadeIn))
    ilink.style.color = "#" + ToHex(m_Fade);
}

function Faderesume() {
  m_iFadeInterval = setInterval(fade_ontimer, 10);
}

function ToHex(strValue) {
  try {
    var result= (parseInt(strValue).toString(16));

    while (result.length !=2)
            result= ("0" +result);
    result = result + result + result;
    return result.toUpperCase();
  }
  catch(e)
  {
  }
}






