// return the part-name for an image
function get_image_name (id) {
	return id;
}
function switch_off (element) {
//	alert ('disabling ' + element);
	document.getElementById ('switch_'+element).style.visibility = 'hidden';
	document.getElementById (element).src = 'images/layout/btn_'+get_image_name(element)+'.jpg';
}
function switch_on (element) {
//	alert ('enabling ' + element);
	document.getElementById ('switch_'+element).style.visibility = 'visible';
	document.getElementById (element).src = 'images/layout/btn_'+get_image_name(element)+'_over.jpg';
}

function switch_select (element) {
	if (element == 'recentnews' || element=='previousnews') {

		if (element == 'recentnews')
			switch_on ('recentnews');
		else
			switch_off ('recentnews');

		if (element == 'previousnews')
			switch_on ('previousnews');
		else
			switch_off ('previousnews');

	} else if (element == 'articles1' || element == 'articles2' || element == 'articles3' || element == 'articles4' || element == 'articles5') {
		if (element == 'articles1')
			switch_on ('articles1');
		else
			switch_off ('articles1');

		if (element == 'articles2')
			switch_on ('articles2');
		else
			switch_off ('articles2');

		if (element == 'articles3')
			switch_on ('articles3');
		else
			switch_off ('articles3');

		if (element == 'articles4')
			switch_on ('articles4');
		else
			switch_off ('articles4');

		if (element == 'articles5')
			switch_on ('articles5');
		else
			switch_off ('articles5');

	} else if (element == 'events1' || element == 'events2' || element == 'events3') {
		if (element == 'events1')
			switch_on ('events1');
		else
			switch_off ('events1');

		if (element == 'events2')
			switch_on ('events2');
		else
			switch_off ('events2');

		if (element == 'events3')
			switch_on ('events3');
		else
			switch_off ('events3');
	}
}