// Flexible Image Slideshow- By JavaScriptKit.com (http://www.javascriptkit.com)
// For this and over 400+ free scripts, visit JavaScript Kit- http://www.javascriptkit.com/
// This notice must stay intact for use
function StringArray (n) {
	this.length = n;
	for (var i =1; i <= n; i++) {
		this[i] = ' '

	}
}

	quote = new StringArray(4)
	quote[0] = '<span class="ColorText1"><strong >"...we have a real plan of action to become debt free"</strong></span>'
	quote[1] = '<span class="ColorText1"><strong>"...there are two types of people"</strong></span>'
	quote[2] = '<span class="ColorText1"><strong>"...excited that we are saving $142,000."</strong></span>'
	quote[3] = '<span class="ColorText1"><strong>"...have a greater sense of security"</strong></span>'

	designation = new StringArray(4)
	designation[0] = "You have been so helpful and we really appreciate your help. We are so happy that we have a real ..."
	designation[1] = "When you told me there are two types of people, those who pay  interest ... "
	designation[2] = "Being a procrastinator it took me a few weeks to fill out the information to get my Free Analysis ... "
	designation[3] = "I will say April and I already have a greater sense of security and confidence in our financial future ... "

	author = new StringArray(4)
	author[0] = "<BR><strong>&ndash; Mike and Lisa</strong><br /><br />"
	author[1] = "<BR><strong>&ndash; Tricia K</strong><br /><br />"
	author[2] = "<BR><strong>&ndash; Robert and Lucinda</strong><br /><br />"
	author[3] = "<BR><strong>&ndash; Steve and April</strong><br /><br />"

	tImage = new StringArray(4)
	tImage[0] = '<img src="images/testimonials_pic4.jpg" width="75" height="83" align="right">'
	tImage[1] = '<img src="images/testimonials_pic5.jpg" width="75" height="83" align="right">'
	tImage[2] = '<img src="images/testimonials_pic6.jpg" width="75" height="83" align="right">'
	tImage[3] = '<img src="images/testimonials_pic7.jpg" width="75" height="83" align="right">'

	//configure the below 3 variables to set the dimension/background color of the slideshow
	var slidewidth="159px" //set to width of LARGEST image in your slideshow
	var slideheight="116px" //set to height of LARGEST iamge in your slideshow
	var slidecycles="continous" //number of cycles before slideshow stops (ie: "2" or "continous")
	var randomorder="no" //randomize the order in which images are displayed? "yes" or "no"
	var preloadimages="no" //preload images? "yes" or "no"
	var slidebgcolor=''

	//configure the below variable to determine the delay between image rotations (in miliseconds)
	var slidedelay=8000



//Do Not Configure Below
var ie=document.all
var dom=document.getElementById
var curcycle=0

var currentslide=0

function randomize(targetarray){
quoteCopy=new Array()
var the_one
var z=0
while (z<targetarray.length){
the_one=Math.floor(Math.random()*targetarray.length)
if (targetarray[the_one]!="_selected!"){
quoteCopy[z]=targetarray[the_one]
targetarray[the_one]="_selected!"
z++
}
}
}

if (randomorder=="yes")
randomize(quote)
else
quoteCopy=quote
var thebegin = '<p align="left">'
var thebreak = '</p><p align="left">'
var theq = ''
var theend = '</p>'
var theauthorbreak = ',</span><br><span class="">'

function rotateimages(){
curcycle=(currentslide==0)? curcycle+1 : curcycle
ultcontainer=''
if (quoteCopy[currentslide][1]!="")
{
var thequote = quote[currentslide]
var theImage = tImage[currentslide]
var theauthor = author[currentslide]
var thedesignation = designation[currentslide]
ultcontainer+= thebegin + theq + theImage + thequote + theq + thebreak + thedesignation + theauthorbreak + theauthor + theend
}
ultcontainer+=''
fader[0] = new fadeObj(0, 'fade0', '999999', 'ffffff', 30, 50, true);
fader[0].message[0] = ultcontainer;

/*if (ie||dom)
crossrotateobj.innerHTML=ultcontainer*/
fade(0, 0, true);
if (currentslide==quote.length-1) currentslide=0
else currentslide++
if (curcycle==parseInt(slidecycles) && currentslide==0)
return
setTimeout("rotateimages()",slidedelay)
}

/*if (ie||dom)
document.write('<div id="slidedom" style="width:'+slidewidth+';"></div>')*/

function start_slider(){
crossrotateobj=dom? document.getElementById("slidedom") : document.all.slidedom
rotateimages()
}