This is exactly what I was looking for few weeks ago. Actually I think you can try something like this:
Code:
if($row["category"] == 'XXX') {
<a href="javascript:decision('I confirm that I have completed 18+ years','details.php?id=350117&hit=1&catalog=xxx')"><b> $dispname </b></a>
}
else {
<a href="details.php?id=350117&hit=1&catalog=xxx')"><b> $dispname </b></a>
}
Or something like that. Edit it until it works, haven't tested it but it should work. I'll try it myself tomorrow.