Safari and Chrome not accepting getElementsByTagName

Try this:

	if(orderLinesTable){
		alert ("before");
		linksInOrderLinesTable = orderLinesTable.getElementsByTagName("a");
		alert ("after");

if the orderLinesTable.getElementsByTagName causes the error, the second alert will not be executed.