
// Colin McCloskey
// Pseudo-Random Image Selector for blockFire

function getRandom(ran) {
	currentdate = new Date();
	core = currentdate.getSeconds();
	core = Math.floor(core/ran);
	return(core);
}

function StringArray (n) {
	this.length = n;
	for (var i =1; i <= n; i++) {
		this[i] = ' ';
	}
}

function writeSplash(format, folder_prefix) {
	var currentdate = 0;
	var core = 0;
	
	if (folder_prefix == null)
		folder_prefix = "";

	imagedir = folder_prefix + "images/splash/";
	image = new StringArray(41);
	image[0] = imagedir + 'gray_daveprom.gif';
	image[1] = imagedir + 'gray_cyborg.gif';
	image[2] = imagedir + 'gray_justindrink.gif';
	image[3] = imagedir + 'gray_keelyhead.gif';
	image[4] = imagedir + 'scream_gray_pixelate.gif';
	image[5] = imagedir + 'point_gray_pixelate.gif';
	image[6] = imagedir + 'gray_squirrel.gif';
	image[7] = imagedir + 'gray_drewupclose.gif';
	image[8] = imagedir + 'gray_gregconfused.gif';
	image[9] = imagedir + 'gray_tonypete.gif';
	image[10]= imagedir + 'gray_hallowchicks.gif';
	image[11]= imagedir + 'gray_anticolin.gif';
	image[12]= imagedir + 'gray_nightvision.gif';
	image[13]= imagedir + 'gray_voodoo.gif';
	image[14]= imagedir + 'gray_hamletstrike.gif';
	image[15]= imagedir + 'gray_colinsquint.gif';
	image[16]= imagedir + 'gray_heatersit.gif';
	image[17]= imagedir + 'gray_socklove.gif';
	image[18]= imagedir + 'gray_janetgrowl.gif';
	image[19]= imagedir + 'gray_colinugmo.gif';
	image[20]= imagedir + 'gray_balloonparty.gif';
	image[21]= imagedir + 'gray_monica.gif';
	image[22]= imagedir + 'gray_tonystare.gif';
	image[23]= imagedir + 'gray_htboobs.gif';
	image[24]= imagedir + 'gray_ruthanneat.gif';
	image[25]= imagedir + 'gray_alienglow.gif';
	image[26]= imagedir + 'gray_assvision.gif';
	image[27]= imagedir + 'gray_crackup.gif';
	image[28]= imagedir + 'gray_headband.gif';
	image[29]= imagedir + 'gray_homecookin.gif';
	image[30]= imagedir + 'gray_intelligentia.gif';
	image[31]= imagedir + 'gray_jumpcar.gif';
	image[32]= imagedir + 'gray_lifestructure.gif';
	image[33]= imagedir + 'gray_pamterror.gif';
	image[34]= imagedir + 'gray_smilepony.gif';
	image[35]= imagedir + 'gray_startwithus.gif';
	image[36]= imagedir + 'gray_microbike.gif';
	image[37]= imagedir + 'gray_ddr.gif';
	image[38]= imagedir + 'gray_fosho.gif';
	image[39]= imagedir + 'gray_windowbust.gif';
	image[40]= imagedir + 'gray_cuteness.gif';

	alt = new StringArray(41);
	alt[0] = '\\fatDOG\\ Dave Heliotis enjoys his senior prom with Janet Lubas, Dennis Chin, and Aubrey Strohl';
	alt[1] = '\\fatDOG\\ Big Brother is watching. Now more than ever.';
	alt[2] = '\\fatDOG\\ Ever the slick hombre, Justin lewis eyes our cameras in formal dress.';
	alt[3] = '\\fatDOG\\ Kicking back between performances of Babes in Arms, Colin McCloskey observes Keely Swan twisting her head away from Drew Housten and his camera.';
	alt[4] = '\\fatDOG\\ Colin McCloskey screams his head off in the hallway between acts of Babes in Arms.';
	alt[5] = '\\fatDOG\\ Steve Stirling and Colin McCloskey call out crazy at a Housten xmas party 2000.';
	alt[6] = '\\fatDOG\\ Squirrel Fight! Squirrel Fight! Squirrel Fight! Squirrel Fight! Ditta Ditta Ditta Otcha Otcha Otcha Dit Da!';
	alt[7] = '\\fatDOG\\ Drew Housten bumps into his own camera. Excited isnt he?';
	alt[8] = '\\fatDOG\\ Greg Sydlowski sits down the morning following prom. Poor kid looks all tuckered out.';
	alt[9] = '\\fatDOG\\ Sporting each others duds, Tony and Pete make a statment.';
	alt[10]= '\\fatDOG\\ Liz, Leslie, and Nell enjoy halloween.. a little too much.';
	alt[11]= '\\fatDOG\\ Colin sports his favorite teeshirt and stares down one of many poparazzi cameras.';
	alt[12]= '\\fatDOG\\ Mike Lee can see for twenty-five feet in the dark! Ahh, technology today.';
	alt[13]= '\\fatDOG\\ Dont mess with Kristin or she will voodoo your ass fast!';
	alt[14]= '\\fatDOG\\ Rawson throws the Hamletisms at you like no other!';
	alt[15]= '\\fatDOG\\ Colin squints right past an excited Glenda to the viewer. Imagine!';
	alt[16]= '\\fatDOG\\ Who says you shouldnt sit on heaters in school gymnasiums? REBEL!';
	alt[17]= '\\fatDOG\\ WE LOVE FEET!!!!! In a general photographic sort of way, not a weird fetish kind of way... no worries.';
	alt[18]= '\\fatDOG\\ Never mess with Janet Lubas';
	alt[19]= '\\fatDOG\\ Colin is doing a good job of looking ugly for our sketch artists';
	alt[20]= '\\fatDOG\\ Cheering for your school often involves a balloon hat and the look of a badass.';
	alt[21]= '\\fatDOG\\ UH UH UH! Restrain yourself because Monica is going crazy!';
	alt[22]= '\\fatDOG\\ Ooooh.. looking mean Mr Bacigalupo. Dangerous.';
	alt[23]= '\\fatDOG\\ HT shows off the benefits of his latest surgery for our heat-sensitive camera equipment.';
	alt[24]= '\\fatDOG\\ Eat that chicken! Ruthann chows down some birthday cake but we just cannot seem to focus properly.';
	alt[25]= '\\fatDOG\\ Evan chows down on some steak marinate - but whats that glowing light coming from?';
	alt[26]= '\\fatDOG\\ Greg is Mr FixIt - bending over that DVD player to make the film play like it never has before!';
	alt[27]= '\\fatDOG\\ Joel? Are you okay? Joel!? Stop cracking up down there!';
	alt[28]= '\\fatDOG\\ Ninja Colin sports the latest in ninja garb - the watered down head band of dooooom!';
	alt[29]= '\\fatDOG\\ No one can man a grill like Sean Shealy. Hands down the grill MASTER.';
	alt[30]= '\\fatDOG\\ Dave serenades passersby in Colonial Park... and looks so with it while hes at it';
	alt[31]= '\\fatDOG\\ Pubert rides like a dream. Especially when a cartoon rendering of Colin rides the hood!';
	alt[32]= '\\fatDOG\\ Could we have positioned that building behind Life Force Drew any better?';
	alt[33]= '\\fatDOG\\ Scariest picture ever taken. A little known fact: Pam actually ate my arm off after taking this picture.';
	alt[34]= '\\fatDOG\\ Not doctored at all, this is real material... The Pupanator and Colinski look hilarious!';
	alt[35]= '\\fatDOG\\ You wanna start something? Didnt think so. No messin with the Cassie and the Colin';
	alt[36]= '\\fatDOG\\ Time to get tricky with the fatDOG microbiking team. Captain Colin rolls the halls';
	alt[37]= '\\fatDOG\\ Nothing like an addictive video game that involves jumping around and getting sweaty with friends';
	alt[38]= '\\fatDOG\\ Flip us off, Jeff. I dare you.';
	alt[39]= '\\fatDOG\\ Forty-one counts of splash image perpetration and counting';
	alt[40]= '\\fatDOG\\ Awww. Stick that tongue out Pete. Smile nicely, Leslie. Awww.';

	var ran = 60/image.length;
	core = getRandom(ran);

	// Write one random splash image:
	if (format != 1)
		document.write("<IMG width='320' height='240' border='0' alt='" + alt[core] + "' src='" + image[core] + "'>");
	
	// Write all splash images out of a loop:
	else
		for (ipic=0; ipic < image.length; ipic++)
			document.write("<IMG width='320' height='240' border='0' alt='" + alt[ipic] + "' src='" + image[ipic] + "'><BR><BR>");
}
