var folders = new Array("frequency_foursquare", "frequency_haiku", "frequency_petrarchan", "frequency_snowball_by_char", "frequency_snowball_by_word", "frequency_tanka", "frequency_terza_rima", "frequency_two_towers", "frequency_doubling", "frequency_spenserian");

var folder = folders[Math.floor(Math.random()*folders.length)];

var selector = [Math.floor(Math.random()*200)];

function Page() {
window.location.href = "../" + folder + "/frequency_" + selector  + ".html"
}

function doNextpoem(page)
{
    window.setTimeout("Page()", 30*1000)
}

function doWordlist()
{
    window.setTimeout('window.location.href = "../frequency_info/frequency_wordlist.html"', 30*1000)
}

function doInfo()
{
    window.setTimeout('window.location.href = "../frequency_info/frequency_generator.html"', 30*1000)
}

function doProject()
{
    window.setTimeout('window.location.href = "../frequency_info/frequency_project.html"', 30*1000)
}

var x = [Math.floor(Math.random()*30)];

if (x == 1)
{
doInfo();
}
else if (x == 2)
{
doWordlist();
}
else if (x == 3)
{
doProject();
}
else
{
doNextpoem();
}

