//window.onerror = null;

fortunespan_obj = new Object();
motherspan_obj = new Object();
fortcode_obj = new Object();
fortcodealt_obj = new Object();

fortunes = new Array("You will be deeply offended<br> by what someone says......<br> That's life. Kiss my ass.",
  "Today you will die....a cat<br> related death. better watch<br> your back. MROW!!!",
  "You'll get some tonight. how<br> the fuck YOU managed that,<br> I don't know....",
  "A new opportunity will present<br> itself. Don't worry, you'll<br> blow it again, for<br> sure. Way to go, asshole.",
  "Confucius say 'Be kind to others,<br> and it will be returned<br> to you 10 fold.... <br>just kidding; they'll walk<br> all over you.<br>people suck ass'",
  "Happy Birthday! Blow out the<br>candles and make a wish! and<br>remember, it doesn't matter.<br> wishes are bullshit.",
  "Did you know that the Bible is<br>30% more absorbent than Charmin?<br> Quite a feat, since one comes<br> already full of shit",
  "Stop kidding yourself;<br>It's because you're<br> so goddamn ugly.",
  "I KNOW you're not getting any.<br>Have you considered that god's<br> trying to phase your line out?",
  "Keep masturbating; <br>I fucking hate kittens.",
  "Strive to reveal to others your <br> inner beauty. but in the<br>meantime, it wouldn't hurt<br> to show off the goods.",
  "Remember:<br>fortune telling is bullshit",
  "Buddy, I'm the only pussy<br> you're getting for<br> a LOOOOOONG time",
  "Your team will lose. That's<br> what you get for<br> believing in anything",
  "You'll win the lottery<br>....then blow it all<br> on booze.<br>Dumbass",
  "Opportunity will knock<br>...or maybe it's a hungry<br>grizzly bar.....<br> Ma!, git mah gun!",
  "In the future, I see<br>adventure and excitement<br>......just not for you",
  "Soon, you will make<br>a new friend. His name<br>is Jack. Jack Daniels.<br>He will become your best<br>and only friend",
  "You have a strong, noble<br>and interesting<br>character.....wait...<br>...wrong person. Uh, next?",
  "the world is a vampire....<br>but you're not.<br>turn off that Cure CD,<br>stop smoking cloves, and<br>stay away from<br>Hot Topic",
  "Ancient chinese wisdom say:<br>'repay a good turn<br>with another good<br>turn. Repay an injury....<br>with an icepick'",
  "You will find true happiness<br>in this life....or<br>maybe the next one<br>or the one after that.....",
  "The world is my litterbox<br>....like your couch for<br> example. sorry 'bout that...",
  "Fortune is smiling on you.<br> Or maybe that's death,<br> I forget",
  "I see good things in <br>the future. For other<br>people.",
  "Soon you will be sitting<br> on top of the world.<br>...When we launch you<br>into the sun",
  "The current week will<br>bring you much happiness.<br>Enjoy it. it's all<br>downhill afterwards",
  "A 6-legged cat will<br>defecate on your face<br>while you're sleeping.<br>and laugh<br>and laugh<br>and laaauugh...",
  "Try something different<br>You'll like the<br>results. It'll liven<br>up your pathetic<br>life",
  "You are talented in<br>many ways. Like breathing,<br>eating, and<br>crapping. That's<br>about it",
  "You will be showered<br> with good luck.<br>...I'm glad to hear<br>it...you needed<br>a shower, believe<br>me",
  "Your present plans are<br> going to succeed.<br>er....fail. I meant<br>fail.",
  "Respect your elders<br>...I heard they're<br>loaded and currently<br>writing up their will",
  "Crime doesn't pay<br>...unless it's called<br>'politics'",
  "You will receive a<br>letter of great<br>importance...but what's<br>that mysterious powder...?",
  "You feel a sense of<br> calm setting in....<br>WRONG!<br>The end is nigh!<br>In fact, it's next<br>Tuesday. Better get<br>1,000,000 sunblock",
  "Success cannot be<br>measured in material<br>goods.<br>....or at all.<br>Everybody sucks",
  "Who needs The Matrix<br>when you have this<br>artificial world.",
  "Be honest and<br>authentic and you<br>will fail at life",
  "If at first<br>you don't succeed<br>...take the fucking<br>hint",
  "Fool me once,<br>shame on you.<br>Fool me twice....<br>....I'll get you, bitch.",
  "I predict much<br>career success<br>...to a point.<br>Don't bump your<br>head on that<br>glass ceiling",
  "Good news will<br>come from afar<br>...in the form of bombs.<br>on your front lawn.<br>You're being liberated!<br>God Bless America",
  "I predict excellent<br>health.<br>For a while.<br>Then, you'll get<br>Ebola.<br>and herpes<br>and have 3 heart<br>attacks.",
  "You'll soon meet the<br>love of your life.<br>Just kidding. There's<br>no-one out there<br>for you. You'll<br>die alone, and<br>rats will eat you",
  "You will make a<br>profitable investment.<br>about 3 kilos worth<br>...just don't get<br>caught",
  "A surprise treat awaits you.<br>...Suprise! it<br> IS herpes after all",
  "Live in the now,<br>...and savor the<br>hardships you<br>brought upon yourself<br>by not planning<br>ahead.<br>dumbfuck",
  "Today will be joyous<br>unlike tomorrow<br>and the next day<br>and the next decade",
  "You will make a wise<br>business deal.<br>and then a stupid<br>one.<br>and live in the<br>gutter for the<br>rest of your life",
  "You have a natural<br>charisma that draws<br>many to you.<br>or could it be<br>your fine rack?",
  "The grass is always<br>greener on the other<br>side. On your side,<br>however, it will<br>always be brown and<br>trampled and covered<br>in dog crap",
  "Don't fret: things<br>will look better with<br>time.<br>or with alcohol",
  "You spread joy<br>and laughter everywhere<br>you go.<br>uh...they're<br>laughing WITH you,<br>I promise.....",
  "Today you will narrowly<br> escape a grizzly death.<br> only to meet another one.<br> lucky you. as they say<br> 'out of the frying pan,<br> into the grill<br> of that truck'",
  "Did you know that the Bible is<br>30% more absorbent than Charmin?<br>So is your country's<br>flag. try it out<br>sometime",
  "Always have confidence<br>in yourself.<br>YOU have no reason<br>to, but<br>people buy that shit",
  "Love isn't a battlefield,<br>it's a farm,<br>because men are<br>pigs and women<br>are bitches",
  "Good things come to<br>those who wait. But<br>first they come to<br>those who get off<br>their ass and just<br>take it.<br>carpe-motherfucking-diem",
  "All life is suffering,<br>punctuated by brief<br>moments of happiness.<br>I predict yours will<br>be no different.<br>Actually, it will be worse.<br>HA HA!",
  "None of your dreams<br>Will ever come true.<br>...Especially that one<br>with the truck full of<br> cheerleaders. Seriously, what<br>the hell were you thinking?",
  "Don't just get mad, and don't<br> just get even<br>Get Super Duper Even!<br>An eye, liver, spleen,<br>and two limbs for an<br>eye");

maxfortune = fortunes.length;
adcode = "<b><a href='http://doorknobsoft.com/fortunecat/'>Billy's Weird...cat...thing tells your fortune!</a></b>";

function makeobjs() {
	fortunespan_obj = document.getElementById('fortunespan');
	motherspan_obj = document.getElementById('motherspan');
	fortcode_obj = document.getElementById('fortcode');
	fortcodealt_obj = document.getElementById('fortcodealt');
}

function randfortune() {
	whichfortune = Math.floor(Math.random() * maxfortune);
	return fortunes[whichfortune];
}

function newestfortune() {
	fortunespan_obj.innerHTML = "<font size='2' color='black'><b>" + fortunes[maxfortune-1] + "</b></font>";
	showcode();
}

function catsayit() {
	fortunespan_obj.innerHTML = "<font size='2' color='black'><b>" + randfortune() + "</b></font>";
	showcode();
}

function showcode() {
	fortcode_obj.value = motherspan_obj.innerHTML + adcode;
	fortcodealt_obj.value = "[URL=http://www.doorknobsoft.com/fortunecat/][IMG]http://doorknobsoft.tripod.com/cgi-bin/cat_v2_reflog.pl?fortnum=" + (whichfortune+1) + "[/IMG]\n" + "Billy's Weird...cat...thing tells your fortune![/URL]";
}