I've created some CSS modifications but a Safari detector seems to be overwriting some of my modifications:

Code:
<script language="javascript" type="text/javascript">

if(navigator.userAgent.indexOf('Mac') > 5 && navigator.userAgent.indexOf('Safari') > 0)

{ document.write('<link href="templates/<?php /*?><?php echo $this->template ?><?php */?>/css/safari5.css" rel="stylesheet" type="text/css" />');}

</script>
.

What I need is a detector that says, if it is a Desktop Safari browser, use this stylesheet. If not, then just use this stylesheet.

Any suggestions?