This is not a straight forward edit and would be completely custom. In a test that I did I was able to add a counter variable, then check for this value being divisible by four to allow for the <li> and </li> tags to be written. Here is the code from my test if you want to check that out to get an idea of how this can be done:
intermediate.php lines 38-42 original
<?php do { ?>
<?php if ($totalRows_ProductMenu > 0) { // Show if recordset not empty ?>
<li><span><a href="<?php echo($assumedRoot); ?>Products_Detail.php?ProductID=<?php echo $row_ProductMenu['ProductID']; ?>"><?php print $row_ProductMenu['ProductName']; ?></a></span></li>
<?php } // Show if recordset not empty ?>
<?php } while ($row_ProductMenu = mysql_fetch_assoc($ProductMenu)); ?></ul>
update these lines to this
<?php $i = 0; ?>
<?php do { ?>
<?php if ($totalRows_ProductMenu > 0) { // Show if recordset not empty ?>
<?php if($i % 4 == 0 || $i == 0) {?><li><?php } ?><span><a href="<?php echo($assumedRoot); ?>Products_Detail.php?ProductID=<?php echo $row_ProductMenu['ProductID']; ?>"><?php print $row_ProductMenu['ProductName']; ?></a></span><?php if($i % 4 == 0 && $i != 0) {?></li><?php } ?>
<?php } // Show if recordset not empty ?>
<?php $i += 1; ?>
<?php } while ($row_ProductMenu = mysql_fetch_assoc($ProductMenu)); ?></ul>