var detect = navigator.userAgent.toLowerCase();
var OS,browser,version,total,thestring;

if (checkIt('safari')) browser = "Safari"
else if (checkIt('opera')) browser = "Opera"
else if (checkIt('firefox')) browser = "FireFox"
else if (checkIt('msie')) browser = "IE"

else browser = "An unknown browser";

function checkIt(string)
{
	place = detect.indexOf(string) + 1;
	thestring = string;
	return place;
}


if (browser == "IE") {

document.write('<link rel="stylesheet" href="blue.css" type="text/css" />');
document.write("<div id='whaha'><h1 id='fatal'>Blue Screen of Death</h1><p id='fatalp'>A Fatal Error has occured because you're using IE. You may not continue until you get a better browser. </p> <p> In order to continue: </p> <p> * Get FireFox</p></div>")
}

else if (browser == "Opera") {

document.write('<link rel="stylesheet" href="red.css" type="text/css" />');
document.write("<div id='whole'><img src='ads/virus.gif' /><img src='ads/congrats.gif' /><img src='ads/spy.gif' /><img src='ads/ipod.gif' /><span></span><p>I thought a bunch of ads would be enough MAYHEM for the contest...But now I'm not so sure. Because I mean, if you've been using that browser for any time at all, you're probably pretty used to seeing stuff like this. Unless, of course, you were one of the poor demented souls who paid for their browser only to find out later that they were going to make it free anyways.</p></div>");
}

else if (browser == "Safari") {

document.write('<link rel="stylesheet" href="green.css" type="text/css" />');

}

else {
document.write('<link rel="stylesheet" href="main.css" type="text/css" />');
}