function makeNews(l,f){
	this.link = l;
	this.follow = f;
	this.write = writeNews;
}

function writeNews(){
	var str = '';
        str +=  '' + this.link + '' + this.follow + '</a>';
	return str;
}

var newsArray = new Array();
newsArray[0] = new makeNews('<a href="/index_files/testimonials.html" />','View Customer Testimonials!').write();

newsArray[1] = new makeNews('<a href="https://www2.openbookasp.com/Default.aspx?tabid=1257" target="_blank" alt="Book Online Now!" onclick="pageTracker._link(this.href); return false;" />','Only 2 miles from Spokane Raceway').write();

newsArray[2] = new makeNews('<a href="https://www2.openbookasp.com/Default.aspx?tabid=1257" target="_blank" alt="Book Online Now!" onclick="pageTracker._link(this.href); return false;" />','Call For Military Discount').write();

newsArray[3] = new makeNews('<a href="/index_files/testimonials.html" />','View Customer Testimonials!').write();

newsArray[4] = new makeNews('<a href="https://www2.openbookasp.com/Default.aspx?tabid=1257" target="_blank" alt="Book Online Now!" onclick="pageTracker._link(this.href); return false;" />','Great for a night or a month!').write();

newsArray[5] = new makeNews('<a href="http://www.travel-spokane.com" target="_blank" alt="Spokane finest event resource" />','Visit The Essential Guide to Spokane').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()',6500);
}
function pauseNews() {
	if (timerID != null) {
		clearTimeout(timerID);
		timerID = null;
	}
}

function playNews() {
	if (timerID == null) {
		timerID = setTimeout('rotateNews()', 500);
	}
}

function startGallery() {
var myGallery = new gallery($('myGallery'), {
timed: true,
showArrows: false,
showCarousel: false
});
}
if (window.onDomReady) {
	window.onDomReady(startGallery);
}
else { window.onload = startGallery; }


