// Chooses a background image, and set of comments

function whichLandscape()
{
var r = Math.random();

// ******* Bears *******

if (r<0.17)
{ document.getElementById('wrapper').style.backgroundImage="url(images/layout/bears.jpg)";
comments = [ 
"<span class=\"white\">You say, \"arghhh\"<\/span>",
"<span class=\"white\">You say, \"Oh n&mdash;\"<\/span>",
"<span class=\"white\">You say, \"help meeeeeee!\"<\/span>",
"<span class=\"yellow\">Bear<\/span> <span class=\"purple\">claws you for <span class=\"red\">44.3<\/span> points of damage!<\/span>",
"<span class=\"yellow\">Bear<\/span> <span class=\"purple\">claws you for <span class=\"red\">46.1<\/span> points of damage!<\/span>",
"<span class=\"yellow\">Bear<\/span> <span class=\"purple\">claws you for <span class=\"red\">46.8<\/span> points of damage!<\/span>",
"<span class=\"yellow\">Bear<\/span> <span class=\"purple\">claws you for <span class=\"red\">48.6<\/span> points of damage!<\/span>",
"<span class=\"yellow\">Bear<\/span> <span class=\"purple\">claws you for <span class=\"red\">50.3<\/span> points of damage!<\/span>",
"<span class=\"yellow\">Bear<\/span> <span class=\"purple\">claws you for <span class=\"red\">51.9<\/span> points of damage!<\/span>",
"<span class=\"yellow\">Bear<\/span> <span class=\"purple\">critically claws you for <span class=\"red\">100.8</span> points of damage!<\/span>",
"<span class=\"yellow\">Bear<\/span> <span class=\"purple\">critically claws you for <span class=\"red\">105.9</span> points of damage!<\/span>",
"<span class=\"yellow\">Bear<\/span> <span class=\"purple\">critically claws you for <span class=\"red\">106.6</span> points of damage!<\/span>",
"<span class=\"purple\">You score a glancing hit on <span class=\"yellow\">Bear<\/span> for <span class=\"green\">4.0<\/span> points of damage!<\/span>",
"<span class=\"purple\">You score a glancing hit on <span class=\"yellow\">Bear<\/span> for <span class=\"green\">4.1<\/span> points of damage!<\/span>",
"<span class=\"purple\">You score a glancing hit on <span class=\"yellow\">Bear<\/span> for <span class=\"green\">3.9<\/span> points of damage!<\/span>",
"<span class=\"purple\">You miss <span class=\"yellow\">Bear<\/span>!<\/span>",
"<span class=\"purple\">You miss <span class=\"yellow\">Bear<\/span>!<\/span>",
"<span class=\"purple\">You miss <span class=\"yellow\">Bear<\/span>!<\/span>",
"<span class=\"purple\">You critically fumble!<\/span>"]; }


// ******* Dungeon *******

else if (r<0.33)
{ document.getElementById('wrapper').style.backgroundImage="url(images/layout/dungeon.jpg)";
comments = [ 
"<span class=\"green\">Sera<\/span> <span class=\"yellow\">Ronin<\/span> <span class=\"white\">says, \"What was the problem?\"<\/span>",
"<span class=\"yellow\">Pyromaniac &loz;<\/span> <span class=\"white\">says, \"it takes all of your ap\'s\"<\/span>",
"<span class=\"green\">Sera<\/span> <span class=\"yellow\">Ronin<\/span> <span class=\"white\">says, \"Okay, thanks. Cause I was going to make one soon.\"<\/span>",
"<span class=\"yellow\">Iwid Militia<\/span> <span class=\"purple\">pierces you for <span class=\"red\">87.7<\/span> points of damage!<\/span>",
"<span class=\"yellow\">Iwid Militia<\/span> <span class=\"purple\">pierces you for <span class=\"red\">83.1<\/span> points of damage!<\/span>",
"<span class=\"yellow\">Iwid Militia<\/span> <span class=\"purple\"> scores a glancing hit on you for <span class=\"red\">4.8<\/span> points of damage!<\/span>",
"<span class=\"yellow\">Iwid Watchman<\/span> <span class=\"purple\"> scores a glancing hit on you for <span class=\"red\">1.9<\/span> points of damage!<\/span>",
"<span class=\"yellow\">Iwid Watchman<\/span> <span class=\"purple\"> scores a glancing hit on you for <span class=\"red\">2.2<\/span> points of damage!<\/span>",
"<span class=\"yellow\">Iwid Watchman<\/span> <span class=\"purple\"> misses you!<\/span>",
"<span class=\"yellow\">Iwid Warrior<\/span> <span class=\"purple\">criticaly fumbles!<\/span>",
"<span class=\"yellow\">Iwid Warrior<\/span> <span class=\"purple\">misses you!<\/span>",
"<span class=\"yellow\">Iwid Mage<\/span> <span class=\"purple\">uses <span class=\"blue\">Lightning<\/span> (Green)!<\/span>",
"<span class=\"aqua\">It's Dawn<\/span>",
"ACE <span class=\"yellow\">BudMan<\/span> <span class=\"white\">says, \"hey\"<\/span>"]; }


// ******* Mountain *******

else if (r<0.5)
{ document.getElementById('wrapper').style.backgroundImage="url(images/layout/mountain.jpg)";
comments = [
"<span class=\"yellow\">Roland<\/span> <span class=\"white\">says, \"Childe Roland to the Dark Tower came\"<\/span>",
"<span class=\"yellow\">Blowden<\/span> <span class=\"white\">says, \"Those were some amazing books\"<\/span>",
"<span class=\"yellow\">Roland<\/span> <span class=\"white\">says, \"Favorite series, hands down.\"<\/span>",
"<span class=\"yellow\">Blowden<\/span> <span class=\"white\">says, \"I\'d probably have to say the same. I\'d like to reread them soon\"<\/span>",
"<span class=\"yellow\">Roland<\/span> <span class=\"white\">says, \"Yeah, I\'ve been reading a few of the little ones that tie into it.\"<\/span>",
"<span class=\"yellow\">Blowden<\/span> <span class=\"white\">says, \"I\'ve heard a lot of his books do\"<\/span>",
"<span class=\"yellow\">Roland<\/span> <span class=\"white\">says, \"Yeah, like 20 or more.\"<\/span>",
"<span class=\"yellow\">Blowden<\/span> <span class=\"white\">says, \"I agree\"<\/span>",
"<span class=\"yellow\">Roland<\/span> <span class=\"white\">says, \"I would too\"<\/span>",
"<span class=\"yellow\">Duke LiathLuachra &loz;<\/span> <span class=\"white\">tells you, \"Good morning.\"<\/span>",
"<span class=\"yellow\">Duke LiathLuachra &loz;<\/span> <span class=\"white\">tells you, \"And where have you been lately?\"<\/span>",
"<span class=\"white\">LiathLuachra &mdash; (Email hidden)<br \/>x???? y????, Level 125, Druid \/ Green \/ Male \/ Gifted<br\/>LiathLuachra is an associate to: Culhuch, Likimeya"]; }


// ******* Midnight *******

else if (r<0.66)
{ document.getElementById('wrapper').style.backgroundImage="url(images/layout/midnight.jpg)";
comments = [
"ACE <span class=\"yellow\">Sammuel<\/span> <span class=\"white\">says, \"dont you just love this game? ;)\"<\/span>",
"<span class=\"aqua\">It's Midnight<\/span>",
"<span class=\"yellow\">Kirby &loz;<\/span> <span class=\"white\">says, \"argh midnight\"<\/span>",
"<span class=\"yellow\">Kirby &loz;<\/span> <span class=\"white\">says, \"noooooo!\"<\/span>",
"<span class=\"yellow\">Kirby &loz;<\/span> <span class=\"white\">says, \"this is ridiculous\"<\/span>",
"<span class=\"red\">It's too dark for you to attack that target<\/span>",
"<span class=\"red\">It's too dark for you to attack that target<\/span>",
"<span class=\"yellow\">Zombie<\/span> <span class=\"purple\">attacks but misses you!<\/span>",
"<span class=\"yellow\">Zombie<\/span> <span class=\"purple\">attacks but misses you!<\/span>",
"<span class=\"orange\">Your Torch burned out<\/span>",
"<span class=\"orange\">Your Lantern burned out<\/span>",
"<span class=\"orange\">Your Candle burned out<\/span>"
]; }


// ******* Sand *******

else if (r<0.83)
{ document.getElementById('wrapper').style.backgroundImage="url(images/layout/sand.jpg)";
comments = [
"<span class=\"aqua\">It is afternoon<\/span>",
"<span class=\"white\">You tell <span class=\"green\">Sera<\/span> <span class=\"yellow\">beweartheboogaI<\/span>, \"hey booga whats up?\"<\/span>",
"<span class=\"white\">You tell <span class=\"green\">Sera<\/span> <span class=\"yellow\">beweartheboogaI<\/span>, \"cmon man\"<\/span>",
"<span class=\"white\">You tell <span class=\"green\">Sera<\/span> <span class=\"yellow\">beweartheboogaI<\/span>, \"cmon...\"<\/span>",
"<span class=\"white\">You tell <span class=\"green\">Sera<\/span> <span class=\"yellow\">beweartheboogaI<\/span>, \"is it anything like the alchemist potions?\"<\/span>",
"<span class=\"white\">You tell <span class=\"green\">Sera<\/span> <span class=\"yellow\">beweartheboogaI<\/span>, \"come on man. just tell me, no big deal.\"<\/span>",
"<span class=\"white\">You tell <span class=\"green\">Sera<\/span> <span class=\"yellow\">beweartheboogaI<\/span>, \"i dont even care about specifics\"<\/span>",
"<span class=\"green\">Sera<\/span> <span class=\"yellow\">beweartheboogaI<\/span> <span class=\"white\">tells you, \"if its no big deal y u keep asking?\"<\/span>",
"<span class=\"green\">Sera<\/span> <span class=\"yellow\">beweartheboogaI<\/span> <span class=\"white\">tells you, \"hey\"<\/span>",
"<span class=\"green\">Sera<\/span> <span class=\"yellow\">beweartheboogaI<\/span> <span class=\"white\">tells you, \"u already got ur hint\"<\/span>",
"<span class=\"green\">Sera<\/span> <span class=\"yellow\">beweartheboogaI<\/span> <span class=\"white\">tells you, \"and i did give u a hint\"<\/span>",
"<span class=\"green\">Sera<\/span> <span class=\"yellow\">beweartheboogaI<\/span> <span class=\"white\">tells you, \"if i tell u will u shut up??\"<\/span>",
"<span class=\"green\">Sera<\/span> <span class=\"yellow\">beweartheboogaI<\/span> <span class=\"white\">tells you, \"?\"<\/span>",
"<span class=\"white\">Equipping item...<\/span><br \/><span class=\"blue\">Your Maximum Damage increased by<\/span> <span class=\"green\">25.7<\/span>",
"<span class=\"white\">Equipping item...<\/span><br \/><span class=\"blue\">Your Maximum Damage increased by<\/span> <span class=\"red\">-25.7<\/span>"
]; }


// ******* Grass *******

else
{ document.getElementById('wrapper').style.backgroundImage="url(images/layout/grass.jpg)";
comments = [ 
"<span class=\"yellow\">White Rabbit<\/span> <span class=\"purple\">attacks but misses you!<\/span>",
"<span class=\"yellow\">Brown Rabbit<\/span> <span class=\"purple\">attacks but misses you!<\/span>",
"<span class=\"yellow\">Black Rabbit<\/span> <span class=\"purple\">attacks but misses you!<\/span>",
"<span class=\"blue\">You feel more powerful (<span class=\"white\">36<\/span> progression points)<\/span><br \/><span class=\"yellow\">Brown Rabbit<\/span> <span class=\"purple\">was killed<\/span>",
"<span class=\"blue\">You feel more powerful (<span class=\"white\">36<\/span> progression points)<\/span><br \/><span class=\"yellow\">White Rabbit<\/span> <span class=\"purple\">was killed<\/span>",
"<span class=\"blue\">You feel more powerful (<span class=\"white\">36<\/span> progression points)<\/span><br \/><span class=\"yellow\">Black Rabbit<\/span> <span class=\"purple\">was killed<\/span>",
"<span class=\"white\">You see<\/span> <span class=\"yellow\">Syke the Ranger<\/span> (100% health, experience level 0)</span>",
"<span class=\"yellow\">Syke's Uneasy Dreams<\/span> <span class=\"white\">has been updated in your Quest Log<\/span>",
"<span class=\"white\">Interacting with Syke the Ranger...<\/span>",
"<span class=\"blue\">You received<\/span> <span class=\"white\">7 Copper Coins<\/span>",
"<span class=\"blue\">You received<\/span> <span class=\"white\">13 Copper Coins<\/span>",
"<span class=\"blue\">You received<\/span> <span class=\"white\">19 Copper Coins<\/span>",
"<span class=\"red\">Czar<\/span> <span class=\"yellow\">GhostRider<\/span> <span class=\"white\">says, \"hey, can i help u?\"<\/span>",
"<span class=\"red\">Czar<\/span> <span class=\"yellow\">GhostRider<\/span> <span class=\"white\">says, \"yum yum, Bunnies! :P\"<\/span>",
"<span class=\"red\">Czar<\/span> <span class=\"yellow\">GhostRider<\/span> <span class=\"white\">says, \"If you need help just ask for it!\"<\/span>",
"<span class=\"red\">Czar<\/span> <span class=\"yellow\">GhostRider<\/span> <span class=\"white\">says, \"Bunnies are cool! :D\"<\/span>",
"<span class=\"red\">Czar<\/span> <span class=\"yellow\">GhostRider<\/span> <span class=\"white\">says, \"let me know when u reach level 15\"<\/span>",
"<span class=\"red\">Czar<\/span> <span class=\"yellow\">GhostRider<\/span> <span class=\"white\">says, \"Tell me when u are heading for Zatras Tomb...\"<\/span>",
"<span class=\"red\">Czar<\/span> <span class=\"yellow\">GhostRider<\/span> <span class=\"white\">says, \"What class are u gonna go for?\"<\/span>",
"<span class=\"blue\">You gained an attribute point!<\/span>"]; }



// Picks a random comment

function randomComment() {
var comment = comments[Math.floor(Math.random()*comments.length)]; 
document.write("<p>" + comment + "</p>"); }



// Chooses how many comments should appear

var manyComments = Math.random();
if (manyComments<0.1)
{ many = 1; }

else if (manyComments<0.6)
{ many = 2; }

else if (manyComments<0.9)
{ many = 3; }

else
{ many = 4; }

while (many >= 1) 
{ randomComment();
many = many - 1; }


}