/***********************************************
* 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 = 6000; //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,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  id="quote">'; //set opening tag, such as font declarations
fcontent[	0	]="	This most impressive thing I&#39;ve noticed is how the instructors seemlessly go from teaching advanced students, then beginners.	<br><p align=right><font size=-1><i>-	Jeremy Bennett	</i></font>"
fcontent[	1	]="	[The instructors] are able to teach the kids that their achievements will be rewarded, but rewards aren&#39;t given just for showing up.	<br><p align=right><font size=-1><i>-	Jeremy Bennett	</i></font>"
fcontent[	2	]="	Great place for children to learn.	<br><p align=right><font size=-1><i>-	Jeremy Bennett	</i></font>"
fcontent[	3	]="	The staff is so professional and caring.	<br><p align=right><font size=-1><i>-	Monica Blacker	</i></font>"
fcontent[	4	]="	American Karate is a great place for kids and parents.	<br><p align=right><font size=-1><i>-	Shannon Mani	</i></font>"
fcontent[	5	]="	I love this place.	<br><p align=right><font size=-1><i>-	Shannon Mani	</i></font>"
fcontent[	6	]="	Mr. and Mrs. Gomez are awesome teachers.	<br><p align=right><font size=-1><i>-	Shannon Mani	</i></font>"
fcontent[	7	]="	They are very caring of their students.	<br><p align=right><font size=-1><i>-	Shannon Mani	</i></font>"
fcontent[	8	]="	They will work around your schedule.	<br><p align=right><font size=-1><i>-	Shannon Mani	</i></font>"
fcontent[	9	]="	The environment is very friendly.	<br><p align=right><font size=-1><i>-	Shannon Mani	</i></font>"
fcontent[	10	]="	I have made a many friends, boosted my self confidence.	<br><p align=right><font size=-1><i>-	Shannon Mani	</i></font>"
fcontent[	11	]="	I am learning many tricks and techniques of self defense.  As a girl I need this and my teachers are wonderfully teaching me these.	<br><p align=right><font size=-1><i>-	Shannon Mani	</i></font>"
fcontent[	12	]="	I am always looking forward to going to karate.	<br><p align=right><font size=-1><i>-	Shannon Mani	</i></font>"
fcontent[	13	]="	Check American Karate out. You will love it!!!	<br><p align=right><font size=-1><i>-	Shannon Mani	</i></font>"
fcontent[	14	]="	My daughter is in the 2nd grade and is 7 years old. She has been attending American Karate for 3 months now and has learned so much.	<br><p align=right><font size=-1><i>-	Brandie McManus	</i></font>"
fcontent[	15	]="	Mr. and Mrs. Gomez not only teach karate, they teach respect for others, self discipline, and the courage to protect yourself.	<br><p align=right><font size=-1><i>-	Brandie McManus	</i></font>"
fcontent[	16	]="	This class has enriched my daughter&#39;s life in ways that I cannot put into words.	<br><p align=right><font size=-1><i>-	Brandie McManus	</i></font>"
fcontent[	17	]="	[My daughter&#39;s] balance has improved, but she has gotten so much more than improved balance from American Karate & Self Defense.	<br><p align=right><font size=-1><i>-	Brandie McManus	</i></font>"
fcontent[	18	]="	My daughter&#39;s self-esteem has improved beyond comprehension.	<br><p align=right><font size=-1><i>-	Brandie McManus	</i></font>"
fcontent[	19	]="	My daughter thinks that she can do ANYTHING now and what else could a parent desire for their little girl?	<br><p align=right><font size=-1><i>-	Brandie McManus	</i></font>"
fcontent[	20	]="	Ray and Mary Gomez are fantastic.	<br><p align=right><font size=-1><i>-	Lisa Hernandez	</i></font>"
fcontent[	21	]="	You can tell instantly that they love the kids and love what they do.	<br><p align=right><font size=-1><i>-	Lisa Hernandez	</i></font>"
fcontent[	22	]="	You get a fantastic sense of family from everyone at the school.	<br><p align=right><font size=-1><i>-	Lisa Hernandez	</i></font>"
fcontent[	23	]="	The experience has made a great improvement in my sons ability to stay focused at school as well as at home.	<br><p align=right><font size=-1><i>-	Lisa Hernandez	</i></font>"
fcontent[	24	]="	If you want a school and instructors that care about your child and will teach them how to deal with everyday situations then this is the school for you!	<br><p align=right><font size=-1><i>-	Lisa Hernandez	</i></font>"
fcontent[	25	]="	[My son&#39;s] more confident, active, aspires to more and loves it.	<br><p align=right><font size=-1><i>-	Maria Frias	</i></font>"
fcontent[	26	]="	I have recently erolled myself and cant wait for all my hard work to show.	<br><p align=right><font size=-1><i>-	Maria Frias	</i></font>"
fcontent[	27	]="	AKSD is a great place to learn martial arts.	<br><p align=right><font size=-1><i>-	Anonymous	</i></font>"
fcontent[	28	]="	If you&#39;re just starting out, you can go as hard and fast or as slow and soft as you want.	<br><p align=right><font size=-1><i>-	Anonymous	</i></font>"
fcontent[	29	]="	You set your own pace and your own goals.	<br><p align=right><font size=-1><i>-	Anonymous	</i></font>"
fcontent[	30	]="	The instructors won&#39;t push you too far and won&#39;t let you slack off either.	<br><p align=right><font size=-1><i>-	Anonymous	</i></font>"
fcontent[	31	]="	This place really makes you feel like you&#39;re at home.	<br><p align=right><font size=-1><i>-	Anonymous	</i></font>"
fcontent[	32	]="	Excellent teaching: I must say, American Karate & Self Defense is the best thing to happen to my son.	<br><p align=right><font size=-1><i>-	Mrs. Morrison	</i></font>"
fcontent[	33	]="	The school teachs self respect, respect for others as well as goals...	<br><p align=right><font size=-1><i>-	Mrs. Morrison	</i></font>"
fcontent[	34	]="	You will be very happy with the Instructors and the classes.	<br><p align=right><font size=-1><i>-	examiner.com	</i></font>"
fcontent[	35	]="	Ray&#39;s American Karate School has a home like feeling of it&#39;s own.	<br><p align=right><font size=-1><i>-	Anonymous	</i></font>"
fcontent[	36	]="	You are treated very welcome the minute you walk through the door.	<br><p align=right><font size=-1><i>-	Anonymous	</i></font>"
fcontent[	37	]="	They have a great variety in age of the instructors, which I feel is important to address the range of age groups they teach.	<br><p align=right><font size=-1><i>-	Anonymous	</i></font>"
fcontent[	38	]="	Mrs. Gomez is very calm and patient, especially with the 4-6 age group. She takes time out to teach each child individually.	<br><p align=right><font size=-1><i>-	Anonymous	</i></font>"
fcontent[	39	]="	Mr. Gomez has a way of talking to the &#34;Little Dragons&#34; that draws out the kids interest. He asks the kids good questions in kid language that gets them thinking.	<br><p align=right><font size=-1><i>-	Anonymous	</i></font>"
fcontent[	40	]="	The instructors are absolutely awesome.	<br><p align=right><font size=-1><i>-	Anonymous	</i></font>"
fcontent[	41	]="	This is defintely a karate school that you can stay with throughout your karate years.	<br><p align=right><font size=-1><i>-	Anonymous	</i></font>"
fcontent[	42	]="	great school my grandchildren love the classes!	<br><p align=right><font size=-1><i>-	reggie45	</i></font>"
fcontent[	43	]="	My daughter is 9 years old and has been attending American Karate for 18 months. McKenzie loves going to karate and even loves helping with other classes.	<br><p align=right><font size=-1><i>-	Jennifer, Scott, and McKenzie Maner	</i></font>"
fcontent[	44	]="	Mr. and Mrs. Gomez are great instructors	<br><p align=right><font size=-1><i>-	Jennifer, Scott, and McKenzie Maner	</i></font>"
fcontent[	45	]="	We are very thankful for everything they do, and we feel very lucky to be a part of such a special place!	<br><p align=right><font size=-1><i>-	Jennifer, Scott, and McKenzie Maner	</i></font>"
fcontent[	46	]="	When you are at American Karate you feel at home.	<br><p align=right><font size=-1><i>-	Samantha	</i></font>"
fcontent[	47	]="	No matter what your belt level is... you feel powerful.	<br><p align=right><font size=-1><i>-	Samantha	</i></font>"
fcontent[	48	]="	Mr. and Mrs. Gomez are very friendly. They are always looking for ways to help me improve my karate.	<br><p align=right><font size=-1><i>-	Samantha	</i></font>"
fcontent[	49	]="	American Karate and Self Defense is Awesome!!!	<br><p align=right><font size=-1><i>-	Samantha	</i></font>"
fcontent[	50	]="	best school in dallas	<br><p align=right><font size=-1><i>-	Tony Mata	</i></font>"
fcontent[	51	]="	Awesome school!	<br><p align=right><font size=-1><i>-	Tracy Pogue Settimi	</i></font>"
fcontent[	52	]="	The Gomez family rocks!	<br><p align=right><font size=-1><i>-	Tracy Pogue Settimi	</i></font>"
fcontent[	53	]="	My two sons have thrived at American Karate and Self Defense.	<br><p align=right><font size=-1><i>-	mchatch	</i></font>"
fcontent[	54	]="	My two sons...have more self-control, self-respect, and self-confidence.	<br><p align=right><font size=-1><i>-	mchatch	</i></font>"
fcontent[	55	]="	Mr. and Mrs. Gomez give of their time in and out of class to make sure every student and parent feels welcome and wanted.	<br><p align=right><font size=-1><i>-	mchatch	</i></font>"
fcontent[	56	]="	Mr. Cmar, one of the instructors, has had a HUGE impact on my son, who was quiet, and unsure of himself.	<br><p align=right><font size=-1><i>-	mchatch	</i></font>"
fcontent[	57	]="	My son would do just about anything the Gomez&#39;s or Mr. Cmar says, because he knows they care and want what&#39;s best for him. He respects them, us, and most of all, himself.	<br><p align=right><font size=-1><i>-	mchatch	</i></font>"
fcontent[	58	]="	Our family can&#39;t say enough wonderful things about AK&SD.	<br><p align=right><font size=-1><i>-	mchatch	</i></font>"
fcontent[	59	]="	If you are considering starting your child, you can rest assured that whether he/she has behavior problems, confidence problems, or no problems, he/she will get the attention and information he/she needs to be successful at whatever is in his/her future.	<br><p align=right><font size=-1><i>-	mchatch	</i></font>"
fcontent[	60	]="	A lot of Karate schools are just money printing factories. This is different. Very clean. Great instructors. Good programs for the kids. 	<br><p align=right><font size=-1><i>-	martinkim	</i></font>"
fcontent[	61	]="	As a novice and white belt I was nervous but Ray made me feel right at home.	<br><p align=right><font size=-1><i>-	Cory	</i></font>"
fcontent[	62	]="	They are patient and help each student grow at an individual level.	<br><p align=right><font size=-1><i>-	Cory	</i></font>"
fcontent[	63	]="	I see a mix of young and old, fit and unfit walk in to this school and they all enjoy being part of this program	<br><p align=right><font size=-1><i>-	Cory	</i></font>"
fcontent[	64	]="	I highly recommend this school for adults and kids, it is a great family oriented environment.	<br><p align=right><font size=-1><i>-	Cory	</i></font>"



closetag='</div>';

var fwidth='50%'; //set scroller width

var screenw=(screen.width);
var galh=(50 + (64000 / screenw));
var fheight=(galh + "px"); //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=Math.floor(Math.random() * 65);


/*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=Math.floor(Math.random() * 61)
}

// 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="border:1px solid black;width:'+fwidth+';height:'+fheight+'"></div>');
document.write('<div id="fscroller" style="border:0px solid black;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
