// This file contains randomizing code for the TUGO Website;
// it is responsible for the images in the corner and the
// text next to the counter.

// It's meant mainly for TUGO site maintainers to see/edit.
// So if you're just some tech-savvy bugger who decided to
// look up our source on a whim, I feel it is my duty to
// inform you that you are, in fact, a n00b.

// And on a related note, you just lost the game. ;]



// Set up the arrays
var tehPix = new Array()		//character pictures
var tehAlts = new Array()		//alternate texts
var tehFunnies = new Array()	//counter quotes

// Array data goes here. Simply add lines to this as you
// add character pictures / counter quotes. Be sure to 
// update the array index accordingly, and make sure the
// alt-texts match the pictures (e.g. "Sonic" has the same
// array index as char_sonic.png).
tehPix[0] = "char_mario.png";
tehPix[1] = "char_sonic.png";
tehPix[2] = "char_ratchet.png";
tehPix[3] = "char_shepard.png";
tehPix[4] = "char_link.png";
tehPix[5] = "char_snake.png";
tehPix[6] = "char_samus.png";
tehPix[7] = "char_pacman.png";
tehPix[8] = "char_fox.png";
tehPix[9] = "char_agent47.png";
tehPix[10] = "char_banjokazooie.png";
tehPix[11] = "char_conker.png";
tehPix[12] = "char_donkeykong.png";
tehPix[13] = "char_masterchief.png";
tehPix[14] = "char_kirby.png";
tehPix[15] = "char_slycooper.png";

tehAlts[0] = "Mario";
tehAlts[1] = "Sonic";
tehAlts[2] = "Ratchet & Clank";
tehAlts[3] = "Commander Shepard (Mass Effect)";
tehAlts[4] = "Link (Legend of Zelda)";
tehAlts[5] = "Solid Snake (Metal Gear)";
tehAlts[6] = "Samus Aran (Metroid)";
tehAlts[7] = "Pac-Man";
tehAlts[8] = "Fox McCloud (Starfox)";
tehAlts[9] = "Agent 47 (Hitman)";
tehAlts[10] = "Banjo & Kazooie";
tehAlts[11] = "Conker";
tehAlts[12] = "Donkey Kong";
tehAlts[13] = "Master Chief (Halo)";
tehAlts[14] = "Kirby";
tehAlts[15] = "Sly Cooper";

tehFunnies[0] = "people fail at life.";
tehFunnies[1] = "people can't do a Barrel Roll.";
tehFunnies[2] = "n00b5 c4n7 r34d 7h15 |V|355463.";
tehFunnies[3] = "people will randomly explode in the next 60 seconds.";
tehFunnies[4] = "people have tragically perished in internet flamewars.";
tehFunnies[5] = "people can't afford a PS3.";
tehFunnies[6] = "people know Candlejack in pers-";
tehFunnies[7] = "WoW addicts have been harmed in the making of this website.";
tehFunnies[8] = "characters are CONFIRMED FOR BRAWL.";
tehFunnies[9] = "people can't find the ANY key.";
tehFunnies[10] = "people have misplaced their pants.";
tehFunnies[11] = "MUFFINS!!!!!!!!!!";
tehFunnies[12] = "people must now make a DC 50 will save to preserve their sanity.";
tehFunnies[13] = "? NO! NOBODY EXPECTS THE SPANISH INQUISITION!!";
tehFunnies[14] = "people are being stalked by Jack Thompson.";
tehFunnies[15] = "people are robots in disguise.";
tehFunnies[16] = "dollars are missing from your wallet.";
tehFunnies[17] = "people missed our last meeting because they couldn't find parking at Towson.";
tehFunnies[18] = "people still can't find Waldo.";
//tehFunnies[19] = "";



// Randomization and stuff
var p = tehPix.length;
var q = tehFunnies.length;
var sekret = Math.round(Math.random()*(20-1))
var whichPic = Math.round(Math.random()*(p-1));
var whichLine = Math.round(Math.random()*(q-1));
var howMany = Math.round(Math.random()*(5000-1));



// showPic function to display character in corner.
// Pic printed is chosen from tehPix with matching
// alternate text from tehAlts. Also activates the
// "secret" link on occasion.
function showPic()
{
	if (sekret == 1)
	{
		document.write('<a href="lolsekret.htm"><img border="0" align="absbottom" src="'+tehPix[whichPic]+'" alt="'+tehAlts[whichPic]+'"></a>');
	}
	else
	{
		document.write('<img border="0" align="absbottom" src="'+tehPix[whichPic]+'" alt="'+tehAlts[whichPic]+'">');
	}
}



// showCounter function prints a string of text chosen
// from tehFunnies, directly after the counter code.
function showCounter()
{
	if(whichLine != 13)
	{
		document.write(" " + tehFunnies[whichLine]);
	}
	else
	{
		document.write(tehFunnies[whichLine]);
	}
}




about = new Image();
about.src = "about2.png";

schedule = new Image();
schedule.src = "schedule2.png";

contact = new Image();
contact.src = "contact2.png";