/* SEThorian.net v5.1 webdesign */
var numberOfFiles = 4;
var currentBackground;

/*
 * This function randomly choses a background out of all available background themes.
 */
function choseBackground(){
	if(currentBackground == null){
		var selectedBackground = Math.floor(Math.random() * numberOfFiles);
		document.getElementById('container').style.backgroundImage = 'url(img/v5.1/bg_' + selectedBackground + '.jpg)';
	}
}

/*
 * This function dynamically changes the text on the imagebar section for the graphics and
 * websites pages. If the id argument equals 0, then no text is shown. (Onmouseout event.)
 */
function changeText(id){
	var text;	

	if(id == 0){
		// Onmouseout event text; display no text.
		text = "";
	} else {
		// Onmouseover event; decide what page this is and then, based on the id, show the 
		// appropriate text.
		var pageUrl = window.location.pathname;
		var pageName = pageUrl.substring(pageUrl.lastIndexOf('/') + 1);
		
		if(pageName == "graphics.html"){
			switch(id){
			case 1:
				text = 	"<p class='content'>Each year, at the end of it, I make a christmas card to send out to all friends and stalkers. Mind you; I always manage to send the card a <em>wee</em> bit too late.</p><br />" + 
						"<p class='content'>The 2005 Christmascard holds a special spot, and that's because it involves my favorite comic characters and a <strong>lot</strong> of hard work. I drew the entire Duck-family on a big poster. Each character, with the exception of the three nephews, was drawn seperately. In total, I drew about 8 or 9 A4 sized sheets of paper full with Donald Duck, his family and the background. I then scanned them all and inked and colored it all together in Photoshop. All in all, I finished it on late Boxingday and it turned out to be too large to view on a normal screen. Still, I got a lot of positive reactions from people, quite a few thinking I just sent a Disney created card. Evidently, that was quite the compliment... ;)</p><br />" + 
						"<p class='content'>Also, if you click on this image, you'll get the slighty smaller version as the large version will still leave you scrolling - even with a widescreen monitor.</p><br />";
			break;
				
			case 2:
				text = 	"<p class='content'>Each year, at the end of it, I make a christmas card to send out to all friends and stalkers. Mind you; I always manage to send the card a <em>wee</em> bit too late.</p><br />" +
						"<p class='content'>In 2006 I thought of this simple idea, already three months in advance of the holiday itself; why not give everybody a peek into my Christmas shoppings? Three months passed and I finally saw the excuse to realise it. What came out of it is the drawing you can click on; It shows me shopping for presents and yet, somehow, my girlfriend seems to be getting the most attention! Well, I suppose that's justified, eh?</p>";
			break;
				
			case 3:
				text = 	"<p class='content'>Each year, at the end of it, I make a christmas card to send out to all friends and stalkers. Mind you; I always manage to send the card a <em>wee</em> bit too late.</p><br />" +
						"<p class='content'>For the 2008 card I wanted to make something pretty as the 2007 card was one I wasn't very happy with, graphically.</p><br />" +
						"<p class='content'>So, in good Christmascard-tradition, fast forward to the days <em>after</em> Christmas, this is what I had come up with; a peek at all of the Christmas cards we receive here at home. Of course, this card ended up being more of a comic, but I'm happy with that. ^_^</p>";
			break;
				
			case 4:
				text = 	"<p class='content'>Each year, at the end of it, I make a christmas card to send out to all friends and stalkers. Mind you; I always manage to send the card a <em>wee</em> bit too late.</p><br />" +
						"<p class='content'>With the new year looming over the calendar, some people have the habit of making new year resolutions. My personal view however is that new year resolutions are bullshit. Therefore, I wanted to show something I find to be far more important: to be prepared for whatever the next year might bring. Of course, in order to be prepared I <em>really, obviously,</em> needed to have a katana with me.</p><br />" +
						"<p class='content'>Also: spot the references!</p>" + 
						"<ul><li>Team Fortress 2</li><li>Half-Life 1</li><li>Half-Life 2</li><li>Left 4 Dead</li><li>Band of Brothers</li><li>Star Trek</li><li>Dragonball</li><li>Dragon, the Bruce Lee story</li><li>Enter the Dragon</li><li>Bruce Lee</li><li>Harry Potter</li><li>Kill Bill</li><li>iPad</li><li>Up</li></ul>";
			break;
				
			// Both cases apply to rage comic pages thus share the same text; lack of break is intentional.
			case 5:
			case 6:
				text = 	"<p class='content'>In an attempt to get better at drawing, I decided to start drawing a comic for no other purpose than to improve myself. It didn't require much of a plot, since I just wanted to focus on the drawing. But then what would the plot be? I knew I needed at least <em>something</em> to motivate me to keep going...</p><br />" +
						"<p class='content'>Thankfully, YouTube turned out to have the answer; when browsing one day I came across a childhood favorite cartoon of mine: Dragonball.</p><br />" +
						"<p class='content'>I decided to create a comic based on Dragonball; the plot wouldn't be overly thick and would allow for plenty of practice with facial expression, human anatomy and perspectives.</p><br />" +
						"<p class='content'>If you feel like reading more of this, <a href='http://rage.sethorian.net'>click here</a>. Beware: my update cycle is not what it should be.</p>";
			break;
				
			case 7:
				text =	"<p class='content'>Apparently, at MTV Networks it's considered a bit of a sport to personalize the company logo in your email footer. So when a certain someone asked me to personalize one for her, I was quite excited.</p><br />" +
						"<p class='content'>The excitement came from the challenge; I had never used a company logo as base for artwork before nor do I usually work with bright colors. The change seemed interesting.</p><br />" +
						"<p class='content'>Thankfully, the work proved as interesting as the premise and this is what came out. Also note: most of the pixelart was handdrawn. (Save the rainbow and sun and the actual logo template. I used some Photoshop trickery there.)</p>";
			break;
				
			case 8:
				text = 	"<p class='content'>Each year, at the end of it, I make a christmas card to send out to all friends and stalkers. Mind you; I always manage to send the card a <em>wee</em> bit too late.</p><br />" +
						"<p class='content'>In 2011 my therapists were slightly worried in my increased interest in gore where the subscribed medication should've <em>decreased</em> this. I was taught to channel my emotions and then this is what you get for Christmas. A slightly worrisome but amusing card. Erm. I think.</p><br />";
			break;
			}
		} else if(pageName == "websites.html"){
			switch(id){
			case 1:
				text = 	"<p class='content'>Der Schneepass (pronounced in an authentic Austrian accent) was a college assignment where I had to create a simple JSP website with basic functionality.</p><br />" +
						"<p class='content'>It was interesting to see what the Java equivalent of PHP could do and a nice assignment. In the end though, I found this assignment quite easy and therefore focused more on the looks. It worked!</p>";
				break;
				
			case 2:
				text =	"<p class='content'>I have worked on various <a href='http://en.wikipedia.org/wiki/Mod_(computer_gaming)' target='_blank'>modifications</a> for Half-Life. One of these was <a href='http://reissues.sethorian.net/'>Reissues</a>.</p><br />" +
						"<p class='content'>When the need for a website arose, I offered to make one. The end result is what you see here.</p><br />"  +
						"<p class='content'>The website's look was based on the request to keep it as graphically simple and subtle as possible as well as lightweight. The simple but functional design is the end result.</p>";
				break;
				
			case 3:
				text =	"<p class='content'>While in college I got a bit of an odd request: to make a hip-hop styled website for a bunch of other students. Their assignment was to create a magazine in that theme and they thought it would be a nice touch to also show a potential website.</p><br />" +
						"<p class='content'>Intrigued, I accepted. You see, I'm not quite... how do I put this?... <em>down</em> with the hip crowd, so hip-hop isn't really the theme I usually work with. Still, I found it to be an interesting deviation from what I normally work with. Not to mention: colors! I got to use nearly every base color; that was a first!</p>";
				break;
				
			case 4:
				text =	"<p class='content'>When I was still working with ASM ('Who?', you ask; they do technical mumbo jumbo with complex sounding stuff such as 'semiconductors') one of my assignments was to make a proposal design for the new local intranet. This is what I whipped out.</p><br />" +
						"<p class='content'>Technically, this was my first <em>professional</em> website design and I was, and still am, quite happy with the outcome; it matched the company colors and design but was more modern and slick than what was present at the time. The initial response was good. Unfortunately, that's where it ended, as soon the company had to downgrade and I didn't get to implement it. A pity.</p>";
				break;
			}
		}
	}
	
	// Set the text to the imagebar.
	document.getElementById('imagebar').innerHTML = text;
}

