/*

	Internet Explorer - yellow 
	Internet Explorer 7 - orange 
	Gecko Engine on Windows (Firefox, Mozilla, Camino) - red 
	Gecko Engine on Linux (Firefox, Mozilla, Camino) - pink 
	Gecko Engine on Other OS (Firefox, Mozilla, Camino) - gray 
	Opera - green 
	Konqueror - blue 
	Safari - black 
	
	<style type="text/css">
	.ie .example {
	  background-color: yellow
	}
	.ie7 .example {
	  background-color: orange
	}
	.gecko .example {
	  background-color: gray
	}
	.win.gecko .example {
	  background-color: red
	}
	.linux.gecko .example {
	  background-color: pink
	}
	.opera .example {
	  background-color: green
	}
	.konqueror .example {
	  background-color: blue
	}
	.webkit .example {
	  background-color: black
	}
	.example {
	  width: 100px;
	  height: 100px;
	}
	.no_js { display: block }
	.has_js { display: none }
	.js .no_js { display: none }
	.js .has_js { display: block }
	</style>

*/
var css_browser_selector = function() {
	var 
		ua=navigator.userAgent.toLowerCase(),
		is=function(t){ return ua.indexOf(t) != -1; },
		h=document.getElementsByTagName('html')[0],
		b=(!(/opera|webtv/i.test(ua))&&/msie (\d)/.test(ua))?('ie ie'+RegExp.$1):is('gecko/')? 'gecko':is('opera/9')?'opera opera9':/opera (\d)/.test(ua)?'opera opera'+RegExp.$1:is('konqueror')?'konqueror':is('applewebkit/')?'webkit safari':is('mozilla/')?'gecko':'',
		os=(is('x11')||is('linux'))?' linux':is('mac')?' mac':is('win')?' win':'';
	var c=b+os+' js';
	h.className += h.className?' '+c:c;
}();