function mapa_handler(command, portAbbreviation){

var from = document.forms.searchOutwardRoute.from;
var to = document.forms.searchOutwardRoute.to;
		
	if (command=="departure") 
	{		
		updateList(from, portAbbreviation);
		updatePortsDestinations(from, to);
	}
	
	if (command=="arrival"){	
		updateList(to, portAbbreviation);
	}
}

function updateList(list, portAbbreviation){
for (var k=0; k<list.length; k++) 
{

	if(list[k].value==portAbbreviation){
	list.selectedIndex=k;
	}
}
}