var lastactive='nav_nfs';

function changepic(picture_url)
{
if (document.images)
	{
	if (NS4)
		{
		document.carrierport.document.personport.document.images.picture.src = picture_url;
		}
	else
		{
		document.images.picture.src = picture_url;			
		}
	}
}

function selectnav(nav)
{
if (document.images)
	{
	if (NS4)
		{
		document.maincontent.document.images[lastactive].src = "img/arrow2_off.gif";
		document.maincontent.document.images[nav].src = "img/arrow2.gif";
		}
	else
		{
		document.images[lastactive].src = "img/arrow2_off.gif";
		document.images[nav].src = "img/arrow2.gif";
		}
	}
lastactive = nav;
}


function writeinfoport(person)
{

var personindex=0;

while (peoplebase[personindex][0].lastIndexOf(person) < 0) { personindex++; }

info = "<table width=200 cellpadding=0 cellspacing=0 border=0><tr><td width=200 colspan=2 class=infoportheader><center>";
info = info + peoplebase[personindex][1] + "</center></td></tr><tr><td width=200 colspan=2><img width=200 height=4 border=0 src=\"img/bkg_info_spacer.gif\"></td></tr>";
if (peoplebase[personindex][2] != "")
	{
	info = info + "<tr><td valign=top width=65 class=infoportbody><b>";
	if (peoplebase[personindex][3] == "") { info = info + "&nbsp;Currently:"; } else { info = info + "&nbsp;Office:"; }
	info = info + "</b></td><td width=135 class=infoportbody>" + peoplebase[personindex][2] +"</td></tr>";
	}
if (peoplebase[personindex][3] != "" ) { info = info + "<tr><td valign=top width=65 class=infoportbody><b>&nbsp;Phone:</b></td><td width=135 class=infoportbody>" + peoplebase[personindex][3] + "</td></tr>"; }
if (peoplebase[personindex][4] != "" ) 
	{
	info = info + "<tr><td valign=top width=65 class=infoportbody><b>&nbsp;E-mail:</b></td><td width=135 class=infoportbody><a href=\"mailto:" + peoplebase[personindex][4] + "\">";
	if (peoplebase[personindex][4].length > 22)
		{
		info = info + peoplebase[personindex][4].substring(0,peoplebase[personindex][4].indexOf("@")+1) + " " + peoplebase[personindex][4].substring(peoplebase[personindex][4].indexOf("@")+1,peoplebase[personindex][4].length);  
		}	
	else
		{
		info = info + peoplebase[personindex][4]; 
		}
	info = info + "</a></td></tr>";
	}
info = info + "</table>";
	
if (NS4) 
	{
	with (document.carrierport.document.infoport.document) 
		{
    		open();
		write(info);
		close();
    		}
  	}   
else if (NS6)
	{
	document.getElementById("infoport").innerHTML = info;
	}
else
	{
	document.all.infoport.innerHTML = info;
	}
}

function updateinfo(person)
{
selectnav('nav_' + person);
changepic('img/people/' + person + '.jpg');
writeinfoport(person);
}