/*
SCOTT!!! 

READ ALL OF MY NOTES BEFORE YOU START ADDING OR CHANGING QUOTES!!!

Be careful if you start cutting and pasting from Word or NotePad.
Carrige returns are *hidden* characters and will break the script.
You can copy and paste, but delete the carrige returns and replace
them with one or more <br />.

Different Browsers read *special* characters differently, for 
example slanted quotes or apostrophies may be shown as a block
and not the character expected.  Remove these characters and 
retype them in Dreamweaver code view, or whatever ASCII program
you use (non-formatted!!!!).

If one of your quotes actually uses a quotation mark you 
have to prefix it with a \.  ie. "Ken is a \"Great\" programmer." will
work but "Ken is an "Awsome" dude." will break the script.

You can use common HTML tags in the quotes but remember to use the \
infront of quotes.  ie.:
<strong>BOLD TEXT</strong>
<u>UNDERLINED TEXT</u>
<em>ITALIC TEXT</em>
<font color=\"red\">RED COLOR TEXT</font> (remember the \ before quotes)
<a href=\"http://www.google.com\" target=\"_blank\">NEW PAGE LINK TO GOOGLE.COM</a>

Be careful not to break the syntax when you update the quotes.
IT HAS TO BE:
.....................
quotes: [

"First quote... use <br /> for carrage returns",

"etc, etc...",

"Last quote... this quote cannot have a comma after it"

]
.....................

So, each quote has to start with a    "    and end with a    ",   
and the last quote does not have a comma.  Because this is random
you can just put new quotes at the top so you don't forget the no comma part.

If you want to change how fast the quotes rotate, you will need to find this line:

"setTimeout(bundleFunction(null, fadeText, [el, tg]), 10000);"

(there is only 1 of them) Change the 10000 (10 sec.) to whatever you want.  Only
change the numbers and not any of the code surrounding it.

Add the new quotes below... Have fun dude!  Let's hang soon!!!
*/

rotateText.texts = {
quotes: [
		 
" \"Our web site carries the Moving America Forward program on the front page and has received significant positive feedback from homeowners and our nationwide dealer base. The show profiled Leisure Pools in a favorable light and also adds to the credibility of the entire fiberglass pool industry.\" <br /><br />Ashley Gill<br />CEO<br />Leisure Pools",

"\"We announced the Moving America Forward broadcast to our clients and prospects and received tremendous response. We've made it available on our website and continue to promote it through our email signatures, e-newsletters, and social media outlets and continue to track regular click throughs.\"<br /><br />Amy C. Levitt<br />Huthwaite, Inc.",

"\"The program is being used on our web site to promote the way we do business and our commitment and belief in the USA market.\"<br /></br>Regards,<br /><br />Brett Haysom <br />C.E.O.<br />Point To Point Technology USA, Inc. ",

"\"Being involved with Moving America Forward has been a very valuable experience for our company.  The Moving America Forward video has brought our products international exposure, and we are on the verge of going global.\"<br /><br /> Janeen Anderson<br />Game Production Services", 

"\"Rosa's Horchata has been very pleased with the response it has received from its episode of Moving America Forward.Currently the show has been uploaded to You Tube and it is been used to attract investors. As a marketing driven company, this strategy is effective for Rosa's as it shows how the company is effectively using a marketing asset to achieve an early stage goal.\" <br /><br />Steven G. Fox<br />Rosa's Horchata",

"\"I am very pleased how this production came out. We will be sending a copy to all our customer base to enhance their understanding of our services, will use it in our trade show exhibits to attract new clients and enhance our credibility along with utilizing it for advertising purposes.\" <br /><br />Harlan Kirschner</br>President</br>The Kirschner Group Inc.",

"\"I am an entrepreneur who created a revolutionary barter bank that enables businesses to increase their spending power by 25%, reduce inventory, and increase their cash customers and thanks to the credibility of William Shatner and the Moving America Forward program I have been able to succeed and at the same time move our country forward.\" <br /><br />Alex Kanakaris</br>Global Barter Banc",

"\"We're currently utilizing the show by streaming it on our websites and by giving it to perspective customers as a promotional DVD sample.  Mr. Shatner's personal endorsement and the professional coverage from the show itself are great tools for demonstrating legitimacy and creating desire in our product.\" <br /><br />Mike Ballway</br>Resource Partners Enterprises, LLC",





]
};

//////////////////////////////////////////////////////////////////////////
/////////////////// DONT EDIT ANYTHING BELOW THIS LINE ///////////////////
//////////////////////////////////////////////////////////////////////////

function rotateText(el, textGroup) {
  setOpacity(el, 0);
  var t = rotateText.texts[textGroup];
  var t = t[Math.floor(Math.random() * (t.length - 1))];
  el.innerHTML = t;
  unfadeText(el, textGroup);
}

function setOpacity(el, value) {
  el.style.opacity = value / 100;
  el.style.filter = "alpha(opacity=" + value + ")";
}

function unfadeText(el, tg) {
  var v = el.style.opacity * 100 + 1;
  if(v > 100) {
    setOpacity(el, 100);
    setTimeout(bundleFunction(null, fadeText, [el, tg]), 10000);
    return;
  }
  setOpacity(el, v);
  setTimeout(bundleFunction(null, unfadeText, [el, tg]), 10);
}

function fadeText(el, tg) {
  var v = el.style.opacity * 100 - 1;
  if(v < 0) {
    setOpacity(el, 0);
    rotateText(el, tg);
    //or... setTimeout(bundleFunction(null, rotateText, [el, tg]), NUMBER);
    return;
  }
  setOpacity(el, v);
  setTimeout(bundleFunction(null, fadeText, [el, tg]), 10);
}

function bundleFunction(context, func, args) {
  context = context || null;
  if(typeof func == "string" && context)
    func = context[func];
  if(!args)
    args = [];
  else if(!(args instanceof Array))
    args = [args];
  return function() {
    return func.apply(context, args);
  };
}
