var newsDelay = 6000;
var newsBlankDelay = 300;
var Threshold = 0; //0=all reviews, 1=all news.
var index;
var oldIndex;
var textReview = "Check out our great reviews! Click here...";
//var textOther = "The Flu can be bad, Swine flu isn&#39;t";
//var textOther = "Have you caught the FEAR bug?";
//var imgOther = "news.flu.gif";
//var imgOther = "news.fear.gif";
//var linkOther = "index.flu.html";
//var linkOther = "index.fear.html";
//var textOther = "Limited space left. Check out NEW 2009 to 2010 TOURS!";
//var imgOther = "news.limitedspace.gif";
//var linkOther = "index.tourslist.cya.html";
//var textOther = "Professors and Teachers take note! We now have tours in JULY! Click here for more info...";
//var imgOther = "news.july.gif";
//var linkOther = "index.tours.july.html";
//var textOther = "Slide-Show Presentations in Ottawa (Oct.12) and Toronto (Oct.19). Click for details.";
//var imgOther = "news.presentation.gif";
//var linkOther = "index.slideshow.html";
var textOther = "Check out our NEW TOURS! 10% for earlybirds!";
var linkOther = "index.tours.html";

var Reviews = new Array();

var thisReview = 0;

Reviews[thisReview++] = "This was a really great tour! The guides are very...";
Reviews[thisReview++] = "I&#39;ve never enjoyed a tour more... I will be scheduling another...";
Reviews[thisReview++] = "...terrific guides...we will definately be back for another trip...";
Reviews[thisReview++] = "It may have been a &#39;budget tour&#39; but it was a 1st class adventure...";
Reviews[thisReview++] = "They avoid the tourist buddle and love the people and culture...";
Reviews[thisReview++] = "...experience Mexico and push your limits on a bicycle...";
Reviews[thisReview++] = "I loved the tour and look forward to another...";
Reviews[thisReview++] = "I saw places I would have never seen on my own...";
Reviews[thisReview++] = "Best way to see a side of Mexico that most tourists would miss...";
Reviews[thisReview++] = "...the face of Mexico away from the tourist resorts...";
Reviews[thisReview++] = "Beautiful Mayan ruins, white sandy beaches, clear cool cenotes...";
Reviews[thisReview++] = "...far exceeded my expectations...";
Reviews[thisReview++] = "I can't speak highly enough of the tours...";
Reviews[thisReview++] = "A most excellent adventure! I recommend it...";
Reviews[thisReview++] = "...best choice for any traveller wanting a truly authentic experience...";

var anchor = document.getElementById ("newsLink");

index = Math.random()
if (index<Threshold) {
	anchor.href = linkOther;
	anchor.innerHTML = textOther;
	index = 0;
}
else {
	index = Math.floor(Math.random()*Reviews.length)
//	document.getElementById("newsLink").href = "index.r"+index+".html";
	anchor.href = "index.r"+index+".html";
	anchor.innerHTML = Reviews[index];
}
oldIndex = index;
timeOutNews=setTimeout('ChangeNews()',newsDelay/2);
//timeOutNews=setTimeout('ChangeNews()',newsDelay*2);



function ChangeNews() {
//	document.images["newsImg"].src = "news.blank.gif";
	timeOutNews=setTimeout('ChangeNews2()',newsBlankDelay);
}

function ChangeNews2() {
	index = Math.random()
	if (oldIndex==0) index = Threshold;
	if (index<Threshold || Threshold==1) {
		anchor.href = linkOther;
		anchor.innerHTML = textOther;
		index = 0;
	}
	else {
		index = Math.floor(Math.random()*Reviews.length)
		if (oldIndex==index) {
			index-=index;
			if (index==0) index=Reviews.length-1;
		}
		document.getElementById("newsLink").href = "index.r"+index+".html";
		anchor.href = "index.r"+index+".html";
		anchor.innerHTML = Reviews[index];
	}
	oldIndex = index;
	timeOutNews=setTimeout('ChangeNews()',newsDelay);
}






//	document.writeln('<a xhref="popups/presentations.html" xtarget="popup" href="javascript:PopupPresentation()"><img src="http://nocache.bikemexico.com/news.presentation.gif" width="200" height="100" alt="Slide-show presentation in Ottawa (Sept.29) and Toronto (Oct.6)" hspace=0 vspace=0 border=0 name="Slide-show presentation in Ottawa (Sept.29) and Toronto (Oct.6)"></a>');
//	document.writeln('<a href="index.tours.new.html"><img src="news.new.gif" width="200" height="100" alt="Check out our new 2005-2006 season. Register early for 10% off!" hspace=0 vspace=0 border=0 name="Check out our new 2005-2006 season. Register early for 10% off!"></a>');
//	document.writeln('<a href="index.tours.esm.html"><img src="news.july.gif" width="200" height="100" alt="Professors and Teachers take note! We now have tours in JULY!" hspace=0 vspace=0 border=0 name="Professors and Teachers take note! We now have tours in JULY!"></a>');

