
/* call add onload event -> see global.js
------------------------------------------------*/
addLoadEvent(workInit);

/*
 * Function to initiate the tabs
 */

function workInit() {
	var obj = document.getElementById('recentwork');
	if (obj) { // ensure an element with the ID of 'recentwork' exists
		var links = obj.getElementsByTagName('a');
		for (var i = 0; i < links.length; i++ ) {
			eval(" links[i].onclick = function(){ "+
				"showContent("+i+");"+
				"return false;"+
			"} ");
		}
	}
}

function showContent(obj) {
	document.getElementById('work_0').style.display = 'none';
	document.getElementById('work_1').style.display = 'none';
	document.getElementById('work_2').style.display = 'none';
	
	document.getElementById('work_'+obj).style.display = 'block';
}