Probably it would be something like this (Disclaimer: This is typed off the top of my head and not tested but should put you in the right direction):
In product.php find:
Code:
$smarty->assign("product",$product_info);
BEFORE add:
Code:
if (intval($product_info['manufacturerid']) > 0)
$product_info['manufacturer'] = func_query_first_cell("SELECT manufacturer FROM $sql_tbl[manufacturers] WHERE manufacturerid='" . $product_info[manufacturerid] . "'");
Then in your skin1/customer/main/product.tpl you can use
Code:
<a href="manufacturers.php?manufacturerid={$product.manufacturerid}">{$product.manufacturer}</a>