var current = 0;

function swapimg( show ){

	var piece = new Array();
	var title = new Array();
	var size = new Array();
	var meta = new Array();


	piece[0] = 'images/web/009.jpg';
	title[0] = 'Ideal World Group';
	size[0] = 'I made the design for this website for a Chinese company in Beijing.';
	meta[0] = '';

	piece[1] = 'images/web/011.jpg';
	title[1] = 'Solomon Wang';
	size[1] = 'A small portfolio site I made for graphic designer Solomon Wang (a good friend of mine). Some paintings by Greg Padfield are on display and actually for sale now is see... <br>Click <a href="http://www.solomonwang.com" target="blank">HERE</a> to open';
	meta[1] = '';

	piece[2] = 'images/web/006.jpg';
	title[2] = 'Lida Tode';
	size[2] = 'Website for my mom, Interim Manager Lida Tode. <br>Click <a href="http://www.lidatode.com" target="blank">HERE</a> to open';
	meta[2] = '';

	piece[3] = 'images/web/001.jpg';
	title[3] = 'Stichting evenementen';
	size[3] = 'A young and fresh website for Stichting Evenementen, an organisation that organises summer camps for children. I made the flash banner change apearance according to the time of the day. <br>Click <a href="http://www.st-evenementen.nl/" target="blank">HERE</a> to test it (Try playing with the time settings of your computer).';
	meta[3] = '';

	piece[4] = 'images/web/005.jpg';
	title[4] = 'Bellevue Apeldoorn';
	size[4] = 'This flash-based website shows folder information about recreations and events in Apeldoorn (city in Holland). <br>Click <a href="http://www.bellevueapeldoorn.nl" target="blank">HERE</a> to open';
	meta[4] = '';

	piece[5] = 'images/web/003.jpg';
	title[5] = 'Lentink Painters';
	size[5] = 'The goal of this tiny website was to show everything on one page and showing the visitor all he/she needs to see with as little mouse-clicks as possible. Unfortunetely they&rsquo;ve replaced my website with a very crappy one and messed up my logo. It just hurts to see... <br>Click <a href="http://www.schildersbedrijf-apeldoorn.nl/tab_over%20Lentink.html" target="blank">HERE</a> to open';
	meta[5] = '';

	piece[6] = 'images/web/007.jpg';
	title[6] = 'Jeremy Goldkorn & Maya Alexandri';
	size[6] = 'A website I designed for these two writers/journalists. I never know if they used it or not, because I was hired by someone as middle-man to make a quick design.';
	meta[6] = '';

	piece[7] = 'images/web/008.jpg';
	title[7] = 'Hoeksch Beershop';
	size[7] = 'A webshop I made using the osCommerce php module for "Hoeskche Waard", a beer brewer in Holland.';
	meta[7] = '';

	piece[8] = 'images/web/004.jpg';
	title[8] = 'Delchi';
	size[8] = 'This design didn&rsquo;t quite turn out the way I wanted it to in the first place due to some disagreements with the client. Also none of the logo&rsquo;s I made for them (about 14 of them) were approved, so I ended up making a logo "together" with the client at home in Microsolf Paint or Word or something. Something that didn&rsquo;t put in my portfolio here, for good reasons. Anyway, the Content Management System behind this website was still very good. See it <a href="http://www.delchi.nl" target="blank">HERE</a>.';
	meta[8] = '';

	piece[9] = 'images/web/010.jpg';
	title[9] = 'Old Portfolio';
	size[9] = 'My old portfolio, in flash. <br>Click <a href="http://www.niekoptende.nl/old" target="blank">HERE</a> to see.';
	meta[9] = '';

	piece[10] = 'images/web/002.jpg';
	title[10] = 'Bao Wushu';
	size[10] = 'A website for 3-times world champion wushu and a good friend, Baoxian Fei. Unfortunately the domain-name expired...';
	meta[10] = '';

	piece[11] = 'images/web/012.jpg';
	title[11] = 'Niek in China';
	size[11] = 'A simple design for my blog here in China. Didn&rsquo;t update it for a while though...';
	meta[11] = '';


	document.getElementById( 'featured' ).src = piece[show];
	document.getElementById( 'featured' ).alt = title[show];
	document.getElementById( 'featuretitle' ).innerHTML = title[show];
	document.getElementById( 'featuresize' ).innerHTML = size[show];
	document.getElementById( 'featuremeta' ).innerHTML = meta[show];
	
	for( i = 0; i < meta.length; i++ ){
		document.getElementById( 'item' + i ).style.opacity = '1';
	}
	document.getElementById( 'item' + ( show ) ).style.opacity = '.6';
	
	current = ( show );
	
	if ( current == 0 ){
		document.getElementById( 'previous' ).style.display = 'none';
	}
	else{
		document.getElementById( 'previous' ).style.display = '';
	}
	if ( current == (meta.length - 1) ){
		document.getElementById( 'next' ).style.display = 'none';
	}
	else{
		document.getElementById( 'next' ).style.display = '';
	}
}


function next(){
	working = current;
	swapimg( working + 1 );
}

function previous(){
	working = current;
	swapimg( working - 1 );
}
