var selected_person = false;

function clearinfo(whichperson, whichlink) {
//alert('called' + amt_people)
	for(i=1;i<=amt_people;i++) 
	{
		var lgth = whichperson.length;
		var persons = 'people' + i;
		var txtlink = 'people' + i + '_details';
		var wlink = 'people_link' + i;

		var whichimg = document.getElementById(persons)	  	
		var txtlink = document.getElementById(persons + '_details')
		
		whichimg.src = 'images/' + persons + '_off.jpg';

		txtlink.style.display = 'none';
		document.getElementById(wlink).style.color = '#aaa';
	}
}


function swapinfo(whichperson, whichlink) 
{
	clearinfo(whichperson, whichlink);

	
	
	
	whichimg = document.getElementById(whichperson)
	var txtlink = document.getElementById(whichperson + '_details');

	whichimg.src = 'images/' + whichperson + '_on.jpg';
	selected_person = whichperson;
	txtlink.style.display = 'block';
	document.getElementById('peoplequote').src = 'images/' + whichperson + '_quote.gif';
	document.getElementById(whichlink).style.color = 'green';
} 

function showphoto(whichperson) 
{
	if(document.getElementById(whichperson).childNodes[0].nodeType == '3') 
	{
		whichimg = document.getElementById(whichperson).childNodes[1].firstChild;
	}
	else 
	{
		whichimg = document.getElementById(whichperson).childNodes[0].firstChild;
	}

	whichimg.src = 'images/' + whichperson + '_on.jpg';	
}

function hidephoto(whichperson) 
{
	if(document.getElementById(whichperson).childNodes[0].nodeType == '3') 
	{ 
		whichimg = document.getElementById(whichperson).childNodes[1].firstChild;
	}
	else 
	{
		whichimg = document.getElementById(whichperson).childNodes[0].firstChild;
	}
	if(whichperson != selected_person) 
	{
		whichimg.src = 'images/' + whichperson + '_off.jpg';
	}	
}
