daneuchar 0 Light Poster

i want to use two different css for firefox and chrome but unable to do it.. :( please help !! the code i tried is given below !!

<script>
function css_append(file){
	var css = document.createElement('link')
	css.setAttribute("rel", "stylesheet");
	css.setAttribute("type", "text/css");
	css.setAttribute("href", file);
	document.getElementByTagName("head")[0].appendChild(css)
}

if(navigator.userAgent.indexOf("Firefox") > -1){
	alert("Firefox");
	css_append('css/default_ff.css');
}
if(navigator.userAgent.toLowerCase().indexOf('chrome') > -1){
	alert("chrome");
	css_append('css/default_chrome.css');
}
</script>