/**
 * Useragent and CSS Checker
 * Adam Shannon (Radiant Web Design)
 * 2009-11-27
 */

var ua = navigator.userAgent.toString().toLowerCase();
var head = document.getElementsByTagName('head')[0];
var css_elm = document.createElement('link');
	css_elm.rel = 'stylesheet';
	css_elm.type = 'text/css';

	if (ua.match(/msie/)) {
		
		// Check for which version
		if (ua.match(/msie\s8\.0/)) {
			css_elm.href = './inc/css/ie8.css';
		} else if (ua.match(/msie\s7\.0/)) {
			css_elm.href = './inc/css/ie7.css';
		}	else {
			css_elm.href = './inc/css/ie6.css';
		}
		
	} else {
		
		// Add the normal (webkit/gecko) css.
		css_elm.href = './inc/css/style.css';
		
	}
	
	// Now add the element to the <head>
	head.appendChild(css_elm);