the navigation uses the MainNavigation recordset. there is a variable created by the recordset for the number of rows.
$totalRows_MainNavigation
in your code for the navigation:
<?php do { ?>
<li><a href="<?php echo $row_MainNavigation['URL']; ?>"><?php echo $row_MainNavigation['PageName']; ?></a></li>
<?php } while ($row_MainNavigation = mysql_fetch_assoc($MainNavigation)); ?>
add a counter to determine if it is the last record, if so, set the border to none:
<?php $counter = 1;?>
<?php do { ?>
<li><a href="<?php echo $row_MainNavigation['URL']; ?>" <?php if($counter == $totalRows_MainNavigation ) echo("style=\"border:0px;\""); ?>><?php echo $row_MainNavigation['PageName']; ?></a></li>
<?php $counter++; ?>
<?php } while ($row_MainNavigation = mysql_fetch_assoc($MainNavigation)); ?>