Most likely it is an issue with the function, but it also looks like there is some syntax funkiness and an extra space in...
maketd(makehref("Company-Products.php? SWCompanyID=".$id."&Company=".$company,"",$company)) ;
Also, it might clear some stuff up if you got rid of the concatenation and just did...
maketd(makehref("Company-Products.php?SWCompanyID=$id&Company=$company","$company")) ;
(I'm assuming the makehref() function has two parts, the url and the company name.)