/*--- Get random quote from Array 6 ---*/
/* Array 6 is Observations */
/* total number of arrays MUST always be divisible by 3 */

//Initialize GLOBAL variable
var randomNum = Math.floor(Math.random() * 6)+1;

function quoteget()
{

//REMOVE AFTER TESTING
//randomNum = 7;

// generate a random number between 1 and 6
// build the functon name including the random num
var funk = "getquote" + randomNum + "()";

//document.write(funk);

//execute the function
eval(funk);
}

function getqfile()
{

//document.write(randomNum + " ");

//get the right quote file ... reduce randomNum to 1,2,or 3
while (randomNum > 3)
{
randomNum = randomNum - 3;
}

// randomNum is now 1,2, or 3

// get correct URL
if (randomNum < 2)
{
// randomNum = 1, then news2me

//document.write("new2me");
window.location.href="xtra/news2me/index.html";

}
else if (randomNum < 3)
{
// randomNum = 2, then aphorism

//document.write("aphorism");
window.location.href="other/aphorisms/aphorism.html";

}
else
{
// randomNum = 3, then observations

//document.write("observations");
window.location.href="other/observations/observes.html";
	
}

}

/*--- EndOfFile ---*/

