function getRandomFact(){
	var strSearch = document.location.search;
	var bTestMode = false;
	if (strSearch.length==0) {
		var nRandom = parseInt(Math.random()*arrayFacts.length,10);
	}
	else {
		bTestMode = true;
		var nRandom = Number(strSearch.substring(1));
	}
	var strFact = arrayFacts[nRandom];
	if (bTestMode) {
		var strURL = document.location.href;
		strURL = strURL.substring(0, strURL.indexOf("?")+1);
		strURL = strURL + (nRandom+1).toString();
		strFact += "<br><br><a href=\""+strURL+"\">Click here for the next fact.</a>"
	}
	return strFact;
}
