There is no such script.
There are lot of function and properties which are uncommon between different browsers, so you have to find out browser and write compatible code.
The following script will help you:
<script language="javascript">
var ua = navigator.userAgent
if (ua.indexOf("Firefox")>0)
{
alert('Firefox!')
//firefox compatible code
}
else
{
alert('Other Browser!')
}
</script>