//pre-load images
var listImg = new Image();
listImg.src = 'images/testimonials/kindermusik.gif';
var treeImg = new Image();
treeImg.src = 'images/testimonials/rebath_logo.gif';
var listImg2 = new Image();
listImg2.src = 'images/testimonials/eg_tax.gif';

function makeNews(c,l,s, f,i){
	this.copy = c;
	this.link = l;
	this.sign = s;
	this.follow = f;
	this.img = i;
	this.write = writeNews;
}

function writeNews(){
	var str = '';
	str += '<ul style="padding:10px 0px 5px 0px; margin:0px" class="testimonialcontent"><p>'+ this.copy ;
	str += '<img border="0" align="left" src="' + this.img.src + '">';
	str += '<br/>' + this.sign + '<br/>';
        str +=  '<small><a rel="nofollow" href="' + this.link + '" target="_blank">' + this.follow + '</a></small></p>  </ul>  ';
	return str;
}

var newsArray = new Array();
newsArray[0] = new makeNews("&quot;We began &rsquo;Musical Pathways&rsquo; without any brand recognition from scratch with mailing lists.  We began with 24 families, and have grown to 275 families.&quot; <br/>", 'http://www.musicalpathways.net/', '<small>Betsy Flanagan<br/>Director<br>Musical Pathways Foundation<br/>(an affiliate of Kindermusik)</small>' , 'www.musicalpathways.net',listImg).write();

newsArray[1] = new makeNews("&quot;Direct mail has, by far, the highest closing rate.&quot;<br/>",'http://www.rebath.com', '<small>Jim Whalen<br/>Owner<br/>Rebath of Rochester LLC</small>', 'www.rebath.com',treeImg).write();

newsArray[2] = new makeNews("&quot;We have been using your services for several years, and I can&rsquo;t tell you what an asset USADATA has been to our firm.&quot;<BR/><BR/>&quot;I am happy to report that each year since we started working with USADATA we&rsquo;ve seen a continued increase in revenue. We have over 24 offices in Western New York, and your lists have helped us successfully satisfy several new locations, by enabling our continued growth.&quot; <br/>", 'http://www.egtax.com', '<small>Tiffany Fabian<br/>Corporate Development Director<br>EG Tax</small>' , 'www.egtax.com',listImg2).write();





var nIndex = 0;
var timerID = null;
function rotateNews(){
	var len = newsArray.length;
	if(nIndex >= len)
		nIndex = 0;
	document.getElementById('stories').innerHTML = newsArray[nIndex];
	nIndex++;
	timerID = setTimeout('rotateNews()',6000);
}
function pauseNews() {
	if (timerID != null) {
		clearTimeout(timerID);
		timerID = null;
	}
}

function playNews() {
	if (timerID == null) {
		timerID = setTimeout('rotateNews()', 6000);
	}
}
// JavaScript Document